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

[ui] Finalize ui for relationships

parent 0640343c9b76
......@@ -27,6 +27,9 @@ msgstr ""
msgid "<no classification owner specified>"
msgstr ""
msgid "<no data-object specified>"
msgstr ""
msgid "<no final action specified>"
msgstr ""
......
......@@ -27,6 +27,9 @@ msgstr "<niveau libre>"
msgid "<no classification owner specified>"
msgstr "<propriétaire libre>"
msgid "<no data-object specified>"
msgstr "<objet-données libre>"
msgid "<no final action specified>"
msgstr "<action finale libre>"
......@@ -6998,7 +7001,7 @@ msgid "seda_tag_object"
msgstr ""
msgid "seda_target"
msgstr ""
msgstr "objet-données lié"
msgctxt "SEDARelationship"
msgid "seda_target"
......
......@@ -186,13 +186,19 @@ class DataObjectRelationssTab(tabs.PrimaryTab):
class RelationshipBusinessValueLinkEntityView(viewlib.BusinessValueLinkEntityView):
__select__ = viewlib.BusinessValueLinkEntityView.__select__ & is_instance('SEDARelationship')
def entity_call(self, entity):
super(RelationshipBusinessValueLinkEntityView, self).entity_call(entity)
def entity_value(self, entity):
target = entity.seda_target[0] if entity.seda_target else None
if target:
value = tags.a(target.dc_title(), href=target.absolute_url())
else:
value = xml_escape(self._cw._('<no data-object specified>'))
if entity.seda_type_relationship:
concept = entity.seda_type_relationship[0]
self.w(self._cw._(', of relationship type %s') % concept.label())
msg = self._cw._(', of relationship type %s') % concept.label()
else:
self.w(self._cw._(', no relationship type specified'))
msg = self._cw._(', no relationship type specified')
value += xml_escape(msg)
return value
class AttachmentBusinessValueEntityView(viewlib.BusinessValueEntityView):
......
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