updates for python3
[yourule] / templates / gallery.tmpl
1 <% extends 'site.tmpl' %>
2
3 <% block body %>
4
5 <h2>Gallery of Existing Rulers</h2>
6
7 <table id="gallery">
8 <tr>
9 <th>Model</th>
10 <th>Pixel Width</th>
11 <th>Width (cm/in)</th>
12 <th>Rulers</th>
13 <th></th>
14 </tr>
15 <% for ruler in rulers %>
16 <tr>
17   <td><%= ruler.model%></td>
18   <td><%= ruler.pixel_width %></td>
19   <td><%= ruler.cm_width() %>/<%= ruler.in_width() %></td>
20   <td>
21     <a href="<%= homepath %>/show/ruler_<%= ruler.pixel_width %>px_<%= ruler.cm_width() %>centimeters.png?fromgallery=true">cm</a>/<a href="<%= homepath %>/show/ruler_<%= ruler.pixel_width %>px_<%= ruler.in_width() %>inches.png?fromgallery=true">in</a>
22   </td>
23   <td><form method="GET" action="<%= homepath %>/delete/<%= ruler.id %>" style="display:inline;">
24       <input type="submit" value="delete" /></form></td>
25 </tr>
26 <% endfor %>
27 </table>
28
29 <h2>Add Your Ruler</h2>
30
31 <p>If your ruler is not on the list you should add it with the box
32 form.</p>
33
34 <% if errormsg %>
35 <div class="errormsg">
36 <strong>Error</strong><br />
37 <%= errormsg %>
38 </div>
39 <% endif %>
40 <form method="POST" action="<%= homepath %>/gallery">
41
42 <% include '_form_elements.tmpl' %>
43
44 <p><label for="model">Laptop or monitor model:</label>
45 <input type="text" name="model" size="50" maxlength="100"
46 value="<%= model %>" /></p>
47
48 <input type="Submit" name="submit" value="Save" />
49 </form>
50
51 <% endblock %>

Benjamin Mako Hill || Want to submit a patch?