Fini ! modulo les trucs que j'ai peut-être cassé/oublié :)

This commit is contained in:
Qwann 2016-07-27 15:29:06 +02:00
parent d864a7bc16
commit e942bf7074
5 changed files with 60 additions and 47 deletions

View file

@ -1,26 +1,28 @@
{% extends "base_title.html" %} {% extends "base_title.html" %}
{% load staticfiles %}
{% block realcontent %} {% block realcontent %}
<h2>{{ spectacle }}</h2> <h2>{{ spectacle }}</h2>
<table class='table table-striped'> <table class='table table-striped etat-bda'>
<thead> <thead>
<tr> <tr>
<th>Nom</th> <th data-sort="string">Nom</th>
<th>Places</th> <th data-sort="int">Places</th>
<th>Adresse Mail</th> <th data-sort="string">Adresse Mail</th>
<th>Payé</th> <th data-sort="string">Payé</th>
<th>Donné</th> <th data-sort="string">Donné</th>
</tr> </tr>
</thead> </thead>
<tbody>
{% for participant in participants %} {% for participant in participants %}
<tr> <tr>
<td>{{participant.name}}</td> <td data-sort-value="{{ participan.name}}">{{participant.name}}</td>
<td>{{participant.nb_places}} place{{participant.nb_places|pluralize}}</td> <td data-sort-value="{{participant.nb_places}}">{{participant.nb_places}} place{{participant.nb_places|pluralize}}</td>
<td>{{participant.email}}</td> <td data-sort-value="{{participant.email}}">{{participant.email}}</td>
<td class={%if participant.paid %}"greenratio"{%else%}"redratio"{%endif%}> <td data-sort-value="{{ participant.paid}}" class={%if participant.paid %}"greenratio"{%else%}"redratio"{%endif%}>
{% if participant.paid %}Oui{% else %}Non{%endif%} {% if participant.paid %}Oui{% else %}Non{%endif%}
</td> </td>
<td class={%if participant.given == participant.nb_places %}"greenratio" <td data-sort-value="{{participant.given}}" class={%if participant.given == participant.nb_places %}"greenratio"
{%elif participant.given == 0%}"redratio" {%elif participant.given == 0%}"redratio"
{%else%}"orangeratio" {%else%}"orangeratio"
{%endif%}> {%endif%}>
@ -31,6 +33,7 @@
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody>
</table> </table>
<h3><a href="{% url "admin:bda_attribution_add" %}?spectacle={{spectacle.id}}"><span class="glyphicon glyphicon-plus-sign"></span> Ajouter une attribution</a></h3> <h3><a href="{% url "admin:bda_attribution_add" %}?spectacle={{spectacle.id}}"><span class="glyphicon glyphicon-plus-sign"></span> Ajouter une attribution</a></h3>
<br> <br>
@ -45,11 +48,20 @@
{% endfor %} {% endfor %}
</pre> </pre>
<script> <script type="text/javascript"
function toggle(id) { src="{% static "js/jquery.min.js" %}"></script>
<script type="text/javascript"
src="{% static "js/joequery-Stupid-Table-Plugin/stupidtable.js" %}"></script>
<script>
function toggle(id) {
var pre = document.getElementById(id) ; var pre = document.getElementById(id) ;
pre.style.display = pre.style.display == "none" ? "block" : "none" ; pre.style.display = pre.style.display == "none" ? "block" : "none" ;
} }
</script> </script>
<script type="text/javascript">
$(function(){
$("table.etat-bda").stupidtable();
});
</script>
{% endblock %} {% endblock %}

View file

@ -3,7 +3,7 @@
{% block realcontent %} {% block realcontent %}
<h2>État des inscriptions BdA</h2> <h2>État des inscriptions BdA</h2>
<table class="table table-striped"> <table class="table table-striped etat-bda">
<thead> <thead>
<tr> <tr>
<th data-sort="string">Titre</th> <th data-sort="string">Titre</th>

View file

@ -6,12 +6,18 @@
<h3 class="error">Attention, vous avez reçu plusieurs places pour des spectacles différents à la même date !</h3> <h3 class="error">Attention, vous avez reçu plusieurs places pour des spectacles différents à la même date !</h3>
{% endif %} {% endif %}
{% if places %} {% if places %}
<ol> <table class="table table-striped">
{% for place in places %} {% for place in places %}
<li>{{ place.spectacle }}{% if place.double %} (deux places){% endif %}</li> <tr>
<td>{{place.spectacle.title}}</td>
<td>{{place.spectacle.location}}</td>
<td>{{place.spectacle.date_no_seconds}}</td>
<td>{% if place.double %}deux places{%else%}une place{% endif %}</td>
</tr>
{% endfor %} {% endfor %}
</ol> </table>
<h4>Total à payer : {{ total|floatformat }}€</h4> <h4 class="bda-prix">Total à payer : {{ total|floatformat }}€</h4>
<br/>
<h4><a href="{% url "bda-places-attribuees-ics" tirage.id %}">Exporter au format calendrier</a> (.ics, compatible avec tous les logiciels d'agenda)</h4> <h4><a href="{% url "bda-places-attribuees-ics" tirage.id %}">Exporter au format calendrier</a> (.ics, compatible avec tous les logiciels d'agenda)</h4>
{% else %} {% else %}
<h3>Vous n'avez aucune place :(</h3> <h3>Vous n'avez aucune place :(</h3>

View file

@ -6,7 +6,7 @@
<h3>Liste des spectacles</h3> <h3>Liste des spectacles</h3>
<table class="table table-striped table-hover"> <table class="table table-striped table-hover etat-bda">
<thead> <thead>
<tr> <tr>
<th data-sort="string">Titre</th> <th data-sort="string">Titre</th>
@ -21,7 +21,7 @@
<td><a href="{% url 'bda-spectacle' tirage_id spectacle.id %}">{{ spectacle.title }} <span style="font-size:small;" class="glyphicon glyphicon-link" aria-hidden="true"></span></a></td> <td><a href="{% url 'bda-spectacle' tirage_id spectacle.id %}">{{ spectacle.title }} <span style="font-size:small;" class="glyphicon glyphicon-link" aria-hidden="true"></span></a></td>
<td data-sort-value="{{ spectacle.timestamp }}">{{ spectacle.date_no_seconds }}</td> <td data-sort-value="{{ spectacle.timestamp }}">{{ spectacle.date_no_seconds }}</td>
<td data-sort-value="{{ spectacle.location }}">{{ spectacle.location }}</td> <td data-sort-value="{{ spectacle.location }}">{{ spectacle.location }}</td>
<td data-sort-value="{{ spectacle.ratio |stringformat:".3f" }}"> <td data-sort-value="{{ spectacle.price |stringformat:".3f" }}">
{{ spectacle.price |floatformat }}€ {{ spectacle.price |floatformat }}€
</td> </td>
</tr> </tr>

View file

@ -558,15 +558,6 @@ h4.block-title {
padding-bottom: 28px; padding-bottom: 28px;
padding-top: 8px; padding-top: 8px;
} }
/*
.table-clicable tbody tr {
cursor: pointer;
}
.table-clicable tbody tr:hover,
.table-clicable tbody tr:active {
background-color: #E8C2B8;
}*/
form#bda_form ul.errorlist li { form#bda_form ul.errorlist li {
padding-left: 0px; padding-left: 0px;
@ -1064,6 +1055,10 @@ th[data-sort]{
cursor:pointer; cursor:pointer;
} }
tbody tr.clickable-row {
cursor:pointer;
}
tr.awesome{ tr.awesome{
color: red; color: red;
} }