97 lines
3.8 KiB
HTML
97 lines
3.8 KiB
HTML
{% extends "passerelle/manage/service_view.html" %}
|
|
{% load i18n passerelle gadjo staticfiles %}
|
|
|
|
{% comment %}
|
|
This file is part of passerelle-atreal-openads - a Publik connector to openADS
|
|
|
|
Copyright (C) 2019 Atreal
|
|
|
|
This program is free software: you can redistribute it and/or modify it
|
|
under the terms of the GNU Affero General Public License as published
|
|
by the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
{% endcomment %}
|
|
|
|
{% block extrascripts %}
|
|
{{ block.super }}
|
|
<link rel="stylesheet" type="text/css" media="all" href="{% static "css/atreal_openads.css" %}?{% start_timestamp %}"/>
|
|
{% endblock %}
|
|
|
|
{% block appbar %}
|
|
<h2>{{ view.model.get_verbose_name }} - {{ object.title }}
|
|
{% with status=object.get_availability_status %}
|
|
{% if status %}
|
|
{% if status.down %}<span class="down" title="{{status.message}} {% trans 'since:' %} {{status.start_timestamp|date:"SHORT_DATETIME_FORMAT"}} ">{% trans 'Down' %}</span>{% endif %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
</h2>
|
|
<span class="actions">
|
|
{% if object|can_edit:request.user and has_check_status %}
|
|
<a rel="popup" href="{% url 'manage-availability' resource_type=object|resource_type resource_pk=object.id %}">{% trans 'availability check parameters' %}</a>
|
|
{% endif %}
|
|
{% if object|can_edit:request.user %}
|
|
<a rel="popup" href="{% url 'logging-parameters' resource_type=object|resource_type resource_pk=object.id %}">{% trans 'logging parameters' %}</a>
|
|
{% endif %}
|
|
{% if object|can_delete:request.user %}
|
|
<a rel="popup" href="{{ object.get_delete_url }}">{% trans 'delete' %}</a>
|
|
{% endif %}
|
|
{% if object|can_edit:request.user %}
|
|
<a rel="popup" href="{{ object.get_edit_url }}">{% trans 'edit' %}</a>
|
|
{% endif %}
|
|
{% if object|can_edit:request.user and collectivite_add_url%}
|
|
<a rel="popup" href="{{ collectivite_add_url }}">{% trans "Add a collectivite" %}</a>
|
|
{% endif %}
|
|
</span>
|
|
{% endblock %}
|
|
|
|
{% block description %}
|
|
{{ block.super }}
|
|
{% if object.id %}
|
|
{% if object.collectivites.count %}
|
|
{% if object.collectivites.count == 1 %}
|
|
<p class="title">
|
|
{% trans 'Collectivites' %}
|
|
{% trans ":" %}
|
|
<a href="{{ object.collectivites.first.get_absolute_url }}">{{ object.collectivites.first }}</a>
|
|
</p>
|
|
{% elif object.collectivites.count < 10 %}
|
|
<p class="title">{% trans 'Collectivites' %}</p>
|
|
<ul class="connecteur-collectivites">
|
|
{% for col in object.collectivites.all %}
|
|
<li class="collectivite"><a href="{{ col.get_absolute_url }}">{{ col.name }}</a>
|
|
{% if col.guichet %}<span class="guichet"> ( {{ col.guichet }} ) </span>{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
<p class="title">
|
|
{% trans 'Collectivites' %}
|
|
{% trans ":" %}
|
|
<a href="{{ object.collectivites.first.get_list_url }}">{{ object.collectivites.count }} {% trans 'collectivites' %}</a>
|
|
</p>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if object.forward_files.count %}
|
|
<p class="title">
|
|
{% trans "Forward files" %}
|
|
{% trans ":" %}
|
|
<a href="{{ object.forward_files.first.get_list_url }}">
|
|
{{ object.forward_files.count }}
|
|
{% if object.forward_files.count == 1 %}{% trans "forward file" %}
|
|
{% else %}{% trans "forward files" %}
|
|
{% endif %}
|
|
</a>
|
|
</p>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|