diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2015-09-29 11:00:49 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2015-09-29 11:00:49 +0200 |
commit | e92789adec1ed5c510ac54b80a63175f037a7167 (patch) | |
tree | fa9581db4473cd3f62b8973ad4ba068331309fbb /archaeological_context_records/templates | |
parent | 37cb695ba14761c5c579ace7797dcd99f5b486c2 (diff) | |
download | Ishtar-e92789adec1ed5c510ac54b80a63175f037a7167.tar.bz2 Ishtar-e92789adec1ed5c510ac54b80a63175f037a7167.zip |
Context record window: dynamic table for find
Diffstat (limited to 'archaeological_context_records/templates')
-rw-r--r-- | archaeological_context_records/templates/ishtar/sheet_contextrecord.html | 46 |
1 files changed, 6 insertions, 40 deletions
diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index 8d1a4de63..a984ef8b5 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -1,5 +1,5 @@ {% extends "ishtar/sheet.html" %} -{% load i18n window_tables %} +{% load i18n window_field window_tables %} {% block head_sheet %} {{block.super}} @@ -94,7 +94,7 @@ {% if item.operation %} <h3>{% trans "Operation resume"%}</h3> <p><label>{%trans "Year:"%}</label> <span class='value'>{{ item.operation.year }}</span></p> -<p><label>{%trans "Numerical reference:"%}</label> <span class='value'>{{ item.operation.operation_code }}</span></p> +{% field "Numerical reference" item.operation.operation_code %} {% if item.operation.code_patriarche %} <p><label>{%trans "Patriarche OA code:"%}</label> <span class='value'>{{ item.operation.code_patriarche }}</span></p> @@ -126,44 +126,10 @@ {% trans "Document from this context record" as cr_docs %} {% if item.source.count %} {% table_document cr_docs item.source.all %}{% endif %} -<table class='simple'> - <caption>{%trans "Finds"%}</caption> - <tr> - <th>{% trans "Complete Id" %}</th> - <th>{% trans "Short Id" %}</th> - <th>{% trans "Material type" %}</th> - <th>{% trans "Context record" context "short"%}</th> - <th>{% trans "Periods" %}</th> - <th>{% trans "Description" %}</th> - <th>{% trans "Weight" %}</th> - <th>{% trans "Numbers" %}</th> - <th>{% trans "Parcel" %}</th> - <th>{% trans "Container ref." %}</th> - <th>{% trans "Warehouse" %}</th> - <th class='link'> </th> - </tr> - {% for find in item.base_finds.all %} - <tr> - {# OPE|MAT.CODE|UE|FIND_index #} - <td class="ref">{{ find.complete_id|default:""}}</td> - {# OPE|FIND_index #} - <td class="ref">{{ find.short_id|default:"" }}</td> - <td class="string">{{ find.get_last_find.material_type|default:"" }}</td> - <td>{{find.context_record.label}}</td> - <td>{{ find.get_last_find.dating}}</td>{# TODO .all|join:", " ? #} - <td>{{ find.get_last_find.description }}</td> - <td>{{ find.get_last_find.weight|default:"" }}</td> - <td>{{ find.get_last_find.item_number }}</td> - <td>{{ item.context_record.parcel.short_label }}</td> - <td class='ref'>{{ find.get_last_find.container.reference|default:""}}</td> - <td class='string'>{{ find.get_last_find.container.location|default:""}}</td> - <td class='link'><a class='display_details' href="#">{% trans "Details" %}</a></td> - {#<a href="#" class='display_details' onclick='load_window("{% url show-find find.pk%}");'>{%trans "Details"%}</a></td>#} - </tr> - {% empty %} - <tr><td colspan="9" class='no_items'>{% trans "No find associated to this context record" %}</td></tr> - {% endfor %} -</table> +{% trans "Finds" as finds %} +{% if item.base_finds.count %} +{% dynamic_table_document finds 'finds' 'base_finds__context_record' item.pk %} +{% endif %} {% trans "Documents from associated finds" as find_docs %} {% if item.find_docs_q.count %} {% table_document find_docs item.find_docs_q.all %}{% endif %} |