normalement il reste juste ajout membre

This commit is contained in:
Qwann 2016-07-25 19:19:07 +02:00
parent fa4308b91e
commit 3cd618e60d
15 changed files with 265 additions and 55 deletions

View file

@ -1,6 +1,6 @@
{% extends "base_title.html" %}
{% block realcontent %}
<h1><strong>Nope</strong></h1>
<h2><strong>Nope</strong></h1>
<p>Avant de revendre des places, il faut aller les payer !</p>
{% endblock %}

View file

@ -7,7 +7,7 @@
{% block realcontent %}
<h1>Revente de place</h1>
<h2>Revente de place</h1>
<form action="" method="post" id="resellform">
{% csrf_token %}
{% if form.spectacle.errors %}<ul class="errorlist"><li>Sélectionnez un spetacle</li></ul>{% endif %}
@ -21,6 +21,6 @@ Contactez-moi par email si vous êtes intéressé !<br />
{{ user.get_full_name }} ({{ user.email }})
</pre>
</p>
<input type="submit" value="Envoyer" />
<input class="btn btn-primary" type="submit" value="Envoyer" />
</form>
{% endblock %}

View file

@ -3,7 +3,7 @@
{% block realcontent %}
<h2>État des inscriptions BdA</h2>
<table class="etat-bda">
<table class="table table-striped">
<thead>
<tr>
<th data-sort="string">Titre</th>
@ -22,8 +22,8 @@
<td data-sort-value="{{ spectacle.location }}">{{ spectacle.location }}</td>
<td data-sort-value="{{ spectacle.slots }}">{{ spectacle.slots }} places</td>
<td data-sort-value="{{ spectacle.total }}">{{ spectacle.total }} demandes</td>
<td data-sort-value="{{ spectacle.ratio |stringformat:".3f" }}">
<div class={% if spectacle.ratio < 1.0 %}
<td data-sort-value="{{ spectacle.ratio |stringformat:".3f" }}"
class={% if spectacle.ratio < 1.0 %}
"greenratio"
{% else %}
{% if spectacle.ratio < 2.5 %}
@ -33,13 +33,12 @@
{% endif %}
{% endif %}>
{{ spectacle.ratio |floatformat }}
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<strong>Total : <u>{{ total }} demandes</u></strong>
<span class="bda-prix">Total : {{ total }} demandes</span>
<script type="text/javascript"
src="{% static "js/jquery.min.js" %}"></script>
<script type="text/javascript"

View file

@ -1,7 +1,7 @@
{% extends "base_title.html" %}
{% block realcontent %}
<h3><strong>Places attribuées</strong></h3>
<h2><strong>Places attribuées</strong></h3>
{% if warning %}
<h3 class="error">Attention, vous avez reçu plusieurs places pour des spectacles différents à la même date !</h3>
{% endif %}

View file

@ -41,6 +41,8 @@ a {
}
a:hover {
color: #444;
background: transparent;
@ -314,11 +316,37 @@ fieldset legend {
background-color: #B56A59
}
.title-link {
float: none;
display: block;
}
@media (min-width: 480px) {
.title-link {
float: right !important;
}
}
#main-content {
background-color: white ;
padding: 20px;
}
#main-content a,
#main-content a:hover {
color : #D81138;
}
#main-content h3 {
font-weight: 700;
font-size: large;
color:#DE826B;
}
#main-content h4 {
color:#DE826B;
}
#main-content h2,
#main-content h3.horizontal-title {
display : block;
@ -337,6 +365,14 @@ fieldset legend {
border-width: 0px 0px 5px 0px;
}
#main-content h2 a {
color : #C9E5E1;
}
#main-content h2 a:hover {
color : #ABB8B6;
}
#main-content h3.horizontal-title {
font-weight: 700;
font-size: large;
@ -678,7 +714,7 @@ header a:active {
color : #ADE297;
}
.user-is-not-cof {
color: #F6BEBE;
color: #EE8585;
}
/*
@ -690,26 +726,34 @@ tt {
font-weight: bold;
}
header .member-status {
float: left;
display : block;
width:100%;
padding-top: 5px;
}
header h1 {
font-family: 'Dosis', sans-serif;
font-size: x-large;
}
header h2 {
display : inline-block;
}
.member-status {
float: left;
display : block;
width:100%;
padding-top: 3px;
}
@media (min-width: 480px) {
header .member-status {
float: right !important;
.member-status {
float: right;
display: inline;
width: auto;
}
}
.secondary {
float:right;
}
header .btn-toolbar {
float : left ;
}
@ -782,6 +826,10 @@ input#search_autocomplete:focus {
.yourlabs-autocomplete.inner-container { position: absolute; left: -1px; top: 2px; border: 1px solid #B7B7B7; width: 618px; background: #fff; }
.yourlabs-autocomplete.inner-container { margin: 0; padding: 0; overflow-x: hidden; overflow-y: auto; position: relative; list-style-type: none; }
hr {
border-color : #D4D6C8;
}
/*
hr {
border: 0;
height: 1px;
@ -792,7 +840,7 @@ hr {
background: -ms-linear-gradient(left, hsla(0,0%,70%,0) 0%, hsla(0,0%,70%,.75) 50%, hsla(0,0%,70%,0) 100%);
background: -o-linear-gradient(left, hsla(0,0%,70%,0) 0%, hsla(0,0%,70%,.75) 50%, hsla(0,0%,70%,0) 100%);
background: linear-gradient(left, hsla(0,0%,70%,0) 0%, hsla(0,0%,70%,.75) 50%, hsla(0,0%,70%,0) 100%);
}
}*/
.tristate:hover {
cursor: pointer;
@ -930,28 +978,13 @@ pre code {
.etat-bda tr:nth-child(even) {background: #CCC}
.greenratio {
background-color: #3F3;
border: 5px solid #ccc;
border: 5px solid rgba(0, 0, 0, 0.15);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
background-color: #ADE297;
}
.orangeratio {
background-color: #FF3;
border: 5px solid #ccc;
border: 5px solid rgba(0, 0, 0, 0.15);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
background-color: #EEE285;
}
.redratio {
background-color: #F33;
border: 5px solid #ccc;
border: 5px solid rgba(0, 0, 0, 0.15);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
background-color: #EE8585;
}
th[data-sort]{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 686 B

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 B

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 B

After

Width:  |  Height:  |  Size: 378 B

View file

@ -9,9 +9,11 @@
<span class="glyphicon glyphicon-home" aria-hidden=true></span>
{% endblock %}
</a>
<div class="member-status">
<h2>{% if user.first_name %}{{ user.first_name }}{% else %}<tt>{{ user.username }}</tt>{% endif %}, {% if user.profile.is_cof %}<tt class="user-is-cof">Membre du COF{% else %}<tt class="user-is-not-cof">Non-membre du COF{% endif %}</tt></h2>
<div class="secondary">
<span class="hidden-xs">&nbsp;&nbsp;|&nbsp; </span>
<span>Se déconnecter&nbsp;<span class="glyphicon glyphicon-log-out"></span></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 %}

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

@ -0,0 +1,40 @@
{% load bootstrap %}
{{ formset.non_form_errors.as_ul }}
<table id="bda_formset" class="form table">
{{ 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 | 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="glyphicon glyphicon-remove remove-btn" title="Supprimer"></a>
</div>
<div class="spacer"></div>
</td>
</tr>
{% endfor %}
</tbody>
</table>

View file

@ -0,0 +1,118 @@
{% 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');
});
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.remove-btn"));
$("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'>&nbsp;</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 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 %}
<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" %}
<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>
</form>
{% endblock %}

View file

@ -2,7 +2,7 @@
{% load staticfiles %}
{% block realcontent %}
<h3>Demandes de petits cours</h3>
<h2>Demandes de petits cours</h2>
{% if object_list %}
<table>
<thead>

View file

@ -8,13 +8,17 @@
{% if success %}
<p class="success">Votre profil a été mis à jour avec succès !</p>
{% endif %}
<form id="profile form-inline" method="post" action="{% url 'gestioncof.views.profile' %}">
<form id="profile form-horizontal" method="post" action="{% url 'gestioncof.views.profile' %}">
<div class="row" style="margin: 0 15%;>
{% csrf_token %}
<fieldset>
<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,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 %}