Ménage dans les templates
- Déplacement des templates des applications sous la racine des applications. - Suppression des templates inutiles dans /templates/admin : seule la page base_site.html comporte des modifications
This commit is contained in:
parent
18d3b4614b
commit
37606b0910
66 changed files with 29 additions and 1175 deletions
50
gestion/templates/gestion/base.html
Normal file
50
gestion/templates/gestion/base.html
Normal file
|
@ -0,0 +1,50 @@
|
|||
{% load static %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{% block titre %}{% endblock %}</title>
|
||||
<link rel="stylesheet" href={% static 'css/bootstrap.css' %} />
|
||||
<link rel="stylesheet" href={% static 'css/ernesto.css' %} />
|
||||
{% block extrahead %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<header>
|
||||
{% block header %}
|
||||
<div id="logo_ernesto">
|
||||
<a href='/'><img src="{%static "logo.png" %}" alt="L'Ernestophone" /></a>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<ul id="menu">
|
||||
<li><a href="{% url 'partitions.views.liste' %}">Partitions</a></li>
|
||||
{% if user.is_authenticated %}
|
||||
{% if user.is_superuser %}
|
||||
<li><a href = '/admin/'>Administration</a></li>
|
||||
{% endif %}
|
||||
<li><a href='/divers/'>Divers</a></li>
|
||||
<li><a href="{% url 'gestion.views.change_membre' %}">Connecté en tant que {{user.username }}</a></li>
|
||||
<li><a href = '/logout/'>Déconnexion</a></li>
|
||||
{% else %}
|
||||
<li><a href='/login/'>Connexion</a></li>
|
||||
<li><a href='/registration/'>Créer un compte</a></li>
|
||||
<li><a href='/user/password/reset/'>Mot de passe oublié</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endblock %}</header>
|
||||
<section id="content">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
© L'Ernestophone 2015. L'Ernestophone est un club du Comité d'Organisation des Fêtes de l'ENS. Contacts :
|
||||
<a href="https://www.facebook.com/ernestophone" style="color:white;">Facebook</a>
|
||||
<a href="mailto:fanfare@ens.fr" style="color: white;">Mail</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
20
gestion/templates/gestion/change.html
Normal file
20
gestion/templates/gestion/change.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{% extends "gestion/base.html" %}
|
||||
{% block titre %}Modification du profil{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Modification du profil</h2>
|
||||
{% if error %}
|
||||
<p>{{ error }}</p>
|
||||
{% endif %}
|
||||
{% if success %}
|
||||
<p>Changements enregistrés !</p>
|
||||
{% endif %}
|
||||
<p><a href="{% url "gestion.views.change_password" %}">Changer mon mot de passe</a></p>
|
||||
<p><a href="{% url "calendrier.views.changename" %}">Changer mon nom pour les doodles</a></p>
|
||||
<form action="{% url 'gestion.views.change_membre' %}" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" value="Valider" />
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
18
gestion/templates/gestion/changepasswd.html
Normal file
18
gestion/templates/gestion/changepasswd.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% extends "gestion/base.html" %}
|
||||
{% block titre %}Changement du mot de passe{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Changement du mot de passe</h2>
|
||||
{% if error %}
|
||||
<p>{{ error }}</p>
|
||||
{% endif %}
|
||||
{% if success %}
|
||||
<p>Changement enregistré !</p>
|
||||
{% endif %}
|
||||
<form action="{% url 'gestion.views.change_password' %}" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" value="Valider" />
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
9
gestion/templates/gestion/divers.html
Normal file
9
gestion/templates/gestion/divers.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{% extends "gestion/base.html" %}
|
||||
{% block titre %}Divers{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Divers</h1>
|
||||
<ul>
|
||||
<li><a href="{% url "propositions.views.liste" %}">Propositions de morceaux</a></li>
|
||||
<li><a href="{% url "pads.views.liste_pads" %}">Pads</a></li>
|
||||
</ul>
|
||||
{% endblock %}
|
6
gestion/templates/gestion/home.html
Normal file
6
gestion/templates/gestion/home.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% extends "gestion/base.html" %}
|
||||
{% block titre %}L'Ernestophone{% endblock %}
|
||||
{% block content %}<h1>L'Ernestophone, la fanfare de l'École normale supérieure</h1>
|
||||
{% endblock %}
|
||||
|
||||
|
30
gestion/templates/gestion/login.html
Normal file
30
gestion/templates/gestion/login.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{% extends "gestion/base.html" %}
|
||||
{% block titre %}Connexion{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Connexion</h1>
|
||||
<div id="Connexion">
|
||||
{% if form.errors %}
|
||||
<p>Mot de passe ou nom d'utilisateur incorrect</p>
|
||||
{% endif %}
|
||||
{% if error %}
|
||||
<p>{{ error }}</p>
|
||||
{% endif %}
|
||||
<form method="post" action="{% url 'gestion.views.login' %}">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
<tr>
|
||||
<td><input type="{{ form.username.type }}" name="{{ form.username.name }}" placeholder="Login"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="password" name="{{ form.password.name }}" placeholder="Password"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="submit" value="Connexion" />
|
||||
{% if next %}
|
||||
<input type="hidden" name="next" value={{ next }} />
|
||||
{% else %}
|
||||
<input type="hidden" name="next" value="/" />
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
17
gestion/templates/gestion/registration.html
Normal file
17
gestion/templates/gestion/registration.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{% extends "gestion/base.html" %}
|
||||
{% block titre %}L'Ernestophone - Inscription{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Inscription d'un nouvel Ernestophoniste</h2>
|
||||
<p>Entrez dans le champ validation le mot de passe donné par les chef-fe-s</p>
|
||||
{% if error %}
|
||||
<p>{{ error }}</p>
|
||||
{% endif %}
|
||||
<form action="{% url 'gestion.views.inscription_membre' %}" method="post">
|
||||
{% csrf_token %}
|
||||
{{ user_form.as_p }}
|
||||
{{ comp_form.as_p }}
|
||||
<input type="submit" value="Valider l'inscription" />
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
5
gestion/templates/gestion/thanks.html
Normal file
5
gestion/templates/gestion/thanks.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% extends "gestion/base.html" %}
|
||||
{% block titre %}L'Ernestophone - Inscription{% endblock %}
|
||||
{% block content %}<p> Merci pour votre inscription.</p>
|
||||
{% if error %}<p>{{ error }}</p>{% endif %}
|
||||
{% endblock %}
|
|
@ -90,7 +90,7 @@ def login(request):
|
|||
{"error_type": "no_password"})
|
||||
except User.DoesNotExist:
|
||||
pass
|
||||
return django_login_view(request, template_name='login.html')
|
||||
return django_login_view(request, template_name='gestion/login.html')
|
||||
|
||||
|
||||
@login_required
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue