Commit 729b5a7a authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[ui] merged with with proper selector

This makes it simpler to grasp by avoiding ambiguous semantic.
parent c52594a26fcc
......@@ -147,7 +147,7 @@ class TitleBusinessValueEntityView(viewlib.BusinessValueLinkEntityView):
"""Entity view for SEDAContent entities that will display value of the SEDATitle related
__select__ = viewlib.BusinessValueLinkEntityView.__select__ & is_instance('SEDAContent')
__select__ = is_instance('SEDAContent')
no_value_msg = _('<no title specified>')
def entity_value(self, entity):
......@@ -236,7 +236,7 @@ class DataObjectRelationsTab(tabs.PrimaryTab):
class RelationshipBusinessValueLinkEntityView(viewlib.BusinessValueLinkEntityView):
__select__ = viewlib.BusinessValueLinkEntityView.__select__ & is_instance('SEDARelationship')
__select__ = is_instance('SEDARelationship')
def entity_value(self, entity):
target = entity.seda_target[0] if entity.seda_target else None
......@@ -20,6 +20,7 @@ from cubicweb.predicates import match_kwargs, is_instance
from cubicweb.view import EntityView
from cubicweb.web.views import tabs
from cubes.seda.xsd2uicfg import FIRST_LEVEL_ETYPES
from cubes.seda.views import add_subobjects_button
_ = unicode
......@@ -132,8 +133,8 @@ class BusinessValueConceptEntityView(BusinessValueEntityView):
class BusinessValueLinkEntityView(BusinessValueEntityView):
"""Similar to but value is enclosed in a link if specified"""
__regid__ = ''
"""Similar to but value is enclosed in a link if some value is specified."""
__select__ = is_instance(*FIRST_LEVEL_ETYPES)
def entity_value(self, entity):
value = super(BusinessValueLinkEntityView, self).entity_value(entity)
......@@ -143,11 +144,11 @@ class BusinessValueLinkEntityView(BusinessValueEntityView):
class LinkMetaEntityView(EntityView):
"""Glue and seda.xsdmeta views together, for use within list"""
"""Glue and seda.xsdmeta views together, for use within list."""
__regid__ = 'seda.link_meta'
def entity_call(self, entity):
entity.view('', w=self.w)
entity.view('', w=self.w)
entity.view('seda.xsdmeta', w=self.w, skip_one_card=True)
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