diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2015-09-29 02:43:19 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2015-09-29 02:43:19 +0200 |
commit | df2405cb949e268dda4c880d2685054c0eab4a80 (patch) | |
tree | e27f01bf29b9fe16dfccc157f2a1f2d6fcb872e4 /archaeological_operations/templates/ishtar | |
parent | fa03f91834500f7589ba1912a681227186d7974e (diff) | |
download | Ishtar-df2405cb949e268dda4c880d2685054c0eab4a80.tar.bz2 Ishtar-df2405cb949e268dda4c880d2685054c0eab4a80.zip |
Display dynamicaly large tables in windows
Diffstat (limited to 'archaeological_operations/templates/ishtar')
3 files changed, 16 insertions, 78 deletions
diff --git a/archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html b/archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html index 9feb51e72..0be468b59 100644 --- a/archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html +++ b/archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html @@ -1,5 +1,5 @@ {% load i18n %} -<table> +<table class='simple'> <caption>{{caption}}</caption> <tr> <th>{% trans "Ref." %}</th> diff --git a/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html b/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html index 06a1fa7b1..e19b729fe 100644 --- a/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html +++ b/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html @@ -1,5 +1,5 @@ {% load i18n %} -<table> +<table class='simple'> <caption>{{ parcels_label }}</caption> <tr> <th>{% trans "Town" %}</th> diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index cc69abda0..daeea7c40 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -91,87 +91,25 @@ {% trans "Document from this operation" as operation_docs %} {% if item.source.count %} -{% table_document operation_docs item.source.all|slice:":15" %} -{% if item.source.count > 15 %} -<em>Seuls les 15 premiers éléments ont été affichés sur un total de {{item.source.count}}.</em> -{% endif %} +{% dynamic_table_document operation_docs 'operation_docs' 'operation' item.pk %} {% endif %} -<table> - <caption>{%trans "Context records"%}</caption> - <tr> - <th>{% trans "ID" %}</th> - <th>{% trans "Type" %}</th> - <th>{% trans "Chronology" %}</th> - <th>{% trans "Description" %}</th> - <th>{% trans "Parcel" %}</th> - <th class='link'> </th> - </tr> - {% for context_record in item.context_record.all|slice:"15" %} - <tr> - <td class='string'>{{ context_record.label }}</td> - <td class='string'>{{context_record.unit|default:""}}</td> - <td class='string'>{{ context_record.datings.all|join:", " }}</td>{# periods ?#} - <td class='string'>{{ context_record.description }}</td> - <td class='string'>{{ context_record.parcel.section }} - {{context_record.parcel.parcel_number}}</td> - <td class='link'><a href="#" class='display_details' onclick='load_window("{%url show-contextrecord context_record.pk ''%}")'>{% trans "Details" %}</a></td> - </tr> - {% empty %} - <tr><td colspan="6" class='no_items'>{% trans "No context record associated to this operation" %}</td></tr> - {% endfor %} -</table> -{% if item.context_record.count > 15 %} -<em>Seuls les 15 premiers éléments ont été affichés sur un total de {{item.context_record.count}}.</em> +{% trans "Context records" as context_records %} +{% if item.context_record.count %} +{% dynamic_table_document context_records 'context_records' 'operation' item.pk %} {% endif %} +{% comment %} {% 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|slice:"15" %}{% endif %} - -<div class='table'> -<table> - <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 context_record in item.context_record.all|slice:"5" %} - {% for find in context_record.base_finds.all|slice:"15" %} - <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 class='string'>{{ find.get_last_find.dating}}</td>{# TODO .all|join:", " ? #} - <td class='string'>{{ find.get_last_find.description }}</td> - <td>{{ find.get_last_find.weight|default:"" }}</td> - <td>{{ find.get_last_find.item_number }}</td> - <td class="ref">{{ 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 context record" %} {{context_record.short_label}}</td></tr> - {% endfor %} - {% empty %} - <tr><td colspan="9" class='no_items'>{% trans "No find associated to parcel" %} {{parcel.short_label}} {% trans "(no context record)" %}</td></tr> - {% endfor %} -</table> -</div> -<em>Seuls les 15 premiers éléments des 5 premières UEs sont affichées</em> +{% if item.context_record_docs_q.count %} +{% dynamic_table_document cr_docs 'context_records_docs' 'context_record__operation' item.pk %} +{% endif %} +{% endcomment %} + +{% trans "Finds" as finds %} +{% if item.finds %} +{% dynamic_table_document finds 'finds' 'base_finds__context_record__operation' item.pk %} +{% endif %} {% comment %} {% trans "Documents from associated finds" as find_docs %} |