[Trac-tickets] [The Trac Project] #1545: Move ticket's status-related visible strings from Python to templates

The Trac Project noreply at edgewall.com
Fri May 13 08:37:37 EDT 2005


#1545: Move ticket's status-related visible strings from Python to templates
---------------------------+------------------------------------------------
       Id:  1545           |      Status:  new                     
Component:  ticket system  |    Modified:  Fri May 13 08:37:37 2005
 Severity:  normal         |   Milestone:  0.9                     
 Priority:  normal         |     Version:  devel                   
    Owner:  cmlenz         |    Reporter:  pkou at ua.fm           
---------------------------+------------------------------------------------
 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:
  1. {{{trac/Query.py}}}, function {{{render_macro}}}, preparation of a
 compact report:
    1. CSS class name depends on ticket status.[[BR]]__Suggested change__:
 Define CSS styles for every ticket status and specify CSS class regardless
 of ticket status.
    1. Depending on ticket status, it is added to ''Summary''
 field.[[BR]]__Suggested change__: Add ticket status for all tickets? Or
 remove?
  1. {{{trac/wiki/formatter.py}}}, function {{{_make_ticket_link}}},
 creating an URL for ticket reference in wiki:
    1. CSS class name depends on ticket status.[[BR]]__Suggested change__:
 Define CSS styles for every ticket status and specify CSS class regardless
 of ticket status.
    1. Ticket status is added to popup text for some
 statuses.[[BR]]__Suggested change__: Add ticket status for all tickets.
  1. {{{trac/Ticket.py}}}, function {{{TicketModule.get_timeline_events}}},
 formatting title for an item in timeline:
    1. Text for timeline title depends on ticket status ({{{verbs}}}
 variable).[[BR]]__Suggested change__: (easy) put ticket status - bad look
 for new tickets, (hard) - format ticket title in template depending on
 ticket type.

 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)''

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/1545>
The Trac Project <>


More information about the Trac-Tickets mailing list