]> projects.mako.cc - yourule/blob - templates/gallery.tmpl
0a94f91760fd27988c88590b35f5f7246f15a64c
[yourule] / templates / gallery.tmpl
1 #extends site
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="/show/ruler_${ruler.pixel_width}px_${ruler.cm_width}centimeters.png?fromgallery=true">cm</a>/<a href="/show/ruler_${ruler.pixel_width}px_${ruler.in_width}inches.png?fromgallery=true">in</a>
22   </td>
23   <td><form method="GET" action="delete/$ruler.id" style="display:inline;">
24       <input type="submit" value="delete" /></form></td>
25 </tr>
26 #end for
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 $getVar('errormsg', False)
35 <div class="errormsg">
36 <strong>Error</strong><br />
37 $getVar('errormsg', False)
38 </div>
39 #end if
40 <form method="POST" action="/gallery">
41
42 #include 'templates/_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="$getVar("model", None)" /></p>
47
48 <input type="Submit" name="submit" value="Save" />
49 </form>
50
51 #end block body

Benjamin Mako Hill || Want to submit a patch?