[PATCH 2 of 2 seda] [views] Fix base class for unit's agents / coordinates tabs

Sylvain Thenault sylvain.thenault at logilab.fr
Wed Dec 6 15:03:52 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1512568404 -3600
#      Wed Dec 06 14:53:24 2017 +0100
# Node ID ad663bcecf88c01f4f7e11876bb98982d41fdbd1
# Parent  1a8d43a9547b00797a8ec07dd71893a15695283e
[views] Fix base class for unit's agents / coordinates tabs

so we're properly redirected after creation of their associated subobjects.

diff --git a/cubicweb_seda/views/archiveunit.py b/cubicweb_seda/views/archiveunit.py
--- a/cubicweb_seda/views/archiveunit.py
+++ b/cubicweb_seda/views/archiveunit.py
@@ -449,15 +449,16 @@ class ArchiveUnitAgentsTab(ArchiveUnitCo
     __regid__ = 'seda_agents_tab'
     __select__ = ArchiveUnitContentTab.__select__ & full_seda2_profile()
     content_vid = 'seda_content_agents'
 
 
-class ContentAgentsView(viewlib.SubObjectsTab):
+class ContentAgentsView(ContentSubObjectsView):
     """Display agents related to an archive unit content."""
 
     __regid__ = 'seda_content_agents'
     __select__ = is_instance(CONTENT_ETYPE)
+    tabid = ArchiveUnitAgentsTab.__regid__
 
     rtype_role_targets = [
         ('seda_writer_from', 'object', None),
         ('seda_addressee_from', 'object', None),
         ('seda_recipient_from', 'object', None),
@@ -479,15 +480,16 @@ class ArchiveUnitCoverageTab(ArchiveUnit
     __regid__ = 'seda_coverage_tab'
     __select__ = ArchiveUnitContentTab.__select__ & full_seda2_profile()
     content_vid = 'seda_content_coverage'
 
 
-class ContentCoverageView(viewlib.SubObjectsTab):
+class ContentCoverageView(ContentSubObjectsView):
     """Display coverage information about an archive unit content."""
 
     __regid__ = 'seda_content_coverage'
     __select__ = is_instance(CONTENT_ETYPE)
+    tabid = ArchiveUnitCoverageTab.__regid__
 
     rtype_role_targets = [('seda_spatial', 'object', None),
                           ('seda_temporal', 'object', None),
                           ('seda_juridictional', 'object', None)]
 


More information about the saem-devel mailing list