summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorCefin <kevon@tuta.io>2022-03-23 15:03:57 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-07-08 09:58:50 +0200
commit8db4c7cb88d9faaa5ae80e6ca03f98debaaef737 (patch)
tree1e70daccefa1aedae1c73c0131acc62b412bca9f /ishtar_common
parent102b11cf2cc7fedb60f20c620f882e26f79e6830 (diff)
downloadIshtar-8db4c7cb88d9faaa5ae80e6ca03f98debaaef737.tar.bz2
Ishtar-8db4c7cb88d9faaa5ae80e6ca03f98debaaef737.zip
Import - Current - Delete: refactoring delete page (refs #5312)
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/templates/ishtar/import_delete.html68
1 files changed, 48 insertions, 20 deletions
diff --git a/ishtar_common/templates/ishtar/import_delete.html b/ishtar_common/templates/ishtar/import_delete.html
index ef05a884c..e131447d4 100644
--- a/ishtar_common/templates/ishtar/import_delete.html
+++ b/ishtar_common/templates/ishtar/import_delete.html
@@ -1,24 +1,52 @@
{% extends "base.html" %}
{% load i18n inline_formset verbose_names %}
{% block content %}
-<h2>{{page_name}}</h2>
-<div class='form'>
- <h3>{{object}}</h3>
- <form action="." method="post">{% csrf_token %}
- <p>{% trans "The current items are linked to this import:" %}</p>
- {% for accessor, imported in object.get_all_imported %}
- {% ifchanged imported|verbose_model_name %}
- {% if forloop.counter %}</ul>{% endif %}
- <h4>{{imported|verbose_model_name}}</h4>
- <ul class='item-list'>
- {%endifchanged%}
- <li>{{imported}}</li>
- {% endfor %}
- </ul>
- <p>{% trans "All these items will be deleted with this import." %}</p>
- <strong>{% trans "Are you sure?" %}</strong>
- <input type="submit" value="{% trans "Yes" %}"/>
- </form>
- <p><a href='{% url 'current_imports' %}'>{% trans "Back" %}</a></p>
-</div>
+ <div class='form'>
+ <form action="." method="post">{% csrf_token %}
+ <h2>{{page_name}}</h2>
+
+ {% block "warning_message" %}
+ <div class="alert alert-danger">
+ <div><i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
+ {% trans "Are you sure to want to delete this item?" %}
+ </div>
+ <p>{% trans "No rollback is possible. Be careful to scroll to the end of page to check every piece of information." %}</p>
+ </div>
+ {% endblock %}
+
+ <div class="card">
+ <div class="card-header">
+ {{ object }}
+ </div>
+ <div class="card-body">
+ {% for accessor, imported in object.get_all_imported %}
+ {% ifchanged imported|verbose_model_name %}
+ {% if forloop.counter %}
+ </ul>
+ {% endif %}
+ <hr><strong>{{ imported|verbose_model_name }}</strong><hr>
+ <ul class="list">
+ {% endifchanged %}
+ <li>
+ {{ imported }}
+ {% url "show-"|add:imported.SLUG imported.pk "" as current_url %}
+ {% if current_url %}
+ <a class="display_details_inline" href="#" onclick='load_window("{% url "show-"|add:imported.SLUG imported.pk "" %}")'>
+ <i class="fa fa-info-circle" aria-hidden="true"></i>
+ </a>
+ {% endif %}
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+ </div>
+
+ {% block "footer" %}
+ <div id="footer">
+ <p class="confirm-message">{% trans "Are you sure to want to delete this import?" %}</p>
+ {% include 'ishtar/wizard/validation_bar.html' %}
+ </div>
+ {% endblock %}
+ </form>
+ </div>
{% endblock %}