Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#8051 closed defect (worksforme)

Change of Ticket template doesn't work

Reported by: li.jie@… Owned by:
Priority: normal Milestone:
Component: web frontend Version: 0.11.2.1
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I tried to enlarge rows of description field by modifying newticket.cs, however, it doesn't work. Here is what I did:modify value of rows from 15 to 45 in /usr/share/trac/template/newticket.cs: <textarea id="description" name="description" class="wikitext"rows="45" cols="78"> Then go Trac project, click "New Tickets", the description field does not change at all.

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 16 years ago

Resolution: worksforme
Status: newclosed

Since Trac 0.11, the template engine changed from ClearSilver to Genshi. Modifying your old 0.10 .cs template files is therefore pointless.

You should instead modify the Genshi templates:

  • statically, by changing the template files themselves in your environment's templates directory
  • dynamically, by writing a plugin implementing ITemplateStreamFilter, which is then able to transform the structured output while it is produced. See for example source:tags/trac-0.11/sample-plugins/ticket_clone.py.

The latter method is the preferred one, as it has better chances to adapt to changes to the template as you upgrade Trac.

P.S.: in 0.11 the newticket.cs and ticket.cs have been merged into a single ticket.html template. If you used to know well ClearSilver, you can look at TracDev/PortingFromClearSilverToGenshi for a conversion tutorial.

comment:2 by Jie Li, 16 years ago

Fantastic, thanks a million~

comment:3 by osimons, 16 years ago

Or,

comment:4 by Jie Li, 16 years ago

How nice you guys are! I am studying Genshi. Have a nice day!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.