[rt-devel] [PATCH] Colors and Child Ticket Links
Darrin Thompson
darrint at progeny.com
Fri Feb 13 17:41:48 EST 2004
We use child tickets a lot. This patch helps make the child ticket tree
more usable for us.
* Add color support to make it easier to distinguish ticket status
(particularly useful for tickets with lots of children).
* Minor related fixes to bring child tickets in line with other
related tickets:
+ Link the entire child ticket number/subject
+ Add owner name
See attached.
--
Darrin
-------------- next part --------------
Index: share/html/Ticket/Elements/ShowLinks
===================================================================
--- share/html/Ticket/Elements/ShowLinks (revision 14568)
+++ share/html/Ticket/Elements/ShowLinks (revision 14569)
@@ -27,7 +27,8 @@
<td class="value">
<ul>
% while (my $Link = $Ticket->DependsOn->Next) {
-<li><& ShowLink, URI => $Link->TargetURI &>
+% my $status = $Link->TargetURI->Object->Status;
+<li class="<% $status %>"><& ShowLink, URI => $Link->TargetURI &>
% }
</ul>
</td>
@@ -37,7 +38,8 @@
<td class="value">
<ul>
% while (my $Link = $Ticket->DependedOnBy->Next) {
-<li><& ShowLink, URI => $Link->BaseURI &>
+% my $status = $Link->BaseURI->Object->Status;
+<li class="do <% $status %>"><& ShowLink, URI => $Link->BaseURI &>
% }
</ul>
</td>
@@ -47,7 +49,8 @@
<td class="value">
<ul>
% while (my $Link = $Ticket->MemberOf->Next) {
-<li><& ShowLink, URI => $Link->TargetURI &>
+% my $status = $Link->TargetURI->Object->Status;
+<li class="<% $status %>"><& ShowLink, URI => $Link->TargetURI &>
% }
</ul>
</td>
@@ -61,7 +64,8 @@
<td class="value">
<ul>
% while (my $Link = $Ticket->RefersTo->Next) {
-<li><& ShowLink, URI => $Link->TargetURI &>
+% my $status = $Link->TargetURI->Object->Status;
+<li class="<% $status %>"><& ShowLink, URI => $Link->TargetURI &>
% }
</ul>
</td>
@@ -71,7 +75,8 @@
<td class="value">
<ul>
% while (my $Link = $Ticket->ReferredToBy->Next) {
-<li><& ShowLink, URI => $Link->BaseURI &>
+% my $status = $Link->BaseURI->Object->Status;
+<li class="<% $status %>"><& ShowLink, URI => $Link->BaseURI &>
% }
</ul>
</td>
Index: share/html/Ticket/Elements/ShowMembers
===================================================================
--- share/html/Ticket/Elements/ShowMembers (revision 14568)
+++ share/html/Ticket/Elements/ShowMembers (revision 14569)
@@ -25,7 +25,7 @@
<UL>
% while (my $link = $members->Next) {
% my $member= $link->BaseObj;
-<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: <%$member->Subject%> [<%loc($member->Status)%>]<br>
+<LI class="<% $member->Status %>"><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%loc($member->Status)%>]</a><br>
% if ($depth < 8) {
<&/Ticket/Elements/ShowMembers, Ticket => $member, depth => ($depth+1) &>
% }
Index: share/html/Search/Elements/TicketRow
===================================================================
--- share/html/Search/Elements/TicketRow (revision 14568)
+++ share/html/Search/Elements/TicketRow (revision 14569)
@@ -31,7 +31,10 @@
>
<TD ROWSPAN="2"><B><A HREF="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->Id%>"><%$Ticket->id%></a></B></TD>
<TD><B><A HREF="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->Id%>"><%$Ticket->Subject%></a></B></TD>
-<TD><%loc($Ticket->Status)%></TD>
+% my $status = $Ticket->Status;
+<TD class="<% $status %>">
+<%loc($Ticket->Status)%>
+</TD>
<TD><%$Ticket->QueueObj->Name%></TD>
<TD><%$Ticket->Owner == $RT::Nobody->Id ? loc('Nobody') : $Ticket->OwnerObj->Name%></TD>
<TD><%$Ticket->Priority%></TD>
Index: share/html/Elements/MyRequests
===================================================================
--- share/html/Elements/MyRequests (revision 14568)
+++ share/html/Elements/MyRequests (revision 14569)
@@ -45,7 +45,8 @@
<TD>
<%$Ticket->QueueObj->Name%>
</TD>
-<TD>
+% my $status = $Ticket->Status;
+<TD class="<% $status %>">
% if ($Ticket->HasUnresolvedDependencies ) {
% if ($Ticket->HasUnresolvedDependencies( Type => 'approval' )) {
<em><&|/l&>(pending approval)</&></em>
Index: share/html/Elements/MyTickets
===================================================================
--- share/html/Elements/MyTickets (revision 14568)
+++ share/html/Elements/MyTickets (revision 14569)
@@ -47,7 +47,8 @@
<TD>
<%$Ticket->QueueObj->Name%>
</TD>
-<TD>
+%my $status = $Ticket->Status;
+<TD class="<% $status %>">
% if ($Ticket->HasUnresolvedDependencies ) {
% if ($Ticket->HasUnresolvedDependencies( Type => 'approval' ) or
% $Ticket->HasUnresolvedDependencies( Type => 'code' )) {
Index: share/html/NoAuth/webrt.css
===================================================================
--- share/html/NoAuth/webrt.css (revision 14568)
+++ share/html/NoAuth/webrt.css (revision 14569)
@@ -331,7 +331,33 @@
margin-bottom:0;
}
+/* highlights status text */
+td.open {
+ color: #0FBF0F; //green
+}
+td.new {
+ color: #C20E12; //red
+}
+td.stalled {
+ color: #0000FF; //blue
+}
+td.resolved, td.rejected {
+ color: #808080; //gray
+}
+li.open {
+ background-color: #2FAD2F; //green
+}
+li.new {
+ background-color: #E94343; //red
+}
+li.stalled {
+ background-color: #5E90DC; //blue
+}
+li.resolved, li.rejected {
+ background-color: #808080; //gray
+}
+
<%init>
$r->content_type('text/css');
$r->header_out('Expires' ,'+30m');
More information about the Rt-devel
mailing list