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

Hide compressed/version elements from data-object of simplified profiles

parent 370df5f16508
......@@ -27,9 +27,9 @@ from cubes.relationwidget import views as rwdg
from cubes.skos.views import widgets as skos
from cubes.seda.xsd2yams import RDEF_CONSTRAINTS
from cubes.seda.entities import parent_and_container
from cubes.seda.entities import parent_and_container, simplified_profile
from cubes.seda.views import rtags_from_xsd_element, add_subobject_link
from cubes.seda.views import viewlib
from cubes.seda.views import viewlib, copy_rtag
from cubes.seda.views import uicfg as sedauicfg # noqa - ensure those rules are defined first
......@@ -101,6 +101,11 @@ pvdc.tag_object_of(('*', 'seda_data_object_reference_id', '*'),
'label': _('referenced by:')})
pvs.tag_object_of(('*', 'seda_target', '*'), 'hidden') # in the relationship tab
simplified_pvs = copy_rtag(pvs, __name__,
is_instance('SEDABinaryDataObject') & simplified_profile())
simplified_pvs.tag_object_of(('*', 'seda_data_object_reference_id', '*'), 'hidden')
for rtype in ('seda_compressed', 'seda_data_object_version_from'):
# hide relation from autoform because of limitation of _container_eid
afs.tag_object_of(('*', rtype, '*'), 'main', 'hidden')
......@@ -108,6 +113,7 @@ for rtype in ('seda_compressed', 'seda_data_object_version_from'):
rec.tag_object_of(('*', rtype, '*'),
{'rvid': 'seda.reledit.complexlink',
'novalue_label': _('<unauthorized>')})
simplified_pvs.tag_object_of(('*', rtype, '*'), 'hidden')
rec.tag_subject_of(('SEDABinaryDataObject', 'seda_alt_binary_data_object_attachment', '*'),
{'rvid': 'seda.reledit.alternative',
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