diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-08-19 13:09:51 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-08-19 13:09:51 +0200 |
commit | 3e162780236ca6608270665b0cbc9c75c27a2a75 (patch) | |
tree | c4885502aec18a4f3e2a767a0e260c083400f23d /ishtar_common/templates/ishtar/sheet_person.html | |
parent | 780e15a479e6a59f89297387780178dd13c230ca (diff) | |
download | Ishtar-3e162780236ca6608270665b0cbc9c75c27a2a75.tar.bz2 Ishtar-3e162780236ca6608270665b0cbc9c75c27a2a75.zip |
Person sheet: improve display of documents (refs #2944)
Diffstat (limited to 'ishtar_common/templates/ishtar/sheet_person.html')
-rw-r--r-- | ishtar_common/templates/ishtar/sheet_person.html | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/ishtar_common/templates/ishtar/sheet_person.html b/ishtar_common/templates/ishtar/sheet_person.html index 90b65b72c..3c554acdf 100644 --- a/ishtar_common/templates/ishtar/sheet_person.html +++ b/ishtar_common/templates/ishtar/sheet_person.html @@ -83,27 +83,20 @@ {% dynamic_table_document af 'files' 'in_charge' item.pk '' output %} {% endif %} -<table> - <caption>{%trans "Documents"%}</caption> - <tr> - <th>{% trans "Year" %}</th> - <th>{% trans "Title" %}</th> - <th>{% trans "Type" %}</th> - <th>{% trans "Link" %}</th> - </tr> - {% for author in item.author.all %} - {% for doc in author.related_sources %} - <tr> - <td class='string'>{{ doc.creation_date|date:"Y"}}</td> - <td class='string'>{{ doc.title }}</td> - <td class='string'>{{ doc.source_type }}</td> - <td class='string'>{% if doc.associated_url %}<a href='{{doc.associated_url}}'>{% trans "Link"%}</a>{% endif %}</td> - </tr> - {% endfor %} - {% empty %} - <tr><td colspan="4" class='no_items'>{% trans "No document associated to this person" %}</td></tr> - {% endfor %} -</table> +{% if item.operation_docs_q.count %} +{% trans "Documents associated to operations" as operation_docs %} +{% dynamic_table_document operation_docs 'operation_docs' 'person' item.pk '' output %} +{% endif %} + +{% if item.contextrecord_docs_q.count %} +{% trans "Documents associated to context records" as context_records %} +{% dynamic_table_document context_records 'context_records_docs' 'person' item.pk '' output %} +{% endif %} + +{% if item.find_docs_q.count %} +{% trans "Documents associated to finds" as finds_docs %} +{% dynamic_table_document finds_docs 'finds_docs' 'person' item.pk '' output %} +{% endif %} {% endblock %} |