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/forwardfile_list.html

112 lines
4.2 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 %}
{% if collectivite %}<a href="{{collectivite.get_absolute_url}}">{{ collectivite.name }}</a>{% endif %}
{% endblock %}
{% block appbar %}
<h2>{{ view.model.get_verbose_name }} - {% trans 'list' %}</h2>
{% endblock %}
{% block content %}
<table id="list-forward-files">
{% block list %}
{% if object_list %}
<thead>
<tr>
<th class="actions">{% trans "Actions" %}</th>
{% for field in view.model.get_fields %}
{% if field.name != "connecteur" and field.name != "file_hash" and field.name != "orig_filename" %}
<th class="{{field.name}}">{% trans field.verbose_name %}</th>
{% endif %}
{% endfor %}
</tr>
</thead>
<tbody>
{% for ff in object_list %}
<tr>
<td class="actions">
<span class="edit-link"><a rel="popup" href="{{ff.get_edit_url}}?back-to={% if collectivite %}col-{% endif %}list-forward-files" >{% trans "edit" %}</a></span>
<span class="delete-link"><a rel="popup" href="{{ff.get_delete_url}}?back-to={% if collectivite %}col-{% endif %}list-forward-files">{% trans "delete" %}</a></span>
</td>
{% for field, value in ff.get_fields_kv %}
{% if field.name != "connecteur" and field.name != "file_hash" and field.name != "orig_filename" %}
<td class="{{field.name}}">
{% if field.name != "collectivite" and field.name != "upload_file" %}
{{value}}
{% elif field.name == "collectivite" %}
{% if value %}<a href="{{value.get_absolute_url}}">{{value}}</a>
{% else %}{% trans "None" %}
{% endif %}
{% elif field.name == "upload_file" %}
{% if value %}<a href="{{value.url}}">{{value}}</a>
{% else %}{% trans "None" %}
{% endif %}
{% endif %}
</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
{% if is_paginated %}
<tfoot>
<tr>
<td class="pagination" colspan="{{ view.model.get_fields|length }}">
<span class="step-links">
{% if page_obj.has_previous %}
<a href="?page=1">&laquo; {% trans "first" %}</a>
<a href="?page={{ contacts.previous_page_number }}">{% trans "previous" %}</a>
{% endif %}
<span class="current">
{% trans "Page" %} {{ page_obj.number }} / {{ page_obj.paginator.num_pages }}
</span>
{% if page_obj.has_next %}
<a href="?page={{ page_obj.next_page_number }}">{% trans "next" %}</a>
<a href="?page={{ page_obj.paginator.num_pages }}">{% trans "last" %} &raquo;</a>
{% endif %}
</span>
<td>
</tr>
</tfoot>
{% endif %}
{% else %}
<tr class="nodata">
<td>{% trans "No data" %}</td>
</tr>
{% endif %}
{% endblock %}
</table>
{% endblock %}