This repository has been archived on 2023-02-22. You can view files and clone it, but cannot push or open issues or pull requests.
passerelle-atreal-openads/atreal_openads/templates/atreal_openads/manage/collectivite_view.html

83 lines
2.9 KiB
HTML

{% extends "passerelle/manage.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 breadcrumb %}
{{ block.super }}
{% if connecteur %}<a href="{{connecteur.get_absolute_url}}">{{ connecteur.slug }}</a>{% endif %}
{% endblock %}
{% block appbar %}
<h2>{{ view.model.get_verbose_name }}{% if object.name %} - {{ object.name }}{% endif %}</h2>
<span class="actions">
{% 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 not object.guichet and object|can_edit:request.user and guichet_add_url %}
<a rel="popup" href="{{ guichet_add_url }}">{% trans "Add a Guichet" %}</a>
{% endif %}
</span>
{% endblock %}
{% block content %}
<div id="description">
{% block description %}
{% for field, value in object.get_fields_kv %}
<p class="{{field.name}}">
{% if field.name == "guichet" %}
{% trans "Guichet" %} {% trans ":" %}
{% if value %}
<a href="{{value.get_absolute_url}}">{{value}}</a>
{% else %}
{% trans "None" %}
{% endif %}
{% elif field.name != "connecteur" and field.name != "forward_file" and field.name != "id" and field.name != "name" %}
{% trans field.verbose_name %} {% trans ":" %} {{value}}
{% endif %}
</p>
{% endfor %}
{% if object.forward_files.count %}
<p class="title">
{% trans "Forward files" %}
{% trans ":" %}
<a href="{% if forward_files_list_url %}{{forward_files_list_url}}{% else %}{{ object.forward_files.first.get_list_url }}{% endif %}">
{{ object.forward_files.count }}
{% if object.forward_files.count == 1 %}{% trans "forward file" %}
{% else %}{% trans "forward files" %}
{% endif %}
</a>
</p>
{% endif %}
{% endblock %}
</div>
{% endblock %}