Add intranet app

This commit is contained in:
Claude Paroz 2018-08-16 10:50:00 +02:00
parent c96bd0d0db
commit 9773957baf
11 changed files with 167 additions and 1 deletions

View file

@ -0,0 +1,33 @@
{% extends "cms/base_site.html" %}
{% load i18n static %}
{% 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>
{% if user.is_staff %}
<hr>
<p><a href="{% url 'admin:intranet_intranetdoc_changelist' %}">Gestion des documents</a></p>
{% endif %}
</div>
{% endblock %}