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 | 8d93b5a7fe68a4f21e8c5cd60cd6741e03b7950e (patch) | |
| tree | 246169e5b69c5bc063044ea4835862f28971aa64 | |
| parent | b58d12a861a65689f9641033a874ceb72d3b0b84 (diff) | |
| download | Ishtar-8d93b5a7fe68a4f21e8c5cd60cd6741e03b7950e.tar.bz2 Ishtar-8d93b5a7fe68a4f21e8c5cd60cd6741e03b7950e.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, | 
