Mercurial > treepkg
comparison 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 |
comparison
equal
deleted
inserted
replaced
473:d8012571f9e1 | 474:a8f77807d710 |
---|---|
101 if not a_start and not b_start: return 0 | 101 if not a_start and not b_start: return 0 |
102 if not a_start: return 1 | 102 if not a_start: return 1 |
103 if not b_start: return -1 | 103 if not b_start: return -1 |
104 return cmp(a_start, b_start) | 104 return cmp(a_start, b_start) |
105 | 105 |
106 def create_tags_link(tag_url): | |
107 return quoteattr(tag_url.replace( | |
108 "svn://anonsvn.kde.org/home/kde", | |
109 "http://websvn.kde.org")) | |
110 | |
106 track_items = sorted(track_items, cmp=sort_by_start, reverse=True) | 111 track_items = sorted(track_items, cmp=sort_by_start, reverse=True) |
107 | 112 |
108 last_date = None | 113 last_date = None |
109 | 114 |
110 STATUS2CLASS = { | 115 STATUS2CLASS = { |
132 # date changed | 137 # date changed |
133 %> | 138 %> |
134 <tr class="<%= STATUS2CLASS.get(track_item.build_status, 'error') %>"> | 139 <tr class="<%= STATUS2CLASS.get(track_item.build_status, 'error') %>"> |
135 <td><%= STATUS2MSG.get(track_item.build_status, 'error') %></td> | 140 <td><%= STATUS2MSG.get(track_item.build_status, 'error') %></td> |
136 <td style="font-weight:bold;"><%= nn(track_item.track) %></td> | 141 <td style="font-weight:bold;"><%= nn(track_item.track) %></td> |
137 <td align="right"><%= nn(track_item.revision) %></td> | 142 <td align="right"> |
143 <% | |
144 tags = track_item.build_tags | |
145 if tags: | |
146 # a tag | |
147 %> | |
148 <a href=<%= create_tags_link(tags) %>><strong><%= nn(track_item.revision) %></strong></a> | |
149 <% | |
150 else: | |
151 # not a tag | |
152 %> | |
153 <%= nn(track_item.revision) %> | |
154 <% | |
155 # end if tags | |
156 %> | |
157 </td> | |
138 <td><%= pretty_time(track_item.build_start) %></td> | 158 <td><%= pretty_time(track_item.build_start) %></td> |
139 <td><%= pretty_time(track_item.build_stop) %></td> | 159 <td><%= pretty_time(track_item.build_stop) %></td> |
140 <td> | 160 <td> |
141 <% | 161 <% |
142 for log_desc, log_path in track_item.build_logs: | 162 for log_desc, log_path in track_item.build_logs: |