list.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. {% endfor %}
  30. </tbody>
  31. </table>
  32. <p class="list-filter">
  33. {% if view == 'old' %}
  34. <a href="./">Afficher les prêts en cours</a>
  35. {% else %}
  36. <a href="?old">Afficher l'historique de prêt</a>
  37. {% endif %}
  38. </p>
  39. {% endblock %}