quasi fini

This commit is contained in:
Qwann 2016-07-27 14:00:38 +02:00
parent dbc14a8227
commit d864a7bc16
6 changed files with 77 additions and 35 deletions

View file

@ -2,12 +2,10 @@
{% block realcontent %} {% block realcontent %}
<h2>{{ spectacle }}</h2> <h2>{{ spectacle }}</h2>
<h3><a href="{% url "admin:bda_attribution_add" %}?spectacle={{spectacle.id}}">Ajouter une attribution</a></h3> <table class='table table-striped'>
<table class='etat-bda' align="center">
<thead> <thead>
<tr> <tr>
<th>Nom</th> <th>Nom</th>
<th>Identifiant</th>
<th>Places</th> <th>Places</th>
<th>Adresse Mail</th> <th>Adresse Mail</th>
<th>Payé</th> <th>Payé</th>
@ -17,16 +15,12 @@
{% for participant in participants %} {% for participant in participants %}
<tr> <tr>
<td>{{participant.name}}</td> <td>{{participant.name}}</td>
<td>{{participant.username}}</td>
<td>{{participant.nb_places}} place{{participant.nb_places|pluralize}}</td> <td>{{participant.nb_places}} place{{participant.nb_places|pluralize}}</td>
<td>{{participant.email}}</td> <td>{{participant.email}}</td>
<td> <td class={%if participant.paid %}"greenratio"{%else%}"redratio"{%endif%}>
<div class={%if participant.paid %}"greenratio"{%else%}"redratio"{%endif%}>
{% if participant.paid %}Oui{% else %}Non{%endif%} {% if participant.paid %}Oui{% else %}Non{%endif%}
</div>
</td> </td>
<td align="center"> <td class={%if participant.given == participant.nb_places %}"greenratio"
<div class={%if participant.given == participant.nb_places %}"greenratio"
{%elif participant.given == 0%}"redratio" {%elif participant.given == 0%}"redratio"
{%else%}"orangeratio" {%else%}"orangeratio"
{%endif%}> {%endif%}>
@ -34,18 +28,18 @@
{% elif participant.given == 0 %}Non {% elif participant.given == 0 %}Non
{% else %}{{participant.given}}/{{participant.nb_places}} {% else %}{{participant.given}}/{{participant.nb_places}}
{%endif%} {%endif%}
</div>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</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>
<br> <br>
<button type="button" onclick="toggle('export-mails')">Afficher/Cacher mails participants</button> <button class="btn btn-default" type="button" onclick="toggle('export-mails')">Afficher/Cacher mails participants</button>
<pre id="export-mails" style="display:none"> <pre id="export-mails" style="display:none">
{%for participant in participants %}{{participant.email}}, {%endfor%} {%for participant in participants %}{{participant.email}}, {%endfor%}
</pre> </pre>
<br> <br>
<button type="button" onclick="toggle('export-salle')">Afficher/Cacher liste noms</button> <button class="btn btn-default" type="button" onclick="toggle('export-salle')">Afficher/Cacher liste noms</button>
<pre id="export-salle" style="display:none"> <pre id="export-salle" style="display:none">
{% for participant in participants %}{{participant.name}} : {{participant.nb_places}} places {% for participant in participants %}{{participant.name}} : {{participant.nb_places}} places
{% endfor %} {% endfor %}

View file

@ -28,7 +28,7 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<td class="tools-cell"><div class="tools"> <td class="tools-cell"><div class="tools">
<a href="javascript://" class="glyphicon glyphicon-th drag-btn" title="Déplacer"></a> <a href="javascript://" class="glyphicon glyphicon-sort drag-btn" title="Déplacer"></a>
<input type="checkbox" name="{{ form.DELETE.html_name }}" style="display: none;" /> <input type="checkbox" name="{{ form.DELETE.html_name }}" style="display: none;" />
<input type="hidden" name="{{ form.priority.html_name }}" style="{{ form.priority.value }}" /> <input type="hidden" name="{{ form.priority.html_name }}" style="{{ form.priority.value }}" />
<a href="javascript://" class="glyphicon glyphicon-remove remove-btn" title="Supprimer"></a> <a href="javascript://" class="glyphicon glyphicon-remove remove-btn" title="Supprimer"></a>

View file

@ -1,13 +1,50 @@
{% extends "base_title.html" %} {% extends "base_title.html" %}
{% load staticfiles %}
{% block realcontent %} {% block realcontent %}
<h2><strong>{{tirage_name}}</strong></h2> <h2><strong>{{tirage_name}}</strong></h2>
<h3>Liste des spectacles</h3> <h3>Liste des spectacles</h3>
<ul>
<table class="table table-striped table-hover">
<thead>
<tr>
<th data-sort="string">Titre</th>
<th data-sort="int">Date</th>
<th data-sort="string">Lieu</th>
<th data-sort="float">Prix</th>
</tr>
</thead>
<tbody>
{% for spectacle in object_list %} {% for spectacle in object_list %}
<li><a href="{% url 'bda-spectacle' tirage_id spectacle.id %}">{{ spectacle }}</a></li> <tr class="clickable-row" data-href="{% url 'bda-spectacle' tirage_id spectacle.id %}">
<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.location }}">{{ spectacle.location }}</td>
<td data-sort-value="{{ spectacle.ratio |stringformat:".3f" }}">
{{ spectacle.price |floatformat }}€
</td>
</tr>
{% endfor %} {% endfor %}
</ul> </tbody>
</table>
<script type="text/javascript"
src="{% static "js/jquery.min.js" %}"></script>
<script type="text/javascript"
src="{% static "js/joequery-Stupid-Table-Plugin/stupidtable.js" %}"></script>
<script type="text/javascript">
$(function(){
$("table.etat-bda").stupidtable();
});
</script>
<script>
jQuery(document).ready(function($) {
$(".clickable-row").click(function() {
window.document.location = $(this).data("href");
});
});
</script>
<h3> Exports </h3> <h3> Exports </h3>
<ul> <ul>
<li><a href="{% url 'bda-unpaid' tirage_id %}">Mailing list impayés</a> <li><a href="{% url 'bda-unpaid' tirage_id %}">Mailing list impayés</a>

View file

@ -106,13 +106,13 @@ form .control-label {
} }
.remove-btn { .remove-btn {
color: #E6516A ; color: #E6516A !important;
font-size: x-large; font-size: large;
} }
.drag-btn { .drag-btn {
color :#4F504B; color :#4F504B !important;
font-size: x-large; font-size: large;
} }
.btn-primary, .btn-primary,
@ -121,13 +121,13 @@ form .control-label {
.btn-primary.focus { .btn-primary.focus {
color: #fff; color: #fff;
background-color: #DE826B; background-color: #DE826B;
border-color: #4F504B; border-color: #AB6452;
} }
.btn-primary:active:hover, .btn-primary:active:hover,
.btn-primary:hover { .btn-primary:hover {
color: #fff; color: #fff;
background-color: #D89C8D; background-color: #D89C8D;
border-color: #4F504B; border-color: #AB6452;
} }
label { label {
@ -558,6 +558,15 @@ 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;
@ -863,8 +872,10 @@ input#search_autocomplete:focus {
.yourlabs-autocomplete li.hilight a {color: #FFF; } .yourlabs-autocomplete li.hilight a {color: #FFF; }
.yourlabs-autocomplete { .yourlabs-autocomplete {
border: none; border: solid;
background: white; border-width: 0px 1px 1px 1px;
border-color: #B3B3B3;
background: #FAFAFA;
display: block; display: block;
} }
.yourlabs-autocomplete.outer-container { position: relative; } .yourlabs-autocomplete.outer-container { position: relative; }
@ -878,6 +889,10 @@ input#search_autocomplete:focus {
background: #fff; background: #fff;
} }
#main-content > .yourlabs-autocomplete {
display:none;
}
.yourlabs-autocomplete.inner-container { .yourlabs-autocomplete.inner-container {
margin: 0; margin: 0;
padding: 0; padding: 0;
@ -1032,21 +1047,17 @@ pre code {
/* Louis pour etat places*/ /* Louis pour etat places*/
.etat-bda td {
border:1px solid #666;
padding:4px;
}
.etat-bda tr:nth-child(even) {background: #CCC}
.greenratio { .greenratio {
background-color: #ADE297; background-color: #ADE297;
text-align: center;
} }
.orangeratio { .orangeratio {
background-color: #EEE285; background-color: #EEE285;
text-align: center;
} }
.redratio { .redratio {
background-color: #EE8585; background-color: #EE8585;
text-align: center;
} }
th[data-sort]{ th[data-sort]{

View file

@ -11,7 +11,7 @@
</a> </a>
<div class="secondary"> <div class="secondary">
<span class="hidden-xxs">&nbsp;&nbsp;|&nbsp; </span> <span class="hidden-xxs">&nbsp;&nbsp;|&nbsp; </span>
<span>Se déconnecter&nbsp;<span class="glyphicon glyphicon-log-out"></span></span> <span><a href="{% url "gestioncof.views.logout" %}">Se déconnecter&nbsp;<span class="glyphicon glyphicon-log-out"></span></a></span>
</div> </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> <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 --> </div><!-- /.container -->

View file

@ -25,5 +25,5 @@
{% if login_clipper or member %} {% if login_clipper or member %}
<input type="hidden" name="user_exists" value="1" /> <input type="hidden" name="user_exists" value="1" />
{% endif %} {% endif %}
<input type="submit" class="btn-submit" value="Enregistrer l'inscription" /> <input type="submit" class="btn btn-primary pull-right" value="Enregistrer l'inscription" />
</form> </form>