|
1 """schema driven ui configuration. |
|
2 |
|
3 set of properties configuring edition, actions box, ... rendering using tags |
|
4 on schema relations. Those properties are defined here so we don't get module |
|
5 reloading problems. |
|
6 |
|
7 :organization: Logilab |
|
8 :copyright: 2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
|
9 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
|
10 """ |
|
11 __docformat__ = "restructuredtext en" |
|
12 from cubicweb.rtags import RelationTags |
|
13 |
|
14 # editforms.AutomaticEntityForm configuration ################################# |
|
15 |
|
16 # relations'category (eg primary/secondary/generic/metadata/generated) |
|
17 rcategories = RelationTags() |
|
18 # use primary and not generated for eid since it has to be an hidden |
|
19 rcategories.set_rtag('primary', 'eid', 'subject') |
|
20 rcategories.set_rtag('primary', 'in_state', 'subject') |
|
21 rcategories.set_rtag('secondary', 'description', 'subject') |
|
22 rcategories.set_rtag('metadata', 'creation_date', 'subject') |
|
23 rcategories.set_rtag('metadata', 'modification_date', 'subject') |
|
24 rcategories.set_rtag('metadata', 'owned_by', 'subject') |
|
25 rcategories.set_rtag('metadata', 'created_by', 'subject') |
|
26 rcategories.set_rtag('generated', 'has_text', 'subject') |
|
27 rcategories.set_rtag('generated', 'is', 'subject') |
|
28 rcategories.set_rtag('generated', 'is', 'object') |
|
29 rcategories.set_rtag('generated', 'is_instance_of', 'subject') |
|
30 rcategories.set_rtag('generated', 'is_instance_of', 'object') |
|
31 rcategories.set_rtag('generated', 'identity', 'subject') |
|
32 rcategories.set_rtag('generated', 'identity', 'object') |
|
33 rcategories.set_rtag('generated', 'require_permission', 'subject') |
|
34 rcategories.set_rtag('generated', 'wf_info_for', 'subject') |
|
35 rcategories.set_rtag('generated', 'wf_info_for', 'object') |
|
36 rcategories.set_rtag('generated', 'for_user', 'subject') |
|
37 rcategories.set_rtag('generated', 'for_user', 'object') |
|
38 |
|
39 # relations'widget (eg one of available class name in cubicweb.web.formwidgets) |
|
40 rwidgets = RelationTags() |
|
41 |
|
42 # inlined view flag for non final relations: when True for an entry, the |
|
43 # entity(ies) at the other end of the relation will be editable from the |
|
44 # form of the edited entity |
|
45 rinlined = RelationTags() |
|
46 |
|
47 # set of tags of the form <action>_on_new on relations. <action> is a |
|
48 # schema action (add/update/delete/read), and when such a tag is found |
|
49 # permissions checking is by-passed and supposed to be ok |
|
50 rpermissions_overrides = RelationTags(use_set=True) |
|
51 |
|
52 |
|
53 # boxes.EditBox configuration ################################################# |
|
54 |
|
55 # 'link' / 'create' relation tags, used to control the "add entity" submenu |
|
56 rmode = RelationTags() |
|
57 rmode.set_rtag('link', 'is', 'subject') |
|
58 rmode.set_rtag('link', 'is', 'object') |
|
59 rmode.set_rtag('link', 'is_instance_of', 'subject') |
|
60 rmode.set_rtag('link', 'is_instance_of', 'object') |
|
61 rmode.set_rtag('link', 'identity', 'subject') |
|
62 rmode.set_rtag('link', 'identity', 'object') |
|
63 rmode.set_rtag('link', 'owned_by', 'subject') |
|
64 rmode.set_rtag('link', 'created_by', 'subject') |
|
65 rmode.set_rtag('link', 'require_permission', 'subject') |
|
66 rmode.set_rtag('link', 'wf_info_for', 'subject') |
|
67 rmode.set_rtag('link', 'wf_info_for', 'subject') |