template.list.html 986 B

1234567891011121314151617181920212223242526272829303132333435
  1. {% extends "base.html" %}
  2. {% block title %}Lista Template{% endblock %}
  3. {% block top %}
  4. {% if template %}
  5. <table class='table table-striped table-hover'>
  6. <thead class='thead-dark'>
  7. <tr>
  8. <form name='ordine' method='POST'>
  9. {% csrf_token %}
  10. <th scope='col'><button class='btn btn-link btn-ism' type='submit' name='ordine_id' value='ordine_id'>ID</button></th>
  11. <th scope='col'><button class='btn btn-link btn-ism' type='submit' name='ordine_alfabetico' value='ordine_alfabetico'>Nome</button></th>
  12. </form>
  13. <th scope='col'>Soggetto</th>
  14. </tr>
  15. </thead>
  16. <tbody>
  17. {% for i in template %}
  18. <tr scope='row'>
  19. <td><a href={% url "Template:edit" i.id %}>{{ i.id }}</a></td>
  20. <td>{{ i.nome }}</td>
  21. <td>{{ i.soggetto }}</td>
  22. </tr>
  23. {% endfor %}
  24. </tbody>
  25. </table>
  26. {% else %}
  27. Non ci sono Template da mostrare
  28. {% endif %}
  29. <p>
  30. <p>
  31. Aggiungi un template <a href={% url 'Template:edit' 0 %}>QUI!</a>
  32. {% endblock %}