Merge branch 'master' into Kerl/events

This commit is contained in:
Martin Pépin 2016-08-10 11:38:00 +02:00
commit 9141c484ed
3 changed files with 24 additions and 6 deletions

View file

@ -825,6 +825,16 @@ input#search_autocomplete:focus {
color: #343a4a;
}
input[type=number][readonly] {
-moz-appearance:textfield;
}
input[type=number][readonly]::-webkit-inner-spin-button,
input[type=number][readonly]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
.autocomplete {
margin-bottom:5px;
}

View file

@ -37,10 +37,13 @@
{% for tirage in open_tirages %}
<ul>
<h4>{{ tirage.title }}</h4>
{% if tirage.fermeture > now %}
<li><a href="{% url "bda-tirage-inscription" tirage.id %}">Inscription</a></li>
<li><a href="{% url "bda-etat-places" tirage.id %}">État des demandes</a>
<li><a href="{% url "bda-etat-places" tirage.id %}">État des demandes</a></li>
{% else %}
<li><a href="{% url "bda-places-attribuees" tirage.id %}">Mes places</a></li>
<li><a href="{% url "bda-revente" tirage.id %}">Revendre une place</a></li>
{% endif %}
</ul>
{% endfor %}
</div>
@ -86,6 +89,9 @@
<h4>{{ tirage.title }}</h4>
<li><a href="{% url "bda-liste-spectacles" tirage.id %}">Spectacles</a></li>
<li><a href="{% url "admin:bda_participant_changelist" %}?tirage__id__exact={{ tirage.id }}">Participants</a></li>
{% if tirage.fermeture < now %}
<li><a href="{% url "bda-etat-places" tirage.id %}">Ratios</a></li>
{% endif %}
</ul>
{% endfor %}
{% else %}

View file

@ -15,6 +15,7 @@ from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import login as django_login_view
from django.contrib.auth.models import User
from django.forms.models import formset_factory
from django.utils import timezone
import django.utils.six as six
from gestioncof.models import Survey, SurveyAnswer, SurveyQuestion, \
@ -42,7 +43,8 @@ def home(request):
Survey.objects.filter(survey_open=True, old=False).all(),
"open_events":
Event.objects.filter(registration_open=True, old=False).all(),
"open_tirages": Tirage.objects.filter(active=True).all()}
"open_tirages": Tirage.objects.filter(active=True).all(),
"now": timezone.now()}
return render(request, "home.html", data)