#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: |
Description
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
135 136 'panels': [{ 136 137 'category': {'id': panel[0], 'label': panel[1]}, 137 138 'panel': {'id': panel[2], 'label': panel[3]} 138 } for panel in panels ]139 } for panel in panels if panel[3]] 139 140 }) 140 141 141 142 add_stylesheet(req, 'common/css/admin.css')
Attachments (1)
Change History (4)
by , 16 years ago
Attachment: | unusefull-rendering.png added |
---|
follow-up: 2 comment:1 by , 16 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 by , 16 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 , 16 years ago
Milestone: | 0.12 |
---|
You should be using a request handler for this, not an admin panel.