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

64 lines
2.1 KiB
HTML

{% extends "passerelle/manage.html" %}
{% load i18n passerelle gadjo staticfiles %}
{% 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 %}