ernestophone.ens.fr/templates/partitions/listepart.html

28 lines
1.1 KiB
HTML
Raw Normal View History

2015-03-17 19:03:51 +01:00
{% extends "base.html" %}
{% load urls_extra %}
{% block titre %}{{ nom }}-{{ auteur }}{% endblock %}
{% block content %}
<h1>{{ p.nom }} - {{ p.auteur }}</h1>
{% if suppression %}
<p>{{ suppression }}</p>
{% endif %}
2015-07-22 22:08:59 +02:00
<ul class="filelist">
2015-03-17 19:03:51 +01:00
{% for p in part %}
2015-03-29 17:50:31 +02:00
{% if user.is_authenticated and ".pdf" in p.part.url %}
2015-07-22 22:08:59 +02:00
<li><a href="{% url "partitions.views.see" nom auteur p.part.url|cuturl %}" class="fichier">{{ p.nom }}</a>
2015-03-29 23:26:03 +02:00
{% elif user.is_authenticated and ".mp3" in p.part.url %}
2015-07-22 22:08:59 +02:00
<li><a href="{% url "partitions.views.see" nom auteur p.part.url|cuturl %}" class="fichier">{{ p.nom }}</a>
{% else %}<li>{{ p.nom }}
2015-03-29 17:50:31 +02:00
{% endif %}
2015-07-22 22:08:59 +02:00
{% if user.is_authenticated %}<a href="{% url "partitions.views.download" nom auteur p.part.url|cuturl %}" class="telecharger">Télécharger</a>{% endif %}
2015-03-17 19:03:51 +01:00
{% if user.profile.is_chef %}
2015-07-22 22:08:59 +02:00
<a href="{% url "partitions.views.conf_delete" nom auteur p.pk %}" class="supprimer">Supprimer</a>
2015-03-17 19:03:51 +01:00
{% endif %}
2015-07-22 22:08:59 +02:00
</li>
2015-03-17 19:03:51 +01:00
{% empty %}
<p> Pas de partitions pour le moment </p>
{% endfor %}
2015-07-22 22:08:59 +02:00
</ul>
2015-04-13 18:56:43 +02:00
<p><a href="{% url "partitions.views.upload" p.nom p.auteur %}">Ajouter un média</a></p>
2015-03-17 19:03:51 +01:00
{% endblock %}