From 18a6ad99164350af62d65efd6a1fd1aa4c419739 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 12 May 2014 21:21:04 +0200 Subject: Person and organization deletion (refs #1675) * add associated actions, wizards, forms * prevent deletion of associted items (operations, files, etc.) * give list of associated items before deletion and give access to these items --- .../templates/ishtar/wizard/confirm_wizard.html | 1 + .../wizard/wizard_organization_deletion.html | 37 ++++++ .../ishtar/wizard/wizard_person_deletion.html | 131 +++++++++++++++++++++ 3 files changed, 169 insertions(+) create mode 100644 ishtar_common/templates/ishtar/wizard/wizard_organization_deletion.html create mode 100644 ishtar_common/templates/ishtar/wizard/wizard_person_deletion.html (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/ishtar/wizard/confirm_wizard.html b/ishtar_common/templates/ishtar/wizard/confirm_wizard.html index f67eb5c1e..8550d6a1c 100644 --- a/ishtar_common/templates/ishtar/wizard/confirm_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/confirm_wizard.html @@ -35,6 +35,7 @@ {{ extra_form }} {% endif %} + {% block "extra_informations" %}{% endblock %}

{%if confirm_end_msg %}{{confirm_end_msg|safe}}{%else%}{% trans "Would you like to save them?" %}{%endif%}

diff --git a/ishtar_common/templates/ishtar/wizard/wizard_organization_deletion.html b/ishtar_common/templates/ishtar/wizard/wizard_organization_deletion.html new file mode 100644 index 000000000..6de2fbe8c --- /dev/null +++ b/ishtar_common/templates/ishtar/wizard/wizard_organization_deletion.html @@ -0,0 +1,37 @@ +{% extends "ishtar/wizard/confirm_wizard.html" %} +{% load i18n %} +{% block "extra_informations" %} + +{% if current_object.members.count %} +

{% trans "Associated persons" %}

+ +{% endif %} + +{% if current_object.files.count %} +

{% trans "Associated archaeological files" %}

+ +{% endif %} + +{% if current_object.operator.count %} +

{% trans "Operator of archaeological operations" %}

+ +{% endif %} + +{% if current_object.adminact_operator.count %} +

{% trans "Adminact: operator of archaeological operations" %}

+ +{% endif %} + +{% endblock %} diff --git a/ishtar_common/templates/ishtar/wizard/wizard_person_deletion.html b/ishtar_common/templates/ishtar/wizard/wizard_person_deletion.html new file mode 100644 index 000000000..ee04fbd84 --- /dev/null +++ b/ishtar_common/templates/ishtar/wizard/wizard_person_deletion.html @@ -0,0 +1,131 @@ +{% extends "ishtar/wizard/confirm_wizard.html" %} +{% load i18n %} +{% block "extra_informations" %} + +{% if current_object.file_responsability.count %} +

{% trans "In charge of archaeological files" %}

+ +{% endif %} + +{% if current_object.general_contractor.count %} +

{% trans "General contractor of archaeological files" %}

+ +{% endif %} + +{% if current_object.responsible_town_planning_service.count %} +

{% trans "Responsible town planning service of archaeological files" %}

+ +{% endif %} + +{% if current_object.scientist.count %} +

{% trans "Scientist in charge of archaeological files" %}

+ +{% endif %} + +{% if current_object.operation_scientist_responsability.count %} +

{% trans "Scientist in charge of archaeological operations" %}

+ +{% endif %} + +{% if current_object.operation_responsability.count %} +

{% trans "In charge of archaeological operations" %}

+ +{% endif %} + +{% if current_object.cira_rapporteur.count %} +

{% trans "Rapporteur CIRA des operations" %}

+ +{% endif %} + +{% if current_object.adminact_operation_in_charge.count %} +

{% trans "Administrativ act: in charge of archaeological operations" %}

+ +{% endif %} + +{% if current_object.adminact_scientist.count %} +

{% trans "Administrativ act: scientist in charge" %}

+ +{% endif %} + +{% if current_object.signatory.count %} +

{% trans "Administrativ act: signatory" %}

+ +{% endif %} + +{% if current_object.warehouse_in_charge.count %} +

{% trans "In charge of warehouses" %}

+ +{% endif %} + +{% if current_object.treatments.count %} +

{% trans "Treatments of items" %}

+ +{% endif %} + +{% if current_object.properties.count %} +

{% trans "Property of items" %}

+ +{% endif %} + +{% if current_object.parcel_owner.count %} +

{% trans "Owns parcels" %}

+ +{% endif %} + +{% if current_object.author.count %} +

{% trans "Author" %}

+ +{% endif %} + +{% endblock %} -- cgit v1.2.3