Ticket #1545 (closed defect: worksforme)
Move ticket's status-related visible strings from Python to templates
| Reported by: | pkou at ua.fm | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | ticket system | Version: | devel |
| Severity: | normal | Keywords: | |
| Cc: |
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, function render_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, function TicketModule.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 (verbs variable).
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
Change History
Note: See
TracTickets for help on using
tickets.


