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

56 lines
1.7 KiB
HTML
Raw Normal View History

2015-03-17 19:03:51 +01:00
{% extends "base.html" %}
{% load urls_extra %}
2016-06-22 14:09:41 +02:00
{% block titre %}{{ p }}{% endblock %}
2015-03-17 19:03:51 +01:00
{% block content %}
2016-06-22 14:09:41 +02:00
<h1>{{ p }}</h1>
{% if suppression %}
<p>{{ suppression }}</p>
{% endif %}
2016-06-24 20:50:28 +02:00
<div class="info_part">
{% if user.profile.is_chef %}
<form action="{% url "partitions.views.listepart" nom auteur %}" id="chef-edit-form" method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Enregister" />
</form>
{% else %}
{% if p.infos %}
2016-06-24 20:50:28 +02:00
<div>
<h4>Infos utiles</h4>
<p>{{ p.infos }}</p>
</div>
{% endif %}
{% endif %}
2016-06-24 20:50:28 +02:00
</div>
2016-06-22 14:09:41 +02:00
<ul class="filelist">
{% for p in part %}
{% if user.is_authenticated and ".pdf" in p.part.url %}
<li><a href="{% url "partitions.views.see" nom auteur p.part.url|cuturl %}" class="fichier">{{ p.nom }}</a>
{% elif user.is_authenticated and ".mp3" in p.part.url %}
<li><a href="{% url "partitions.views.see" nom auteur p.part.url|cuturl %}" class="fichier">{{ p.nom }}</a>
{% else %}
<li>{{ p.nom }}
{% endif %}
{% if user.is_authenticated %}
<a href="{% url "partitions.views.download" nom auteur p.part.url|cuturl %}" class="telecharger">Télécharger</a>
{% endif %}
{% if user.profile.is_chef %}
<a href="{% url "partitions.views.conf_delete" nom auteur p.pk %}" class="supprimer">Supprimer</a>
{% endif %}
</li>
{% empty %}
<p> Pas de partitions pour le moment </p>
{% endfor %}
</ul>
<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 %}