forked from DGNum/gestioCOF
Déplace les templates dans les apps
This commit is contained in:
parent
c5db003842
commit
8408942d41
71 changed files with 0 additions and 0 deletions
6
gestioncof/templates/404.html
Normal file
6
gestioncof/templates/404.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% extends "base_title.html" %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h1><strong>404</strong></h1>
|
||||
<p>Wouh pinaise, y'a rien ici !</p>
|
||||
{% endblock %}
|
5
gestioncof/templates/500.html
Normal file
5
gestioncof/templates/500.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<html><head><title>500</title></head>
|
||||
<body><h1><strong>500</strong></h1>
|
||||
<p>Wouh pinaise, y'a une cacahuète dans le beurre !</p>
|
||||
</body>
|
||||
</html>
|
6
gestioncof/templates/admin/base_site.html
Normal file
6
gestioncof/templates/admin/base_site.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% extends "admin/base.html" %}
|
||||
|
||||
{% block extrahead %}
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
|
||||
{% include 'autocomplete_light/static.html' %}
|
||||
{% endblock %}
|
78
gestioncof/templates/admin/index.html
Normal file
78
gestioncof/templates/admin/index.html
Normal file
|
@ -0,0 +1,78 @@
|
|||
{% extends "admin/base_site.html" %}
|
||||
|
||||
<!-- LOADING -->
|
||||
{% load i18n grp_tags log %}
|
||||
|
||||
<!-- JAVASCRIPTS -->
|
||||
{% block javascripts %}
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
<!-- COLTYPE/BODYCLASS-- >
|
||||
{% block bodyclass %}dashboard{% endblock %}
|
||||
{% block content-class %}content-grid{% endblock %}
|
||||
|
||||
<!-- BREADCRUMBS -->
|
||||
{% block breadcrumbs %}
|
||||
<ul class="grp-horizontal-list">
|
||||
<li>{% trans "Home" %}</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
{% block content_title %}
|
||||
{% if title %}
|
||||
<header><h1>{{ title }}</h1></header>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
<!-- CONTENT -->
|
||||
{% block content %}
|
||||
<div class="g-d-c">
|
||||
<div class="g-d-12 g-d-f">
|
||||
|
||||
{% for app in app_list %}
|
||||
<div class="grp-module" id="app_{{ app.name|lower }}">
|
||||
<h2><a href="{{ app.app_url }}" class="grp-section">{% trans app.name %}</a></h2>
|
||||
{% for model in app.models %}
|
||||
<div class="grp-row">
|
||||
{% if model.perms.change %}<a href="{{ model.admin_url }}"><strong>{{ model.name }}</strong></a>{% else %}<span><strong>{{ model.name }}</strong></span>{% endif %}
|
||||
{% if model.perms.add or model.perms.change %}
|
||||
<ul class="grp-actions">
|
||||
{% if model.perms.add %}<li class="grp-add-link"><a href="{{ model.admin_url }}add/">{% trans 'Add' %}</a></li>{% endif %}
|
||||
{% if model.perms.change %}<li class="grp-change-link"><a href="{{ model.admin_url }}">{% trans 'Change' %}</a></li>{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% empty %}
|
||||
<p>{% trans "You don´t have permission to edit anything." %}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="g-d-6 g-d-l">
|
||||
<div class="grp-module" id="grp-recent-actions-module">
|
||||
<h2>{% trans 'Recent Actions' %}</h2>
|
||||
<div class="grp-module">
|
||||
<h3>{% trans 'My Actions' %}</h3>
|
||||
{% get_admin_log 20 as admin_log for_user user %}
|
||||
{% if not admin_log %}
|
||||
<p>{% trans 'None available' %}</p>
|
||||
{% else %}
|
||||
<ul class="grp-listing-small">
|
||||
{% for entry in admin_log %}
|
||||
<li class="grp-row{% if entry.is_addition %} grp-add-link{% endif %}{% if entry.is_change %} grp-change-link{% endif %}{% if entry.is_deletion %} grp-delete-link{% endif %}">
|
||||
{% if entry.is_deletion %}
|
||||
<span>{{ entry.object_repr }}</span>
|
||||
{% else %}
|
||||
<a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
|
||||
{% endif %}
|
||||
<span class="grp-font-color-quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
29
gestioncof/templates/autocomplete_user.html
Normal file
29
gestioncof/templates/autocomplete_user.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
{% load utils %}
|
||||
<ul>
|
||||
{% if members %}
|
||||
<li class="autocomplete-header">Membres du COF</li>
|
||||
{% for member in members %}{% if forloop.counter < 5 %}
|
||||
<li class="autocomplete-value"><a href="{% url 'user-registration' member.user.username %}">{{ member.user|highlight_user:q }}</a></li>
|
||||
{% elif forloop.counter == 5 %}<li class="autocomplete-more">...</a>{% endif %}{% endfor %}
|
||||
{% endif %}
|
||||
{% if users %}
|
||||
<li class="autocomplete-header">Utilisateurs de GestioCOF</li>
|
||||
{% for user in users %}{% if forloop.counter < 5 %}
|
||||
<li class="autocomplete-value"><a href="{% url 'user-registration' user.username %}">{{ user|highlight_user:q }}</a></li>
|
||||
{% elif forloop.counter == 5 %}<li class="autocomplete-more">...</a>{% endif %}{% endfor %}
|
||||
{% endif %}
|
||||
{% if clippers %}
|
||||
<li class="autocomplete-header">Utilisateurs <tt>clipper</tt></li>
|
||||
{% for clipper in clippers %}{% if forloop.counter < 5 %}
|
||||
<li class="autocomplete-value"><a href="{% url 'clipper-registration' clipper.username %}">{{ clipper|highlight_clipper:q }}</a></li>
|
||||
{% elif forloop.counter == 5 %}<li class="autocomplete-more">...</a>{% endif %}{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if not options %}
|
||||
<li class="autocomplete-header">Aucune correspondance trouvée</li>
|
||||
{% else %}
|
||||
<li class="autocomplete-header">Pas dans la liste ?</li>
|
||||
{% endif %}
|
||||
<li><a href="{% url 'empty-registration' %}">Créer un compte</a></li>
|
||||
|
||||
</ul>
|
14
gestioncof/templates/base.html
Normal file
14
gestioncof/templates/base.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{% load staticfiles %}
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
|
||||
<head>
|
||||
<title>{{ site.name }}</title>
|
||||
<link type="text/css" rel="stylesheet" href="{% static "css/cof.css" %}" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
{% block extra_head %}{% endblock %}
|
||||
</head>
|
||||
<body id="cof">
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
18
gestioncof/templates/base_title.html
Normal file
18
gestioncof/templates/base_title.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% extends "base.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 %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
3
gestioncof/templates/base_title_petitscours.html
Normal file
3
gestioncof/templates/base_title_petitscours.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{% 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 %}
|
5
gestioncof/templates/cof-denied.html
Normal file
5
gestioncof/templates/cof-denied.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% extends "base_title.html" %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h2>Section réservée aux membres du COF -- merci de vous inscrire au COF ou de passer au COF/nous envoyer un mail si vous êtes déjà membre :)</h2>
|
||||
{% endblock %}
|
11
gestioncof/templates/demande-petit-cours-raw.html
Normal file
11
gestioncof/templates/demande-petit-cours-raw.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% if success %}
|
||||
<p class="success">Votre demande a été enregistrée avec succès !</p>
|
||||
{% else %}
|
||||
<form id="demandecours" method="post" action="{% url "gestioncof.petits_cours_views.demande_raw" %}">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
<input type="submit" class="btn-submit" value="Enregistrer" />
|
||||
</form>
|
||||
{% endif %}
|
16
gestioncof/templates/demande-petit-cours.html
Normal file
16
gestioncof/templates/demande-petit-cours.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{% extends "base_title.html" %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h2>Demande de petits cours</h2>
|
||||
{% if success %}
|
||||
<p class="success">Votre demande a été enregistrée avec succès !</p>
|
||||
{% else %}
|
||||
<form id="demandecours" method="post" action="{% url "gestioncof.petits_cours_views.demande" %}">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
<input type="submit" class="btn-submit" value="Enregistrer" />
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
36
gestioncof/templates/details_demande_petit_cours.html
Normal file
36
gestioncof/templates/details_demande_petit_cours.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
{% extends "base_title_petitscours.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h3>Demande de petits cours</h3>
|
||||
{% 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>
|
||||
{% 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>:
|
||||
<ul>
|
||||
{% for attrib in attributions %}
|
||||
<li>{{ attrib.user.get_full_name }} pour {{ attrib.matiere }}, {{ attrib.date|date:"d E Y" }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% if demande.traitee %}
|
||||
<div style="text-align: right;">
|
||||
<form action="{% url "petits-cours-demande-retraitement" demande.id %}">
|
||||
<input 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">
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
14
gestioncof/templates/details_demande_petit_cours_infos.html
Normal file
14
gestioncof/templates/details_demande_petit_cours_infos.html
Normal file
|
@ -0,0 +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>
|
14
gestioncof/templates/error.html
Normal file
14
gestioncof/templates/error.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{% extends "base_title.html" %}
|
||||
|
||||
{% block realcontent %}
|
||||
{% if error_type == "use_clipper_login" %}
|
||||
<h2><strong>Votre identifiant est lié à un compte <tt>clipper</tt></strong></h2>
|
||||
<p>Veuillez vous connecter à l'aide de votre <a href="{% url 'cas_login_view' %}">compte <tt>clipper</tt></a></p>
|
||||
{% elif error_type == "no_password" %}
|
||||
<h2><strong>Votre compte n'a pas de mot de passe associé</strong></h2>
|
||||
<p>Veuillez <a href="mailto:cof@clipper.ens.fr">nous contacter</a> pour que nous en définissions un et que nous vous le transmettions !</p>
|
||||
{% else %}
|
||||
<h1><strong>{{ error_title }}</strong></h1>
|
||||
<p>{{ error_description }}</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
16
gestioncof/templates/event.html
Normal file
16
gestioncof/templates/event.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{% extends "base_title.html" %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h2>Événement: {{ event.title }}</h2>
|
||||
{% if success %}
|
||||
<p class="success">Votre inscription a bien été enregistrée ! Vous pouvez cependant la modifier jusqu'à la fin des inscriptions.</p>
|
||||
{% endif %}
|
||||
{% if event.details %}
|
||||
<p>{{ event.details }}</p>
|
||||
{% endif %}
|
||||
<form method="post" action="{% url 'gestioncof.views.event' event.id %}">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" class="btn-submit" value="Enregistrer" />
|
||||
</form>
|
||||
{% endblock %}
|
45
gestioncof/templates/event_status.html
Normal file
45
gestioncof/templates/event_status.html
Normal file
|
@ -0,0 +1,45 @@
|
|||
{% extends "base_title.html" %}
|
||||
{% load utils %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h2>Événement: {{ event.title }}{% if user.is_staff %} – <a href="{% url 'admin:gestioncof_event_change' event.id %}">Administration</a>{% endif %}</h2>
|
||||
{% if event.details %}
|
||||
<p>{{ event.details }}</p>
|
||||
{% 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" />
|
||||
</form>
|
||||
<h3>Résultats globaux</h3>
|
||||
{% for option in options %}
|
||||
<h4>{{ option.value }}</h4>
|
||||
<ul>
|
||||
{% for choice in option.choices.all %}
|
||||
<li>{{ choice.value }} : {{ choices_count|key:choice.id }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
<h3>Réponses individuelles</h3>
|
||||
<ul>
|
||||
{% for user_choice in user_choices %}{% with user_choice.user as auser %}
|
||||
{% if user_choice.options.all %}
|
||||
<li>
|
||||
{% if auser.first_name and auser.last_name %}{{ auser.first_name }} {{ auser.last_name }}
|
||||
{% else %}<tt>{{ auser.username }}</tt>{% endif %} :
|
||||
<ul>
|
||||
{% for choice in user_choice.options.all %}
|
||||
<li>{{ choice.event_option.name }} : {{ choice.value }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endwith %}{% endfor %}
|
||||
</ul>
|
||||
<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 %}
|
||||
{% endspaceless %}</textarea>
|
||||
{% endblock %}
|
82
gestioncof/templates/home.html
Normal file
82
gestioncof/templates/home.html
Normal file
|
@ -0,0 +1,82 @@
|
|||
{% extends "base_title.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>
|
||||
<!-- {% if open_events %}
|
||||
<h3>Événements</h3>
|
||||
<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>
|
||||
<ul>
|
||||
{% for survey in open_surveys %}
|
||||
<li><a href="{% url "gestioncof.views.survey" survey.id %}">{{ survey.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if user.profile.is_cof %}
|
||||
<h3>BdA</h3>
|
||||
<ul>
|
||||
<!-- <li><a href="{% url "bda-tirage-inscription" %}">Inscription au premier tirage au sort du BdA</a></li>
|
||||
<li><a href="{% url "bda-etat-places" %}">État des demandes</a>-->
|
||||
<li><a href="{% url "bda-places-attribuees" %}">Mes places du premier tirage</a></li>
|
||||
<li><a href="{% url "bda-revente" %}">Revendre une place du premier tirage</a></li>
|
||||
<br>
|
||||
Second tirage
|
||||
<!-- <li><a href="{% url "bda2-tirage-inscription" %}">Inscription au deuxième tirage au sort du BdA</a></li>
|
||||
<li><a href="{% url "bda2-etat-places" %}">État des demandes</a></li> -->
|
||||
<li><a href="{% url "bda2-places-attribuees" %}">Mes places du deuxième tirage</a></li>
|
||||
<li><a href="{% url "bda2-revente" %}">Revendre une place du deuxième tirage</a></li>
|
||||
<br>
|
||||
|
||||
|
||||
Troisième tirage
|
||||
<!--<li><a href="{% url "bda3-tirage-inscription" %}">Inscription au troisième tirage au sort du BdA</a></li>
|
||||
<li><a href="{% url "bda3-etat-places" %}">État des demandes</a></li>-->
|
||||
<li><a href="{% url "bda3-places-attribuees" %}">Mes places du troisième tirage</a></li>
|
||||
<li><a href="{% url "bda3-revente" %}">Revendre une place du troisième tirage</a></li>
|
||||
<br>
|
||||
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<h3>Divers</h3>
|
||||
<ul>
|
||||
|
||||
{% 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>
|
||||
<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>
|
||||
<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>
|
||||
{% endif %}
|
||||
|
||||
<h3>Pour tout problème : cof@ens.fr.</h3>
|
||||
{% endblock %}
|
40
gestioncof/templates/inscription-petit-cours-formset.html
Normal file
40
gestioncof/templates/inscription-petit-cours-formset.html
Normal file
|
@ -0,0 +1,40 @@
|
|||
{{ formset.non_form_errors.as_ul }}
|
||||
<table id="bda_formset" class="form">
|
||||
{{ formset.management_form }}
|
||||
{% for form in formset.forms %}
|
||||
{% if forloop.first %}
|
||||
<thead><tr>
|
||||
{% for field in form.visible_fields %}
|
||||
<th class="bda-field-{{ field.name }}">
|
||||
{% if field.name != "DELETE" %}
|
||||
{{ field.label|safe|capfirst }}
|
||||
{% endif %}
|
||||
<sup>{{ forloop.counter }}</sup>
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr></thead>
|
||||
<tbody class="bda_formset_content">
|
||||
{% endif %}
|
||||
<tr class="{% cycle row1,row2 %} dynamic-form {% if form.instance.pk %}has_original{% endif %}">
|
||||
{% for field in form.visible_fields %}
|
||||
{% if field.name != "DELETE" and field.name != "priority" %}
|
||||
<td class="bda-field-{{ field.name }}">
|
||||
{% if forloop.first %}
|
||||
{{ form.non_field_errors }}
|
||||
{% for hidden in form.hidden_fields %}{{ hidden }}{% endfor %}
|
||||
{% endif %}
|
||||
{{ field.errors.as_ul }}
|
||||
{{ field }}
|
||||
</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>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
122
gestioncof/templates/inscription-petit-cours.html
Normal file
122
gestioncof/templates/inscription-petit-cours.html
Normal file
|
@ -0,0 +1,122 @@
|
|||
{% extends "base_title.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block extra_head %}
|
||||
<link href="{% static "grappelli/jquery/ui/css/custom-theme/jquery-ui-1.8.custom.css" %}" rel="stylesheet" type="text/css" media="screen" title="no title" charset="utf-8" />
|
||||
<script src="{% static "grappelli/jquery/jquery-1.6.2.min.js" %}" type="text/javascript"></script>
|
||||
<script src="{% static "grappelli/jquery/ui/js/jquery-ui-1.8.15.custom.min.js" %}" type="text/javascript"></script>
|
||||
<link href="{% static "grappelli/css/tools.css" %}" rel="stylesheet" type="text/css" />
|
||||
<link href="{% static "grappelli/css/jquery-ui-grappelli-extensions.css" %}" rel="stylesheet" type="text/css" />
|
||||
{% endblock %}
|
||||
|
||||
{% block realcontent %}
|
||||
<script type="text/javascript">
|
||||
var django = {
|
||||
"jQuery": jQuery.noConflict(true)
|
||||
};
|
||||
|
||||
(function($) {
|
||||
cloneMore = function(selector, type) {
|
||||
var newElement = $(selector).clone(true);
|
||||
var total = $('#id_' + type + '-TOTAL_FORMS').val();
|
||||
newElement.find(':input').each(function() {
|
||||
var name = $(this).attr('name').replace('-' + (total-1) + '-','-' + total + '-');
|
||||
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);
|
||||
}
|
||||
deleteButtonHandler = function(elem) {
|
||||
elem.bind("click", function() {
|
||||
var deleteInput = $(this).prev(),
|
||||
form = $(this).parents(".dynamic-form").first();
|
||||
// callback
|
||||
// toggle options.predeleteCssClass and toggle checkbox
|
||||
if (form.hasClass("has_original")) {
|
||||
form.toggleClass("predelete");
|
||||
if (deleteInput.attr("checked")) {
|
||||
deleteInput.attr("checked", false);
|
||||
} else {
|
||||
deleteInput.attr("checked", true);
|
||||
}
|
||||
}
|
||||
// callback
|
||||
});
|
||||
};
|
||||
$(document).ready(function($) {
|
||||
deleteButtonHandler($("table#bda_formset tbody.bda_formset_content").find("a.delete-handler"));
|
||||
$("table#bda_formset tbody.bda_formset_content").sortable({
|
||||
handle: "a.drag-handler",
|
||||
items: "tr",
|
||||
axis: "y",
|
||||
appendTo: 'body',
|
||||
forceHelperSize: true,
|
||||
placeholder: 'ui-sortable-placeholder',
|
||||
forcePlaceholderSize: true,
|
||||
containment: 'form#bda_form',
|
||||
tolerance: 'pointer',
|
||||
start: function(evt, ui) {
|
||||
var template = "",
|
||||
len = ui.item.children("td").length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
template += "<td style='height:" + (ui.item.outerHeight() + 12 ) + "px' class='placeholder-cell'> </td>"
|
||||
}
|
||||
template += "";
|
||||
ui.placeholder.html(template);
|
||||
},
|
||||
stop: function(evt, ui) {
|
||||
// Toggle div.table twice to remove webkits border-spacing bug
|
||||
$("table#bda_formset").toggle().toggle();
|
||||
},
|
||||
});
|
||||
$("#bda_form").bind("submit", function(){
|
||||
var sortable_field_name = "priority";
|
||||
var i = 1;
|
||||
$(".bda_formset_content").find("tr").each(function(){
|
||||
var fields = $(this).find("td :input[value]"),
|
||||
select = $(this).find("td select");
|
||||
if (select.val() && fields.serialize()) {
|
||||
$(this).find("input[name$='"+sortable_field_name+"']").val(i);
|
||||
i++;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
})(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' %}">
|
||||
{% 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 />
|
||||
{% 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>
|
||||
<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>
|
||||
{% endblock %}
|
7
gestioncof/templates/liste_mails.html
Normal file
7
gestioncof/templates/liste_mails.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{% extends "base_title.html" %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h2>{{ titre }}</h2>
|
||||
<textarea style="width: 100%; height: 100px; margin-top: 10px;">
|
||||
{% for personne in personnes %}{{ personne.user.email }}, {% endfor %}</textarea>
|
||||
{% endblock %}
|
32
gestioncof/templates/login.html
Normal file
32
gestioncof/templates/login.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div id="main-login-container">
|
||||
<div id="main-login" class="login_block">
|
||||
<div id="header">
|
||||
<h1>{{ site.name }} – Connexion</h1>
|
||||
</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>
|
||||
|
||||
{% endblock %}
|
16
gestioncof/templates/login_switch.html
Normal file
16
gestioncof/templates/login_switch.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div id="main-login-container">
|
||||
<div id="main-login">
|
||||
<a id="login_clipper" href="{% url 'django_cas.views.login' %}">
|
||||
Compte clipper
|
||||
</a>
|
||||
<a id="login_outsider" href="{% url 'gestioncof.views.login_ext' %}">
|
||||
Extérieur
|
||||
</a>
|
||||
<div class="spacer"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
17
gestioncof/templates/petits-cours-mail-demandeur.txt
Normal file
17
gestioncof/templates/petits-cours-mail-demandeur.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
Bonjour,
|
||||
|
||||
Je vous contacte au sujet de votre annonce passée sur le site du COF pour rentrer en contact avec un élève normalien pour des cours particuliers. Voici les coordonnées d'élèves qui sont motivés par de tels cours et correspondent aux critères que vous nous aviez transmis :
|
||||
|
||||
{% for matiere, proposed in proposals %}¤ {{ matiere }} :{% for user in proposed %}
|
||||
¤ {{ user.get_full_name }}{% if user.profile.phone %}, {{ user.profile.phone }}{% endif %}{% if user.email %}, {{ user.email }}{% endif %}{% endfor %}
|
||||
|
||||
{% endfor %}{% if unsatisfied %}Nous n'avons cependant pas pu trouver d'élève disponible pour des cours de {% for matiere in unsatisfied %}{% if forloop.counter0 > 0 %}, {% endif %}{{ matiere }}{% endfor %}.
|
||||
|
||||
{% endif %}Si pour une raison ou une autre ces numéros ne suffisaient pas, n'hésitez pas à répondre à cet e-mail et je vous en ferai parvenir d'autres sans problème.
|
||||
{% if extra|length > 0 %}
|
||||
{{ extra|safe }}
|
||||
{% endif %}
|
||||
Cordialement,
|
||||
|
||||
--
|
||||
Le COF, BdE de l'ENS
|
28
gestioncof/templates/petits-cours-mail-eleve.txt
Normal file
28
gestioncof/templates/petits-cours-mail-eleve.txt
Normal file
|
@ -0,0 +1,28 @@
|
|||
Salut,
|
||||
|
||||
Le COF a reçu une demande de petit cours qui te correspond. Tu es en haut de la liste d'attente donc on a transmis tes coordonnées, ainsi que celles de 2 autres qui correspondaient aussi (c'est la vie, on donne les numéros 3 par 3 pour que ce soit plus souple). Voici quelques infos sur l'annonce en question :
|
||||
|
||||
¤ Nom : {{ demande.name }}
|
||||
|
||||
¤ Période : {{ demande.quand }}
|
||||
|
||||
¤ Fréquence : {{ demande.freq }}
|
||||
|
||||
¤ Lieu (si préféré) : {{ demande.lieu }}
|
||||
|
||||
¤ Niveau : {{ demande.get_niveau_display }}
|
||||
|
||||
¤ Remarques diverses (désolé pour les balises HTML) : {{ demande.remarques }}
|
||||
|
||||
{% if matieres|length > 1 %}¤ Matières :
|
||||
{% for matiere in matieres %} ¤ {{ matiere }}
|
||||
{% endfor %}{% else %}¤ Matière : {% for matiere in matieres %}{{ matiere }}
|
||||
{% endfor %}{% endif %}
|
||||
Voilà, cette personne te contactera peut-être sous peu, tu pourras voir les détails directement avec elle (prix, modalités, ...). Pour indication, 30 Euro/h semble être la moyenne.
|
||||
|
||||
Si tu te rends compte qu'en fait tu ne peux pas/plus donner de cours en ce moment, ça serait cool que tu décoches la case "Recevoir des propositions de petits cours" sur GestioCOF. Ensuite dès que tu voudras réapparaître tu pourras recocher la case et tu seras à nouveau sur la liste.
|
||||
|
||||
À bientôt,
|
||||
|
||||
--
|
||||
Le COF, pour les petits cours
|
47
gestioncof/templates/petits_cours_demandes_list.html
Normal file
47
gestioncof/templates/petits_cours_demandes_list.html
Normal file
|
@ -0,0 +1,47 @@
|
|||
{% extends "base_title_petitscours.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h3>Demandes de petits cours</h3>
|
||||
{% if object_list %}
|
||||
<table>
|
||||
<thead>
|
||||
<th style="width: 30%;">Nom</th>
|
||||
<th style="width: 30%;">Matières</th>
|
||||
<th style="width: 20%;">Date</th>
|
||||
<th>Traitée</th>
|
||||
<th>par</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for demande in object_list %}
|
||||
<tr>
|
||||
<td>{{ demande.name }}</td>
|
||||
<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><a href="{% url "petits-cours-demande-details" demande.id %}" class="see_detail">Détails</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% if is_paginated %}
|
||||
<div class="pagination">
|
||||
<span class="page-links">
|
||||
{% if page_obj.has_previous %}
|
||||
<a href="{% url "petits-cours-demandes-list" %}?page={{ page_obj.previous_page_number }}"><</a>
|
||||
{% endif %}
|
||||
<span class="page-current">
|
||||
Page {{ page_obj.number }} sur {{ page_obj.paginator.num_pages }}
|
||||
</span>
|
||||
{% if page_obj.has_next %}
|
||||
<a href="{% url "petits-cours-demandes-list" %}?page={{ page_obj.next_page_number }}">></a>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p>Aucune demande :(</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
15
gestioncof/templates/profile.html
Normal file
15
gestioncof/templates/profile.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% extends "base_title.html" %}
|
||||
|
||||
{% 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>
|
||||
{% endblock %}
|
36
gestioncof/templates/registration.html
Normal file
36
gestioncof/templates/registration.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
{% extends "base_title.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% 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>
|
||||
<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",
|
||||
});
|
||||
$('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 %}
|
|
@ -0,0 +1,9 @@
|
|||
{% extends "base_title.html" %}
|
||||
|
||||
{% block homelink %}
|
||||
{% endblock %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h2>Mot de passe modifié avec succès !</h2>
|
||||
<h3><a href="{% url "gestioncof.views.home" %}">Retour au menu principal</a></h3>
|
||||
{% endblock %}
|
13
gestioncof/templates/registration/password_change_form.html
Normal file
13
gestioncof/templates/registration/password_change_form.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends "base_title.html" %}
|
||||
|
||||
{% block homelink %}
|
||||
{% endblock %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h2>Changement de mot de passe</h2>
|
||||
<form method="post" action="{% url 'django.contrib.auth.views.password_change' %}">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" class="btn-submit" value="Changer" />
|
||||
</form>
|
||||
{% endblock %}
|
21
gestioncof/templates/registration_form.html
Normal file
21
gestioncof/templates/registration_form.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{% 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>
|
12
gestioncof/templates/registration_post.html
Normal file
12
gestioncof/templates/registration_post.html
Normal file
|
@ -0,0 +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>
|
||||
{% endblock %}
|
23
gestioncof/templates/survey.html
Normal file
23
gestioncof/templates/survey.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{% extends "base_title.html" %}
|
||||
|
||||
{% 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>
|
||||
{% endblock %}
|
44
gestioncof/templates/survey_status.html
Normal file
44
gestioncof/templates/survey_status.html
Normal file
|
@ -0,0 +1,44 @@
|
|||
{% extends "base_title.html" %}
|
||||
{% load utils %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h2>Sondage: {{ survey.title }}{% if user.is_staff %} – <a href="{% url 'admin:gestioncof_survey_change' survey.id %}">Administration</a>{% endif %}</h2>
|
||||
{% if survey.details %}
|
||||
<p>{{ survey.details }}</p>
|
||||
{% 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" />
|
||||
</form>
|
||||
<h3>Résultats globaux</h3>
|
||||
{% for question in questions %}
|
||||
<h4>{{ question.question }}</h4>
|
||||
<ul>
|
||||
{% for answer in question.answers.all %}
|
||||
<li>{{ answer.answer }} : {{ answers_count|key:answer.id }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
<h3>Réponses individuelles</h3>
|
||||
<ul>
|
||||
{% for user_answer in user_answers %}{% with user_answer.user as auser %}
|
||||
{% if user_answer.answers.all %}
|
||||
<li>
|
||||
{% if auser.first_name and auser.last_name %}{{ auser.first_name }} {{ auser.last_name }}
|
||||
{% else %}<tt>{{ auser.username }}</tt>{% endif %} :
|
||||
<ul>
|
||||
{% for answer in user_answer.answers.all %}
|
||||
<li>{{ answer.survey_question.question }} : {{ answer.answer }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endwith %}{% endfor %}
|
||||
<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 %}
|
||||
{% endspaceless %}</textarea>
|
||||
{% endblock %}
|
45
gestioncof/templates/traitement_demande_petit_cours.html
Normal file
45
gestioncof/templates/traitement_demande_petit_cours.html
Normal file
|
@ -0,0 +1,45 @@
|
|||
{% extends "base_title_petitscours.html" %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h3>Traitement de la demande de petits cours {{ demande.id }}</h3>
|
||||
{% include "details_demande_petit_cours_infos.html" %}
|
||||
<hr />
|
||||
{% if errors %}
|
||||
<div class="error">
|
||||
Attention:
|
||||
<ul>{% for error in errors %}<li>{{ error }}</li>{% endfor %}</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if unsatisfied %}
|
||||
<div class="error">
|
||||
Attention: Impossible de trouver des propositions pour les matières suivantes:
|
||||
<ul>
|
||||
{% for matiere in unsatisfied %}<li>{{ matiere }}</li>{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if proposals %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
Propositions:
|
||||
<ul>
|
||||
{% for proposeduser, matieres in proposed_for %}
|
||||
<li>{{ proposeduser }} pour {% for matiere in matieres %}{% if forloop.counter0 > 0 %}, {% endif %}{{ matiere }}{% endfor %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<h4>Mails pour les membres proposés :</h4>
|
||||
{% for proposeduser, mail in proposed_mails %}
|
||||
<h5>Pour {{ proposeduser }}:</h5>
|
||||
<pre>{{ mail }}</pre>
|
||||
{% endfor %}
|
||||
<h4>Mail pour l'auteur de la demande :</h4>
|
||||
<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" />
|
||||
</form>
|
||||
{% else %}
|
||||
<h3>Impossible de trouver des propositions pour cette demande</h3>
|
||||
<div class="error" style="font-size: 1.6em; margin-top: 10px;">Traitement manuel obligatoire !</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -0,0 +1,59 @@
|
|||
{% extends "base_title_petitscours.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h3>Traitement de la demande de petits cours {{ demande.id }}</h3>
|
||||
{% include "details_demande_petit_cours_infos.html" %}
|
||||
<hr />
|
||||
<div class="error">
|
||||
Attention: demande de petits cours spécifiant le niveau "Autre niveau": choisissez les candidats correspondant aux remarques de la demande. S'il y a moins de 3 candidats adaptés, ne mettre que ceux qui conviennent, pas besoin de faire du bourrage :)
|
||||
</div>
|
||||
{% if unsatisfied %}
|
||||
<div class="error">
|
||||
Attention: Impossible de trouver des propositions pour les matières suivantes:
|
||||
<ul>
|
||||
{% for matiere in unsatisfied %}<li>{{ matiere }}</li>{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
<script src="{% static "js/jquery.min.js" %}" type="text/javascript"></script>
|
||||
{% if proposals %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{% for matiere, users in proposals %}
|
||||
<h4>{{ matiere }}</h4>
|
||||
{% for i in "012"|make_list %}{% if i|add:"0" < users|length %}
|
||||
<div style="float: left; width: 340px;">
|
||||
Proposition {{ i|add:"1" }}:
|
||||
<select id="proposal-{{ matiere.id }}-{{ i }}" name="proposal-{{ matiere.id }}-{{ i }}">
|
||||
<option value="-1" data-description="">-------</option>
|
||||
{% for user in users %}
|
||||
<option value="{{ user.id }}" data-description="{{ user.profile.petits_cours_remarques }}">{{ user }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div style="float: right; width: 580px;"><p id="proposal-description-{{ matiere.id }}-{{ i }}"></p></div>
|
||||
<div class="spacer"></div>
|
||||
<script type="text/javascript">
|
||||
$('#proposal-{{ matiere.id }}-{{ i }}').change(function(){
|
||||
var selected = $(this).find(':selected');
|
||||
var content = "";
|
||||
if (selected.val() != "-1")
|
||||
content = (selected.data('description')) ? selected.data('description'): "Pas de remarques";
|
||||
|
||||
$('#proposal-description-{{ matiere.id }}-{{ i }}').html(content);
|
||||
}).trigger('change');
|
||||
</script>
|
||||
<hr />
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<input type="hidden" name="preparing" value="1" />
|
||||
{% if redo %}<input type="hidden" name="redo" value="1" />{% endif %}
|
||||
<input type="submit" value="Préparer le {% if redo %}re{% endif %}traitement de la demande" />
|
||||
</form>
|
||||
{% else %}
|
||||
<h3>Impossible de trouver des propositions pour cette demande</h3>
|
||||
<div class="error" style="font-size: 1.6em; margin-top: 10px;">Traitement manuel obligatoire !</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -0,0 +1,7 @@
|
|||
{% extends "base_title_petitscours.html" %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h3>Traitement de la demande de petits cours {{ demande.id }}</h3>
|
||||
<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 %}
|
70
gestioncof/templates/tristate_js.html
Normal file
70
gestioncof/templates/tristate_js.html
Normal file
|
@ -0,0 +1,70 @@
|
|||
{% load staticfiles %}
|
||||
<script type="text/javascript">
|
||||
var supernifty_tristate = function() {
|
||||
var
|
||||
YES = { image: "{% static "/images/yes.png" %}", state: "yes" },
|
||||
NO = { image: "{% static "/images/no.png" %}", state: "no" },
|
||||
NONE = { image: "{% static "/images/none.png" %}", state: "none" };
|
||||
|
||||
function tristate_elements() {
|
||||
if ( document.getElementsByClassName != undefined ) {
|
||||
return document.getElementsByClassName( "tristate" );
|
||||
}
|
||||
else {
|
||||
var
|
||||
all = document.getElementsByTagName('*'),
|
||||
alllength = all.length,
|
||||
result = [], i;
|
||||
for ( i = 0; i < alllength; i++ ) {
|
||||
if ( all[i].className == 'tristate' ) {
|
||||
result.push( all[i] );
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
init: function() {
|
||||
var list = tristate_elements(),
|
||||
i,
|
||||
html;
|
||||
for ( i = 0; i < list.length; i++ ) {
|
||||
var state = NONE;
|
||||
var value = list[i].getAttribute("value");
|
||||
if ( value == 'yes' )
|
||||
state = YES;
|
||||
else if ( value == 'no' )
|
||||
state = NO;
|
||||
html = "<img id=\"" + list[i].id + "_img\" src=\"" + state.image + "\" onclick=\"supernifty_tristate.update('" + list[i].id + "')\"/><input type=\"hidden\" id=\"" + list[i].id + "_frm\" name=\"" + list[i].id + "\" value=\"" + state.state + "\"/>";
|
||||
list[i].innerHTML = html;
|
||||
}
|
||||
},
|
||||
|
||||
update: function(id) {
|
||||
var state = document.getElementById( id + "_frm" ).value, next;
|
||||
// yes -> no -> none -> yes
|
||||
if ( state == 'yes' ) {
|
||||
next = NO;
|
||||
}
|
||||
else if ( state == 'no' ) {
|
||||
next = NONE;
|
||||
}
|
||||
else { // assume none
|
||||
next = YES;
|
||||
}
|
||||
document.getElementById( id + "_img" ).src = next.image;
|
||||
document.getElementById( id + "_frm" ).value = next.state;
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
// onload handler
|
||||
var existing_onload = window.onload;
|
||||
window.onload = function() {
|
||||
if ( existing_onload != undefined ) {
|
||||
existing_onload();
|
||||
}
|
||||
supernifty_tristate.init();
|
||||
}
|
||||
</script>
|
32
gestioncof/templates/utile_bda.html
Normal file
32
gestioncof/templates/utile_bda.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
{% extends "base_title.html" %}
|
||||
|
||||
{% block homelink %}
|
||||
{% endblock %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h2>Liens utiles du BdA</h2>
|
||||
<h3>Listes mail</h3>
|
||||
<ul>
|
||||
<li><a href="{% url 'gestioncof.views.liste_bdadiff' %}">BdA diffusion</a></li>
|
||||
<li><a href="{% url 'gestioncof.views.liste_bdarevente' %}">BdA revente</a></li>
|
||||
</ul>
|
||||
<h3>Premier tirage</h3>
|
||||
<ul>
|
||||
<li><a href="{% url 'bda.views.etat_places' %}">Etat des voeux</a></li>
|
||||
<li><a href="{% url 'bda-liste-spectacles' %}">Mailing list par spectacle</a></li>
|
||||
<li><a href="{% url 'bda.views.unpaid' %}">Mailing list des impayés</a></li>
|
||||
<li><a href="{% url 'bda-liste-spectacles-ics' %}">Calendrier des spectacles (.ics)</a></li>
|
||||
</ul>
|
||||
<h3>Deuxième tirage</h3>
|
||||
<ul>
|
||||
<li><a href="{% url 'bda2.views.etat_places' %}">Etat des voeux</a></li>
|
||||
<li><a href="{% url 'bda2-liste-spectacles' %}">Mailing list par spectacle</a></li>
|
||||
<li><a href="{% url 'bda2.views.unpaid' %}">Mailing list des impayés</a></li>
|
||||
</ul>
|
||||
<h3>Troisième tirage</h3>
|
||||
<ul>
|
||||
<li><a href="{% url 'bda3.views.etat_places' %}">Etat des voeux</a></li>
|
||||
<li><a href="{% url 'bda3-liste-spectacles' %}">Mailing list par spectacle</a></li>
|
||||
<li><a href="{% url 'bda3.views.unpaid' %}">Mailing list des impayés</a></li>
|
||||
</ul>
|
||||
{% endblock %}
|
20
gestioncof/templates/utile_cof.html
Normal file
20
gestioncof/templates/utile_cof.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{% extends "base_title.html" %}
|
||||
|
||||
{% block homelink %}
|
||||
{% endblock %}
|
||||
|
||||
{% block realcontent %}
|
||||
<h2>Liens utiles du COF</h2>
|
||||
<h3>COF</h3>
|
||||
<ul>
|
||||
<li><a href="{% url 'gestioncof.views.export_members' %}">Export des membres du COF</a></li>
|
||||
<li><a href="{% url 'gestioncof.views.liste_diffcof' %}">Diffusion COF</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>Mega</h3>
|
||||
<ul>
|
||||
<li><a href="{% url 'gestioncof.views.export_mega_participants' %}">Export des non-orgas uniquement</a></li>
|
||||
<li><a href="{% url 'gestioncof.views.export_mega_orgas' %}">Export des orgas uniquement</a></li>
|
||||
<li><a href="{% url 'gestioncof.views.export_mega' %}">Export de tout le monde</a></li>
|
||||
</ul>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue