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

Drop useless selector extension

This is not necessary to extend cw primary/tab views'selector, the specific one
is enough
parent b9ac14bed229
......@@ -100,7 +100,7 @@ for rule_type in RULE_TYPES:
class ArchiveTransferTabbedPrimaryView(tabs.TabbedPrimaryView):
__select__ = tabs.TabbedPrimaryView.__select__ & is_instance('SEDAArchiveTransfer')
__select__ = is_instance('SEDAArchiveTransfer')
tabs = [
'main_tab',
_('seda_at_code_list_versions_tab'),
......@@ -127,7 +127,7 @@ class ArchiveTransferCodeListVersionsTab(tabs.PrimaryTab):
class ArchiveTransferManagementTab(tabs.PrimaryTab):
"""Main tab for management data of an archive transfer"""
__regid__ = 'seda_management_tab'
__select__ = tabs.PrimaryTab.__select__ & is_instance('SEDAArchiveTransfer')
__select__ = is_instance('SEDAArchiveTransfer')
rtype_role_targets = [
('seda_storage_rule', 'object', None),
......@@ -156,9 +156,7 @@ class SimplifiedArchiveTransferManagementTab(ArchiveTransferManagementTab):
class ArchiveTransferDataObjectsTab(viewlib.SubObjectsTab):
"""Tab for data objects of an archive transfer"""
__regid__ = 'seda_at_data_objects_tab'
__select__ = (tabs.PrimaryTab.__select__
& is_instance('SEDAArchiveTransfer')
& full_seda2_profile())
__select__ = is_instance('SEDAArchiveTransfer') & full_seda2_profile()
rtype_role_targets = [
('seda_binary_data_object', 'object', 'SEDABinaryDataObject'),
......@@ -189,9 +187,7 @@ class ArchiveTransferArchiveUnitsTab(viewlib.SubObjectsTab):
class ArchiveTransferRelatedTransfersTab(viewlib.SubObjectsTab):
"""Tab for previous transfers related to an archive transfer"""
__regid__ = 'seda_at_related_transfers_tab'
__select__ = (tabs.PrimaryTab.__select__
& is_instance('SEDAArchiveTransfer')
& full_seda2_profile())
__select__ = is_instance('SEDAArchiveTransfer') & full_seda2_profile()
rtype_role_targets = [('seda_related_transfer_reference', 'object', None)]
......@@ -202,8 +198,7 @@ class ArchiveTransferRelatedTransfersTab(viewlib.SubObjectsTab):
class ArchiveTransferDiagnoseTab(viewlib.SubObjectsTab):
"""Tab to diagnose supported format of an archive transfer"""
__regid__ = 'seda_at_diagnose_tab'
__select__ = (tabs.PrimaryTab.__select__
& is_instance('SEDAArchiveTransfer'))
__select__ = is_instance('SEDAArchiveTransfer')
def entity_call(self, entity):
self.w(u'<p class="bg-info">')
......
......@@ -136,7 +136,7 @@ class DataObjectReferenceBusinessValueLinkEntityView(viewlib.BusinessValueLinkEn
class ArchiveUnitTabbedPrimaryView(tabs.TabbedPrimaryView):
__select__ = tabs.TabbedPrimaryView.__select__ & is_instance('SEDAArchiveUnit')
__select__ = is_instance('SEDAArchiveUnit')
tabs = [
'main_tab',
......@@ -227,7 +227,7 @@ class ArchiveUnitSubObjectsTab(viewlib.SubObjectsTab):
"""
__abstract__ = True
__select__ = EntityView.__select__ & is_instance('SEDAArchiveUnit') & ~is_archive_unit_ref()
__select__ = is_instance('SEDAArchiveUnit') & ~is_archive_unit_ref()
def entity_call(self, entity):
seq = entity.first_level_choice.content_sequence
......
......@@ -130,7 +130,7 @@ class ContentIdentificationTab(tabs.PrimaryTab):
"""Display identification data about an archive unit content."""
__regid__ = 'seda_content_identification_tab'
__select__ = tabs.PrimaryTab.__select__ & is_instance('SEDAContent')
__select__ = is_instance('SEDAContent')
rtype_role_targets = [
('seda_source', 'object', None),
......@@ -148,7 +148,7 @@ class ContentRestrictionTab(tabs.PrimaryTab):
"""Display restrictions about an archive unit content."""
__regid__ = 'seda_content_restriction_tab'
__select__ = tabs.PrimaryTab.__select__ & is_instance('SEDAContent')
__select__ = is_instance('SEDAContent')
rtype_role_targets = [
('seda_restriction_rule_id_ref', 'object', None),
......@@ -162,7 +162,7 @@ class ContentDateTab(tabs.PrimaryTab):
"""Display date information about an archive unit content."""
__regid__ = 'seda_content_date_tab'
__select__ = tabs.PrimaryTab.__select__ & is_instance('SEDAContent')
__select__ = is_instance('SEDAContent')
rtype_role_targets = [
('seda_created_date', 'object', None),
......@@ -181,7 +181,7 @@ class ContentGpsTab(tabs.PrimaryTab):
"""Display GPS information about an archive unit content."""
__regid__ = 'seda_content_gps_tab'
__select__ = tabs.PrimaryTab.__select__ & is_instance('SEDAContent')
__select__ = is_instance('SEDAContent')
rsection, display_ctrl = rtags_from_xsd_element('SEDAContent', 'Gps')
......@@ -190,7 +190,7 @@ class ContentServiceTab(tabs.PrimaryTab):
"""Display service information about an archive unit content."""
__regid__ = 'seda_content_service_tab'
__select__ = tabs.PrimaryTab.__select__ & is_instance('SEDAContent')
__select__ = is_instance('SEDAContent')
rtype_role_targets = [
('seda_originating_agency_from', 'object', None),
......@@ -204,7 +204,7 @@ class ContentAgentTab(viewlib.SubObjectsTab):
"""Display agents related to an archive unit content."""
__regid__ = 'seda_content_agent_tab'
__select__ = viewlib.SubObjectsTab.__select__ & is_instance('SEDAContent')
__select__ = is_instance('SEDAContent')
rtype_role_targets = [
('seda_writer_from', 'object', None),
......@@ -222,7 +222,7 @@ class ContentCoverageTab(viewlib.SubObjectsTab):
"""Display coverage information about an archive unit content."""
__regid__ = 'seda_content_coverage_tab'
__select__ = viewlib.SubObjectsTab.__select__ & is_instance('SEDAContent')
__select__ = is_instance('SEDAContent')
rtype_role_targets = [('seda_spatial', 'object', None),
('seda_temporal', 'object', None),
......@@ -238,7 +238,7 @@ class ContentIndexationTab(viewlib.SubObjectsTab):
"""Display indexation (keywords and tags) about an archive unit content."""
__regid__ = 'seda_content_indexation_tab'
__select__ = viewlib.SubObjectsTab.__select__ & is_instance('SEDAContent')
__select__ = is_instance('SEDAContent')
rtype_role_targets = [
('seda_keyword', 'object', 'SEDAKeyword'),
......@@ -253,7 +253,7 @@ class ContentRelationTab(viewlib.SubObjectsTab):
"""Display relation information about an archive unit content."""
__regid__ = 'seda_content_relation_tab'
__select__ = viewlib.SubObjectsTab.__select__ & is_instance('SEDAContent')
__select__ = is_instance('SEDAContent')
rtype_role_targets = [('seda_is_version_of', 'object', None),
('seda_replaces', 'object', None),
......@@ -272,7 +272,7 @@ class ContentEventTab(viewlib.SubObjectsTab):
"""Display events about an archive unit content."""
__regid__ = 'seda_content_event_tab'
__select__ = viewlib.SubObjectsTab.__select__ & is_instance('SEDAContent')
__select__ = is_instance('SEDAContent')
rtype_role_targets = [
('seda_event', 'object', None),
......@@ -285,7 +285,7 @@ class ContentHistoryTab(viewlib.SubObjectsTab):
"""Display custodial history information about an archive unit content."""
__regid__ = 'seda_content_history_tab'
__select__ = viewlib.SubObjectsTab.__select__ & is_instance('SEDAContent')
__select__ = is_instance('SEDAContent')
rtype_role_targets = [('seda_custodial_history_item', 'object', None)]
......
......@@ -169,7 +169,7 @@ pvdc.set_fields_order('SEDABinaryDataObject', bdo_ordered_fields)
class BinaryDataObjectTabbedPrimaryView(tabs.TabbedPrimaryView):
__select__ = tabs.TabbedPrimaryView.__select__ & is_instance('SEDABinaryDataObject')
__select__ = is_instance('SEDABinaryDataObject')
tabs = [
'main_tab',
_('seda_bdo_format_identification'),
......@@ -182,7 +182,7 @@ class BinaryDataObjectFormatIdentificationTab(tabs.PrimaryTab):
"""Display format identification information of a binary data object"""
__regid__ = 'seda_bdo_format_identification'
__select__ = tabs.PrimaryTab.__select__ & is_instance('SEDABinaryDataObject')
__select__ = is_instance('SEDABinaryDataObject')
rsection, display_ctrl = rtags_from_xsd_element('SEDABinaryDataObject', 'FormatIdentification')
......@@ -206,7 +206,7 @@ class BinaryDataObjectFileInfoTab(tabs.PrimaryTab):
class PhysicalDataObjectTabbedPrimaryView(tabs.TabbedPrimaryView):
__select__ = tabs.TabbedPrimaryView.__select__ & is_instance('SEDAPhysicalDataObject')
__select__ = is_instance('SEDAPhysicalDataObject')
tabs = [
'main_tab',
_('seda_pdo_dimensions'),
......@@ -218,7 +218,7 @@ class PhysicalDataObjectDimensionsTab(tabs.PrimaryTab):
"""Display physical dimensions of a physical data object"""
__regid__ = 'seda_pdo_dimensions'
__select__ = tabs.PrimaryTab.__select__ & is_instance('SEDAPhysicalDataObject')
__select__ = is_instance('SEDAPhysicalDataObject')
rsection, display_ctrl = rtags_from_xsd_element('SEDAPhysicalDataObject', 'PhysicalDimensions')
......
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