1
0

list.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {% extends "hardware_provisioning/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. {% for message in messages %}
  9. <div class="message {{ message.tags }}">{{ message }}</div>
  10. {% endfor %}
  11. <p>
  12. <a href="{% url 'hardware_provisioning:item-list' %}"
  13. class="button pre-table-action success">
  14. <i class="fa fa-plus"></i> Déclarer un emprunt
  15. </a>
  16. </p>
  17. <table id="member_loans" class="full-width">
  18. <thead>
  19. <tr>
  20. <th>Type de matériel</th>
  21. <th>Matériel prêté</th>
  22. <th>Date de prêt</th>
  23. {% if view == 'old' %}<th>Date retour</th>{% endif %}
  24. <th>Addr. MAC</th>
  25. <th>Num. de série</th>
  26. {% if view != 'old' %}<th>Actions</th>{% endif %}
  27. </tr>
  28. </thead>
  29. <tbody>
  30. {% for loan in loans %}
  31. <tr>
  32. <td>{{ loan.item.type }}</td>
  33. <td>{{ loan.item }}</a></td>
  34. <td>{{ loan.loan_date }}</td>
  35. {% if view == 'old' %}<td>{{ loan.loan_date_end }}</td>{% endif %}
  36. <td>{{ loan.item.mac_address|default:"n/a" }}</td>
  37. <td>{{ loan.item.serial|default:"n/a" }}</td>
  38. {% if view != 'old' %}
  39. <td class="actions">
  40. <div class="button-group">
  41.   <a href="{% url 'hardware_provisioning:loan-return' pk=loan.pk %}" class="small button">
  42.      <i class="fa fa-times"></i>&nbsp;Rendre
  43.  </a>
  44. <a href="{% url 'hardware_provisioning:loan-transfer' pk=loan.pk %}" class="small button">
  45.  <i class="fa fa-exchange"></i> Transférer
  46. </a>
  47. </div>
  48. </td>
  49. {% endif %}
  50. </tr>
  51. {% empty %}
  52. <tr class="placeholder"><td colspan="6">… rien du tout !</td></tr>
  53. {% endfor %}
  54. </tbody>
  55. </table>
  56. <p class="list-filter">
  57. {% if view == 'old' %}
  58. <a href="./">Afficher les prêts en cours</a>
  59. {% else %}
  60. <a href="?old">Afficher l'historique de prêt</a>
  61. {% endif %}
  62. </p>
  63. {% endblock %}