[Cubicweb] Display of inlined entities

Aurélien Campéas aurelien.campeas at logilab.fr
Fri Aug 3 11:05:57 CEST 2012


Le 03/08/2012 10:32, Stephane Bugat a écrit :
> Dear all,
>
> The `question & answer` cubicweb summer continues...
>
> My purpose will be about inline relations and the ways to display them.
> I've found for instance that it is possible to edit both inline-related
> entities very conveniently using ``uicfg.autform_section``:
>
> _afs = uicfg.autoform_section
> _afs.tag_subject_of(('Person', 'based_in', '*'), 'main', 'inlined')
>
> A pity that this wonderful thing is not documented (I know, I should
> propose a documentation patch... We'll see it in a near future).

Yes, we're waiting for it ;-)

>
> But, it would be also tremendous if both entities attributes could be
> displayed in the same attributes section of the view of the first
> entity... For instance, taking the latter example:
>
> _pvs = uicfg.primaryview_section
> _pvs.tag_subject_of(('Person', 'based_in', '*'), 'inlined')
>
> For the moment I have to do it by customizing the primary view
> 'render_entity_attributes()' method of the first entity and adding the
> 'render_entity_attributes()' of the second inlined entity in it... Not
> optimized as it displays 2 tables (one for each attributes set) that do
> not have the same column size...
>

I occasionally did what you do. Indeed the layout is not optimal.

This probably deserves an "enhancement" ticket on the forge.



More information about the Cubicweb mailing list