[simplified ui] Hide some archive transfer's tabs in simplified ui
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 21 Jul 2016 14:37:23 +0200
changeset 1486 a29e9d30e63b
parent 1485 9d9cdfe9d85b
child 1487 16f2f6e7cfc9
[simplified ui] Hide some archive transfer's tabs in simplified ui Related to #14066262
views/archivetransfer.py
--- a/views/archivetransfer.py	Thu Jul 21 14:36:31 2016 +0200
+++ b/views/archivetransfer.py	Thu Jul 21 14:37:23 2016 +0200
@@ -21,6 +21,7 @@
 from cubicweb.web import formwidgets as fw
 from cubicweb.web.views import tabs, uicfg, reledit
 
+from cubes.seda.entities import full_seda2_profile
 from cubes.seda.views import rtags_from_xsd_element, rtags_from_rtype_role_targets
 from cubes.seda.views import viewlib
 from cubes.seda.views import uicfg as sedauicfg  # noqa - ensure those rules are defined first
@@ -87,7 +88,9 @@
 class ArchiveTransferCodeListVersionsTab(tabs.PrimaryTab):
     """Tab for code list versions information of an archive transfer."""
     __regid__ = 'seda_at_code_list_versions_tab'
-    __select__ = tabs.PrimaryTab.__select__ & is_instance('SEDAArchiveTransfer')
+    __select__ = (tabs.PrimaryTab.__select__
+                  & is_instance('SEDAArchiveTransfer')
+                  & full_seda2_profile())
 
     rsection, display_ctrl = rtags_from_xsd_element('SEDAArchiveTransfer', 'CodeListVersions')
 
@@ -149,7 +152,7 @@
 class ArchiveTransferRelatedTransfersTab(viewlib.SubObjectsTab):
     """Tab for previous transfers related to an archive transfer"""
     __regid__ = 'seda_at_related_transfers_tab'
-    __select__ = is_instance('SEDAArchiveTransfer')
+    __select__ = is_instance('SEDAArchiveTransfer') & full_seda2_profile()
 
     rtype_role_targets = [('seda_related_transfer_reference', 'object', None)]