summaryrefslogtreecommitdiff
path: root/archaeological_operations/templates/ishtar/sheet_operation.html
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/templates/ishtar/sheet_operation.html')
-rw-r--r--archaeological_operations/templates/ishtar/sheet_operation.html90
1 files changed, 14 insertions, 76 deletions
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'>&nbsp;</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'>&nbsp;</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 %}