Edgewall Software

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#7483 closed enhancement (wontfix)

Don't add panel providers which do not provide a label to be rendered

Reported by: Pedro Algarvio, aka, s0undt3ch Owned by:
Priority: normal Milestone:
Component: admin/web Version: 0.12dev
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:


Sometimes one might want his plugin to be able to handle some requests, yet, he might not want it to show on the admin pannels.

For example, on a plugin I'm currently working on I have 2 of those, one is downloads, but since that one is just serving files no active/not active panel rending checks is done, but, for the other one, it's supposed to a sub page and those active/ not active checks are rendered, making some un-useful empty html, like the screenshot attached(the one on the right, the one on the left is with this patch applied). A simple change on this code will do the trick:

  • trac/admin/web_ui.py

    135136            'panels': [{
    136137                'category': {'id': panel[0], 'label': panel[1]},
    137138                'panel': {'id': panel[2], 'label': panel[3]}
    138             } for panel in panels]
     139            } for panel in panels if panel[3]]
    139140        })
    141142        add_stylesheet(req, 'common/css/admin.css')

Attachments (1)

unusefull-rendering.png (4.0 KB ) - added by Pedro Algarvio, aka, s0undt3ch 14 years ago.

Download all attachments as: .zip

Change History (4)

by Pedro Algarvio, aka, s0undt3ch, 14 years ago

Attachment: unusefull-rendering.png added

comment:1 by Noah Kantrowitz, 14 years ago

Resolution: wontfix
Status: newclosed

You should be using a request handler for this, not an admin panel.

in reply to:  1 comment:2 by Pedro Algarvio, aka, s0undt3ch, 14 years ago

Replying to nkantrowitz:

You should be using a request handler for this, not an admin panel.

Even if I'm still rendering an admin page?

comment:3 by Remy Blank, 14 years ago

Milestone: 0.12

Modify Ticket

Change Properties
Set your email in Preferences
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.