Modify

Opened 6 years ago

Last modified 3 years ago

#4608 new enhancement

Using Trac short notation for report and changeset

Reported by: peterA Owned by: hasienda
Priority: normal Component: BreadCrumbsNavPlugin
Severity: normal Keywords: display format
Cc: Trac Release: 0.11

Description

It would be nice to shorten the breadcrumbs display using Trac syntax for report and changeset. Also only shows just the filename instead of full browser path. Here's a quick patch.

breadcrumbs.py:

148              if realm == "ticket": 
149                  name = "#" + resource 
150              elif realm == "report":           # report:7 is {7}
151                  name = "{" + resource + "}" 
152              elif realm == "changeset":        # changeset:10 is [10]
153                  name = "[" + resource + "]" 
154              elif realm == "browser":          # browser:/trunk/foo.py is foo.py
156                  name = resource.split('/').pop() 
157              elif realm != "wiki": 
158                  name = "%s:%s" % (realm, name) 

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by hasienda

  • Keywords display format added

Thanks for the suggestion, anyway we should do better with get_resource_description and argument 'format=compact'.

comment:2 Changed 3 years ago by hasienda

  • Owner changed from ixokai to hasienda

I'd like to keep this just as an reminder, but rather resolve it by implementing code referred to in #7790 in a backwards-compatible way, at least down to Trac 0.11.

Add Comment

Modify Ticket

Action
as new The owner will remain hasienda.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.