new template for intranet docs
This commit is contained in:
parent
1b41d838d9
commit
a986e8939b
6 changed files with 41 additions and 22 deletions
|
|
@ -87,7 +87,7 @@
|
|||
</table>
|
||||
<p>
|
||||
<a href="{% url 'module-pdf' object.id %}">Imprimer en PDF</a>
|
||||
<a href="{% url 'intranet-list' %}">Documents de cours (connexion requise)</a>
|
||||
<a href="{% url 'intranet-list' object.id %}">Documents de cours (connexion requise)</a>
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,42 @@
|
|||
{% extends "cms/base_site.html" %}
|
||||
{% load i18n static %}
|
||||
{% load i18n static group_tags %}
|
||||
|
||||
{% block extrastyle %}
|
||||
{{ block.super }}
|
||||
<style type="text/css">
|
||||
ul li {float: none;}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="content-main">
|
||||
<h1>Documents de cours</h1>
|
||||
{% regroup object_list by module as module_list %}
|
||||
<ul>
|
||||
{% for module in module_list %}
|
||||
<li><h3>{{ module.grouper }}</h3>
|
||||
<ol>
|
||||
{% for doc in module.list %}
|
||||
<li><a href="{{ doc.doc.url }}">{{ doc.doc.name }} ({{ doc.get_authorization_display }})</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</li>
|
||||
{% empty %}
|
||||
<p><i>Désolé, aucun document disponible pour le moment.</i></p>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div style="float:left; widht:500px">
|
||||
<ol>
|
||||
<h3>Documents Etudiant</h3>
|
||||
{% for doc in object_list %}
|
||||
{% if doc.authorization == 1 %}
|
||||
<li><a href="{{ doc.doc.url }}">{{ doc.doc.name }}</a></li>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
<p><i>Aucun document disponible.</i></p>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
{% if user|has_group:"prof" or user.is_staff %}
|
||||
<div style="margin-left:600px; width:500px">
|
||||
<ol>
|
||||
<h3>Documents ENSEIGNANT</h3>
|
||||
{% for doc in object_list %}
|
||||
{% if doc.authorization == 2 %}
|
||||
<li><a href="{{ doc.doc.url }}">{{ doc.doc.name }}</a></li>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
<p><i>Aucun document disponible.</i></p>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if user.is_staff %}
|
||||
<hr>
|
||||
<hr style="margin-top:100px">
|
||||
<p><a href="{% url 'admin:intranet_intranetdoc_changelist' %}">Gestion des documents</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue