added parent delete popup + endpoint
This commit is contained in:
@ -6,13 +6,14 @@
|
||||
{% block extra-head %}{% endblock %}
|
||||
{% endblock %}
|
||||
{% block main %}
|
||||
{% csrf_token %}
|
||||
<div class="list-wrapper">
|
||||
<div class="list-header">
|
||||
<button class="new">New {{ class_name }}</button>
|
||||
</div>
|
||||
<ul class="list">
|
||||
{% for element in elements %}
|
||||
<li data-id="{{ element.id }}" class="{% block extra-class %}{% endblock %}">
|
||||
<li data-id="{{ element.id }}" data-name="{% block element-name %}{% endblock %}" class="{% block extra-class %}{% endblock %}">
|
||||
{% block element %}{% endblock %}
|
||||
<div class="actions">
|
||||
{% block actions %}{% endblock %}
|
||||
@ -23,4 +24,14 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="popup" id="delete-popup">
|
||||
<div class="popup-container">
|
||||
<h2 class="title">Delete <span class="elmt-name"></span> ?</h2>
|
||||
<p class="desc">{% block delete-desc %}{% endblock %}</p>
|
||||
<div class="actions">
|
||||
<button class="cancel">Cancel</button>
|
||||
<button class="delete">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
@ -3,8 +3,10 @@
|
||||
{% block title %}Parents{% endblock %}
|
||||
{% block extra-head %}
|
||||
<link rel="stylesheet" href="{% static "parents.css" %}">
|
||||
<script src="{% static "parents.js" %}"></script>
|
||||
{% endblock %}
|
||||
{% block extra-class %}{% if element.is_productive %}productive{% endif %}{% endblock %}
|
||||
{% block element-name %}{{ element.name }}{% endblock %}
|
||||
{% block element %}
|
||||
<div class="name">{{ element.name }}</div>
|
||||
{% if element.project_num %}
|
||||
@ -13,4 +15,13 @@
|
||||
{% endblock %}
|
||||
{% block actions %}
|
||||
<button class="edit">Edit</button>
|
||||
{% endblock %}
|
||||
<button class="delete">Delete</button>
|
||||
{% endblock %}
|
||||
{% block delete-desc %}
|
||||
Are sure you want to delete <span class="elmt-name"></span> ?
|
||||
This action is <u>IRREVERSIBLE</u> ! By deleting this element, you will also delete:
|
||||
<ul>
|
||||
<li><span class="project-count"></span> project(s)</li>
|
||||
<li><span class="task-count"></span> task imputation(s)</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user