Changes between Version 20 and Version 21 of MenusPlugin


Ignore:
Timestamp:
Jul 29, 2009, 12:31:37 AM (6 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MenusPlugin

    v20 v21  
    5757== Example ==
    5858
    59 Demo config:
     59[http://code.optaros.com/trac/oforge/ Demo] config:
    6060{{{
    61 ...
    62 [components]
    63 tracmenus.* = enabled
     61[mainnav]
     62tags = disabled
     63search = disabled
     64timeline = disabled
    6465
    65 [mainnav]
    66 # Create a new top-level element for "Team Tools" - make sure to set it to "enabled" or it doesn't show up!
    67 teamtools = enabled
    68 teamtools.parent = top
    69 teamtools.label  = Team Tools
    70 # Do not display this menu if it has no children (e.g. visitor has no permission to any)
    71 teamtools.hide_if_no_children = 1
    72 # Now add the discussion plugin here
    73 discussion = enabled
    74 discussion.parent = teamtools
    75 # Add the worklog here as well
    76 worklog.parent = teamtools
     66home = enabled
     67home.href = /
     68home.label = Home
     69home.parent = top
     70home.order = 10
    7771
    78 # Add more things...
    79 ...
     72wiki.label = Wiki
     73wiki.order = 20
    8074
    81 # rename "Browse Source" to "Code"
    82 browser.label = Code
    83 # Add some entry points to the code browser
    84 code_trunk = enabled
    85 code_trunk.parent=browser
    86 code_trunk.href=/browser/trunk
    87 code_trunk.label=Trunk
     75wiki_newpage = enabled
     76wiki_newpage.href = /newwikipage
     77wiki_newpage.parent = wiki
     78wiki_newpage.label = New Wiki Page
     79wiki_newpage.order = 1
    8880
    89 # this is no component - so to hide it if not available, we need a trick
    90 code_trunk.perm = BROWSER_VIEW
     81wiki_titleindex = enabled
     82wiki_titleindex.href = /wiki/TitleIndex
     83wiki_titleindex.label = Wiki Index
     84wiki_titleindex.parent = wiki
     85wiki_titleindex.order = 2
    9186
    92 # Add some reports to the ticket item
    93 special_report = enabled
    94 special_report.parent=tickets
    95 special_report.href=/report/7
    96 special_report.label=My Tickets
    97 # same trick as above required here
    98 special_report.perm=REPORT_VIEW
     87wiki_timeline = enabled
     88wiki_timeline.href = /timeline?wiki=on
     89wiki_timeline.label = Recent Changes
     90wiki_timeline.parent = wiki
     91wiki_timeline.order = 3
    9992
    100 # Some more things
    101 wiki.parent=top
    102 browser.parent=top
     93ticketgrp = enabled
     94ticketgrp.href = /report
     95ticketgrp.label = Tickets
     96ticketgrp.order = 30
     97ticketgrp.parent = top
    10398
    104 # unassigned is a reserved keyword:
    105 # - if present, all other items not specified in config section will appear as sub-items under unassigned item.
    106 # - if not present, all other items will appear as top items.
    107 unassigned = enabled
    108 unassigned.href=/wiki
    109 unassigned.label=Tools
    110 ...
     99tickets.parent = ticketgrp
     100tickets.order = 1
     101tickets.label = View Reports
    111102
    112 # Make sure the Wiki is always the first item - and Admin always the last:
    113 wiki.order = -999999
    114 admin.order = 999999
     103query = enabled
     104query.href = /query
     105query.label = Custom Query
     106query.parent = ticketgrp
     107query.order = 2
     108
     109newticket.parent = ticketgrp
     110newticket.order = 3
     111
     112ticket_defect = enabled
     113ticket_defect.href = /newticket?type=defect
     114ticket_defect.parent = newticket
     115ticket_defect.label = New Defect
     116ticket_defect.order = 1
     117
     118ticket_enhancement = enabled
     119ticket_enhancement.href = /newticket?type=enhancement
     120ticket_enhancement.parent = newticket
     121ticket_enhancement.label = New Enhancement
     122ticket_enhancement.order = 2
     123
     124ticket_task = enabled
     125ticket_task.href = /newticket?type=task
     126ticket_task.parent = newticket
     127ticket_task.label = New Task
     128ticket_task.order = 3
     129
     130ticket_timeline = enabled
     131ticket_timeline.href = /timeline?ticket=on
     132ticket_timeline.label = Recent Changes
     133ticket_timeline.parent = ticketgrp
     134ticket_timeline.order = 4
     135
     136browsergrp = enabled
     137browsergrp.parent = top
     138browsergrp.href = /browser
     139browsergrp.label = Code
     140browsergrp.order = 40
     141
     142browser.label = Browse Repository
     143browser.parent = browsergrp
     144browser.order = 10
     145
     146browser_log = enabled
     147browser_log.label = Revision Log
     148browser_log.href = /log
     149browser_log.parent = browsergrp
     150browser_log.order = 20
     151
     152browser_timeline = enabled
     153browser_timeline.label = Recent Changes
     154browser_timeline.href = /timeline?changeset=on
     155browser_timeline.parent = browsergrp
     156browser_timeline.order = 30
     157
     158status.order = 50
     159
     160tools = enabled
     161tools.href = #
     162tools.label = Team Tools
     163tools.order = 60
     164tools.parent = top
     165tools.hide_if_no_children = true
     166
     167# tools
     168alfresco.parent = tools
     169continuum.parent = tools
     170irclogs.parent = tools
     171mailarchives.parent = tools
     172pastebin.parent = tools
     173roadmap.parent = status
    115174}}}
    116175