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

[ui] Introduce tabbed primary view for binary/physical data objects

parent 589da7e542b9
......@@ -17,13 +17,15 @@
import json
from cubicweb.predicates import match_form_params
from cubicweb.predicates import match_form_params, is_instance
from cubicweb.web import formwidgets as fw
from cubicweb.web.views import uicfg
from cubicweb.web.views import uicfg, tabs
from cubes.relationwidget import views as rwdg
_ = unicode
affk = uicfg.autoform_field_kwargs
pvdc = uicfg.primaryview_display_ctrl
......@@ -106,3 +108,17 @@ for key, rql_expr in RDEF_CONSTRAINTS.items():
rtype = key
affk.tag_subject_of((etype, rtype, '*'),
{'widget': ContainedRelationFacetWidget(dialog_options={'width': 800})})
class BinaryDataObjectTabbedPrimaryView(tabs.TabbedPrimaryView):
__select__ = tabs.TabbedPrimaryView.__select__ & is_instance('SEDABinaryDataObject')
tabs = [
'main_tab',
]
class PhysicalDataObjectTabbedPrimaryView(tabs.TabbedPrimaryView):
__select__ = tabs.TabbedPrimaryView.__select__ & is_instance('SEDAPhysicalDataObject')
tabs = [
'main_tab',
]
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