diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-16 23:29:41 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-16 23:29:41 +0200 | 
| commit | 78cb0d4794a80c99e17f96a06e68951d5221d0f8 (patch) | |
| tree | ceac818ab232d6fb74289ab31571de56086d7bb5 /ishtar_common | |
| parent | c5bf89a4177c3f40a9b02e721bdcc5e85fc136bf (diff) | |
| download | Ishtar-78cb0d4794a80c99e17f96a06e68951d5221d0f8.tar.bz2 Ishtar-78cb0d4794a80c99e17f96a06e68951d5221d0f8.zip | |
List and export context record relations (refs #3329)
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/templatetags/window_tables.py | 5 | ||||
| -rw-r--r-- | ishtar_common/widgets.py | 2 | 
2 files changed, 6 insertions, 1 deletions
| diff --git a/ishtar_common/templatetags/window_tables.py b/ishtar_common/templatetags/window_tables.py index 578d94535..acb3d4a0a 100644 --- a/ishtar_common/templatetags/window_tables.py +++ b/ishtar_common/templatetags/window_tables.py @@ -15,7 +15,7 @@ from ishtar_common.widgets import JQueryJqGrid  from archaeological_files.models import File  from archaeological_operations.models import OperationSource, Operation  from archaeological_context_records.models import ContextRecord, \ -    ContextRecordSource +    ContextRecordSource, RecordRelations as CRRecordRelations  from archaeological_finds.models import Find, FindSource, \      FindUpstreamTreatments, FindDownstreamTreatments @@ -39,6 +39,9 @@ ASSOCIATED_MODELS['context_records_for_ope'] = (  ASSOCIATED_MODELS['context_records_docs'] = (      ContextRecordSource,      'get-contextrecordsource', 'get-contextrecordsource-full') +ASSOCIATED_MODELS['context_records_relations'] = ( +    CRRecordRelations, 'get-contextrecordrelation', '') +  ASSOCIATED_MODELS['finds'] = (Find, 'get-find', 'get-find-full')  ASSOCIATED_MODELS['finds_for_ope'] = (      Find, 'get-find-for-ope', 'get-find-full') diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index 89eead988..48d1377fa 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -564,6 +564,8 @@ class JQueryJqGrid(forms.RadioSelect):                  field_verbose_names.append(unicode(field_verbose_name))              if field_name in col_labels:                  jq_col_names.append(unicode(col_labels[field_name])) +            elif col_names and col_names[0] in col_labels: +                jq_col_names.append(unicode(col_labels[col_names[0]]))              else:                  jq_col_names.append(settings.JOINT.join(                      [f for f in field_verbose_names if f])) | 
