comparison contrib/sawmill/web/templates/details.html @ 486:283154e189d9

sawmill: Moved python blocks in templates to make them more readable.
author Sascha Teichmann <teichmann@intevation.de>
date Thu, 23 Sep 2010 09:59:06 +0000
parents a55a521b7a31
children a0d19e20fb89
comparison
equal deleted inserted replaced
485:a55a521b7a31 486:283154e189d9
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd"> 2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <%@include file="header.inc" %>
5
6 <div class="css_prison">
7 <h1><%= escape(description) %></h1>
8 <%= header %>
9 <table class="statustable">
10 <tr>
11 <th class="statustablehead">Status</th>
12 <th class="statustablehead">Package</th>
13 <th class="statustablehead">Revision</th>
14 <th class="statustablehead">Start</th>
15 <th class="statustablehead">Stop</th>
16 <th class="statustablehead">Duration</th>
17 <th class="statustablehead">Notes</th>
18 </tr>
3 <% 19 <%
4 from cgi import escape 20 from cgi import escape
5 from xml.sax.saxutils import quoteattr 21 from xml.sax.saxutils import quoteattr
6 22
7 from datetime import date, datetime 23 from datetime import date, datetime
63 'creating_binary_package': 'building binary packages', 79 'creating_binary_package': 'building binary packages',
64 'creating_source_package': 'building source package', 80 'creating_source_package': 'building source package',
65 'source_package_created': 'preparing build envrionment', 81 'source_package_created': 'preparing build envrionment',
66 'binary_package_created': 'success' 82 'binary_package_created': 'success'
67 } 83 }
68 %>
69 <html>
70 <%@include file="header.inc" %>
71 84
72 <div class="css_prison">
73 <h1><%= escape(description) %></h1>
74 <%= header %>
75 <table class="statustable">
76 <tr>
77 <th class="statustablehead">Status</th>
78 <th class="statustablehead">Package</th>
79 <th class="statustablehead">Revision</th>
80 <th class="statustablehead">Start</th>
81 <th class="statustablehead">Stop</th>
82 <th class="statustablehead">Duration</th>
83 <th class="statustablehead">Notes</th>
84 </tr>
85 <%
86 for track_item in track_items: 85 for track_item in track_items:
87 # for all track items 86 # for all track items
88 curr_date = date_from_datetime(track_item.build_start) 87 curr_date = date_from_datetime(track_item.build_start)
89 if curr_date != last_date: 88 if curr_date != last_date:
90 last_date = curr_date 89 last_date = curr_date
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)