blob: 248898df4cd5d174ff4162c2217d956fe6889dd0 [file] [log] [blame]
Michael Lando451a3402017-02-19 10:28:42 +02001*******************************************************************
2******* Explanation about menu.json *******
3*******************************************************************
4
5The menu.json defines the menu to show for each type of "roles":
6
7Supported roles:
8-----------------------------
9ADMIN
10DESIGNER
Michael Lando451a3402017-02-19 10:28:42 +020011
12The JSON is separated to roles, and for each role we define "states",
13what menu to show the user for each state of the component:
14
15Supported states:
16-----------------------------
17NOT_CERTIFIED_CHECKOUT
18NOT_CERTIFIED_CHECKIN
Michael Lando451a3402017-02-19 10:28:42 +020019CERTIFIED
20
21For each state we can define the user that will see this menu, the available parameters are:
22
23Supported users:
24-----------------------------
25ANY
26NOT_OWNER
27
28Example:
29For designer, if the component state is checkout and the component was created by other user, the NOT_OWNER will be used.
30
31"DESIGNER":{
32 "states":{
33 "NOT_CERTIFIED_CHECKOUT":{
34 "ANY":[
35 {"text":"Edit" ,"action":"goToEntity"},
36 {"text":"Check in","action":"changeLifecycleState", "url":"lifecycleState/CHECKIN", "confirmationModal": "lifecycleState/CHECKIN"},
Michael Lando451a3402017-02-19 10:28:42 +020037 {"text":"View" ,"action":"openViewerModal"}
38 ],
39 "NOT_OWNER":[
40 {"text":"View" ,"action":"openViewerModal"}
41 ]
42 },
43
44
45Definition of the menu item:
46-----------------------------
47text - The text to show
48action - Function that will be called when pressing on the menu item
49url - Data added to menu item, in case the function need to use it, example: for function "changeLifecycleState", I need to pass also the url "lifecycleState/CHECKOUT" that I want the state to change to.
50confirmationModal - Open confirmation modal (user should select "OK" or "Cancel"), and continue with the action.
Michael Lando451a3402017-02-19 10:28:42 +020051blockedForTypes - This item will not be shown for specific components types.