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 -%]
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 -%]
17 <td>[% list.id %]</td>
18 <td>[% list.title %]</td>
19 <td>[% list.user_id %]</td>
20 <!-- Also kg, cost, ... -->
22 [% # Add a link to delete a list %]
24 c.uri_for(c.controller.action_for('delete'), [list.id]) %]">Delete</a>
26 c.uri_for(c.controller.action_for('view'), [list.id]) %]">View</a>
31 <!-- XXX never use GET to delete data -->