forked from DGNum/gestioCOF
Meilleure gestion des liens sur la page d'accueil
- Le lien vers l'inscription à un tirage BdA disparaît après sa fermeture - Les liens “mes places” et “revente” n'apparaissent qu'après la fermeture du tirage. - Le lien vers les ratios des demandes est déplacé dans la partie “Gestion des tirages” pour servir d'archive au BdA. Fixes #55
This commit is contained in:
parent
5a1d854bb1
commit
45385be556
2 changed files with 14 additions and 6 deletions
|
@ -37,10 +37,13 @@
|
||||||
{% for tirage in open_tirages %}
|
{% for tirage in open_tirages %}
|
||||||
<ul>
|
<ul>
|
||||||
<h4>{{ tirage.title }}</h4>
|
<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-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-places-attribuees" tirage.id %}">Mes places</a></li>
|
||||||
<li><a href="{% url "bda-revente" tirage.id %}">Revendre une place</a></li>
|
<li><a href="{% url "bda-revente" tirage.id %}">Revendre une place</a></li>
|
||||||
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -86,6 +89,9 @@
|
||||||
<h4>{{ tirage.title }}</h4>
|
<h4>{{ tirage.title }}</h4>
|
||||||
<li><a href="{% url "bda-liste-spectacles" tirage.id %}">Spectacles</a></li>
|
<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>
|
<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>
|
</ul>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
@ -14,6 +14,7 @@ from django.http import Http404, HttpResponse
|
||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.contrib.auth.views import login as django_login_view
|
from django.contrib.auth.views import login as django_login_view
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
from django.utils import timezone
|
||||||
import django.utils.six as six
|
import django.utils.six as six
|
||||||
|
|
||||||
from gestioncof.models import Survey, SurveyAnswer, SurveyQuestion, \
|
from gestioncof.models import Survey, SurveyAnswer, SurveyQuestion, \
|
||||||
|
@ -40,7 +41,8 @@ def home(request):
|
||||||
Survey.objects.filter(survey_open=True, old=False).all(),
|
Survey.objects.filter(survey_open=True, old=False).all(),
|
||||||
"open_events":
|
"open_events":
|
||||||
Event.objects.filter(registration_open=True, old=False).all(),
|
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)
|
return render(request, "home.html", data)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue