This commit is contained in:
alazo 2018-08-14 11:55:16 +00:00 committed by GitHub
commit 283e4b7abd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 945 additions and 14 deletions

View file

@ -9,9 +9,9 @@
<div id="user-tools">
{% if user.is_authenticated %}
{% block welcome-msg %}Bienvenue <strong>{% firstof user.username %}</strong>.{% endblock %}
<a href="{% url 'home' %}">Site public</a>&nbsp;&nbsp;<a href="{% url 'admin:index' %}">Admin</a>
<a href="{% url 'logout' %}">Déconnexion</a>&nbsp;
{% else %}
<a href="{% url 'admin:index' %}">Admin</a>
<a href="{% url 'login' %}">Login</a>
{% endif %}
</div>
{% endblock %}
@ -29,8 +29,8 @@
<li><a href="{% url 'concept-detail' 1 %}">Concept pédagogique</a>&nbsp;&nbsp;</li>
<li><a href="{% url 'concept-detail' 2 %}">Concept de formation</a>&nbsp;&nbsp;</li>
<li><a href="{% url 'uploaddoc-list' %}">Téléchargements</a>&nbsp;&nbsp;</li>
{% if has_permission %}
<li><a href="#">Calendrier</a>&nbsp;&nbsp;</li>
{% if user.is_superuser %}
<li><a href="{% url 'admin:index' %}">Administration</a></li>
{% endif %}
</ul>
</div>

View file

@ -54,7 +54,7 @@
</tr>
<!-- Ligne 2 -->
<tr>
<td rowspan="3" class="l2 d">{{ D2.url }}</td>
<td rowspan="2" class="l2 d">{{ D2.url }}</td>
<td class="l2 p">{{ P03.url }}</td>
<td class="l2 m">{{ M05.url_code }}</td>
<td>&nbsp;</td>

View file

@ -85,7 +85,10 @@
<td>{{ object.processus.domaine.responsable.descr|safe }}</td>
</tr>
</table>
<p><a href="{% url 'module-pdf' object.id %}">Imprimer en PDF</a></p>
<p>
<a href="{% url 'module-pdf' object.id %}">Imprimer en PDF</a>
&nbsp;&nbsp; &nbsp;<a href="{% url 'intranet-list' %}">Documents de cours (login requis)</a>
</p>
</div>
{% endblock %}

View file

@ -0,0 +1,23 @@
{% extends "../cms/base_site.html" %}
{% load i18n static %}
{% block content %}
<style type="text/css">
ul li {float: none;}
</style>
<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>
{% endfor %}
</ul>
</div>
{% endblock %}

View file

@ -0,0 +1,66 @@
{% extends "admin/base_site.html" %}
{% load i18n static %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/login.css" %}" />
{{ form.media }}
{% endblock %}
{% block bodyclass %}{{ block.super }} login{% endblock %}
{% block usertools %}{% endblock %}
{% block nav-global %}{% endblock %}
{% block content_title %}{% endblock %}
{% block breadcrumbs %}{% endblock %}
{% block content %}
{% if form.errors and not form.non_field_errors %}
<p class="errornote">
{% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
</p>
{% endif %}
{% if form.non_field_errors %}
{% for error in form.non_field_errors %}
<p class="errornote">
{{ error }}
</p>
{% endfor %}
{% endif %}
<div id="content-main">
{% if user.is_authenticated %}
<p class="errornote">
{% blocktrans trimmed %}
You are authenticated as {{ username }}, but are not authorized to
access this page. Would you like to login to a different account?
{% endblocktrans %}
</p>
{% endif %}
<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
<div class="form-row">
{{ form.username.errors }}
{{ form.username.label_tag }} {{ form.username }}
</div>
<div class="form-row">
{{ form.password.errors }}
{{ form.password.label_tag }} {{ form.password }}
<input type="hidden" name="next" value="{{ next }}" />
</div>
{% url 'admin_password_reset' as password_reset_url %}
{% if password_reset_url %}
<div class="password-reset-link">
<a href="{{ password_reset_url }}">{% trans 'Forgotten your password or username?' %}</a>
</div>
{% endif %}
<div class="submit-row">
<label>&nbsp;</label><input type="submit" value="{% trans 'Log in' %}" />
</div>
</form>
</div>
{% endblock %}