service_detail_user.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. {% extends 'base.html' %}
  2. {% load bootstrap3 %}
  3. {% block usertab %}{% if service.adhesion == request.user.profile.adhesion %} class="active"{% endif %}{% endblock %}
  4. {% block corptab %}{% if service.adhesion != request.user.profile.adhesion %} active{% endif %}{% endblock %}
  5. {% block content %}
  6. <div class="panel panel-{{ service.active|yesno:"success,danger"}}">
  7. <div class="panel-heading">
  8. <h3>{{ service.service_type }}</h3>
  9. {% if service.label %}
  10. <h4>{{ service.label }}</h4>
  11. {% endif %}
  12. </div>
  13. <div class="panel-body">
  14. <p>Identifiant du service : #{{ service.id }}</p>
  15. <p>Responsable : {{ service.adhesion }}</p>
  16. {% if service.contribution %}
  17. <p>Contribution : {{ service.contribution }}</p>
  18. {% else %}
  19. <p>Contribution : pas de contribution</p>
  20. {% endif %}
  21. <p>Actif : {{ service.active|yesno:"oui,non" }}</p>
  22. <p>
  23. IP allouée{{ service.active_allocations.count|pluralize }} :
  24. {% for allocation in service.active_allocations %}
  25. {% if forloop.first %}<ul>{% endif %}
  26. <li>{{ allocation.resource }} (depuis le {{ allocation.start }})</li>
  27. {% if forloop.last %}</ul>{% endif %}
  28. {% empty %}
  29. aucune IP allouée
  30. {% endfor %}
  31. </p>
  32. </div>
  33. </div>
  34. {% endblock %}