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

25 lines
1,015 B
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 %}
{% for p in part %}
2015-03-29 17:50:31 +02:00
{% if user.is_authenticated and ".pdf" in p.part.url %}
<p><a href="{% url "partitions.views.see" nom auteur p.part.url|cuturl %}">{{ p.nom }}</a>
2015-03-29 23:26:03 +02:00
{% elif user.is_authenticated and ".mp3" in p.part.url %}
<p><a href="{% url "partitions.views.see" nom auteur p.part.url|cuturl %}">{{ p.nom }}</a>
2015-03-29 17:50:31 +02:00
{% else %}<p>{{ p.nom }}
{% endif %}
{% if user.is_authenticated %}<a href="{% url "partitions.views.download" nom auteur p.part.url|cuturl %}">Télécharger</a>{% endif %} </p>
2015-03-17 19:03:51 +01:00
{% if user.profile.is_chef %}
<p><a href="{% url "partitions.views.conf_delete" nom auteur p.pk %}">Supprimer</a> </p>
{% endif %}
{% empty %}
<p> Pas de partitions pour le moment </p>
{% endfor %}
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 %}