document_detail.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. {% extends "base.html" %}
  2. {% load costs %}
  3. {% block rail %}
  4. {% if document.comment_html %}
  5. <div class="ui segment">
  6. <p>
  7. <a class="ui ribbon left label">Notes</a>
  8. {{ document.comment_html|safe }}
  9. </p>
  10. </div>
  11. {% endif %}
  12. {% if request.user.is_staff %}
  13. <a href="{% url 'admin:costs_document_change' document.id %}" class="ui button">
  14. <i class="edit icon"></i>
  15. Éditer
  16. </a>
  17. {% endif %}
  18. {% endblock %}
  19. {% block content %}
  20. {% if document.type == document.TYPE_PLAN %}
  21. <div class="ui yellow icon message">
  22. <i class="warning icon"></i>
  23. <div class="content">
  24. <p>
  25. Ce document est un document de travail, exposant un scénario, et non
  26. un relevé.
  27. </p>
  28. </div>
  29. </div>
  30. {% endif %}
  31. <section class="ui row">
  32. <h2>Services proposés aux adhérents</h2>
  33. <p class="ui text container">
  34. Combien chaque abonnement à un service coûte à l'association ?
  35. </p>
  36. <ul class="ui text container">
  37. {% for service in document.service_set.all %}
  38. <li>
  39. <a href="{{ service.get_absolute_url }}">{{ service.name }}</a>
  40. ({{ service.get_prices.unit_consolidated_cost|price }} /mois)
  41. </li>
  42. {% empty %}
  43. <li>Pas de service pour l'instant.</li>
  44. {% endfor %}
  45. </ul>
  46. </section>
  47. <section class="ui row">
  48. <h2>Que paye {{ settings.ORGANIZATION_NAME }} chaque mois ?</h2>
  49. <div class="ui text container">
  50. <p>
  51. Coûts facturés à l'association mensuellement pour fournir l'ensemble des services.
  52. </p>
  53. <table class="ui structured table">
  54. <thead>
  55. <tr>
  56. <th>Désignation</th><th>Forfait souscrit</th>
  57. <th>Coût mensuel</th>
  58. </tr>
  59. </thead>
  60. <tbody>
  61. {% for cost in document.cost_set.all %}
  62. <tr>
  63. <td>
  64. {{ cost.name }}
  65. {% if cost.description %}
  66. <a href="#" title="{{ cost.description }}">
  67. <i class="info circle icon"></i>
  68. </a>
  69. {% endif %}
  70. </td>
  71. <td>
  72. {% if cost.capacity_unit %}
  73. {{ cost.total_capacity|human_round }} {{ cost.get_capacity_unit_display }}
  74. {% else %}
  75. n/a
  76. {% endif %}
  77. </td>
  78. <td>{{ cost.price|price }}</td>
  79. </tr>
  80. {% empty %}
  81. <tr><td>Pas de coût pour l'instant.</td></tr>
  82. {% endfor %}
  83. </tbody>
  84. <tfoot>
  85. <tr><th colspan="2">Total mensuel</th><th>{{ total_recuring_costs|price }}</th></tr>
  86. </tfoot>
  87. </table>
  88. </section>
  89. <section class="ui row">
  90. <h2>Matériel et frais d'accès</h2>
  91. <div class="ui text container">
  92. <p>
  93. Sont listés ici les investissements que l'association n'a a payer qu'une
  94. fois. Le coût d'achat est réparti entre les différents services. De plus,
  95. chaque mois, de l'argent est mis de côté pour veiller au remplacement de ce
  96. matériel lorsque celui-ci arrivera en fin de vie.
  97. </p>
  98. <table class="ui structured table">
  99. <thead>
  100. <tr>
  101. <th>Désignation</th>
  102. <th>Coût d'achat</th>
  103. </tr>
  104. </thead>
  105. <tbody>
  106. {% for good in document.good_set.all %}
  107. <tr>
  108. <td>
  109. {{ good.name }}
  110. {% if good.description %}
  111. <a href="#" title="{{ good.description }}">
  112. <i class="info circle icon"></i>
  113. </a>
  114. {% endif %}
  115. </td>
  116. <td>
  117. {{good.price|price }}
  118. </td>
  119. </tr>
  120. {% empty %}
  121. <tr><td>Pas de matériel pour l'instant.</td></tr>
  122. {% endfor %}
  123. <tfoot>
  124. <tr><th>Total</th><th>{{ total_goods|price }}</th></tr>
  125. </tfoot>
  126. </table>
  127. </div>
  128. </section>
  129. {% endblock %}