From 195b20d930ef7eef7320f59b8eb722a4f6e9175a Mon Sep 17 00:00:00 2001 From: "holger.trampe" Date: Fri, 6 Mar 2020 23:35:08 +0100 Subject: [PATCH] Stnadards Stuff etc. --- .../templates/standards/standards_single.html | 12 +- .../standards/standards_single_SAVE.html | 106 ++++++++++++++++++ 2 files changed, 110 insertions(+), 8 deletions(-) create mode 100644 standards/templates/standards/standards_single_SAVE.html diff --git a/standards/templates/standards/standards_single.html b/standards/templates/standards/standards_single.html index b127ac2..93caced 100644 --- a/standards/templates/standards/standards_single.html +++ b/standards/templates/standards/standards_single.html @@ -18,21 +18,17 @@ {% endif%}
- Ansprechpartner: - {% for taskuser in standard.task.usersfield.all %} -  {{taskuser.first_name}} {{taskuser.last_name}} - {% endfor %} - + {% if standard.authority %} - Verantwortlicher:  {{standard.authority.first_name}} {{standard.authority.last_name}} |  + Verantwortlicher:   {{standard.authority.first_name}} {{standard.authority.last_name}} |  {% endif %} {% if standard.executor %} - Ausführende Person: {{standard.executor.first_name}} {{standard.executor.last_name}} |  + Ausführende Person: {{standard.executor.first_name}} {{standard.executor.last_name}} |  {% endif %} {% if standard.representative %} - Vertreter: {{standard.representative.first_name}} {{standard.representative.last_name}} |  + Vertreter: {{standard.representative.first_name}} {{standard.representative.last_name}} |  {% endif %} diff --git a/standards/templates/standards/standards_single_SAVE.html b/standards/templates/standards/standards_single_SAVE.html new file mode 100644 index 0000000..b127ac2 --- /dev/null +++ b/standards/templates/standards/standards_single_SAVE.html @@ -0,0 +1,106 @@ +{% extends "users/base.html" %} +{% load counter_tag %} +{% block content %} +
+ + +

{{standard.name}}

+ Erstellt durch {{standard.created_standard_by.first_name}} {{standard.created_standard_by.last_name}} am {{standard.created_standard_date}} | Zuletzt bearbeitet von {{ standard.last_modified_by.first_name}} {{ standard.last_modified_by.last_name}} am {{ standard.last_modified_on}} + {% if standard.created_standard_by == user or perms.users.standard_management %} +  | Löschen +  | Bearbeiten + {% endif%} +
+
+ Ansprechpartner: + {% for taskuser in standard.task.usersfield.all %} +  {{taskuser.first_name}} {{taskuser.last_name}} + {% endfor %} + + {% if standard.authority %} + Verantwortlicher:  {{standard.authority.first_name}} {{standard.authority.last_name}} |  + {% endif %} + + {% if standard.executor %} + Ausführende Person: {{standard.executor.first_name}} {{standard.executor.last_name}} |  + {% endif %} + + {% if standard.representative %} + Vertreter: {{standard.representative.first_name}} {{standard.representative.last_name}} |  + {% endif %} + + +
+
+
+ + {% if standard.addedfiles.all|length == 0 and standard.linked_standards.all|length == 0 %} +
+ {% else %} +
+ {% endif %} +
+
+

+ {{standard.media}} + {{standard.content|safe}} +

+
+
+ +
+ {% if standard.addedfiles.all|length > 0 %} +
+
+
Dateien
+

+ {% for files in standard.addedfiles.all %} + {{files.name|truncatechars:30}}
+ {% endfor %} +

+
+
+ {% endif %} + + {% if standard.linked_standards.all|length > 0 %} +
+
+
Verwandte Standards
+

+ {% for standard in standard.linked_standards.all %} + + + {% setbool False %} + {% for ag in standard.visibleby.all %} + {% if request.user|has_group:ag.group.name %} + {% setbool True %} + {% endif %} + {% endfor %} + + {% if standard.visibleby.all|length == 0 %} + {% setbool True %} + {% endif %} + + {% getbool as groupchecker %} + + {% if groupchecker %} + {{standard.name|truncatechars:30}}
+ {% else %} +  {{standard.name|truncatechars:30}}

+ {% endif %} + + {% endfor %} +

+
+
+ {% endif %} +
+
+
+{% endblock content %} \ No newline at end of file