12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- {% extends 'base.html' %}
- {% load bootstrap3 humanize %}
- {% block usertab %}{% if service.adhesion == request.user.adhesion %} class="active"{% endif %}{% endblock %}
- {% block corptab %}{% if service.adhesion != request.user.adhesion %} active{% endif %}{% endblock %}
- {% block content %}
- <div class="panel panel-{{ service.is_active|yesno:"success,danger"}}">
- <div class="panel-heading">
- <h3>{{ service.service_type }}</h3>
- {% if service.label %}
- <h4>{{ service.label }}</h4>
- {% endif %}
- </div>
- <div class="panel-body">
- <p>Identifiant du service : #{{ service.id }}</p>
- <p>Responsable : {{ service.adhesion }} {{ service.adhesion.adherent }}</p>
- {% if service.contribution.get_current_payment %}
- <p>Contribution : {{ service.contribution.get_current_payment }}</p>
- {% else %}
- <p>Contribution : pas de contribution</p>
- {% endif %}
- <p>
- IP allouée{{ service.active_allocations.count|pluralize }} :
- {% for allocation in service.active_allocations.all %}
- {% if forloop.first %}<ul>{% endif %}
- <li>{{ allocation.resource }}{% if allocation.resource.last_time_up %} (dernière réponse au ping : {{ allocation.resource.last_time_up|naturaltime }}){% endif %}</li>
- {% if forloop.last %}</ul>{% endif %}
- {% empty %}
- aucune IP allouée
- {% endfor %}
- </p>
- {% if service.ports.exists %}
- <p>
- Port{{ service.ports.count|pluralize }} :
- {% for port in service.ports.all %}
- {% if forloop.first %}<ul>{% endif %}
- <li>Switch {{ port.switch }} port {{ port.port }}{% if port.up is not None %} ({{ port.up|yesno:"UP,DOWN" }}){% endif %}
- {% if forloop.last %}</ul>{% endif %}
- {% endfor %}
- </p>
- {% endif %}
- </div>
- </div>
- {% endblock %}
|