document_detail.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {% extends "costs/base.html" %}
  2. {% load costs %}
  3. {% block title %}{{ document.name }}{% endblock %}
  4. {% block content %}
  5. <aside>
  6. <p><em>{{ document.date|date:"M Y" }}</em></p>
  7. </aside>
  8. <h2>Services proposés</h2>
  9. <ul>
  10. {% for service in document.service_set.all %}
  11. <li>
  12. <a href="{{ service.get_absolute_url }}">{{ service.name }}</a>
  13. </li>
  14. {% empty %}
  15. <li>Pas de service pour l'instant.</li>
  16. {% endfor %}
  17. </ul>
  18. <h2>Coûts</h2>
  19. <table>
  20. <thead>
  21. <tr>
  22. <th>Désignation</th><th>Capacité totale</th>
  23. <th>Occupation</th><th>Coût mensuel</th>
  24. </tr>
  25. </thead>
  26. <tbody>
  27. {% for cost in document.cost_set.all %}
  28. <tr>
  29. <td>
  30. {{ cost.name }}<a href="#" title="{{ cost.description }}">ⓘ</a>
  31. </td>
  32. <td>
  33. {% if cost.capacity_unit %}
  34. {{ cost.total_capacity }} {{ cost.get_capacity_unit_display }}
  35. {% else %}
  36. n/a
  37. {% endif %}
  38. </td>
  39. <td>{{ cost.used_fraction|percent }}</td>
  40. <td>{{ cost.price|price }}</td>
  41. </tr>
  42. {% empty %}
  43. <tr><td>Pas de coût pour l'instant.</td></tr>
  44. {% endfor %}
  45. <tbody>
  46. </table>
  47. <h2>Matériel et frais d'accès</h2>
  48. <table>
  49. <thead>
  50. <tr>
  51. <th>Désignation</th>
  52. <th>Capacité totale</th>
  53. <th>Occupation</th>
  54. <th>Coût d'achat</th>
  55. </tr>
  56. </thead>
  57. <tbody>
  58. {% for good in document.good_set.all %}
  59. <tr>
  60. <td>
  61. {{ good.name }}<a href="#" title="{{ good.description }}">ⓘ</a>
  62. </td>
  63. <td>
  64. {% if good.capacity_unit %}
  65. {{ good.total_capacity }} {{ good.get_capacity_unit_display }}
  66. {% else %}
  67. n/a
  68. {% endif %}
  69. </td>
  70. <td>
  71. {{ good.used_fraction|percent }}
  72. </td>
  73. <td>
  74. {{good.price|price }}
  75. </td>
  76. </tr>
  77. {% empty %}
  78. <tr><td>Pas de matériel pour l'instant.</td></tr>
  79. {% endfor %}
  80. </table>
  81. {% endblock %}