feat: improve relation display
This MR improves how relations are displayed to the user in show and list modes.
In show modes, the relations labels are easier to understand:
- Subject relations: show
Relation_name object_name
instead ofSubject_name relation_name object_name
- Object relations: show
Subject_name relation_name this
instead ofReverse subject_name relation_name object_name
To make the code more readable and coherent, fields to display relations are now encapsulated in one component name CubicWebRelationField
, much like the already present CubicWebRelationInput
. Users wanting to create their own admin panel without auto-generation can now use this component for any relation and it will adapt based on the cardinality.
And finally, to make ready easier, when no data is found for a relation (no matter the cardinality) or an attribute, the text N/A
is shown.
Edited by Arnaud Vergnet