Opened 19 years ago
Closed 17 years ago
#1545 closed defect (worksforme)
Move ticket's status-related visible strings from Python to templates
Reported by: | pkou at ua.fm | Owned by: | Christopher Lenz |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | ticket system | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
There are several places in Trac Python code that define strings/parameters to be displayed in HTML. Areas of interest are the places where HTML text/code depends on ticket status directly. These places need to refactor with the following goals:
- Move HTML formatting from Python code to ClearSilver templates or CSS;
- Make the places status-independant.
The following places have been identified:
trac/Query.py
, functionrender_macro
, preparation of a compact report:- CSS class name depends on ticket status.
Suggested change: Define CSS styles for every ticket status and specify CSS class regardless of ticket status. - Depending on ticket status, it is added to Summary field.
Suggested change: Add ticket status for all tickets? Or remove?
- CSS class name depends on ticket status.
trac/wiki/formatter.py
, function_make_ticket_link
, creating an URL for ticket reference in wiki:- CSS class name depends on ticket status.
Suggested change: Define CSS styles for every ticket status and specify CSS class regardless of ticket status. - Ticket status is added to popup text for some statuses.
Suggested change: Add ticket status for all tickets.
- CSS class name depends on ticket status.
trac/Ticket.py
, functionTicketModule.get_timeline_events
, formatting title for an item in timeline:- Text for timeline title depends on ticket status (
verbs
variable).
Suggested change: (easy) put ticket status - bad look for new tickets, (hard) - format ticket title in template depending on ticket type.
- Text for timeline title depends on ticket status (
Goal of the changes is to make Trac Python code independent from ticket status. This will allow use existing code without changes when new statuses are introduced or when they are changed.
(In preparation for #869)
Attachments (0)
Change History (7)
comment:1 by , 19 years ago
comment:3 by , 19 years ago
Point 2 fixed in [1948].
Point 3 is tricky indeed. Just putting the status in the title would be bad IMHO. Moving this into the templates is no longer an option as the template no longer does the formatting of the individual timeline event titles. No bright idea here ATM.
comment:4 by , 19 years ago
Milestone: | 0.9 → 1.0 |
---|---|
Status: | assigned → new |
I don't see a good way to resolve point 3 for now. Postponing…
comment:7 by , 17 years ago
Milestone: | 1.0 |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Replying to pkou at ua.fm:
I think this should be closed safely.
Original reporter says 'close', so I'm closing… If nothing else, point 3 should also be resolved by the timeline-refactoring merge of [6158] for 0.11 (and most other things '0.11').
I am not sure that suggested changes are the better way for resolving this problem. Thus, review of the proposed changes is necessary before making them (or just implement as you think it is appropriate).