Trac is being migrated to new services! Issues can be found in our new YouTrack instance and WIKI pages can be found on our website.

LocalTracChanges: query_and_report.diff

File query_and_report.diff, 1.4 KB (added by deryni, 14 years ago)

Patch to allow the query and report modules to play nicely together.

  • trac/ticket/query.py

    diff -urp Trac-orig/trac/ticket/query.py Trac-0.11.5/trac/ticket/query.py
    old new class QueryModule(Component): 
    744744        return 'tickets'
    745745
    746746    def get_navigation_items(self, req):
    747         from trac.ticket.report import ReportModule
    748         if 'TICKET_VIEW' in req.perm and \
    749                 not self.env.is_component_enabled(ReportModule):
     747        if 'TICKET_VIEW' in req.perm:
    750748            yield ('mainnav', 'tickets',
    751749                   tag.a(_('View Tickets'), href=req.href.query()))
    752750
  • trac/ticket/report.py

    Only in Trac-0.11.5/trac/ticket: query.py.orig
    diff -urp Trac-orig/trac/ticket/report.py Trac-0.11.5/trac/ticket/report.py
    old new class ReportModule(Component): 
    5555    # INavigationContributor methods
    5656
    5757    def get_active_navigation_item(self, req):
    58         return 'tickets'
     58        return 'reports'
    5959
    6060    def get_navigation_items(self, req):
    6161        if 'REPORT_VIEW' in req.perm:
    62             yield ('mainnav', 'tickets', tag.a(_('View Tickets'),
     62            yield ('mainnav', 'reports', tag.a(_('View Reports'),
    6363                                               href=req.href.report()))
    6464
    6565    # IPermissionRequestor methods 
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!