Changes between Version 13 and Version 14 of MenusPlugin
- Timestamp:
- Dec 20, 2008, 5:58:30 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MenusPlugin
v13 v14 31 31 ||href||Where the item should link to||/report/1|| 32 32 ||enabled||Should it be used? Hell, why we define it? But this is useful to temporarily disable an item.||1|| 33 ||hide_if_disabled||Useful if you move an existing top-level element: Don't display anything if it is not existing (otherwise, <item_name> would be displayed if the user lacks the permission). Works only for components.||1||34 33 ||hide_if_no_children||Don't display this (sub) menu if it has no children (e.g. the current user lacks the privileges for all sub-items)||1|| 35 34 ||perm||For items like reports, `hide_if_disabled` does not work, since this is no component. Though, it should not be displayed if it is not available. So you can handle this by defining the required permission.||REPORT_VIEW|| … … 59 58 [mainnav] 60 59 # Create a new top-level element for "Team Tools" 60 teamtools = enabled 61 61 teamtools.parent = top 62 62 teamtools.label = Team Tools … … 64 64 teamtools.hide_if_no_children = 1 65 65 # Now add the discussion plugin here 66 discussion = enabled 66 67 discussion.parent = teamtools 67 # Hide it if it's not available68 discussion.hide_if_disabled = 169 68 # Add the worklog here as well 70 69 worklog.parent = teamtools 71 worklog.hide_if_disabled = 1 70 72 71 # Add more things... 73 72 ... … … 76 75 browser.label = Code 77 76 # Add some entry points to the code browser 77 code_trunk = enabled 78 78 code_trunk.parent=browser 79 79 code_trunk.href=/browser/trunk 80 code_trunk.label=Trunk 80 81 81 code_trunk.label=Trunk82 82 # this is no component - so to hide it if not available, we need a trick 83 83 code_trunk.perm = BROWSER_VIEW 84 84 85 85 # Add some reports to the ticket item 86 special_report = enabled 86 87 special_report.parent=tickets 87 88 special_report.href=/report/7 … … 97 98 # - if present, all other items not specified in config section will appear as sub-items under unassigned item. 98 99 # - if not present, all other items will appear as top items. 100 unassigned = enabled 99 101 unassigned.href=/wiki 100 102 unassigned.label=Tools