diff options
Diffstat (limited to 'archaeological_operations')
| -rw-r--r-- | archaeological_operations/models.py | 4 | ||||
| -rw-r--r-- | archaeological_operations/templates/ishtar/sheet_operation.html | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 4dd107da8..60a7359db 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -404,6 +404,10 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms, def render_parcels(self): return Parcel.render_parcels(list(self.parcels.all())) + def context_record_relations_q(self): + from archaeological_context_records.models import RecordRelations as CRRL + return CRRL.objects.filter(left_record__operation=self) + def context_record_docs_q(self): from archaeological_context_records.models import ContextRecordSource return ContextRecordSource.objects.filter( diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index 98a69a5f1..07f8d8ab0 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -113,6 +113,11 @@ {% dynamic_table_document '' 'context_records_for_ope' 'operation' item.pk 'TABLE_COLS_FOR_OPE' output %} {% endif %} +{% trans "Context record relations" as cr_rels %} +{% if item.context_record_relations_q.count %} +{% dynamic_table_document cr_rels 'context_records_relations' 'left_record__operation' item.pk '' output %} +{% endif %} + {% trans "Documents from associated context records" as cr_docs %} {% if item.context_record_docs_q.count %} {% dynamic_table_document cr_docs 'context_records_docs' 'context_record__operation' item.pk '' output %} |
