[PATCH 3 of 3 seda] [uicfg] Hide relation to a profile from authority record POV

Sylvain Thenault sylvain.thenault at logilab.fr
Wed Mar 1 15:51:30 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1488379771 -3600
#      Wed Mar 01 15:49:31 2017 +0100
# Node ID 08ff736126f14654fc1d1282ac998964dcb7ddcd
# Parent  b8fc498d02277c17599cac49689310bac46e6bff
[uicfg] Hide relation to a profile from authority record POV

as we already did for concept and scheme.

diff --git a/cubicweb_seda/views/uicfg.py b/cubicweb_seda/views/uicfg.py
--- a/cubicweb_seda/views/uicfg.py
+++ b/cubicweb_seda/views/uicfg.py
@@ -936,10 +936,12 @@ afs.tag_object_of(('*', 'seda_repository
 
 
 pvs = uicfg.primaryview_section
 pvs.tag_subject_of(('*', 'seda_related_transfer_reference', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_related_transfer_reference', '*'), 'hidden')
+pvs.tag_object_of(('*', 'seda_archival_agency', '*'), 'hidden')
+pvs.tag_object_of(('*', 'seda_transferring_agency', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_reply_code_list_version', '*'), 'hidden')
 pvs.tag_subject_of(('*', 'seda_reply_code_list_version', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_message_digest_algorithm_code_list_version', '*'), 'hidden')
 pvs.tag_subject_of(('*', 'seda_message_digest_algorithm_code_list_version', '*'), 'hidden')
 pvs.tag_subject_of(('*', 'seda_mime_type_code_list_version_from', '*'), 'hidden')
@@ -1054,10 +1056,16 @@ pvs.tag_subject_of(('*', 'seda_restricti
 pvs.tag_object_of(('*', 'seda_restriction_end_date', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_description_level', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_type_to', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_language_to', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_description_language_to', '*'), 'hidden')
+pvs.tag_object_of(('*', 'seda_originating_agency_to', '*'), 'hidden')
+pvs.tag_object_of(('*', 'seda_submission_agency_to', '*'), 'hidden')
+pvs.tag_object_of(('*', 'seda_authorized_agent_to', '*'), 'hidden')
+pvs.tag_object_of(('*', 'seda_writer_to', '*'), 'hidden')
+pvs.tag_object_of(('*', 'seda_addressee_to', '*'), 'hidden')
+pvs.tag_object_of(('*', 'seda_recipient_to', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_rule', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_ref_non_rule_id_to', '*'), 'hidden')
 pvs.tag_subject_of(('*', 'seda_custodial_history_item', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_custodial_history_item', '*'), 'hidden')
 pvs.tag_subject_of(('*', 'seda_custodial_history_file', '*'), 'hidden')
diff --git a/cubicweb_seda/xsd2uicfg.py b/cubicweb_seda/xsd2uicfg.py
--- a/cubicweb_seda/xsd2uicfg.py
+++ b/cubicweb_seda/xsd2uicfg.py
@@ -156,11 +156,13 @@ class UICFGGenerator(CodeGenerator):
         if mapping.rtype in RTYPES_IN_TAB:
             section = 'hidden'
             role = mapping.composite or 'subject'
             yield mapping.rtype, neg_role(role), section
             yield mapping.rtype, role, section
-        elif 'Concept' in mapping.objtypes or 'ConceptScheme' in mapping.objtypes:
+        elif ('Concept' in mapping.objtypes
+              or 'ConceptScheme' in mapping.objtypes
+              or 'AuthorityRecord' in mapping.objtypes):
             yield mapping.rtype, 'object', 'hidden'
 
     def reledit_ctrl_for_e_type_mapping(self, mapping):
         for rtype, target_etype in sorted(mapping.attributes.items()):
             if rtype == 'id':


More information about the saem-devel mailing list