I'm getting Trac 0.12.1 set up for the first time, and have written a few custom report queries.
However, I am having difficulty getting the custom __style__
macro thingy (described in the docs here) to display a text-decoration: line-through;
style. It doesn't show up at all.
My query is roughly the following:
SELECT p.value AS __color__,
(CASE status WHEN 'closed' THEN 'text-decoration: line-through' END)
AS __style__,
id AS ticket, priority, summary, version
FROM ticket t
LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
ORDER BY version DESC, id DESC
This does not display closed tickets with line-through. I can see it in the rendered page source, it is correctly formatted in the style=""
attribute tag, as such:
</tr>
<tr class="color1-even" style="text-decoration: line-through;">
<td class="ticket">
However, changing line 2 in the query above to read:
(CASE status WHEN 'closed' THEN 'color: #666; background: #ccc' END)
It actually does show the row color and background as changing to a medium-gray color, so the style is definitely working.
Is anyone familiar enough with Trac to say why this may not be working, and provide a workaround? Strike-through really helps to distinguish closed/invalid tickets.
It may be that text-decoration:line-through
doesn't work across tr
tags; if that is the case, is there a way to apply the Trac __style__
only on one column (having it only on the summary
would be fine.)
Thank you in advance.