diff options
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r-- | archaeological_finds/models_finds.py | 50 |
1 files changed, 31 insertions, 19 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 5c28d1a69..c54fd1ed9 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -481,17 +481,17 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): CHECK_DICT = dict(CHECK_CHOICES) SHOW_URL = 'show-find' SLUG = 'find' - TABLE_COLS = ['label', 'material_types__label', 'datings__period__label', - 'base_finds__context_record__parcel__town', - 'base_finds__context_record__operation__year', - 'base_finds__context_record__operation__operation_code', + TABLE_COLS = ['label', 'base_finds__context_record__parcel__town', + 'base_finds__context_record__operation__common_name', + 'base_finds__context_record__parcel', + 'base_finds__context_record__label', + 'material_types__label', 'object_types', + 'datings__period__label', 'container__cached_label', - 'base_finds__batch', - 'base_finds__context_record__parcel__town', - 'base_finds__context_record__parcel', ] + 'base_finds__batch', ] if settings.COUNTRY == 'fr': TABLE_COLS.insert( - 6, 'base_finds__context_record__operation__code_patriarche') + 2, 'base_finds__context_record__operation__code_patriarche') TABLE_COLS_FOR_OPE = [ 'base_finds__cache_short_id', 'base_finds__cache_complete_id', @@ -502,8 +502,26 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): 'base_finds__context_record__parcel__town', 'base_finds__context_record__parcel', ] COL_LABELS = { - 'datings__period__label': _(u"Periods"), + 'base_finds__context_record__label': _(u"Context record"), + 'base_finds__cache_short_id': _(u"Base find - Short ID"), + 'base_finds__cache_complete_id': _(u"Base find - Complete ID"), + 'base_finds__context_record__operation__code_patriarche': _( + u"Operation (code)" + ), + 'base_finds__context_record__parcel__town': _(u"Town"), + 'base_finds__context_record__operation__common_name': _( + u"Operation (name)" + ), + 'base_finds__context_record__parcel': _(u"Parcel"), + 'base_finds__batch':_(u"Batch"), + 'base_finds__comment': _(u"Base find - Comment"), + 'base_finds__description': _(u"Base find - Description"), + 'base_finds__topographic_localisation': _(u"Base find - " + u"Topographic localisation"), + 'base_finds__special_interest': _(u"Base find - Special interest"), + 'base_finds__discovery_date': _(u"Base find - Discovery date"), 'container__cached_label': _(u"Container"), + 'datings__period__label': _(u"Periods"), 'material_types__label': _(u"Material types"), } @@ -513,16 +531,6 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): 'base_finds__topographic_localisation', 'base_finds__special_interest', 'base_finds__discovery_date'] - EXTRA_FULL_FIELDS_LABELS = { - 'base_finds__cache_short_id': _(u"Base find - Short ID"), - 'base_finds__cache_complete_id': _(u"Base find - Complete ID"), - 'base_finds__comment': _(u"Base find - Comment"), - 'base_finds__description': _(u"Base find - Description"), - 'base_finds__topographic_localisation': _(u"Base find - " - u"Topographic localisation"), - 'base_finds__special_interest': _(u"Base find - Special interest"), - 'base_finds__discovery_date': _(u"Base find - Discovery date"), - } ATTRS_EQUIV = {'get_first_base_find': 'base_finds'} # search parameters @@ -563,6 +571,10 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): 'basket': 'basket', 'cached_label': 'cached_label__icontains', 'image__isnull': 'image__isnull', + 'container__location': 'container__location__pk', + 'container__responsible': 'container__responsible__pk', + 'container__index': 'container__index', + 'container__reference': 'container__reference', } EXTRA_REQUEST_KEYS.update( dict( |