Opened 9 years ago
Closed 5 years ago
#12196 closed enhancement (fixed)
Link from milestone admin panel to milestone page
Reported by: | anonymous | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.1 |
Component: | admin/web | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Added View Milestone contextual navigation to the Admin milestone edit page. |
||
API Changes: | |||
Internal Changes: |
Description
I often want to navigate from the milestone admin panel to the milestone page available from the roadmap.
I would add a link to the contextual navigation menu, or do admin panels not have those?
And maybe also add a link in the reverse direction if the user has admin permissions.
Attachments (0)
Change History (7)
comment:1 by , 9 years ago
Keywords: | bitesized added |
---|---|
Milestone: | → next-major-releases |
comment:2 by , 7 years ago
comment:3 by , 7 years ago
if the user has admin permissions.
I'm not exactly sure what the right permission check is. Looking at the existing code possibly this:
-
trac/ticket/roadmap.py
diff -r a3e91091080a trac/ticket/roadmap.py
a b 1037 1038 1038 1039 add_stylesheet(req, 'common/css/roadmap.css') 1039 1040 1041 admin_perm = req.perm('admin', 'ticket/milestones') 1042 if 'MILESTONE_ADMIN' in admin_perm or \ 1043 'MILESTONE_MODIFY' in admin_perm and 'TICKET_ADMIN' in admin_perm: 1044 add_ctxtnav(req, _("Admin"), 1045 req.href.admin('ticket', 'milestones', milestone.name)) 1046 1040 1047 def add_milestone_link(rel, milestone): 1041 1048 href = req.href.milestone(milestone.name, by=req.args.get('by')) 1042 1049 add_link(req, rel, href, _('Milestone "%(name)s"',
comment:4 by , 6 years ago
Keywords: | patch review added |
---|
Please can you let me know what is missing in the patches above for Trac? They would be very helpful. Thanks! 🎅
follow-up: 6 comment:5 by , 5 years ago
Milestone: | next-major-releases → 1.5.1 |
---|---|
Owner: | set to |
Status: | new → assigned |
- View on Roadmap looks useful, though I'd name it View Milestone.
- What is the reason for Edit on Roadmap? After #3754 is implemented, it's just the same edit page set within a different context.
- Same thought as (2) for the Admin link from the Edit Milestone page.
- A link to the Milestone from the Manage Milestone page (
/admin/ticket/milestones
) would be useful, but I'm not sure where to put it. The Name column could link to the milestone if we had an Edit link (such as: [✎ Edit], see Wiki History page for example) somewhere: to the left or right of the table, or to the right of the link in the name column.
Unless there's an idea for (4), I propose to just commit this change:
-
trac/ticket/admin.py
diff --git a/trac/ticket/admin.py b/trac/ticket/admin.py index acc2df617..93d2766b8 100644
a b from trac.util.datefmt import format_date, format_datetime, \ 24 24 get_datetime_format_hint, parse_date, user_time 25 25 from trac.util.text import exception_to_unicode, print_table, printout 26 26 from trac.util.translation import _, N_, gettext 27 from trac.web.chrome import Chrome, add_notice, add_script, add_warning 27 from trac.web.chrome import Chrome, add_ctxtnav, add_notice, add_script, \ 28 add_warning 28 29 29 30 30 31 class TicketAdminPanel(Component): … … class MilestoneAdminPanel(TicketAdminPanel): 252 253 chrome = Chrome(self.env) 253 254 chrome.add_wiki_toolbars(req) 254 255 chrome.add_auto_preview(req) 256 add_ctxtnav(req, _("View Milestone"), 257 req.href.milestone(milestone_name)) 255 258 data = {'view': 'detail', 256 259 'milestone': milestone, 257 260 'default_due': milestone_module.get_default_due(req)}
comment:6 by , 5 years ago
- View on Roadmap looks useful, though I'd name it View Milestone.
Agree, sounds good.
- What is the reason for Edit on Roadmap? After #3754 is implemented, it's just the same edit page set within a different context.
Agree. The idea was "we are already in the (admin) edit milestone view so we apparently want to edit the milestone, so allow to go directly to the (roadmap) edit milestone view to use the more advanced editing features there". if #3754 is implemented and makes all the advanced editing features available on the admin page already, then the Edit on Roadmap link is not urgently needed.
- Same thought as (2) for the Admin link from the Edit Milestone page.
Maybe it is not urgently needed. I think navigation from roadmap to admin panel could be useful just in case (maybe in the future or with some plugin it is still needed), for completeness (after navigating from admin panel to roadmap you get "stuck" and can not easily return to the admin panel), and for discoverability (new users may not be aware of related admin panel).
- A link to the Milestone from the Manage Milestone page (
/admin/ticket/milestones
) would be useful, but I'm not sure where to put it. The Name column could link to the milestone if we had an Edit link (such as: [✎ Edit], see Wiki History page for example) somewhere: to the left or right of the table, or to the right of the link in the name column.Unless there's an idea for (4)
Agree it could be nice, but there is no obvious good place. Contextual navigation links was the best "workaround" I could find.
I propose to just commit this change:
Looks good, thanks! 🥮
comment:7 by , 5 years ago
Keywords: | bitesized patch review removed |
---|---|
Release Notes: | modified (diff) |
Resolution: | → fixed |
Status: | assigned → closed |
trac/ticket/admin.py
trac/ticket/roadmap.py