diff contrib/sawmill/web/templates/details.html @ 474:a8f77807d710

sawmill: create links for tag builds
author Sascha Teichmann <teichmann@intevation.de>
date Fri, 10 Sep 2010 14:18:07 +0000
parents d8012571f9e1
children 7be221f41f58
line wrap: on
line diff
--- a/contrib/sawmill/web/templates/details.html	Fri Sep 10 10:46:50 2010 +0000
+++ b/contrib/sawmill/web/templates/details.html	Fri Sep 10 14:18:07 2010 +0000
@@ -103,6 +103,11 @@
     if not b_start: return -1
     return cmp(a_start, b_start)
 
+def create_tags_link(tag_url):
+    return quoteattr(tag_url.replace(
+        "svn://anonsvn.kde.org/home/kde",
+        "http://websvn.kde.org"))
+
 track_items = sorted(track_items, cmp=sort_by_start, reverse=True)
 
 last_date = None
@@ -134,7 +139,22 @@
 <tr class="<%= STATUS2CLASS.get(track_item.build_status, 'error') %>">
     <td><%= STATUS2MSG.get(track_item.build_status, 'error') %></td>
     <td style="font-weight:bold;"><%= nn(track_item.track) %></td>
-    <td align="right"><%= nn(track_item.revision) %></td>
+    <td align="right">
+<%
+    tags = track_item.build_tags
+    if tags:
+        # a tag
+%>
+    <a href=<%= create_tags_link(tags) %>><strong><%= nn(track_item.revision) %></strong></a>
+<%
+    else:
+        # not a tag
+%>
+    <%= nn(track_item.revision) %>
+<%
+    # end if tags
+%>
+    </td>
     <td><%= pretty_time(track_item.build_start) %></td>
     <td><%= pretty_time(track_item.build_stop) %></td>
     <td>
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)