Changes between Version 13 and Version 14 of MenusPlugin


Ignore:
Timestamp:
Dec 20, 2008, 5:58:30 PM (15 years ago)
Author:
Catalin BALAN
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MenusPlugin

    v13 v14  
    3131||href||Where the item should link to||/report/1||
    3232||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||
    3433||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||
    3534||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||
     
    5958[mainnav]
    6059# Create a new top-level element for "Team Tools"
     60teamtools = enabled
    6161teamtools.parent = top
    6262teamtools.label  = Team Tools
     
    6464teamtools.hide_if_no_children = 1
    6565# Now add the discussion plugin here
     66discussion = enabled
    6667discussion.parent = teamtools
    67 # Hide it if it's not available
    68 discussion.hide_if_disabled = 1
    6968# Add the worklog here as well
    7069worklog.parent = teamtools
    71 worklog.hide_if_disabled = 1
     70
    7271# Add more things...
    7372...
     
    7675browser.label = Code
    7776# Add some entry points to the code browser
     77code_trunk = enabled
    7878code_trunk.parent=browser
    7979code_trunk.href=/browser/trunk
     80code_trunk.label=Trunk
    8081
    81 code_trunk.label=Trunk
    8282# this is no component - so to hide it if not available, we need a trick
    8383code_trunk.perm = BROWSER_VIEW
    8484
    8585# Add some reports to the ticket item
     86special_report = enabled
    8687special_report.parent=tickets
    8788special_report.href=/report/7
     
    9798# - if present, all other items not specified in config section will appear as sub-items under unassigned item.
    9899# - if not present, all other items will appear as top items.
     100unassigned = enabled
    99101unassigned.href=/wiki
    100102unassigned.label=Tools