added much of the ruler application
[yourule] / templates / gallery.tmpl
1 #extends site
2
3 #block body
4
5 <h2>Gallery of Existing Rulers</h2>
6
7 <table>
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>
22     <a href="/show/ruler_${ruler.pixel_width}px_${ruler.in_width}inches.png?fromgallery=true">in</a>
23   </td>
24   <td><form method="GET" action="delete/$ruler.id" style="display:inline;">
25       <input type="submit" value="delete" /></form></td>
26 </tr>
27 #end for
28 </table>
29
30 <h2>Add Your Ruler</h2>
31
32 <p>If your ruler is not on the list you should add it with the box
33 form.</p>
34
35
36 <form method="POST" action="/gallery">
37
38 #include 'templates/_form_elements.tmpl'
39
40 <p><label for="model">Laptop or monitor model:</label>
41 <input type="text" name="model" size="50" maxlength="100"
42 value="$getVar("model", None)" /></p>
43
44 <input type="Submit" name="submit" value="Save" />
45 </form>
46
47 #end block body

Benjamin Mako Hill || Want to submit a patch?