From c10b0bac3f5d5ee61d7789de4db0fbb18dd666d3 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 28 Oct 2013 19:31:45 +0100 Subject: Templates: list all dependant documents New template tags for displaying table of documents --- .../templates/ishtar/sheet_operation.html | 31 +++++++--------------- 1 file changed, 10 insertions(+), 21 deletions(-) (limited to 'archaeological_operations/templates') diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index 0672cf22f..2768fd96c 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -1,5 +1,5 @@ {% extends "ishtar/sheet.html" %} -{% load i18n %} +{% load i18n window_tables %} {% block head_sheet %} {{block.super}} @@ -117,26 +117,8 @@ {% endfor %} -

{% trans "Scientific documentation"%}

- - - - - - - - - {% for doc in item.source.all %} - - - - - - - {% empty %} - - {% endfor %} -
{%trans "Documents"%}
{% trans "Title" %}{% trans "Type" %}{% trans "Authors" %}{% trans "Link" %}
{{ doc.title }}{{doc.source_type}}{{ doc.authors.all|join:", " }}{% if doc.associated_url %}{% trans "Link"%}{% endif %}
{% trans "No scientific document associated to this operation" %}
+{% trans "Document from this operation" as operation_docs %} +{% if item.source.count %} {% table_document operation_docs item.source.all %}{% endif %} @@ -161,6 +143,10 @@ {% endfor %}
{%trans "Context records"%}
{% trans "No context record associated to this operation" %}
+ +{% trans "Documents from associated context records" as cr_docs %} +{% if item.context_record_docs_q.count %} {% table_document cr_docs item.context_record_docs_q.all %}{% endif %} +
@@ -206,4 +192,7 @@
{%trans "Finds"%}
+{% trans "Documents from associated finds" as find_docs %} +{% if item.find_docs_q.count %} {% table_document find_docs item.find_docs_q.all %}{% endif %} + {% endblock %} -- cgit v1.2.3