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

[ui] Move related transfer references to their own tab

As there may be multiple ones.

Closes #13750862
parent 2e094f615943
......@@ -1329,10 +1329,6 @@ msgstr ""
msgid "SEDARelatedTransferReference"
msgstr ""
msgctxt "inlined:SEDAArchiveTransfer.seda_related_transfer_reference.object"
msgid "SEDARelatedTransferReference"
msgstr ""
msgid "SEDARelatedTransferReference_plural"
msgstr ""
......@@ -3133,10 +3129,6 @@ msgstr ""
msgid "add a SEDARelatedTransferReference"
msgstr ""
msgctxt "inlined:SEDAArchiveTransfer.seda_related_transfer_reference.object"
msgid "add a SEDARelatedTransferReference"
msgstr ""
msgid "add a SEDARelationship"
msgstr ""
......@@ -4119,6 +4111,12 @@ msgid ""
"%(linkto)s)"
msgstr ""
#, python-format
msgid ""
"creating SEDARelatedTransferReference (SEDARelatedTransferReference "
"seda_related_transfer_reference SEDAArchiveTransfer %(linkto)s)"
msgstr ""
#, python-format
msgid ""
"creating SEDAReplaces (SEDAReplaces seda_replaces SEDAContent %(linkto)s)"
......@@ -4820,6 +4818,9 @@ msgstr ""
msgid "seda_at_management_tab"
msgstr ""
msgid "seda_at_related_transfers_tab"
msgstr ""
msgid "seda_attachment"
msgstr ""
......
......@@ -1332,10 +1332,6 @@ msgstr ""
msgid "SEDARelatedTransferReference"
msgstr "identifiant d’un transfert associé"
msgctxt "inlined:SEDAArchiveTransfer.seda_related_transfer_reference.object"
msgid "SEDARelatedTransferReference"
msgstr ""
msgid "SEDARelatedTransferReference_plural"
msgstr ""
......@@ -3136,10 +3132,6 @@ msgstr ""
msgid "add a SEDARelatedTransferReference"
msgstr "identifiant d’un transfert associé"
msgctxt "inlined:SEDAArchiveTransfer.seda_related_transfer_reference.object"
msgid "add a SEDARelatedTransferReference"
msgstr ""
msgid "add a SEDARelationship"
msgstr "ajouter une relation"
......@@ -4125,6 +4117,12 @@ msgid ""
msgstr ""
"Création d'une référence vers un autre objet pour le contenu %(linkto)s"
#, python-format
msgid ""
"creating SEDARelatedTransferReference (SEDARelatedTransferReference "
"seda_related_transfer_reference SEDAArchiveTransfer %(linkto)s)"
msgstr "Ajout d'une référence à un transfert sur %(linkto)s"
#, python-format
msgid ""
"creating SEDAReplaces (SEDAReplaces seda_replaces SEDAContent %(linkto)s)"
......@@ -4828,6 +4826,9 @@ msgstr "objets-données"
msgid "seda_at_management_tab"
msgstr "gestion"
msgid "seda_at_related_transfers_tab"
msgstr "transferts associés"
msgid "seda_attachment"
msgstr ""
......
......@@ -29,7 +29,6 @@ _ = unicode
at_ordered_fields = [
('seda_archival_agency', 'subject'),
('seda_transferring_agency', 'subject'),
('seda_related_transfer_reference', 'object'),
('seda_transfer_request_reply_identifier', 'object'),
('seda_comment', 'object'),
('seda_signature', 'object'),
......@@ -50,7 +49,6 @@ pvs.tag_object_of(('*', 'seda_service_level', 'SEDAArchiveTransfer'), 'attribute
pvs.tag_object_of(('*', 'seda_transfer_request_reply_identifier', 'SEDAArchiveTransfer'),
'attributes')
pvs.tag_object_of(('*', 'seda_comment', 'SEDAArchiveTransfer'), 'attributes')
pvs.tag_object_of(('*', 'seda_related_transfer_reference', 'SEDAArchiveTransfer'), 'attributes')
for rtype, role in at_ordered_fields:
if rtype.endswith('agency'):
......@@ -78,6 +76,7 @@ class ArchiveTransferTabbedPrimaryView(tabs.TabbedPrimaryView):
_('seda_at_management_tab'),
_('seda_at_data_objects_tab'),
_('seda_at_archive_units_tab'),
_('seda_at_related_transfers_tab'),
]
......@@ -143,6 +142,17 @@ class ArchiveTransferArchiveUnitsTab(viewlib.SubObjectsTab):
super(ArchiveTransferArchiveUnitsTab, self).display_add_button(entity)
class ArchiveTransferRelatedTransfersTab(viewlib.SubObjectsTab):
"""Tab for previous transfers related to an archive transfer"""
__regid__ = 'seda_at_related_transfers_tab'
__select__ = is_instance('SEDAArchiveTransfer')
rtype_role_targets = [('seda_related_transfer_reference', 'object', None)]
_('creating SEDARelatedTransferReference (SEDARelatedTransferReference '
'seda_related_transfer_reference SEDAArchiveTransfer %(linkto)s)')
@monkeypatch(reledit.AutoClickAndEditFormView)
def _compute_formid_value(self, rschema, role, rvid, formid):
"""Overriden to give rtype/role information to the view"""
......
......@@ -586,7 +586,7 @@ afs.tag_object_of(('*', 'seda_signature', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_archival_agreement', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_archival_agreement', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_related_transfer_reference', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_related_transfer_reference', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_related_transfer_reference', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_transfer_request_reply_identifier', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_transfer_request_reply_identifier', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_archival_agency', '*'), 'main', 'hidden')
......@@ -946,6 +946,8 @@ afs.tag_subject_of(('*', 'seda_relationship_code_list_version_to', '*'), 'main',
pvs = uicfg.primaryview_section
pvs.tag_subject_of(('*', 'seda_related_transfer_reference', '*'), 'hidden')
pvs.tag_object_of(('*', 'seda_related_transfer_reference', '*'), 'hidden')
pvs.tag_subject_of(('*', 'seda_binary_data_object', '*'), 'hidden')
pvs.tag_object_of(('*', 'seda_binary_data_object', '*'), 'hidden')
pvs.tag_subject_of(('*', 'seda_physical_data_object', '*'), 'hidden')
......
......@@ -31,6 +31,7 @@ LEVEL_ETYPES = set(('SEDABinaryDataObjectType', 'SEDAPhysicalDataObjectType',
RTYPES_IN_TAB = set((
'seda_binary_data_object',
'seda_physical_data_object',
'seda_related_transfer_reference',
'seda_archive_unit',
'seda_relationship',
'seda_storage_rule',
......
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