Visualisation des pdf en ligne

This commit is contained in:
R1kM 2015-03-29 17:50:31 +02:00
parent 2140fcc7ee
commit c0af60eedb
4 changed files with 25 additions and 5 deletions

View file

@ -7,7 +7,11 @@
<p>{{ suppression }}</p>
{% endif %}
{% for p in part %}
<p>{{ p.nom }} {% if user.is_authenticated %}<a href="{% url "partitions.views.download" nom auteur p.part.url|cuturl %}">Télécharger</a>{% endif %} </p>
{% 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>
{% 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>
{% if user.profile.is_chef %}
<p><a href="{% url "partitions.views.conf_delete" nom auteur p.pk %}">Supprimer</a> </p>
{% endif %}