list.html 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {% extends "base.html" %}
  2. {% block content %}
  3. {% if view == 'old' %}
  4. <h2>L'association m'a prêté…</h2>
  5. {% else %}
  6. <h2>L'association me prête…</h2>
  7. {% endif %}
  8. <table id="member_loans" class="full-width">
  9. <thead>
  10. <tr>
  11. <th>Type de matériel</th>
  12. <th>Matériel prêté</th>
  13. <th>Date de prêt</th>
  14. {% if view == 'old' %}<th>Date retour</th>{% endif %}
  15. <th>Addr. MAC</th>
  16. <th>Num. de série</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. {% for loan in loans %}
  21. <tr>
  22. <td>{{ loan.item.type }}</td>
  23. <td>{{ loan.item }}</a></td>
  24. <td>{{ loan.loan_date }}</td>
  25. {% if view == 'old' %}<td>{{ loan.loan_date_end }}</td>{% endif %}
  26. <td>{{ loan.item.mac_address|default:"n/a" }}</td>
  27. <td>{{ loan.item.serial|default:"n/a" }}</td>
  28. </tr>
  29. {% empty %}
  30. <tr class="placeholder"><td colspan="6">… rien du tout !</td></tr>
  31. {% endfor %}
  32. </tbody>
  33. </table>
  34. <p class="list-filter">
  35. {% if view == 'old' %}
  36. <a href="./">Afficher les prêts en cours</a>
  37. {% else %}
  38. <a href="?old">Afficher l'historique de prêt</a>
  39. {% endif %}
  40. </p>
  41. {% endblock %}