Prettify revente/shotgun

This commit is contained in:
Ludovic Stephan 2018-12-07 17:35:53 +01:00
parent 5c8164dd3b
commit 6be42d57ca
3 changed files with 33 additions and 6 deletions

View file

@ -2,11 +2,26 @@
{% block realcontent %}
<h2>Places disponibles immédiatement</h2>
{% if shotgun %}
<ul class="list-unstyled">
{% for spectacle in shotgun %}
<li><a href="{% url "bda-revente-buy" spectacle.id %}">{{spectacle}}</a></li>
{% endfor %}
{% if spectacles %}
<table class="table table-striped stupidtable" id="bda-shotgun">
<thead>
<tr>
<th data-sort="string">Titre</th>
<th data-sort="int">Date</th>
<th data-sort="string">Lieu</th>
<th data-sort="int">Prix</th>
<th></th>
</tr>
</thead>
<tbody>
{% for spectacle in spectacles %}
<tr>
{% include "bda/forms/spectacle_label_table.html" with spectacle=spectacle %}
<td class="button"><a role="button" class="btn btn-primary" href="{% url 'bda-revente-buy' spectacle.id %}">Racheter</a>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p> Pas de places disponibles immédiatement, désolé !</p>
{% endif %}

View file

@ -660,7 +660,7 @@ def revente_shotgun(request, tirage_id):
)
shotgun = [sp for sp in spectacles if len(sp.shotguns) > 0]
return render(request, "bda/revente/shotgun.html", {"shotgun": shotgun})
return render(request, "bda/revente/shotgun.html", {"spectacles": shotgun})
@buro_required

View file

@ -187,6 +187,18 @@ form.petit-cours_form .remove-btn {
margin-top : 10px;
}
table#bda-shotgun td {
padding: 14px;
}
table#bda-shotgun td.button {
padding: 8px;
}
table#bda-shotgun a, table#bda-shotgun a:hover {
color: #FFF
}
tr.dynamic-form td {
background: #F0F0F0;
}