equal
deleted
inserted
replaced
|
1 Boxes (:mod:`cubicweb.web.views.boxes`) |
|
2 --------------------------------------------------------------- |
|
3 |
|
4 *sidebox* |
|
5 This view displays usually a side box of some related entities |
|
6 in a primary view. |
|
7 |
|
8 The action box |
|
9 ~~~~~~~~~~~~~~~ |
|
10 |
|
11 The ``add_related`` is an automatic menu in the action box that allows to create |
|
12 an entity automatically related to the initial entity (context in |
|
13 which the box is displayed). By default, the links generated in this |
|
14 box are computed from the schema properties of the displayed entity, |
|
15 but it is possible to explicitely specify them thanks to the |
|
16 `cubicweb.web.uicfg.rmode` *relation tag*: |
|
17 |
|
18 * `link`, indicates that a relation is in general created pointing |
|
19 to an existing entity and that we should not to display a link |
|
20 for this relation |
|
21 |
|
22 * `create`, indicates that a relation is in general created pointing |
|
23 to new entities and that we should display a link to create a new |
|
24 entity and link to it automatically |
|
25 |
|
26 |
|
27 |
|
28 If necessary, it is possible to overwrite the method |
|
29 `relation_mode(rtype, targettype, x='subject')` to dynamically |
|
30 compute a relation creation category. |
|
31 |
|
32 Please note that if at least one action belongs to the `addrelated` category, |
|
33 the automatic behavior is desactivated in favor of an explicit behavior |
|
34 (e.g. display of `addrelated` category actions only). |