Commit b7782149 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[code gen] Tab for restriction* fields on content

Closes #13853501
parent f5270ba9f2c7
......@@ -1732,30 +1732,18 @@ msgstr ""
msgid "SEDArestrictionEndDate"
msgstr ""
msgctxt "inlined:SEDAContent.seda_restriction_end_date.object"
msgid "SEDArestrictionEndDate"
msgstr ""
msgid "SEDArestrictionEndDate_plural"
msgstr ""
msgid "SEDArestrictionRuleIdRef"
msgstr ""
msgctxt "inlined:SEDAContent.seda_restriction_rule_id_ref.object"
msgid "SEDArestrictionRuleIdRef"
msgstr ""
msgid "SEDArestrictionRuleIdRef_plural"
msgstr ""
msgid "SEDArestrictionValue"
msgstr ""
msgctxt "inlined:SEDAContent.seda_restriction_value.object"
msgid "SEDArestrictionValue"
msgstr ""
msgid "SEDArestrictionValue_plural"
msgstr ""
......@@ -3442,24 +3430,12 @@ msgstr ""
msgid "add a SEDArestrictionEndDate"
msgstr ""
msgctxt "inlined:SEDAContent.seda_restriction_end_date.object"
msgid "add a SEDArestrictionEndDate"
msgstr ""
msgid "add a SEDArestrictionRuleIdRef"
msgstr ""
msgctxt "inlined:SEDAContent.seda_restriction_rule_id_ref.object"
msgid "add a SEDArestrictionRuleIdRef"
msgstr ""
msgid "add a SEDArestrictionValue"
msgstr ""
msgctxt "inlined:SEDAContent.seda_restriction_value.object"
msgid "add a SEDArestrictionValue"
msgstr ""
msgid "add a SEDAwhen"
msgstr ""
......@@ -5115,6 +5091,9 @@ msgstr ""
msgid "seda_content_relation_tab"
msgstr ""
msgid "seda_content_restriction_tab"
msgstr ""
msgid "seda_content_service_tab"
msgstr ""
......
......@@ -1735,30 +1735,18 @@ msgstr ""
msgid "SEDArestrictionEndDate"
msgstr ""
msgctxt "inlined:SEDAContent.seda_restriction_end_date.object"
msgid "SEDArestrictionEndDate"
msgstr ""
msgid "SEDArestrictionEndDate_plural"
msgstr ""
msgid "SEDArestrictionRuleIdRef"
msgstr ""
msgctxt "inlined:SEDAContent.seda_restriction_rule_id_ref.object"
msgid "SEDArestrictionRuleIdRef"
msgstr ""
msgid "SEDArestrictionRuleIdRef_plural"
msgstr ""
msgid "SEDArestrictionValue"
msgstr ""
msgctxt "inlined:SEDAContent.seda_restriction_value.object"
msgid "SEDArestrictionValue"
msgstr ""
msgid "SEDArestrictionValue_plural"
msgstr ""
......@@ -3445,24 +3433,12 @@ msgstr ""
msgid "add a SEDArestrictionEndDate"
msgstr ""
msgctxt "inlined:SEDAContent.seda_restriction_end_date.object"
msgid "add a SEDArestrictionEndDate"
msgstr ""
msgid "add a SEDArestrictionRuleIdRef"
msgstr ""
msgctxt "inlined:SEDAContent.seda_restriction_rule_id_ref.object"
msgid "add a SEDArestrictionRuleIdRef"
msgstr ""
msgid "add a SEDArestrictionValue"
msgstr ""
msgctxt "inlined:SEDAContent.seda_restriction_value.object"
msgid "add a SEDArestrictionValue"
msgstr ""
msgid "add a SEDAwhen"
msgstr "ajouter un horodatage"
......@@ -4379,14 +4355,14 @@ msgid "referenced by:"
msgstr "référencé par :"
msgid "restriction_rule_id_ref"
msgstr ""
msgstr "valeur"
msgctxt "SEDArestrictionRuleIdRef"
msgid "restriction_rule_id_ref"
msgstr ""
msgid "restriction_value"
msgstr ""
msgstr "valeur"
msgctxt "SEDArestrictionValue"
msgid "restriction_value"
......@@ -5123,6 +5099,9 @@ msgstr ""
msgid "seda_content_relation_tab"
msgstr "objets liés"
msgid "seda_content_restriction_tab"
msgstr "restriction"
msgid "seda_content_service_tab"
msgstr "services"
......@@ -6576,21 +6555,21 @@ msgid "seda_restriction_end_date"
msgstr ""
msgid "seda_restriction_end_date_object"
msgstr ""
msgstr "date de fin de la restriction"
msgctxt "SEDAContent"
msgid "seda_restriction_end_date_object"
msgstr ""
msgid "seda_restriction_rule_id_ref"
msgstr ""
msgstr "valeur"
msgctxt "SEDArestrictionRuleIdRef"
msgid "seda_restriction_rule_id_ref"
msgstr ""
msgid "seda_restriction_rule_id_ref_object"
msgstr ""
msgstr "identifiant de la règle"
msgctxt "SEDAContent"
msgid "seda_restriction_rule_id_ref_object"
......@@ -6604,7 +6583,7 @@ msgid "seda_restriction_value"
msgstr ""
msgid "seda_restriction_value_object"
msgstr ""
msgstr "valeur de la restriction"
msgctxt "SEDAContent"
msgid "seda_restriction_value_object"
......
......@@ -83,6 +83,7 @@ class ContentTabbedPrimaryView(tabs.TabbedPrimaryView):
tabs = [
'main_tab',
_('seda_content_identification_tab'),
_('seda_content_restriction_tab'),
_('seda_content_date_tab'),
_('seda_content_gps_tab'),
_('seda_content_service_tab'),
......@@ -113,6 +114,20 @@ class ContentIdentificationTab(tabs.PrimaryTab):
rsection, display_ctrl = rtags_from_rtype_role_targets('SEDAContent', rtype_role_targets)
class ContentRestrictionTab(tabs.PrimaryTab):
"""Display restrictions about an archive unit content."""
__regid__ = 'seda_content_restriction_tab'
__select__ = tabs.PrimaryTab.__select__ & is_instance('SEDAContent')
rtype_role_targets = [
('seda_restriction_rule_id_ref', 'object', None),
('seda_restriction_value', 'object', None),
('seda_restriction_end_date', 'object', None),
]
rsection, display_ctrl = rtags_from_rtype_role_targets('SEDAContent', rtype_role_targets)
class ContentDateTab(tabs.PrimaryTab):
"""Display date information about an archive unit content."""
......
......@@ -674,11 +674,11 @@ afs.tag_object_of(('*', 'seda_data_object_reference', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_data_object_reference_id', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_data_object_reference_id', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_restriction_rule_id_ref', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_restriction_rule_id_ref', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_restriction_rule_id_ref', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_restriction_value', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_restriction_value', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_restriction_value', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_restriction_end_date', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_restriction_end_date', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_restriction_end_date', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_description_level', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_description_level', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_title', '*'), 'main', 'hidden')
......@@ -974,6 +974,12 @@ pvs.tag_subject_of(('*', 'seda_content', '*'), 'hidden')
pvs.tag_object_of(('*', 'seda_content', '*'), 'hidden')
pvs.tag_subject_of(('*', 'seda_data_object_reference', '*'), 'hidden')
pvs.tag_object_of(('*', 'seda_data_object_reference', '*'), 'hidden')
pvs.tag_subject_of(('*', 'seda_restriction_rule_id_ref', '*'), 'hidden')
pvs.tag_object_of(('*', 'seda_restriction_rule_id_ref', '*'), 'hidden')
pvs.tag_subject_of(('*', 'seda_restriction_value', '*'), 'hidden')
pvs.tag_object_of(('*', 'seda_restriction_value', '*'), 'hidden')
pvs.tag_subject_of(('*', 'seda_restriction_end_date', '*'), 'hidden')
pvs.tag_object_of(('*', 'seda_restriction_end_date', '*'), 'hidden')
pvs.tag_subject_of(('*', 'seda_gps_version_id', '*'), 'hidden')
pvs.tag_object_of(('*', 'seda_gps_version_id', '*'), 'hidden')
pvs.tag_subject_of(('*', 'seda_gps_altitude', '*'), 'hidden')
......
......@@ -42,6 +42,9 @@ RTYPES_IN_TAB = set((
'seda_need_authorization',
'seda_data_object_reference',
'seda_content',
'seda_restriction_rule_id_ref',
'seda_restriction_value',
'seda_restriction_end_date',
))
for element_name in ('CodeListVersions', 'FormatIdentification', 'FileInfo', 'PhysicalDimensions',
'Gps', 'RelatedObjectReference', 'CustodialHistory', 'Coverage'):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment