On Nov 19, 2007 4:45 PM, G S <[EMAIL PROTECTED]> wrote:
>
> I added a text field in the custom ticket area on my Trac 10.4 Install.
> It is called design and it is for holding a link to the Design Document.
>
> As of now when viewing the ticket the whole http://...... shows up.
>
> I would like to modify the ticket.cs so that it show a hyperlink
> instead of the text.
>
> I tried adding an elif to the ticket.cs
>
> if:field.type == 'text' && field.name =="design" ?><input type="text"
> id="<?cs
> var:name(field) ?>" name="<?cs
> var:name(field) ?>" value="<?cs <a href="' +
> var:ticket[name(field)] + '"> Design Document </a> ?>" /
>
> but obviously I am not a Clearsilver guru and this does not work.
>
> Anyone have a hint about where to go with this.
Not tested, but I think this is what you want:
<?cs elif:field.type == 'text' && field.name == "design" ?>
<input type="text" id="<?cs var:name(field) ?>"
name="<?cs var:name(field) ?>" value="<?cs
var:ticket[name(field)] ?>" />
<?cs /elif ?>
Ticket.cs has two sections in which the fields are looped through:
The first is the display of the ticket itself at the top. The second
is the inputs for modifying the ticket. The above is what you want in
the inputs section.
In the ticket display you just need
<a href="<?cs var:ticket[name(field)] ?>">Blah blah blah</a>
I'm not sure what you were trying to do with the <a> tag in the value
of the input...
Erik
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---