main.tpl 604 B

12345678910111213141516171819
  1. % rebase('base.tpl')
  2. %#template to generate a HTML table from a list of tuples (or list of lists, or tuple of tuples or ...)
  3. <form action="/" method="POST">
  4. <select multiple name="tag" onchange="this.form.submit()">
  5. %for tag in tags:
  6. <option value="{{tag}}">{{tag}}</option>
  7. %end
  8. </select>
  9. </form>
  10. <p>Click on username to view the details:</p>
  11. <table border="1">
  12. %for node in nodes:
  13. <tr>
  14. <td><a href=/node/{{node._id}}>{{node.username}}@{{node.url}}</a></td>
  15. <td>{{ ', '.join([t.strip() for t in filter(None, node.tags)]) }}</td>
  16. <td><a href=/edit/{{node._id}}>edit</a></td>
  17. </tr>
  18. %end
  19. </table>