diff --git a/bda/templates/resume_places.html b/bda/templates/resume_places.html index 39711f51..4cc087e0 100644 --- a/bda/templates/resume_places.html +++ b/bda/templates/resume_places.html @@ -12,6 +12,9 @@ {% endfor %}

Total à payer : {{ total|floatformat }}€

+

Ne manque pas un spectacle avec le + calendrier + automatique !

{% else %}

Vous n'avez aucune place :(

{% endif %} diff --git a/gestioncof/templates/calendar_subscription.html b/gestioncof/templates/calendar_subscription.html index 2c2671df..e4facd36 100644 --- a/gestioncof/templates/calendar_subscription.html +++ b/gestioncof/templates/calendar_subscription.html @@ -18,8 +18,18 @@ souscrire aux événements du COF et/ou aux spectacles BdA.

{% if token %} -

Le lien à fournir avec votre application agenda préférée se trouve -ici.

+

Votre calendrier (compatible avec toutes les applications d'agenda) se trouve à +cette adresse.

+ + {% endif %}
diff --git a/gestioncof/views.py b/gestioncof/views.py index a988d3e9..214aa622 100644 --- a/gestioncof/views.py +++ b/gestioncof/views.py @@ -24,7 +24,7 @@ from gestioncof.forms import UserProfileForm, EventStatusFilterForm, \ SurveyForm, SurveyStatusFilterForm, RegistrationUserForm, \ RegistrationProfileForm, AdminEventForm, EventForm, CalendarForm -from bda.models import Tirage, Attribution +from bda.models import Tirage, Spectacle @login_required @@ -654,11 +654,12 @@ def calendar(request): def calendar_ics(request, token): subscription = get_object_or_404(CalendarSubscription, token=token) - shows = set(subscription.other_shows.all()) \ - | {attr.spectacle - for attr in Attribution.objects.filter( - participant__user=subscription.user, - participant__tirage__active=True)} + shows = subscription.other_shows.all() + if subscription.subscribe_to_my_shows: + shows |= Spectacle.objects.filter( + attribues__participant__user=subscription.user, + tirage__active=True) + shows = shows.distinct() vcal = Calendar() for show in shows: vevent = Vevent()