]> ruin.nu Git - ndwebbie.git/blobdiff - root/src/quotes/index.tt2
Interface for searching for quotes
[ndwebbie.git] / root / src / quotes / index.tt2
diff --git a/root/src/quotes/index.tt2 b/root/src/quotes/index.tt2
new file mode 100644 (file)
index 0000000..22012c7
--- /dev/null
@@ -0,0 +1,19 @@
+[% META title = 'Quotes' %]
+<form action="[% c.uri_for('') %]" method="post"><fieldset> <legend>Search term</legend>
+       <input type="text" name="search" value="[% search | html %]" class="search">
+       <input type="submit" value="Search">
+</fieldset></form>
+
+<table>
+       <tr>
+               <th>Id</th><th>Quote</th>
+       </tr>
+
+[% debug(quotes.size) %]
+[% FOR q IN quotes %]
+       <tr align="center" class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
+       <td align="right">[% q.qid %]</td>
+       <td align="left">[% q.quote | html %]</td>
+       </tr>
+[% END %]
+</table>