Skip to content

Commit 43a201a

Browse files
author
Richard Jones
committed
another example
1 parent 3db7b1c commit 43a201a

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

doc/customizing.txt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Customising Roundup
33
===================
44

5-
:Version: $Revision: 1.107 $
5+
:Version: $Revision: 1.108 $
66

77
.. This document borrows from the ZopeBook section on ZPT. The original is at:
88
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -3654,6 +3654,28 @@ template as follows::
36543654
line).
36553655

36563656

3657+
Colouring the rows in the issue index according to priority
3658+
-----------------------------------------------------------
3659+
3660+
A simple ``tal:attributes`` statement will do the bulk of the work here. In
3661+
the ``issue.index.html`` template, add to the ``<tr>`` that displays the
3662+
actual rows of data::
3663+
3664+
<tr tal:attributes="class string:priority-${i/priority/plain}">
3665+
3666+
and then in your stylesheet (``style.css``) specify the colouring for the
3667+
different priorities, like::
3668+
3669+
tr.priority-critical td {
3670+
background-color: red;
3671+
}
3672+
3673+
tr.priority-urgent td {
3674+
background-color: orange;
3675+
}
3676+
3677+
and so on, with far less offensive colours :)
3678+
36573679
-------------------
36583680

36593681
Back to `Table of Contents`_

0 commit comments

Comments
 (0)