Fossil SCM
Tickets: make the (html & th1) template for ticket reports editable
bb4e02048ddff8d…
· opened 15 years, 3 months ago
- Type
- Feature_Request
- Priority
- —
- Severity
- Important
- Resolution
- Open
- Subsystem
- —
- Created
- Dec. 20, 2010 2:37 p.m.
The ticket system is amazingly customizable, except the report page. I'd like to style it further, like changing the font color or making a title or an entire row a hyperlink. CSS can do any of this, but it cannot bind to element contents(
anonymous added on 2010-12-20 14:39:25: Oops, html is mangled. I meant "<td>critical</td>" and "<td class="severity">critical</td>"
anonymous claiming to be Alex added on 2010-12-28 07:18:08:
Found a partial workaround, based on the absence of checks on the background color specified in a report template. Since background color is now done with CSS, we can specify something like
WHEN status='CLOSED' THEN '#909090; text-decoration: line-through'
in the template, which gives us this HTML code
<tr style="background-color:#909090; text-decoration: line-through">
and a correct style. Of course this gives us limited design opportunities, but it is still better than nothing.
anonymous claiming to be Alex added on 2010-12-28 10:20:56:
OK, found a more complete workaround for decent browsers (latest Opera/Firefox/Chrome/maybe IE9) that allows per-column styling. It is based on passing values in rarely-used CSS properties and CSS3 nth-child property.
First, we need to agree that our ticket report might sound bad if pronounced by text-to-speech software. Then we can use the 'elevation' property for our own purposes. 'elevation: 1deg;' will be a substitute for 'class=myclass1', 'elevation: 2deg;' for 'class=myclass2', etc.
WHEN status='CLOSED' AND severity='HIGH' THEN '#909090; elevation: 1deg;'
WHEN status='CLOSED' THEN '#909090; elevation: 2deg;'
Note the spaces after the first semicolon and after the 'elevation:' property, and the trailing semicolon.
Then, in CSS
table.report tr[style~="1deg;"] td:nth-child(1) {
text-decoration: line-through;
}
Again, note the trailing semicolon and lack of the property name in the selector. We need to follow this syntax because a) attribute text is space-separated in ~= matches, and b) some browsers internally rewrite CSS into this 'canonical' form.
These settings strike out the numbers of the closed highly-severe tickets, but leave other columns intact. Background color of all closed tickets is the same.
Unfortunately, IE7-8 does not support this.
anonymous added on 2010-12-28 10:25:18:
Damn, it was supposed to read
table.report tr[style~="1deg;"] td:nth-child(1) {