Fin de l'ajout du champ category

This commit is contained in:
Martin Pépin 2016-06-22 14:09:41 +02:00
parent de6d3be052
commit 78a473b468
6 changed files with 90 additions and 32 deletions

View file

@ -12,7 +12,7 @@
{% endif %}
<h3>Partitions actuelles</h3>
<h3>Partitions actives</h3>
{% for part in active_partitions %}
<ul class="filelist">
{% include "partitions/liste_item.html" with part=part %}

View file

@ -1,27 +1,48 @@
{% extends "base.html" %}
{% load urls_extra %}
{% block titre %}{{ nom }}-{{ auteur }}{% endblock %}
{% block titre %}{{ p }}{% endblock %}
{% block content %}
<h1>{{ p.nom }} - {{ p.auteur }}</h1>
{% if suppression %}
<p>{{ suppression }}</p>
{% endif %}
<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>
<h1>{{ p }}</h1>
{% if suppression %}
<p>{{ suppression }}</p>
{% endif %}
<div id="category-change">
<h4>Changer de catégorie&#8239;?</h4>
<ul class="hbuttonlist">
<li><a href="{% url "partitions.views.change_category" nom auteur "active" %}">Actuel</a></li>
<li><a href="{% url "partitions.views.change_category" nom auteur "incoming" %}">À venir</a></li>
<li><a href="{% url "partitions.views.change_category" nom auteur "old" %} ">Archives</a></li>
</ul>
</div>
<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>
{% endblock %}