consider primaryview_display_ctrl in reledit, XXX should split into reledit / autoreledit
--- a/web/views/editforms.py Fri Jul 10 12:15:09 2009 +0200
+++ b/web/views/editforms.py Fri Jul 10 19:51:19 2009 +0200
@@ -20,7 +20,7 @@
from cubicweb.utils import make_uid, compute_cardinality, get_schema_property
from cubicweb.view import EntityView
from cubicweb.common import tags
-from cubicweb.web import INTERNAL_FIELD_VALUE, stdmsgs, eid_param
+from cubicweb.web import INTERNAL_FIELD_VALUE, stdmsgs, eid_param, uicfg
from cubicweb.web.form import FormViewMixIn
from cubicweb.web.formfields import guess_field
from cubicweb.web.formwidgets import Button, SubmitButton, ResetButton
@@ -87,7 +87,6 @@
"""
id = 'reledit'
__select__ = non_final_entity() & match_kwargs('rtype')
-
# FIXME editableField class could be toggleable from userprefs
_onclick = u"showInlineEditionForm(%(eid)s, '%(rtype)s', '%(divid)s')"
@@ -126,6 +125,11 @@
form = self._build_attribute_form(entity, value, rtype, role, reload,
row, col, default, landing_zone)
else:
+ vid = uicfg.primaryview_display_ctrl.etype_get(entity.e_schema,
+ rtype, role)
+ if vid != 'reledit': # reledit explicitly disabled
+ self.wview(vid, entity.related(rtype, role))
+ return
if rvid is None:
rvid = self._compute_best_vid(entity, rtype, role)
rset = entity.related(rtype, role)