[PATCH 2 of 9 saem_ref] Uniformize regids to use 'saem' instead of 'saem_ref'

Sylvain Thenault sylvain.thenault at logilab.fr
Thu Mar 16 17:38:17 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1489669632 -3600
#      Thu Mar 16 14:07:12 2017 +0100
# Node ID 9b723a1b21929aa0a6336c6d44df7260650ccca1
# Parent  869f68fecd89d0c6e98c34577be789d79289f497
Uniformize regids to use 'saem' instead of 'saem_ref'

diff --git a/cubicweb_saem_ref/entities/seda.py b/cubicweb_saem_ref/entities/seda.py
--- a/cubicweb_saem_ref/entities/seda.py
+++ b/cubicweb_saem_ref/entities/seda.py
@@ -106,29 +106,29 @@ class TransferringAgentOAISetSpec(OAISet
 PROFILE_METADATA_FORMATS = {
     'seda02xsd': (
         MetadataFormat(
             schema='https://www.w3.org/2001/XMLSchema.xsd',
             namespace='http://www.w3.org/2001/XMLSchema'),
-        'saem_ref.oai.seda.0.2-xsd',
+        'saem.oai.seda.0.2-xsd',
     ),
     'seda02rng': (
         MetadataFormat(
             schema='http://relaxng.org/relaxng.xsd',
             namespace='http://www.w3.org/2001/XMLSchema'),
-        'saem_ref.oai.seda.0.2-rng',
+        'saem.oai.seda.0.2-rng',
     ),
     'seda1rng': (
         MetadataFormat(
             schema='http://relaxng.org/relaxng.xsd',
             namespace='http://www.w3.org/2001/XMLSchema'),
-        'saem_ref.oai.seda.1.0-rng',
+        'saem.oai.seda.1.0-rng',
     ),
     'seda2rng': (
         MetadataFormat(
             schema='http://relaxng.org/relaxng.xsd',
             namespace='http://www.w3.org/2001/XMLSchema'),
-        'saem_ref.oai.seda.2.0-rng',
+        'saem.oai.seda.2.0-rng',
     ),
 }
 
 
 class SEDAArchiveTransferOAIPMHRecordAdapter(oai.OAIPMHActiveRecordAdapter):
@@ -152,23 +152,23 @@ class DeletedSEDAArchiveTransferOAIPMHRe
 
 class OAISEDAExportView(export.SEDAExportView):
     __abstract__ = True
 
     def call(self):
-        version, format = self.__regid__.replace('saem_ref.oai.seda.', '').split('-')
+        version, format = self.__regid__.replace('saem.oai.seda.', '').split('-')
         self._cw.view('seda.export', rset=self.cw_rset, version=version, format=format, w=self.w)
 
 
 class OAISEDA02XSDExportView(OAISEDAExportView):
-    __regid__ = 'saem_ref.oai.seda.0.2-xsd'
+    __regid__ = 'saem.oai.seda.0.2-xsd'
 
 
 class OAISEDA02RNGExportView(OAISEDAExportView):
-    __regid__ = 'saem_ref.oai.seda.0.2-rng'
+    __regid__ = 'saem.oai.seda.0.2-rng'
 
 
 class OAISEDA1RNGExportView(OAISEDAExportView):
-    __regid__ = 'saem_ref.oai.seda.1.0-rng'
+    __regid__ = 'saem.oai.seda.1.0-rng'
 
 
 class OAISEDA2RNGExportView(OAISEDAExportView):
-    __regid__ = 'saem_ref.oai.seda.2.0-rng'
+    __regid__ = 'saem.oai.seda.2.0-rng'
diff --git a/cubicweb_saem_ref/hooks.py b/cubicweb_saem_ref/hooks.py
--- a/cubicweb_saem_ref/hooks.py
+++ b/cubicweb_saem_ref/hooks.py
@@ -171,11 +171,11 @@ class ReplaceExternalUriByAuthorityRecor
 
 # ARK generation ###############################################################
 
 class AssignARKHook(hook.Hook):
     """When an entity supporting ARK is created, assign it a local ark to."""
-    __regid__ = 'saem_ref.ark.assign'
+    __regid__ = 'saem.ark.assign'
     __select__ = hook.Hook.__select__ & relation_possible('ark')
     events = ('before_add_entity',)
     order = metadata.InitMetaAttrsHook.order - 1
 
     def __call__(self):
@@ -331,11 +331,11 @@ class LogContainerCreationHook(hook.Hook
     """Add an Activity upon creation of a container entity (`IContainer`). There is no need for a
     hook on `IContained` creation, we'll catch creation of the relation linking them to their
     container.
     """
     __select__ = hook.Hook.__select__ & adaptable('IContainer')
-    __regid__ = 'saem_ref.log.add'
+    __regid__ = 'saem.log.add'
     events = ('after_add_entity',)
     category = 'prov.logging'
 
     def __call__(self):
         activity = Record([('created', self.entity.cw_etype)])
@@ -345,11 +345,11 @@ class LogContainerCreationHook(hook.Hook
 class LogModificationHook(hook.Hook):
     """Add an Activity upon modification of a container (`IContainer`) or contained (`IContained`)
     entity. The message should be adapted accordingly.
     """
     __select__ = hook.Hook.__select__ & adaptable('IContainer', 'IContained')
-    __regid__ = 'saem_ref.log.update'
+    __regid__ = 'saem.log.update'
     events = ('after_update_entity',)
     category = 'prov.logging'
 
     def __call__(self):
         entity = self.entity
@@ -377,11 +377,11 @@ class LogModificationHook(hook.Hook):
 class LogRelationHook(hook.Hook):
     """Add an Activity upon modification of a container (`IContainer`) or contained (`IContained`)
     entity. The message should be adapted accordingly.
     """
     __select__ = hook.Hook.__select__ & contained_relation()
-    __regid__ = 'saem_ref.log.relation'
+    __regid__ = 'saem.log.relation'
     events = ('after_add_relation', 'before_delete_relation')
     category = 'prov.logging'
 
     def __call__(self):
         for relationship, role, target in qualify_relation(self._cw.entity_from_eid(self.eidfrom),
@@ -425,11 +425,11 @@ class DepreciateProfileOnReplacePublishe
 class DontDeleteUnitIfArchival(hook.Hook):
     """Before deleting an agent, if it is an archival agent, make sure it isn't
     associated to an organization through the "archival_unit" relation.
     """
     __select__ = hook.Hook.__select__ & hook.match_rtype('archival_role')
-    __regid__ = 'saem_ref.archival_role.delete'
+    __regid__ = 'saem.archival_role.delete'
     events = ('before_delete_relation', )
 
     def __call__(self):
         ou = self._cw.entity_from_eid(self.eidfrom)
         role = self._cw.entity_from_eid(self.eidto)
@@ -442,11 +442,11 @@ class DontDeleteUnitIfArchival(hook.Hook
 
 class AuthorityRecordUsedBySetDefault(hook.Hook):
     """Set a default value for `OrganizationUnit use_authorityrecord
     AuthorityRecord` upon addition of AuthorityRecord entity.
     """
-    __regid__ = 'saem_ref.set-default-use_authorityrecord-relation'
+    __regid__ = 'saem.set-default-use_authorityrecord-relation'
     __select__ = (hook.Hook.__select__
                   & hook.match_rtype('created_by',
                                      frometypes=('AuthorityRecord',)))
     events = ('after_add_relation', )
 
diff --git a/cubicweb_saem_ref/i18n/en.po b/cubicweb_saem_ref/i18n/en.po
--- a/cubicweb_saem_ref/i18n/en.po
+++ b/cubicweb_saem_ref/i18n/en.po
@@ -559,50 +559,50 @@ msgid "ctxcomponents_saem.seda.relatedpr
 msgstr ""
 
 msgid "ctxcomponents_saem.seda.relatedprofiles_description"
 msgstr ""
 
-msgid "ctxcomponents_saem_ref.add_entity"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.add_entity_description"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.import_entity"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.import_entity_description"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.navmenu_authorityrecord"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.navmenu_authorityrecord_description"
+msgid "ctxcomponents_saem.add_entity"
 msgstr ""
 
-msgid "ctxcomponents_saem_ref.navmenu_conceptscheme"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.navmenu_conceptscheme_description"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.navmenu_organization"
+msgid "ctxcomponents_saem.add_entity_description"
 msgstr ""
 
-msgid "ctxcomponents_saem_ref.navmenu_organization_description"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.navmenu_sedaarchivetransfer"
+msgid "ctxcomponents_saem.import_entity"
 msgstr ""
 
-msgid "ctxcomponents_saem_ref.navmenu_sedaarchivetransfer_description"
+msgid "ctxcomponents_saem.import_entity_description"
 msgstr ""
 
-msgid "ctxcomponents_saem_ref.navmenu_sedalib"
+msgid "ctxcomponents_saem.navmenu_authorityrecord"
 msgstr ""
 
-msgid "ctxcomponents_saem_ref.navmenu_sedalib_description"
+msgid "ctxcomponents_saem.navmenu_authorityrecord_description"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_conceptscheme"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_conceptscheme_description"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_organization"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_organization_description"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_sedaarchivetransfer"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_sedaarchivetransfer_description"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_sedalib"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_sedalib_description"
 msgstr ""
 
 # we want to override this
 msgid "cwuri"
 msgstr "URI"
@@ -629,32 +629,32 @@ msgid "edit"
 msgstr ""
 
 msgid "enquirer"
 msgstr ""
 
-msgid "facets_saem_ref.agent_end_date_facet"
-msgstr ""
-
-msgid "facets_saem_ref.agent_end_date_facet_description"
-msgstr ""
-
-msgid "facets_saem_ref.agent_kind_facet"
+msgid "facets_saem.agent_end_date_facet"
 msgstr ""
 
-msgid "facets_saem_ref.agent_kind_facet_description"
-msgstr ""
-
-msgid "facets_saem_ref.agent_role_facet"
+msgid "facets_saem.agent_end_date_facet_description"
 msgstr ""
 
-msgid "facets_saem_ref.agent_role_facet_description"
+msgid "facets_saem.agent_kind_facet"
 msgstr ""
 
-msgid "facets_saem_ref.agent_start_date_facet"
+msgid "facets_saem.agent_kind_facet_description"
 msgstr ""
 
-msgid "facets_saem_ref.agent_start_date_facet_description"
+msgid "facets_saem.agent_role_facet"
+msgstr ""
+
+msgid "facets_saem.agent_role_facet_description"
+msgstr ""
+
+msgid "facets_saem.agent_start_date_facet"
+msgstr ""
+
+msgid "facets_saem.agent_start_date_facet_description"
 msgstr ""
 
 msgctxt "Concept"
 msgid "generated_object"
 msgstr ""
diff --git a/cubicweb_saem_ref/i18n/fr.po b/cubicweb_saem_ref/i18n/fr.po
--- a/cubicweb_saem_ref/i18n/fr.po
+++ b/cubicweb_saem_ref/i18n/fr.po
@@ -577,50 +577,50 @@ msgid "ctxcomponents_saem.seda.relatedpr
 msgstr ""
 
 msgid "ctxcomponents_saem.seda.relatedprofiles_description"
 msgstr ""
 
-msgid "ctxcomponents_saem_ref.add_entity"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.add_entity_description"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.import_entity"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.import_entity_description"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.navmenu_authorityrecord"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.navmenu_authorityrecord_description"
+msgid "ctxcomponents_saem.add_entity"
 msgstr ""
 
-msgid "ctxcomponents_saem_ref.navmenu_conceptscheme"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.navmenu_conceptscheme_description"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.navmenu_organization"
+msgid "ctxcomponents_saem.add_entity_description"
 msgstr ""
 
-msgid "ctxcomponents_saem_ref.navmenu_organization_description"
-msgstr ""
-
-msgid "ctxcomponents_saem_ref.navmenu_sedaarchivetransfer"
+msgid "ctxcomponents_saem.import_entity"
 msgstr ""
 
-msgid "ctxcomponents_saem_ref.navmenu_sedaarchivetransfer_description"
+msgid "ctxcomponents_saem.import_entity_description"
 msgstr ""
 
-msgid "ctxcomponents_saem_ref.navmenu_sedalib"
+msgid "ctxcomponents_saem.navmenu_authorityrecord"
 msgstr ""
 
-msgid "ctxcomponents_saem_ref.navmenu_sedalib_description"
+msgid "ctxcomponents_saem.navmenu_authorityrecord_description"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_conceptscheme"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_conceptscheme_description"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_organization"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_organization_description"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_sedaarchivetransfer"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_sedaarchivetransfer_description"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_sedalib"
+msgstr ""
+
+msgid "ctxcomponents_saem.navmenu_sedalib_description"
 msgstr ""
 
 # we want to override this
 msgid "cwuri"
 msgstr "URI"
@@ -647,32 +647,32 @@ msgid "edit"
 msgstr "éditer"
 
 msgid "enquirer"
 msgstr "service demandeur"
 
-msgid "facets_saem_ref.agent_end_date_facet"
-msgstr ""
-
-msgid "facets_saem_ref.agent_end_date_facet_description"
-msgstr ""
-
-msgid "facets_saem_ref.agent_kind_facet"
+msgid "facets_saem.agent_end_date_facet"
 msgstr ""
 
-msgid "facets_saem_ref.agent_kind_facet_description"
-msgstr ""
-
-msgid "facets_saem_ref.agent_role_facet"
+msgid "facets_saem.agent_end_date_facet_description"
 msgstr ""
 
-msgid "facets_saem_ref.agent_role_facet_description"
+msgid "facets_saem.agent_kind_facet"
 msgstr ""
 
-msgid "facets_saem_ref.agent_start_date_facet"
+msgid "facets_saem.agent_kind_facet_description"
 msgstr ""
 
-msgid "facets_saem_ref.agent_start_date_facet_description"
+msgid "facets_saem.agent_role_facet"
+msgstr ""
+
+msgid "facets_saem.agent_role_facet_description"
+msgstr ""
+
+msgid "facets_saem.agent_start_date_facet"
+msgstr ""
+
+msgid "facets_saem.agent_start_date_facet_description"
 msgstr ""
 
 msgctxt "Concept"
 msgid "generated_object"
 msgstr ""
diff --git a/cubicweb_saem_ref/sobjects/__init__.py b/cubicweb_saem_ref/sobjects/__init__.py
--- a/cubicweb_saem_ref/sobjects/__init__.py
+++ b/cubicweb_saem_ref/sobjects/__init__.py
@@ -104,11 +104,11 @@ class EACImportService(eac.EACImportServ
 
 class AllocateArk(Service):
     """Service to allocate an ark identifier given an
     ArkNameAssigningAuthority entity.
     """
-    __regid__ = 'saem_ref.attribute-ark'
+    __regid__ = 'saem.attribute-ark'
     __select__ = match_user_groups('managers', 'users')
 
     def call(self, naa):
         generator = self._cw.vreg['adapters'].select('IARKGenerator', self._cw,
                                                      naa_what=naa.what)
diff --git a/cubicweb_saem_ref/views/__init__.py b/cubicweb_saem_ref/views/__init__.py
--- a/cubicweb_saem_ref/views/__init__.py
+++ b/cubicweb_saem_ref/views/__init__.py
@@ -141,11 +141,11 @@ def editlinks(icon_info):
                 '__redirectpath': kwargs.pop('__redirectpath',
                                              entity.rest_path()),
             }
             if 'tabid' in kwargs:
                 editurlparams['__redirectparams'] = 'tab=' + kwargs.pop('tabid')
-            html_icons = entity.view('saem_ref.edit-link',
+            html_icons = entity.view('saem.edit-link',
                                      icon_info=icon_info,
                                      editurlparams=editurlparams)
             if html_icons:
                 self.w(tags.div(html_icons, klass='pull-right'))
             return entity_call(self, entity, **kwargs)
@@ -182,11 +182,11 @@ def configure_relation_widget(req, div, 
 
 
 class AddEntityComponent(component.CtxComponent):
     """Component with 'add' link to be displayed in 'same etype' views usually 'SameETypeListView'.
     """
-    __regid__ = 'saem_ref.add_entity'
+    __regid__ = 'saem.add_entity'
     __select__ = (component.CtxComponent.__select__ & multi_lines_rset() & has_permission('add') &
                   is_instance('AuthorityRecord', 'ConceptScheme',
                               'SEDAArchiveTransfer', 'SEDAArchiveUnit'))
     context = 'navtop'
     extra_kwargs = {'SEDAArchiveUnit': {'unit_type': 'unit_content'}}
@@ -202,11 +202,11 @@ class ImportEntityComponent(component.Ct
 
     Concret class should fill the `import_vid` class attribute and add a proper `is_instance`
     selector.
     """
     __abstract__ = True
-    __regid__ = 'saem_ref.import_entity'
+    __regid__ = 'saem.import_entity'
     __select__ = component.CtxComponent.__select__ & multi_lines_rset() & has_permission('add')
     import_url = None  # URL of the view that may be used to import data
     context = 'navtop'
 
     def render_body(self, w):
@@ -282,11 +282,11 @@ def main_navigation_menu():
         ('ConceptScheme', _('Vocabularies')),
         ('SEDAArchiveTransfer', 'SEDAArchiveTransfer_plural'),
         ('sedalib', _('SEDA components')),
     ]):
         yield type(path + 'NavMenuEntryComponent', (MainNavigationMenuComponent,), {
-            '__regid__': 'saem_ref.navmenu_' + path.lower(),
+            '__regid__': 'saem.navmenu_' + path.lower(),
             'path': path.lower(),
             'label': label,
             'order': order,
         })
 
@@ -383,11 +383,11 @@ class SubviewsTabView(tabs.TabsMixin, En
                 continue
 
 
 class EditLinkView(EntityView):
     """Render entity as a link to the edition view"""
-    __regid__ = 'saem_ref.edit-link'
+    __regid__ = 'saem.edit-link'
 
     def entity_call(self, entity, icon_info=True, editurlparams=None):
         editurlparams = editurlparams or {}
         links = []
         if icon_info:
@@ -411,14 +411,14 @@ urlrewrite.SchemaBasedRewriter.rules.app
 
 class SAEMRefRewriter(urlrewrite.SimpleReqRewriter):
     """URL rewriter for SAEM-Ref"""
     rules = [
         ('/oai', dict(vid='oai')),
-        ('/ark', dict(vid='saem_ref.ws.ark')),
+        ('/ark', dict(vid='saem.ws.ark')),
         ('/sedalib', dict(rql='Any X WHERE X is SEDAArchiveUnit, '
                               'NOT X seda_archive_unit P',
-                          vid='saem_ref.sedalib')),
+                          vid='saem.sedalib')),
     ]
 
 
 @monkeypatch(tabs.TabsMixin)
 def active_tab(self, default):
diff --git a/cubicweb_saem_ref/views/authorityrecord.py b/cubicweb_saem_ref/views/authorityrecord.py
--- a/cubicweb_saem_ref/views/authorityrecord.py
+++ b/cubicweb_saem_ref/views/authorityrecord.py
@@ -276,19 +276,19 @@ class AsConceptEntityView(EntityView):
 class AuthorityRecordDescriptionTab(SubviewsTabView):
     """Tab view gathering EAC-CPF description information of an AuthorityRecord"""
     __regid__ = 'saem_authorityrecord_description_tab'
     __select__ = EntityView.__select__ & is_instance('AuthorityRecord')
     subvids = (
-        'saem_ref.authorityrecord.other_record_id',
-        'saem_ref.authorityrecord.places',
-        'saem_ref.authorityrecord.functions',
-        'saem_ref.authorityrecord.legal_status',
-        'saem_ref.authorityrecord.mandate',
-        'saem_ref.authorityrecord.occupation',
-        'saem_ref.authorityrecord.generalcontext',
-        'saem_ref.authorityrecord.history',
-        'saem_ref.authorityrecord.structure',
+        'saem.authorityrecord.other_record_id',
+        'saem.authorityrecord.places',
+        'saem.authorityrecord.functions',
+        'saem.authorityrecord.legal_status',
+        'saem.authorityrecord.mandate',
+        'saem.authorityrecord.occupation',
+        'saem.authorityrecord.generalcontext',
+        'saem.authorityrecord.history',
+        'saem.authorityrecord.structure',
     )
     relations_info = [
         ('eac_other_record_id_of', 'object'),
         ('place_agent', 'object'),
         ('function_agent', 'object'),
@@ -301,20 +301,20 @@ class AuthorityRecordDescriptionTab(Subv
     ]
 
 
 class AuthorityRecordOtherRecordIdView(RelatedEntitiesListView):
     """View for EACOtherRecordId, to be display in the context of an AuthorityRecord"""
-    __regid__ = 'saem_ref.authorityrecord.other_record_id'
+    __regid__ = 'saem.authorityrecord.other_record_id'
     rtype = 'eac_other_record_id_of'
-    subvid = 'saem_ref.authorityrecord.other_record_id.listitem'
+    subvid = 'saem.authorityrecord.other_record_id.listitem'
     _('creating EACOtherRecordId (EACOtherRecordId eac_other_record_id_of '
       'AuthorityRecord %(linkto)s)')
 
 
 class OtherRecordIdListItemView(EntityView):
     """Display an EACOtherRecordId item."""
-    __regid__ = 'saem_ref.authorityrecord.other_record_id.listitem'
+    __regid__ = 'saem.authorityrecord.other_record_id.listitem'
 
     def entity_call(self, entity, **kwargs):
         # surrounding div is necessary for proper transportation through ajax (probably because of
         # an erroneous implementation in cubicweb)
         self.w(u'<div>')
@@ -327,11 +327,11 @@ class OtherRecordIdListItemView(EntityVi
 pvs.tag_object_of(('*', 'place_agent', 'AuthorityRecord'), 'hidden')
 
 
 class AuthorityRecordPlaceView(RelatedEntitiesListView):
     """View for AuthorityRecordPlace, to be display in the context of an AuthorityRecord"""
-    __regid__ = 'saem_ref.authorityrecord.places'
+    __regid__ = 'saem.authorityrecord.places'
     rtype = 'place_agent'
     subvid = 'saem.agent_place_as_concept'
     _('creating AgentPlace (AgentPlace place_agent AuthorityRecord %(linkto)s)')
 
 
@@ -363,11 +363,11 @@ class AuthorityRecordPlaceAsConceptView(
 pvs.tag_object_of(('*', 'function_agent', 'AuthorityRecord'), 'hidden')
 
 
 class AuthorityRecordFunctionView(RelatedEntitiesListView):
     """View for AgentFunction, to be display in the context of an AuthorityRecord"""
-    __regid__ = 'saem_ref.authorityrecord.functions'
+    __regid__ = 'saem.authorityrecord.functions'
     rtype = 'function_agent'
     subvid = 'saem.entity_as_concept'
     subvid_kwargs = {'concept_rtype': 'equivalent_concept', 'text_attr': 'name',
                      'details_attr': 'description'}
     _('creating AgentFunction (AgentFunction function_agent AuthorityRecord %(linkto)s)')
@@ -376,11 +376,11 @@ class AuthorityRecordFunctionView(Relate
 pvs.tag_object_of(('*', 'mandate_agent', 'AuthorityRecord'), 'hidden')
 
 
 class AuthorityRecordMandateView(RelatedEntitiesListView):
     """View for Mandate, to be displayed in the context of an AuthorityRecord"""
-    __regid__ = 'saem_ref.authorityrecord.mandate'
+    __regid__ = 'saem.authorityrecord.mandate'
     rtype = 'mandate_agent'
     subvid = 'saem.entity_as_concept'
     subvid_kwargs = {'concept_rtype': 'equivalent_concept',
                      'text_attr': 'term',
                      'details_attr': 'description'}
@@ -390,11 +390,11 @@ class AuthorityRecordMandateView(Related
 pvs.tag_object_of(('*', 'occupation_agent', 'AuthorityRecord'), 'hidden')
 
 
 class AuthorityRecordOccupationView(RelatedEntitiesListView):
     """View for Occupation, to be displayed in the context of an AuthorityRecord"""
-    __regid__ = 'saem_ref.authorityrecord.occupation'
+    __regid__ = 'saem.authorityrecord.occupation'
     rtype = 'occupation_agent'
     subvid = 'saem.entity_as_concept'
     subvid_kwargs = {'concept_rtype': 'equivalent_concept',
                      'text_attr': 'term',
                      'details_attr': 'description'}
@@ -404,11 +404,11 @@ class AuthorityRecordOccupationView(Rela
 pvs.tag_object_of(('*', 'general_context_of', 'AuthorityRecord'), 'hidden')
 
 
 class GeneralContextView(RelatedEntitiesListView):
     """View for GeneralContext, to be displayed in the context of an AuthorityRecord"""
-    __regid__ = 'saem_ref.authorityrecord.generalcontext'
+    __regid__ = 'saem.authorityrecord.generalcontext'
     rtype = 'general_context_of'
     subvid = 'saem.text_attribute'
     subvid_kwargs = {'text_attr': 'content'}
     _('creating GeneralContext (GeneralContext general_context_of AuthorityRecord %(linkto)s)')
 
@@ -440,11 +440,11 @@ class WithCitationTextAttributeView(With
 pvs.tag_object_of(('*', 'legal_status_agent', 'AuthorityRecord'), 'hidden')
 
 
 class AuthorityRecordLegalStatusView(RelatedEntitiesListView):
     """View for LegalStatus, to be displayed in the context of an AuthorityRecord"""
-    __regid__ = 'saem_ref.authorityrecord.legal_status'
+    __regid__ = 'saem.authorityrecord.legal_status'
     rtype = 'legal_status_agent'
     subvid = 'saem.entity_as_concept'
     subvid_kwargs = {'concept_rtype': 'equivalent_concept', 'text_attr': 'term',
                      'details_attr': 'description'}
     _('creating LegalStatus (LegalStatus legal_status_agent AuthorityRecord %(linkto)s)')
@@ -453,11 +453,11 @@ class AuthorityRecordLegalStatusView(Rel
 pvs.tag_object_of(('*', 'history_agent', 'AuthorityRecord'), 'hidden')
 
 
 class AuthorityRecordHistoryView(RelatedEntitiesListView):
     """View for History, to be displayed in the context of an AuthorityRecord"""
-    __regid__ = 'saem_ref.authorityrecord.history'
+    __regid__ = 'saem.authorityrecord.history'
     rtype = 'history_agent'
     subvid = 'saem.text_attribute'
     subvid_kwargs = {'text_attr': 'text'}
     _('creating History (History history_agent AuthorityRecord %(linkto)s)')
 
@@ -465,11 +465,11 @@ class AuthorityRecordHistoryView(Related
 pvs.tag_object_of(('*', 'structure_agent', 'AuthorityRecord'), 'hidden')
 
 
 class AuthorityRecordStructureView(RelatedEntitiesListView):
     """View for Structure, to be displayed in the context of an AuthorityRecord"""
-    __regid__ = 'saem_ref.authorityrecord.structure'
+    __regid__ = 'saem.authorityrecord.structure'
     rtype = 'structure_agent'
     subvid = 'saem.text_attribute'
     subvid_kwargs = {'text_attr': 'description'}
     _('creating Structure (Structure structure_agent AuthorityRecord %(linkto)s)')
 
@@ -490,12 +490,12 @@ class SaemListItemView(EntityView):
 class AuthorityRecordPropertiesTab(SubviewsTabView):
     """Tab view gathering EAC-CPF controle information of an AuthorityRecord"""
     __regid__ = 'saem_authorityrecord_properties_tab'
     __select__ = EntityView.__select__ & is_instance('AuthorityRecord')
     subvids = (
-        'saem_ref.authorityrecord.sources',
-        'saem_ref.authorityrecord.eac_resource_relation',
+        'saem.authorityrecord.sources',
+        'saem.authorityrecord.eac_resource_relation',
     )
     relations_info = [
         ('source_agent', 'object'),
         ('resource_relation_agent', 'object'),
     ]
@@ -506,11 +506,11 @@ pvs.tag_object_of(('*', 'source_agent', 
 pvdc.tag_attribute(('EACSource', 'url'), {'vid': 'urlattr'})
 
 
 class AuthorityRecordEACSourceView(RelatedEntitiesListView):
     """View for EACSource, to be display in the context of an AuthorityRecord"""
-    __regid__ = 'saem_ref.authorityrecord.sources'
+    __regid__ = 'saem.authorityrecord.sources'
     rtype = 'source_agent'
     subvid = 'saem.eacsource-listitem'
     _('creating EACSource (EACSource source_agent AuthorityRecord %(linkto)s)')
 
 
@@ -537,11 +537,11 @@ pvdc.tag_subject_of(('EACResourceRelatio
                     {'vid': 'saem.external_link'})
 
 
 class AuthorityRecordEACResourceRelationView(RelatedEntitiesListView):
     """View for EACResourceRelation, to be displayed in the context of an AuthorityRecord"""
-    __regid__ = 'saem_ref.authorityrecord.eac_resource_relation'
+    __regid__ = 'saem.authorityrecord.eac_resource_relation'
     rtype = 'resource_relation_agent'
     subvid = 'saem.eacresource-listitem'
     _('creating EACResourceRelation (EACResourceRelation '
       'resource_relation_agent AuthorityRecord %(linkto)s)')
 
@@ -576,13 +576,13 @@ class EACResourceListItemView(EntityView
 class AuthorityRecordRelationsTab(SubviewsTabView):
     """Tab view for AuthorityRecord relations."""
     __regid__ = 'saem_authorityrecord_relations_tab'
     __select__ = EntityView.__select__ & is_instance('AuthorityRecord')
     subvids = (
-        'saem_ref.authorityrecord.association_relations',
-        'saem_ref.authorityrecord.chronological_relation',
-        'saem_ref.authorityrecord.hierarchical-links',
+        'saem.authorityrecord.association_relations',
+        'saem.authorityrecord.chronological_relation',
+        'saem.authorityrecord.hierarchical-links',
     )
     relations_info = [
         RelationInfo('chronological_predecessor', 'object',
                      label=_('ChronologicalRelation (predecessor)')),
         RelationInfo('chronological_successor', 'object',
@@ -611,11 +611,11 @@ pvs.tag_object_of(('*', 'association_to'
 
 class AuthorityRecordAssociationRelationView(EntityView):
     """View for association relations to be displayed in the context of an
     AuthorityRecord on either the `from` or `to` side of the relation.
     """
-    __regid__ = 'saem_ref.authorityrecord.association_relations'
+    __regid__ = 'saem.authorityrecord.association_relations'
     __select__ = EntityView.__select__ & (
         has_related_entities('association_from', role='object') |
         has_related_entities('association_to', role='object'))
 
     def entity_call(self, entity, **kwargs):
@@ -625,18 +625,18 @@ class AuthorityRecordAssociationRelation
             'X description XD, X start_date XSD, X end_date XED, X association_to XAT) '
             'UNION (Any X,XD,XSD,XED,XAF,XAT WHERE X association_to XAT, XAT eid %(eid)s, '
             'X description XD, X start_date XSD, X end_date XED, X association_from XAF)',
             {'eid': entity.eid})
         self._cw.view('list', rset=rset, w=self.w,
-                      subvid='saem_ref.associationrelation',
+                      subvid='saem.associationrelation',
                       main_record=entity,
                       __redirectpath=entity.rest_path())
 
 
 class AssociationRelationView(EntityView):
     """Extended 'oneline' view for AssociationRelation"""
-    __regid__ = 'saem_ref.associationrelation'
+    __regid__ = 'saem.authorityrecord.relation'
     __select__ = (EntityView.__select__ &
                   is_instance('AssociationRelation') & match_kwargs('main_record'))
 
 
     @editlinks(icon_info=True)
@@ -659,11 +659,11 @@ pvs.tag_object_of(('*', 'chronological_s
 
 class ChronologicalRelationView(EntityView):
     """Timeline view with authority records involved in a ChronologicalRelation with this authority
     record entity.
     """
-    __regid__ = 'saem_ref.authorityrecord.chronological_relation'
+    __regid__ = 'saem.authorityrecord.chronological_relation'
     __select__ = EntityView.__select__ & (
         has_related_entities('chronological_successor', role='object') |
         has_related_entities('chronological_predecessor', role='object'))
     title = _('ChronologicalRelation_plural')
 
@@ -674,17 +674,17 @@ class ChronologicalRelationView(EntityVi
                                 '       RP chronological_successor S, X eid %(eid)s) '
                                 'UNION (Any P WHERE RS chronological_successor X, '
                                 '       RS chronological_predecessor P, X eid %(eid)s)',
                                 {'eid': entity.eid})
         json_url = self._cw.build_url('view', rql=entity.as_rset().printable_rql(),
-                                      vid='saem_ref.authorityrecord-timeline-json')
+                                      vid='saem.authorityrecord-timeline-json')
         self._cw.view('vtimeline', rset=rset, w=self.w, custom_settings={'source': json_url})
 
 
 class AuthorityRecordTimelineJsonView(EntityView):
     """JSON view for agent with chronological relations to be used with vtimeline view."""
-    __regid__ = 'saem_ref.authorityrecord-timeline-json'
+    __regid__ = 'saem.authorityrecord-timeline-json'
     __select__ = adaptable('ICalendarable') & is_instance('AuthorityRecord')
     template = False
     content_type = 'application/json'
     binary = True
 
@@ -704,20 +704,20 @@ class AuthorityRecordTimelineJsonView(En
         for successor_relation in entity.reverse_chronological_successor:
             predecessor = successor_relation.chronological_predecessor[0]
             data['date'].append(self.entity_as_date(
                 predecessor,
                 text=successor_relation.view(
-                    'saem_ref.timeline-item',
+                    'saem.timeline-item',
                     __redirectpath=entity.rest_path()),
                 tag=self._cw._('chronological_predecessor'))
             )
         for predecessor_relation in entity.reverse_chronological_predecessor:
             successor = predecessor_relation.chronological_successor[0]
             data['date'].append(self.entity_as_date(
                 successor,
                 text=predecessor_relation.view(
-                    'saem_ref.timeline-item',
+                    'saem.timeline-item',
                     __redirectpath=entity.rest_path()),
                 tag=self._cw._('chronological_successor'))
             )
         self.w(json_dumps({'timeline': data}))
 
@@ -741,11 +741,11 @@ class AuthorityRecordTimelineJsonView(En
         return date
 
 
 class ChronologicalRelationTimelineItemView(EntityView):
     """View for 'text' part of date event in timeline view"""
-    __regid__ = 'saem_ref.timeline-item'
+    __regid__ = 'saem.timeline-item'
     __select__ = is_instance('ChronologicalRelation')
 
     def entity_call(self, entity, **urlparams):
         self.w(entity.printable_value('description'))
         vreg = self._cw.vreg
@@ -797,11 +797,11 @@ def _add_html_node_content(properties):
 class AuthorityRecordGraphView(EntityView):
     __select__ = EntityView.__select__ & (
         has_related_entities('hierarchical_parent', role='object') |
         has_related_entities('hierarchical_child', role='object'))
 
-    __regid__ = 'saem_ref.authorityrecord.hierarchical-links'
+    __regid__ = 'saem.authorityrecord.hierarchical-links'
     title = _('HierarchicalRelation_plural')
 
     def entity_call(self, entity, **kwargs):
         self.w(tags.h2(self._cw._(self.title).lower()))
         self._cw.add_js(('jquery.js', 'jquery.jOrgChart.js'))
diff --git a/cubicweb_saem_ref/views/search.py b/cubicweb_saem_ref/views/search.py
--- a/cubicweb_saem_ref/views/search.py
+++ b/cubicweb_saem_ref/views/search.py
@@ -123,31 +123,31 @@ class AjaxController(ajaxcontroller.Ajax
 
 
 # facets #######################################################################
 
 class AgentStartDateFacet(facet.DateRangeFacet):
-    __regid__ = 'saem_ref.agent_start_date_facet'
+    __regid__ = 'saem.agent_start_date_facet'
     __select__ = facet.DateRangeFacet.__select__ & is_instance('Agent')
     rtype = 'start_date'
 
 
 class AgentEndDateFacet(facet.DateRangeFacet):
-    __regid__ = 'saem_ref.agent_end_date_facet'
+    __regid__ = 'saem.agent_end_date_facet'
     __select__ = facet.DateRangeFacet.__select__ & is_instance('Agent')
     rtype = 'end_date'
 
 
 class AgentKindFacet(facet.RelationAttributeFacet):
-    __regid__ = 'saem_ref.agent_kind_facet'
+    __regid__ = 'saem.agent_kind_facet'
     __select__ = facet.RelationAttributeFacet.__select__ & is_instance('Agent')
     rtype = 'agent_kind'
     role = 'subject'
     target_attr = 'name'
 
 
 class AgentRoleFacet(facet.RelationAttributeFacet):
-    __regid__ = 'saem_ref.agent_role_facet'
+    __regid__ = 'saem.agent_role_facet'
     __select__ = facet.RelationAttributeFacet.__select__ & is_instance('Agent')
     rtype = 'archival_role'
     role = 'subject'
     target_attr = 'name'
 
diff --git a/cubicweb_saem_ref/views/ws.py b/cubicweb_saem_ref/views/ws.py
--- a/cubicweb_saem_ref/views/ws.py
+++ b/cubicweb_saem_ref/views/ws.py
@@ -24,11 +24,11 @@ from cubicweb.web.views import json
 
 
 class AssignArkWebService(json.JsonMixIn, View):
     """JSON view to assign a new Ark for external usage."""
 
-    __regid__ = 'saem_ref.ws.ark'
+    __regid__ = 'saem.ws.ark'
     __select__ = (
         match_user_groups('users', 'managers')
         & match_form_params('organization')
         & match_http_method('POST')
     )
@@ -47,11 +47,11 @@ class AssignArkWebService(json.JsonMixIn
         else:
             if not org.ark_naa:
                 error('Organization "{0}" cannot assign ARK identifiers.')
             else:
                 ark = self._cw.call_service(
-                    'saem_ref.attribute-ark', naa=org.ark_naa[0])
+                    'saem.attribute-ark', naa=org.ark_naa[0])
                 self.wdata([{'ark': ark}])
 
 
 class AssignArkWebServiceMissingOrganization(AssignArkWebService):
     __select__ = (
diff --git a/test/test_views.py b/test/test_views.py
--- a/test/test_views.py
+++ b/test/test_views.py
@@ -494,11 +494,11 @@ class TimelineViewsTC(CubicWebTC):
         with self.admin_access.web_request() as req:
             ar3 = req.entity_from_eid(ar3.eid)
             ar2 = req.entity_from_eid(ar2.eid)
             ar1 = req.entity_from_eid(ar1.eid)
             data = json.loads(ar3.view(
-                'saem_ref.authorityrecord-timeline-json', w=None))
+                'saem.authorityrecord-timeline-json', w=None))
             predecessors = [x for x in data['timeline']['date']
                             if x['tag'] == u'chronological_predecessor']
             self.assertEqual(len(predecessors), 2)
             self.assertCountEqual([p['headline'] for p in predecessors],
                                   [ar2.view('incontext', w=None),


More information about the saem-devel mailing list