first commit
[slists.git] / root / src / lists / list.tt2
blobae5d97303bdb7cf9510bd130ec84486847e54ed9
1 [% # This is a TT comment. -%]
3 [%- # Provide a title -%]
4 [% META title = 'Lists List' -%]
6 [% # Note That the '-' at the beginning or end of TT code  -%]
7 [% # "chomps" the whitespace/newline at that end of the    -%]
8 [% # output (use View Source in browser to see the effect) -%]
10 [% # Some basic HTML with a loop to display books -%]
12 <table>
13 <tr><th>Id</th><th>Title</th><th>User id (XXX)</th><th>Links</th></tr>
14 [% # Display each list in a table row %]
15 [% FOREACH list IN lists -%]
16   <tr>
17     <td>[% list.id %]</td>
18     <td>[% list.title %]</td>
19     <td>[% list.user_id %]</td>
20     <!-- Also kg, cost, ... -->
21     <td>
22       [% # Add a link to delete a list %]
23       <a href="[%
24         c.uri_for(c.controller.action_for('delete'), [list.id]) %]">Delete</a>
25     </td>
26   </tr>
27 [% END -%]
28 <!-- XXX never use GET to delete data -->
30 </table>