diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-02-18 20:40:16 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-02-18 20:40:16 +0100 |
commit | c1df9a80ece30549b17aec91c26f97806c1f4a38 (patch) | |
tree | 246169e5b69c5bc063044ea4835862f28971aa64 | |
parent | ba6e3f29166278264f16ce2babc294b5d863a10d (diff) | |
download | Ishtar-c1df9a80ece30549b17aec91c26f97806c1f4a38.tar.bz2 Ishtar-c1df9a80ece30549b17aec91c26f97806c1f4a38.zip |
Sheet operation: improve site table
-rw-r--r-- | archaeological_operations/templates/ishtar/sheet_operation.html | 2 | ||||
-rw-r--r-- | ishtar_common/templatetags/window_tables.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index 2309262fc..3be570326 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -160,7 +160,7 @@ {% if item.archaeological_sites.count %} {% trans "Archaeological sites" as archaeologicalsites_label %} -{% table_archaeologicalsites archaeologicalsites_label item.archaeological_sites.all %} +{% dynamic_table_document archaeologicalsites_label 'sites' 'operations' item.pk '' output %} {% endif %} {% trans "Associated parcels" as parcels_label %} diff --git a/ishtar_common/templatetags/window_tables.py b/ishtar_common/templatetags/window_tables.py index 86744a46b..0f00cf38f 100644 --- a/ishtar_common/templatetags/window_tables.py +++ b/ishtar_common/templatetags/window_tables.py @@ -13,7 +13,8 @@ from ishtar_common.forms import reverse_lazy from ishtar_common.widgets import DataTable from archaeological_files.models import File -from archaeological_operations.models import OperationSource, Operation +from archaeological_operations.models import OperationSource, Operation, \ + ArchaeologicalSite from archaeological_context_records.models import ContextRecord, \ ContextRecordSource, RecordRelationView, \ RecordRelations as CRRecordRelations @@ -49,6 +50,7 @@ ASSOCIATED_MODELS['context_records_relations_detail'] = ( CRRecordRelations, 'get-contextrecordrelationdetail', '') ASSOCIATED_MODELS['finds'] = (Find, 'get-find', 'get-find-full') +ASSOCIATED_MODELS['sites'] = (ArchaeologicalSite, 'get-site', '') ASSOCIATED_MODELS['finds_for_ope'] = ( Find, 'get-find-for-ope', 'get-find-full') ASSOCIATED_MODELS['finds_for_treatment'] = ( @@ -68,7 +70,6 @@ ASSOCIATED_MODELS['treatmentfiles_docs'] = ( ASSOCIATED_MODELS['containers'] = ( Container, 'get-container', '') - @register.simple_tag(takes_context=True) def dynamic_table_document( context, caption, associated_model, key, value, |