service_detail.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {% extends 'base.html' %}
  2. {% load bootstrap3 %}
  3. {% block servicestab %}{% if service.adherent == request.user.profile.adhesion %} class="active"{% endif %}{% endblock %}
  4. {% block assotab %}{% if service.adherent != request.user.profile.adhesion %} active{% endif %}{% endblock %}
  5. {% block content %}
  6. {% if service.adherent == request.user.profile.adhesion %}
  7. <a href="{% url 'service-list' %}" class="btn btn-primary"><span class="glyphicon glyphicon-arrow-left"></span>&nbsp;Retour à la liste de mes services</a>
  8. {% else %}
  9. <a href="{% url 'corporation' service.adherent.adherent.pk %}" class="btn btn-primary">
  10. <span class="glyphicon glyphicon-arrow-left"></span>&nbsp;Retour à la liste des services de {{ service.adherent.adherent }}
  11. </a>
  12. {% endif %}
  13. <br /><br />
  14. <div class="panel panel-default">
  15. <div class="panel-heading">
  16. <h3>{{ service.service_type }}</h3>
  17. {% if service.label %}
  18. <h4>{{ service.label }}</h4>
  19. {% endif %}
  20. </div>
  21. <div class="panel-body">
  22. {% if service.contribution %}
  23. <p>Contribution : {{ service.contribution }}</p>
  24. {% else %}
  25. <p>Contribution : pas de contribution</p>
  26. {% endif %}
  27. <p>
  28. Ressources IP :
  29. {% for allocation in service.active_allocations %}
  30. {% if forloop.first %}<ul>{% endif %}
  31. <li>{{ allocation.resource }} (depuis le {{ allocation.start }})</li>
  32. {% if forloop.last %}</ul>{% endif %}
  33. {% empty %}
  34. aucune IP allouée
  35. {% endfor %}
  36. </p>
  37. </div>
  38. </div>
  39. {% endblock %}