Merge branch 'master' into Kerl/calendar

This commit is contained in:
Martin Pépin 2016-07-29 20:17:04 +02:00
commit 2632c9dff8
58 changed files with 1564 additions and 488 deletions

View file

@ -4,11 +4,14 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
<head>
<title>{{ site.name }}</title>
<link type="text/css" rel="stylesheet" href="{% static "css/bootstrap.min.css" %}" />
<link type="text/css" rel="stylesheet" href="{% static "css/cof.css" %}" />
<link href="https://fonts.googleapis.com/css?family=Dosis|Dosis:700|Raleway|Roboto:300,300i,700" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
{% block extra_head %}{% endblock %}
</head>
<body id="cof">
<body>
{% block content %}{% endblock %}
</body>
<link href="https://fonts.googleapis.com/css?family=Dosis|Dosis:700|Raleway|Roboto:300,300i,700" rel="stylesheet">
</html>

View file

@ -0,0 +1,20 @@
{% extends "base.html" %}
{% block content %}
<header>
<div class="container banner">
<a href="{% url "gestioncof.views.home" %}">
<h1>GestioCOF</h1>
{% block homelink %}
<span class="glyphicon glyphicon-home" aria-hidden=true></span>
{% endblock %}
</a>
<div class="secondary">
<span class="hidden-xxs">&nbsp;&nbsp;|&nbsp; </span>
<span><a href="{% url "gestioncof.views.logout" %}">Se déconnecter&nbsp;<span class="glyphicon glyphicon-log-out"></span></a></span>
</div>
<h2 class="member-status">{% if user.first_name %}{{ user.first_name }}{% else %}<tt>{{ user.username }}</tt>{% endif %}, {% if user.profile.is_cof %}<tt class="user-is-cof">au COF{% else %}<tt class="user-is-not-cof">non-COF{% endif %}</tt></h2>
</div><!-- /.container -->
</header>
{% block interm_content %}{% endblock %}
{% endblock %}

View file

@ -1,18 +1,20 @@
{% extends "base.html" %}
{% extends "base_header.html" %}
{% block content %}
<div id="main-container">
<div id="main">
<div id="header">
<h1>{% block title %}<a href="{% url "gestioncof.views.home" %}">{{ site.name }}</a>{% endblock %}</h1>
{% block homelink %}<div id="homelink"><a href="{% url "gestioncof.views.home" %}">Retour à l'accueil</a></div>{% endblock %}
<div class="spacer"></div>
<hr />
</div>
<div id="main-content">
{% block realcontent %}{% endblock %}
{% block interm_content %}
<div class="container hidden-xs espace"></div>
<div class="container">
<div class="row row-centered">
<div class="col-xs-12 {%block page_size%}col-sm-12{%endblock%} col-centered" id="main-content">
{% block realcontent %}{% endblock %}
</div>
</div>
<div class="home-menu row row-centered">
<div class="visible-xs-block col-xs-12 title-foot">
<div class="foot-banner">
<h3>Pour tout problème : <tt>cof@ens.fr.</tt></h3>
</div>
</div>
</div><!-- /.row.home-menu -->
</div>
<div class="container hidden-xs espace"></div>
{% endblock %}

View file

@ -1,3 +1,2 @@
{% extends "base_title.html" %}
{% block title %}<a href="{% url "gestioncof.views.home" %}">{{ site.name }}</a>: <a href="{% url "petits-cours-demandes-list" %}">Gestion des petits cours</a>{% endblock %}

View file

@ -32,7 +32,6 @@ souscrire aux événements du COF et/ou aux spectacles BdA.
</ul>
{% endif %}
<br />
<hr />
<form action="" method="post">

View file

@ -1,35 +1,38 @@
{% extends "base_title_petitscours.html" %}
{% load staticfiles %}
{% block page_size %}col-sm-8{% endblock %}
{% block realcontent %}
<h3>Demande de petits cours</h3>
<h2>Demande de petits cours</h2>
{% include "details_demande_petit_cours_infos.html" %}
<hr />
<ul>
<li><strong>Traitée</strong>: <img src="{% if demande.traitee %}{% static "images/yes.png" %}{% else %}{% static "images/no.png" %}{% endif %}" /></li>
<table class="table table-striped">
<tr><td><strong>Traitée</strong></td><td> <img src="{% if demande.traitee %}{% static "images/yes.png" %}{% else %}{% static "images/no.png" %}{% endif %}" /></td></tr>
{% if demande.traitee %}
<li><strong>Traitée par</strong>: {{ demande.traitee_par }}</li>
<li><strong>Traitée le</strong>: {{ demande.processed }}</li>
<li>
<strong>Attributions</strong>:
<tr><td><strong>Traitée par</strong></td><td> {{ demande.traitee_par }}</td></tr>
<tr><td><strong>Traitée le</strong></td><td> {{ demande.processed }}</td></tr>
<tr><td>
<strong>Attributions</strong></td><td>
<ul>
{% for attrib in attributions %}
<li>{{ attrib.user.get_full_name }} pour {{ attrib.matiere }}, {{ attrib.date|date:"d E Y" }}</li>
{% endfor %}
</ul>
</li>
</td>
</tr>
{% endif %}
</ul>
</table>
{% if demande.traitee %}
<div style="text-align: right;">
<form action="{% url "petits-cours-demande-retraitement" demande.id %}">
<input type="submit" value="Retraiter">
<input class="btn btn-primary" type="submit" value="Retraiter">
</form>
</div>
{% else %}
<div style="text-align: right;">
<form action="{% url "petits-cours-demande-traitement" demande.id %}">
<input type="submit" value="Traiter">
<input class="btn btn-primary" type="submit" value="Traiter">
</form>
</div>
{% endif %}

View file

@ -1,14 +1,14 @@
{% load staticfiles %}
<ul>
<li><strong>Date</strong>: {{ demande.created }}</li>
<li><strong>Nom/prénom</strong>: {{ demande.name }}</li>
<li><strong>Email</strong>: {{ demande.email }}</li>
<li><strong>Téléphone</strong>: {{ demande.phone }}</li>
<li><strong>Lieu</strong>: {{ demande.lieu }}</li>
<li><strong>Quand</strong>: {{ demande.quand }}</li>
<li><strong>Fréquence</strong>: {{ demande.freq }}</li>
<li><strong>Matières</strong>: {% for matiere in demande.matieres.all %}{% if forloop.counter0 > 0 %}, {% endif %}{{ matiere }}{% endfor %}</li>
<li><strong>Niveau souhaité</strong>: {{ demande.get_niveau_display }}</li>
<li><strong>Agrégé requis</strong>: <img src="{% if demande.agrege_requis %}{% static "images/yes.png" %}{% else %}{% static "images/no.png" %}{% endif %}" /></li>
<li><strong>Remarques</strong>: {{ demande.remarques }}</li>
</ul>
<table class="table table-striped">
<tr class="danger"><td><strong>Date</strong></td><td> {{ demande.created }}</td></tr>
<tr class="warning"><td><strong>Nom/prénom</strong></td><td> {{ demande.name }}</td></tr>
<tr><td><strong>Email</strong></td><td> {{ demande.email }}</td></tr>
<tr><td><strong>Téléphone</strong></td><td> {{ demande.phone }}</td></tr>
<tr><td><strong>Lieu</strong></td><td> {{ demande.lieu }}</td></tr>
<tr><td><strong>Quand</strong></td><td> {{ demande.quand }}</td></tr>
<tr><td><strong>Fréquence</strong></td><td> {{ demande.freq }}</td></tr>
<tr><td><strong>Matières</strong></td><td> {% for matiere in demande.matieres.all %}{% if forloop.counter0 > 0 %}, {% endif %}{{ matiere }}{% endfor %}</td></tr>
<tr><td><strong>Niveau souhaité</strong></td><td> {{ demande.get_niveau_display }}</td></tr>
<tr><td><strong>Agrégé requis</strong></td><td> <img src="{% if demande.agrege_requis %}{% static "images/yes.png" %}{% else %}{% static "images/no.png" %}{% endif %}" /></td></tr>
<tr><td><strong>Remarques</strong></td><td> {{ demande.remarques }}</td></tr>
</table>

View file

@ -1,18 +1,22 @@
{% extends "base_title.html" %}
{% load utils %}
{% block page_size %}col-sm-8{% endblock %}
{% block realcontent %}
<h2>Événement: {{ event.title }}{% if user.is_staff %} &ndash; <a href="{% url 'admin:gestioncof_event_change' event.id %}">Administration</a>{% endif %}</h2>
<h2>Événement: {{ event.title }}{% if user.is_staff %} <a class="title-link" href="{% url 'admin:gestioncof_event_change' event.id %}"><span class="glyphicon glyphicon-link"></span> Administration</a>{% endif %}</h2>
{% if event.details %}
<p>{{ event.details }}</p>
<hr/>
{% endif %}
{% include "tristate_js.html" %}
<h3>Filtres</h3>
<form method="post" action="{% url 'gestioncof.views.event_status' event.id %}">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" class="btn-submit" value="Filtrer" />
<input style="margin-top:10px;" type="submit" class="btn btn-primary" value="Filtrer" />
</form>
<hr/>
<h3>Résultats globaux</h3>
{% for option in options %}
<h4>{{ option.value }}</h4>
@ -22,6 +26,7 @@
{% endfor %}
</ul>
{% endfor %}
<hr/>
<h3>Réponses individuelles</h3>
<ul>
{% for user_choice in user_choices %}{% with user_choice.user as auser %}
@ -38,6 +43,7 @@
{% endif %}
{% endwith %}{% endfor %}
</ul>
<hr/>
<h3>Mailing list</h3>
<textarea style="width: 100%; height: 100px; margin-top: 10px;">
{% spaceless %}{% for user_choice in user_choices %}{% with user_choice.user as auser %}{% if user_choice.options.all %}{% if auser.email %}{{ auser.email }}{% else %}{{ auser.username }}{% endif %}, {% endif %}{% endwith %}{% endfor %}

View file

@ -1,84 +1,126 @@
{% extends "base_title.html" %}
{% extends "base_header.html" %}
{% block homelink %}
{% endblock %}
{% block realcontent %}
<h2>Bienvenue, {% if user.first_name %}{{ user.first_name }}{% else %}<tt>{{ user.username }}</tt>{% endif %} <span style="float: right;"><tt>{% if user.profile.is_cof %}Membre du COF{% else %}Non-membre du COF{% endif %}</tt></span></h2>
{% block interm_content %}
<div class="container hidden-xs espace"></div>
<div class="container">
<div class="home-menu row">
<div class="{% if user.profile.is_buro %}col-sm-6 {% else %}col-sm-8 col-sm-offset-2 col-xs-12 {%endif%}normal-user-hm">
<!-- {% if open_events %}
<h3>Événements</h3>
<h3 class="block-title">Événements<span class="pull-right glyphicon glyphicon-calendar"></span></h3>
<div class="hm-block">
<ul>
{% for event in open_events %}
<li><a href="{% url "gestioncof.views.event" event.id %}">{{ event.title }}</a></li>
{% endfor %}
</ul>
{% endif %} -->
{% if open_surveys %}
<h3>Sondages en cours</h3>
</div>
{% endif %} -->
{% if open_surveys %}
<h3 class="block-title">Sondages en cours<span class="pull-right glyphicon glyphicon-stats"></span></h3>
<div class="hm-block">
<ul>
{% for survey in open_surveys %}
<li><a href="{% url "gestioncof.views.survey" survey.id %}">{{ survey.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
</div>
{% endif %}
{% if user.profile.is_cof %}
{% if open_tirages %}
<h3>Tirages du BdA</h3>
{% for tirage in open_tirages %}
{% if user.profile.is_cof %}
{% if open_tirages %}
<h3 class="block-title">Tirages du BdA<span class="pull-right glyphicon glyphicon-th-list"></span></h3>
<div class="hm-block">
{% for tirage in open_tirages %}
<ul>
{{ tirage.title }}
<h4>{{ tirage.title }}</h4>
<li><a href="{% url "bda-tirage-inscription" tirage.id %}">Inscription</a></li>
<li><a href="{% url "bda-etat-places" tirage.id %}">État des demandes</a>
<li><a href="{% url "bda-places-attribuees" tirage.id %}">Mes places</a></li>
<li><a href="{% url "bda-revente" tirage.id %}">Revendre une place</a></li>
<br>
</ul>
{% endfor %}
{% endif %}
{% endif %}
<h3>Divers</h3>
{% endfor %}
</div>
{% endif %}
{% endif %}
<h3 class="block-title">Divers<span class="pull-right glyphicon glyphicon-question-sign"></span></h3>
<div class="hm-block">
<ul>
<li><a href="{% url "gestioncof.views.calendar" %}">Calendrier dynamique</a></li>
{% if user.profile.is_cof %}<li><a href="{% url "petits-cours-inscription" %}">Inscription pour donner des petits cours</a></li>{% endif %}
<li><a href="{% url "gestioncof.views.profile" %}">Éditer mon profil</a></li>
{% if not user.profile.login_clipper %}<li><a href="{% url "django.contrib.auth.views.password_change" %}">Changer mon mot de passe</a></li>{% endif %}
<li><a href="{% url "gestioncof.views.logout" %}">Se déconnecter</a></li>
</ul>
{% if user.profile.is_buro %}
<h3>Administration</h3>
</div>
</div>
{% if user.profile.is_buro %}
<div class="col-sm-6 buro-user-hm">
<h3 class="block-title">Administration<span class="pull-right glyphicon glyphicon-cog"></span></h3>
<div class="hm-block">
<ul>
<li><a href="{% url "admin:index" %}">Administration générale</a></li>
<li><a href="{% url "petits-cours-demandes-list" %}">Demandes de petits cours</a></li>
<li><a href="{% url "gestioncof.views.registration" %}">Inscription d'un nouveau membre</a></li>
<br>
{% for event in events %}
<li><a href="{% url "gestioncof.views.event_status" event.id %}">Événement : {{ event.title }}</a></li>
{% endfor %}
{% for survey in surveys %}
<li><a href="{% url "gestioncof.views.survey_status" survey.id %}">Sondage : {{ survey.title }}</a></li>
{% endfor %}
<br>
</ul>
<h3>Gestion tirages BDA</h3>
<ul>
{% for tirage in open_tirages %}
<h4>{{ tirage.title }}</h4>
<li><a href="{% url "bda-liste-spectacles" tirage.id %}">Spectacles</a></li>
<li><a href="{% url "admin:bda_participant_changelist" %}?tirage__id__exact={{ tirage.id }}">Participants</a></li>
{% endfor %}
</ul>
<h3>Liens utiles</h3>
<ul>
<li><a href="{% url "gestioncof.views.utile_cof" %}">Liens utiles du COF</a></li>
<li><a href="{% url "gestioncof.views.utile_bda" %}">Liens utiles BdA</a></li>
</ul>
<h4>Général</h4>
<li><a href="{% url "admin:index" %}">Administration générale</a></li>
<li><a href="{% url "petits-cours-demandes-list" %}">Demandes de petits cours</a></li>
<li><a href="{% url "gestioncof.views.registration" %}">Inscription d'un nouveau membre</a></li>
</ul>
<ul>
<h4>Évènements & Sondages</h4>
{% for event in events %}
<li><a href="{% url "gestioncof.views.event_status" event.id %}">Événement : {{ event.title }}</a></li>
{% endfor %}
{% for survey in surveys %}
<li><a href="{% url "gestioncof.views.survey_status" survey.id %}">Sondage : {{ survey.title }}</a></li>
{% endfor %}
</ul>
</div>
<h3 class="block-title">Gestion tirages BDA<span class="pull-right glyphicon glyphicon-list"></span></h3>
<div class="hm-block">
{% if open_tirages %}
{% for tirage in open_tirages %}
<ul>
<h4>{{ tirage.title }}</h4>
<li><a href="{% url "bda-liste-spectacles" tirage.id %}">Spectacles</a></li>
<li><a href="{% url "admin:bda_participant_changelist" %}?tirage__id__exact={{ tirage.id }}">Participants</a></li>
</ul>
{% endfor %}
{% else %}
Pas de tirage ouvert pour l'instant.
{% endif %}
</div>
<h3>Pour tout problème : cof@ens.fr.</h3>
<h3 class="block-title">Liens utiles<span class="pull-right glyphicon glyphicon-link"></span></h3>
<div class="hm-block">
<ul>
<li><a href="{% url "gestioncof.views.utile_cof" %}">Liens utiles du COF</a></li>
<li><a href="{% url "gestioncof.views.utile_bda" %}">Liens utiles BdA</a></li>
</ul>
</div>
</div>
{% endif %}
</div> <!-- /.row.home-menu -->
<div class="container hidden-xs espace"></div>
{% if not user.profile.is_buro %}
<div class="home-menu row row-centered">
<div class="col-sm-8 col-sm-offset-2 col-xs-12 normal-user-hm">
<div class="foot-banner">
<h3>Pour tout problème : <tt>cof@ens.fr.</tt></h3>
</div>
</div>
</div><!-- /.row.home-menu -->
{% else %}
<div class="home-menu row row-centered">
<div class="visible-xs-block col-xs-12 normal-user-hm">
<div class="foot-banner">
<h3>Pour tout problème : <tt>cof@ens.fr.</tt></h3>
</div>
</div>
</div><!-- /.row.home-menu -->
{% endif %}
<div class="container hidden-xs espace"></div>
</div><!-- /.container -->
{% endblock %}

View file

@ -1,5 +1,6 @@
{% load bootstrap %}
{{ formset.non_form_errors.as_ul }}
<table id="bda_formset" class="form">
<table id="bda_formset" class="form table">
{{ formset.management_form }}
{% for form in formset.forms %}
{% if forloop.first %}
@ -23,14 +24,13 @@
{{ form.non_field_errors }}
{% for hidden in form.hidden_fields %}{{ hidden }}{% endfor %}
{% endif %}
{{ field.errors.as_ul }}
{{ field }}
{{ field | bootstrap }}
</td>
{% endif %}
{% endfor %}
<td class="tools-cell"><div class="tools">
<input type="checkbox" name="{{ form.DELETE.html_name }}" style="display: none;" />
<a href="javascript://" class="icon delete-handler" title="Supprimer"></a>
<a href="javascript://" class="glyphicon glyphicon-remove remove-btn" title="Supprimer"></a>
</div>
<div class="spacer"></div>
</td>

View file

@ -24,10 +24,6 @@ var django = {
var id = 'id_' + name;
$(this).attr({'name': name, 'id': id}).val('').removeAttr('checked');
});
newElement.find('label').each(function() {
var newFor = $(this).attr('for').replace('-' + (total-1) + '-','-' + total + '-');
$(this).attr('for', newFor);
});
total++;
$('#id_' + type + '-TOTAL_FORMS').val(total);
$(selector).after(newElement);
@ -50,7 +46,7 @@ var django = {
});
};
$(document).ready(function($) {
deleteButtonHandler($("table#bda_formset tbody.bda_formset_content").find("a.delete-handler"));
deleteButtonHandler($("table#bda_formset tbody.bda_formset_content").find("a.remove-btn"));
$("table#bda_formset tbody.bda_formset_content").sortable({
handle: "a.drag-handler",
items: "tr",
@ -92,31 +88,31 @@ var django = {
})(django.jQuery);
</script>
<h2>Inscription pour donner des cours particuliers</h2>
{% if success %}
<p class="success">Votre inscription a été mise à jour avec succès !</p>
{% endif %}
<form id="bda_form" method="post" action="{% url 'petits-cours-inscription' %}">
<h2 class="no-bottom-margin">Inscription pour donner des cours particuliers</h2>
{% if success %}
<p class="success table-top">Votre inscription a été mise à jour avec succès !</p>
{% endif %}
<form class="form-horizontal petit-cours_form" id="bda_form" method="post" action="{% url 'petits-cours-inscription' %}">
{% csrf_token %}
<span style="font-size: 1.25em; font-weight: bold; color: #e00000;"><input type="checkbox" name="receive_proposals" {% if receive_proposals %}checked="checked"{% endif %} /> Recevoir des propositions de petits cours</span>
<hr />
<div class="table-top" style="margin-left:0px; margin-right:0px; font-size: 1.25em; font-weight: bold; color: #DE826B;"><input type="checkbox" name="receive_proposals" {% if receive_proposals %}checked="checked"{% endif %} /> Recevoir des propositions de petits cours</div>
{% include "inscription-petit-cours-formset.html" %}
<input type="button" class="btn-addmore" value="Ajouter une autre matière" id="add_more" />
<script>
django.jQuery('#add_more').click(function() {
cloneMore('tbody.bda_formset_content tr:last-child', 'petitcoursability_set');
});
</script><br />
<div style="margin: 10px 0px;">
<span style="vertical-align: top; font-weight: bold;">Remarques:</span> <textarea name="remarques" style="width: 60%; height: 60px;">{{ remarques }}</textarea>
<div class="inscription-bottom">
<input type="button" class="btn btn-default pull-right" value="Ajouter une autre matière" id="add_more" />
<script>
django.jQuery('#add_more').click(function() {
cloneMore('tbody.bda_formset_content tr:last-child', 'petitcoursability_set');
});
</script><br />
<div style="margin: 10px 0px;">
<span style="vertical-align: top; font-weight: bold;">Remarques:</span> <textarea name="remarques" style="width: 60%; height: 60px;">{{ remarques }}</textarea>
</div>
<input type="submit" class="btn btn-primary pull-right" value="Enregistrer" />
<p class="footnotes">
<sup>1</sup>: spécifiez les matières pour lesquelles vous êtes compétent<br />
<sup>2</sup>: spécifiez pour chaque matière le ou les niveaux pour lesquels vous souhaitez recevoir des demandes<br />
<sup>3</sup>: spécifiez si vous êtes titulaire de l'agrégation pour cette matière<br />
<sup>4</sup>: pour supprimer une ligne, cliquez sur la croix puis appuyer sur <tt>Enregistrer</tt><br />
</p>
</div>
<input type="submit" class="btn-submit" value="Enregistrer" />
<hr />
<p class="footnotes">
<sup>1</sup>: spécifiez les matières pour lesquelles vous êtes compétent<br />
<sup>2</sup>: spécifiez pour chaque matière le ou les niveaux pour lesquels vous souhaitez recevoir des demandes<br />
<sup>3</sup>: spécifiez si vous êtes titulaire de l'agrégation pour cette matière<br />
<sup>4</sup>: pour supprimer une ligne, cliquez sur la croix puis appuyer sur <tt>Enregistrer</tt><br />
</p>
</form>
</form>
{% endblock %}

View file

@ -1,32 +1,36 @@
{% extends "base.html" %}
{% load bootstrap %}
{% block content %}
<div id="main-login-container">
<div id="main-login" class="login_block">
<div id="header">
<h1>{{ site.name }} &ndash; Connexion</h1>
<div id="main-login-container" class="container">
<div class="row row-centered">
<div class="col-xs-10 col-sm-8 col-md-5 col-centered">
<header>
<div class="banner">
<h1>GestioCOF &ndash; Connexion</h1>
</div>
</header>
<div id="main-login" class="login_block">
{% if form.errors %}
<p class="error">Identifiants incorrects.</p>
{% endif %}
<form class="form-horizontal" method="post"
action="{% url 'gestioncof.views.login_ext' %}?next={{ next|urlencode }}">
{% csrf_token %}
<div class="form-group">
<input class="form-control" id="id_username" maxlength="254" name="username" type="text" placeholder="Nom d'utilisateur">
</div>
<div class="form-group">
<input class="form-control" id="id_password" name="password" type="password" placeholder="Mot de passe">
</div>
<div class="form-actions">
<input type="submit" name="submit" class="btn btn-primary " value="Se Connecter" />
<input type="hidden" name="next" value="{{ next }}" />
</div>
</form>
</div>
{% if form.errors %}
<p class="error">Identifiants incorrects.</p>
{% endif %}
<form method="post" action="{% url 'gestioncof.views.login_ext' %}">
{% csrf_token %}
<table>
<tr>
<td>{{ form.username.label_tag }}</td>
<td>{{ form.username }}</td>
</tr>
<tr>
<td>{{ form.password.label_tag }}</td>
<td>{{ form.password }}</td>
</tr>
</table>
<input type="submit" name="submit" class="btn-submit" value="SE CONNECTER" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
</div>
</div><!-- /.row -->
</div>
{% endblock %}

View file

@ -1,15 +1,31 @@
{% extends "base.html" %}
{% block content %}
<div id="main-login-container">
<div id="main-login">
<a id="login_clipper" href="{% url 'django_cas_ng.views.login' %}">
Compte clipper
</a>
<a id="login_outsider" href="{% url 'gestioncof.views.login_ext' %}">
Extérieur
</a>
<div class="spacer"></div>
<div id="main-login-container" class="container">
<div class="row row-centered">
<div class="col-xs-10 col-sm-8 col-md-8 col-centered">
<header>
<div class="banner">
<h1>GestioCOF &ndash; Mode de connexion</h1>
</div>
</header>
<div class="container-fluid">
<div class="row" style="margin:0;">
<a aria-label="Compte clipper"
href="{% url 'django_cas_ng.views.login' %}?next={{ next|urlencode }}">
<div class="col-xs-12 col-sm-6" id="login_clipper">
Compte clipper
</div>
</a>
<a aria-label="Extérieur"
href="{% url 'gestioncof.views.login_ext' %}?next={{ next|urlencode }}">
<div class="col-xs-12 col-sm-6" id="login_outsider">
Extérieur
</div>
</a>
</div>
</div>
</div>
</div>
</div>

View file

@ -2,13 +2,13 @@
{% load staticfiles %}
{% block realcontent %}
<h3>Demandes de petits cours</h3>
<h2>Demandes de petits cours</h2>
{% if object_list %}
<table>
<table class="table table-stripped">
<thead>
<th style="width: 30%;">Nom</th>
<th style="width: 30%;">Matières</th>
<th style="width: 20%;">Date</th>
<th>Nom</th>
<th>Matières</th>
<th>Date</th>
<th>Traitée</th>
<th>par</th>
<th></th>
@ -20,7 +20,7 @@
<td>{% for matiere in demande.matieres.all %}{% if forloop.counter0 > 0 %}, {% endif %}{{ matiere }}{% endfor %}</td>
<td>{{ demande.created|date:"d E Y" }}</td>
<td style="text-align: center;"><img src="{% if demande.traitee %}{% static "images/yes.png" %}{% else %}{% static "images/no.png" %}{% endif %}" /></td>
<td>{% if demande.traitee_par %}{{ demande.traitee_par.username }}{% else %}<img src="{% static "images/none.png" %}" />{% endif %}</td>
<td>{% if demande.traitee_par %}{{ demande.traitee_par.username }}{% else %}<span class="glyphicon glyphicon-ban-circle"></span>{% endif %}</td>
<td><a href="{% url "petits-cours-demande-details" demande.id %}" class="see_detail">Détails</a></td>
</tr>
{% endfor %}

View file

@ -1,15 +1,24 @@
{% extends "base_title.html" %}
{% load bootstrap %}
{% block page_size %}col-sm-8{%endblock%}
{% block realcontent %}
<h2>Modifier mon profil</h2>
{% if success %}
<p class="success">Votre profil a été mis à jour avec succès !</p>
{% endif %}
<form id="profile" method="post" action="{% url 'gestioncof.views.profile' %}">
{% csrf_token %}
<table>
{{ form.as_table }}
</table>
<input type="submit" class="btn-submit" value="Enregistrer" />
<form id="profile form-horizontal" method="post" action="{% url 'gestioncof.views.profile' %}">
<div class="row" style="margin: 0 15%;">
{% csrf_token %}
<fieldset"center-block">
{% for field in form %}
{{ field | bootstrap}}
{% endfor %}
</fieldset>
</div>
<div class="form-actions">
<input type="submit" class="btn btn-primary pull-right" value="Enregistrer" />
</div>
</form>
{% endblock %}

View file

@ -1,40 +1,41 @@
{% extends "base_title.html" %}
{% load staticfiles %}
{% block page_size %}col-sm-8{% endblock %}
{% block extra_head %}
<script src="{% static "js/jquery.min.js" %}" type="text/javascript"></script>
<script src="{% static "autocomplete_light/autocomplete.js" %}" type="text/javascript"></script>
{% endblock %}
{% block realcontent %}
<h2>Inscription d'un nouveau membre</h2>
<input type="text" name="q" id="search_autocomplete" spellcheck="false" />
<div id="form-placeholder"></div>
<span class="yourlabs-autocomplete"></span>
<script type="text/javascript">
$(document).ready(function() {
$('input#search_autocomplete').yourlabsAutocomplete({
url: '{% url 'gestioncof.autocomplete.autocomplete' %}',
minimumCharacters: 1,
id: 'search_autocomplete',
choiceSelector: 'li:has(a)',
placeholder: "Chercher un utilisateur par nom, prénom ou identifiant clipper",
container: $("#main-content"),
box: $(".yourlabs-autocomplete"),
fixPosition: function() {},
});
$('input#search_autocomplete').bind(
'selectChoice',
function(e, choice, autocomplete) {
autocomplete.hide();
link = choice.find('a:first');
if (link.length && link.attr('href') != undefined) {
$('#form-placeholder').html("").load(link.attr('href'), function() {
$('#form-placeholder').toggle().toggle();
});
}
}
);
});
</script>
<h2>Inscription d'un nouveau membre</h2>
<input type="text" name="q" id="search_autocomplete" spellcheck="false" />
<div id="form-placeholder"></div>
<div class="yourlabs-autocomplete"></div>
<script type="text/javascript">
// On attend que la page soit prête pour executer le code
$(document).ready(function() {
$('input#search_autocomplete').yourlabsAutocomplete({
url: '{% url 'gestioncof.autocomplete.autocomplete' %}',
minimumCharacters: 1,
id: 'search_autocomplete',
choiceSelector: 'li:has(a)',
placeholder: "Chercher un utilisateur par nom, prénom ou identifiant clipper",
box: $(".yourlabs-autocomplete"),
});
$('input#search_autocomplete').bind(
'selectChoice',
function(e, choice, autocomplete) {
autocomplete.hide();
link = choice.find('a:first');
if (link.length && link.attr('href') != undefined) {
$('#form-placeholder').html("").load(link.attr('href'), function() {
$('#form-placeholder').toggle().toggle();
});
}
}
);
});
</script>
{% endblock %}

View file

@ -1,13 +1,13 @@
{% extends "base_title.html" %}
{% load bootstrap %}
{% block homelink %}
{% endblock %}
{% block page_size %}col-sm-8{% endblock %}
{% block realcontent %}
<h2>Changement de mot de passe</h2>
<form method="post" action="{% url 'django.contrib.auth.views.password_change' %}">
<form class="form-horizontal" method="post" action="{% url 'django.contrib.auth.views.password_change' %}">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" class="btn-submit" value="Changer" />
{{ form | bootstrap }}
<input type="submit" class="btn btn-primary pull-right" value="Changer" />
</form>
{% endblock %}

View file

@ -1,21 +1,29 @@
{% if login_clipper %}<h3>Inscription associée au compte clipper <tt>{{ login_clipper }}</tt></h3>
{% elif member %}<h3>Inscription du compte GestioCOF existant <tt>{{ member.username }}</tt></h3>
{% else %}<h3>Inscription d'un nouveau compte (extérieur ?)</h3>{% endif %}
<form id="profile" method="post" action="{% url 'gestioncof.views.registration' %}">
{% csrf_token %}
<table>
{{ user_form.as_table }}
{{ profile_form.as_table }}
{% if event_forms %}
</table>
{% for event_form in event_forms %}
<hr />
<h4>Inscription {{ event_form.event.title }} :</h2>
<table>
{{ event_form.as_table }}
</table>
{% endfor %}
{% endif %}
{% if login_clipper or member %}<input type="hidden" name="user_exists" value="1" />{% endif %}
<input type="submit" class="btn-submit" value="Enregistrer l'inscription" />
</form>
{% load bootstrap %}
{% if login_clipper %}
<h3>Inscription associée au compte clipper <tt>{{ login_clipper }}</tt></h3>
{% elif member %}
<h3>Inscription du compte GestioCOF existant <tt>{{ member.username }}</tt></h3>
{% else %}
<h3>Inscription d'un nouveau compte (extérieur ?)</h3>
{% endif %}
<form role="form" id="profile" method="post" action="{% url 'gestioncof.views.registration' %}">
{% csrf_token %}
<table>
{{ user_form | bootstrap }}
{{ profile_form | bootstrap }}
{% if event_forms %}
</table>
{% for event_form in event_forms %}
<hr />
<h3>Inscription {{ event_form.event.title }} :</h2>
<table>
{{ event_form | bootstrap }}
</table>
{% endfor %}
{% endif %}
{% if login_clipper or member %}
<input type="hidden" name="user_exists" value="1" />
{% endif %}
<input type="submit" class="btn btn-primary pull-right" value="Enregistrer l'inscription" />
</form>

View file

@ -1,12 +1,12 @@
{% extends "base_title.html" %}
{% block realcontent %}
<h2>Inscription d'un nouveau membre</h2>
{% if success %}
<p class="success">L'inscription de {{ member.first_name }} {{ member.last_name }} (<tt>{{ member.username }}</tt>) a été enregistrée avec succès.
{% if member.profile.is_cof %}Il est désormais membre du COF n°{{ member.profile.num }} !{% endif %}</p>
{% endif %}
<div id="form-placeholder">
{% include "registration_form.html" %}
</div>
<h2>Inscription d'un nouveau membre</h2>
{% if success %}
<p class="success">L'inscription de {{ member.first_name }} {{ member.last_name }} (<tt>{{ member.username }}</tt>) a été enregistrée avec succès.
{% if member.profile.is_cof %}Il est désormais membre du COF n°{{ member.profile.num }} !{% endif %}</p>
{% endif %}
<div id="form-placeholder">
{% include "registration_form.html" %}
</div>
{% endblock %}

View file

@ -1,23 +1,29 @@
{% extends "base_title.html" %}
{% load bootstrap %}
{% block page_size %}col-sm-8{% endblock %}
{% block realcontent %}
<h2>Sondage: {{ survey.title }}</h2>
{% if success %}
{% if deleted %}
<p class="success">Votre réponse a bien été supprimée !</p>
{% else %}
<p class="success">Votre réponse a bien été enregistrée ! Vous pouvez cependant la modifier jusqu'à la fin du sondage.</p>
{% endif %}
{% endif %}
{% if survey.details %}
<p>{{ survey.details }}</p>
{% endif %}
<form method="post" action="{% url 'gestioncof.views.survey' survey.id %}">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" class="btn-submit" value="Enregistrer" />
{% if current_answer %}
<input type="submit" name="delete" class="btn-submit" value="Supprimer ma réponse" />
{% endif %}
</form>
<h2>Sondage: {{ survey.title }}</h2>
{% if success %}
{% if deleted %}
<p class="success">Votre réponse a bien été supprimée !</p>
{% else %}
<p class="success">Votre réponse a bien été enregistrée ! Vous pouvez cependant la modifier jusqu'à la fin du sondage.</p>
{% endif %}
{% endif %}
{% if survey.details %}
<p>{{ survey.details }}</p>
{% endif %}
<form class="form-horizontal" method="post" action="{% url 'gestioncof.views.survey' survey.id %}">
{% csrf_token %}
{{ form | bootstrap}}
<div class="pull-right">
{% if current_answer %}
<input type="submit" name="delete" class="btn btn btn-default" value="Supprimer ma réponse" />
{% endif %}
<input type="submit" class="btn btn-primary" value="Enregistrer" />
</div>
</form>
{% endblock %}

View file

@ -1,19 +1,24 @@
{% extends "base_title.html" %}
{% load utils %}
{% block page_size %}col-sm-8{% endblock %}
{% block realcontent %}
<h2>Sondage: {{ survey.title }}{% if user.is_staff %} &ndash; <a href="{% url 'admin:gestioncof_survey_change' survey.id %}">Administration</a>{% endif %}</h2>
<h2>Sondage: {{ survey.title }}{% if user.is_staff %} <a class="title-link" href="{% url 'admin:gestioncof_survey_change' survey.id %}"><span class="glyphicon glyphicon-link" aria-hidden="true"></span> Administration</a>{% endif %}</h2>
{% if survey.details %}
<p>{{ survey.details }}</p>
<hr/>
{% endif %}
<h3>Filtres</h3>
{% include "tristate_js.html" %}
<form method="post" action="{% url 'gestioncof.views.survey_status' survey.id %}">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" class="btn-submit" value="Filtrer" />
<input style="margin-top:10px;" type="submit" class="btn btn-primary" value="Filtrer" />
</form>
<hr/>
<h3>Résultats globaux</h3>
<br/>
{% for question in questions %}
<h4>{{ question.question }}</h4>
<ul>
@ -22,6 +27,7 @@
{% endfor %}
</ul>
{% endfor %}
<hr/>
<h3>Réponses individuelles</h3>
<ul>
{% for user_answer in user_answers %}{% with user_answer.user as auser %}
@ -37,6 +43,8 @@
</li>
{% endif %}
{% endwith %}{% endfor %}
</ul>
<hr/>
<h3>Mailing list</h3>
<textarea style="width: 100%; height: 100px; margin-top: 10px;">
{% spaceless %}{% for user_answer in user_answers %}{% with user_answer.user as auser %}{% if user_answer.answers.all %}{% if auser.email %}{{ auser.email }}{% else %}{{ auser.username }}{% endif %}, {% endif %}{% endwith %}{% endfor %}

View file

@ -1,7 +1,7 @@
{% extends "base_title_petitscours.html" %}
{% block realcontent %}
<h3>Traitement de la demande de petits cours {{ demande.id }}</h3>
<h2>Traitement de la demande de petits cours {{ demande.id }}</h2>
{% include "details_demande_petit_cours_infos.html" %}
<hr />
{% if errors %}
@ -36,7 +36,7 @@
<pre style="margin-top: 15px;">{{ mainmail|safe }}</pre>
<input type="hidden" name="attribdata" value="{{ attribdata }}" />
{% if redo %}<input type="hidden" name="redo" value="1" />{% endif %}
<input type="submit" value="Valider le {% if redo %}re{% endif %}traitement de la demande" />
<input class="btn btn-primary pull-right" type="submit" value="Valider le {% if redo %}re{% endif %}traitement de la demande" />
</form>
{% else %}
<h3>Impossible de trouver des propositions pour cette demande</h3>

View file

@ -2,7 +2,7 @@
{% load staticfiles %}
{% block realcontent %}
<h3>Traitement de la demande de petits cours {{ demande.id }}</h3>
<h2>Traitement de la demande de petits cours {{ demande.id }}</h2>
{% include "details_demande_petit_cours_infos.html" %}
<hr />
<div class="error">

View file

@ -1,7 +1,7 @@
{% extends "base_title_petitscours.html" %}
{% block realcontent %}
<h3>Traitement de la demande de petits cours {{ demande.id }}</h3>
<h2>Traitement de la demande de petits cours {{ demande.id }}</h2>
<div class="success" style="margin: 15px 0px; font-size: 1.4em;">Demande {{ demande.id }} de {{ demande.name }} {% if redo %}re{% endif %}traitée avec succès !</div>
<a href="{% url "petits-cours-demandes-list" %}">Retour à la liste des demandes</a>
{% endblock %}