From 0def28e06d7c21f1fd6c2bf4e12a549416a5bc3b Mon Sep 17 00:00:00 2001 From: ludo Date: Sun, 12 Jun 2016 18:36:21 +0200 Subject: [PATCH 01/21] =?UTF-8?q?Change=20la=20vue=20bda.views.spectacle?= =?UTF-8?q?=20:=20donne=20plus=20d'informations=20=C3=A0=20la=20page=20bda?= =?UTF-8?q?-participants.html,=20et=20g=C3=A9n=C3=A8re=20une=20liste=20de?= =?UTF-8?q?=20participants=20sans=20doublons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bda/views.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/bda/views.py b/bda/views.py index 41c3c94d..bdc74322 100644 --- a/bda/views.py +++ b/bda/views.py @@ -292,8 +292,18 @@ def revente(request, tirage_id): def spectacle(request, tirage_id, spectacle_id): tirage = get_object_or_404(Tirage, id=tirage_id) spectacle = get_object_or_404(Spectacle, id = spectacle_id, tirage=tirage) - return render(request, "bda-emails.html", {"spectacle": spectacle}) - + attributions = spectacle.attribues.all() + participants = {} + for attrib in attributions: + participant = attrib.participant + participant.given = attrib.given + if (participant.id in participants): + participants[participant.id].nb_places = 2 + else: + participant.nb_places = 1 + participants[participant.id]=participant + + return render(request, "bda-participants.html", {"spectacle": spectacle, "participants": participants.values()}) class SpectacleListView(ListView): model = Spectacle @@ -305,6 +315,7 @@ class SpectacleListView(ListView): def get_context_data(self, **kwargs): context = super(SpectacleListView, self).get_context_data(**kwargs) context['tirage_id'] = self.tirage.id + context['tirage_name'] = self.tirage.title return context @buro_required From b1c8abcc3cd3f1b565df813f5b989d56132b233f Mon Sep 17 00:00:00 2001 From: ludo Date: Sun, 12 Jun 2016 18:39:47 +0200 Subject: [PATCH 02/21] =?UTF-8?q?Rajout=20de=20fonctionnalit=C3=A9s=20?= =?UTF-8?q?=C3=A0=20la=20liste=20des=20spectacles=20:=20acc=C3=A8s=20?= =?UTF-8?q?=C3=A0=20la=20page=20sp=C3=A9cifique=20=C3=A0=20chaque=20specta?= =?UTF-8?q?cle,=20export=20en=20.ics=20et=20mailing=20list=20des=20impay?= =?UTF-8?q?=C3=A9s=20(pr=C3=A9c=C3=A9demment=20dans=20utile=5Fbda)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bda/templates/spectacle_list.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bda/templates/spectacle_list.html b/bda/templates/spectacle_list.html index d707dde4..e1863eef 100644 --- a/bda/templates/spectacle_list.html +++ b/bda/templates/spectacle_list.html @@ -1,11 +1,18 @@ {% extends "base_title.html" %} {% block realcontent %} -

Spectacles

+

{{tirage_name}}

+
+

Liste des spectacles

+
+

Exports

+ {% endblock %} From 7cd015dce88c214c2b22792d2a5ba9296d824c9a Mon Sep 17 00:00:00 2001 From: ludo Date: Sun, 12 Jun 2016 18:41:37 +0200 Subject: [PATCH 03/21] =?UTF-8?q?Ajout=20d'un=20tag=20qui=20transforme=20u?= =?UTF-8?q?n=20bool=C3=A9en=20(True/False)=20en=20son=20=C3=A9quivalent=20?= =?UTF-8?q?fran=C3=A7ais=20(Oui/Non)=20pour=20plus=20de=20lisibilit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestioncof/templatetags/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gestioncof/templatetags/utils.py b/gestioncof/templatetags/utils.py index 9c439dd3..5f90722e 100644 --- a/gestioncof/templatetags/utils.py +++ b/gestioncof/templatetags/utils.py @@ -34,3 +34,10 @@ def highlight_clipper(clipper, q): else: text = clipper.username return highlight_text(text, q) + +@register.filter +def oui_ou_non(b): + if b: + return "Oui" + else: + return "Non" From 7b2900e7ec4ef8afe6d56dbe3772af5a9a1a687f Mon Sep 17 00:00:00 2001 From: ludo Date: Sun, 12 Jun 2016 18:42:51 +0200 Subject: [PATCH 04/21] =?UTF-8?q?D=C3=A9placement=20de=20la=20gestion=20de?= =?UTF-8?q?s=20tirages=20de=20utile=5Fbda.html=20=C3=A0=20home.hmtl=20pour?= =?UTF-8?q?=20plus=20d'accessibilit=C3=A9=20;=20des=20fonctionnalit=C3=A9s?= =?UTF-8?q?=20sont=20aussi=20d=C3=A9plac=C3=A9es=20vers=20spectacle=5Flist?= =?UTF-8?q?.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestioncof/templates/home.html | 6 ++++++ gestioncof/templates/utile_bda.html | 10 ---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/gestioncof/templates/home.html b/gestioncof/templates/home.html index f0aecebc..52c0ebfd 100644 --- a/gestioncof/templates/home.html +++ b/gestioncof/templates/home.html @@ -63,6 +63,12 @@
  • Sondage : {{ survey.title }}
  • {% endfor %}
    +

    Gestion tirages BDA

    + {% for tirage in open_tirages %} +
  • {{ tirage.title }}
  • + {% endfor %} + +
  • Liens utiles du COF
  • Liens utiles BdA
  • diff --git a/gestioncof/templates/utile_bda.html b/gestioncof/templates/utile_bda.html index 5f4f383a..8948de97 100644 --- a/gestioncof/templates/utile_bda.html +++ b/gestioncof/templates/utile_bda.html @@ -10,14 +10,4 @@
  • BdA diffusion
  • BdA revente
  • -

    Tirages

    - {% for tirage in tirages %} -

    {{ tirage.title }}

    - - {% endfor %} {% endblock %} From ac1c82b99ddc9090d8385b86ffce6246fc3db40c Mon Sep 17 00:00:00 2001 From: ludo Date: Sun, 12 Jun 2016 18:44:01 +0200 Subject: [PATCH 05/21] =?UTF-8?q?Cr=C3=A9=C3=A9e=20un=20template=20avec=20?= =?UTF-8?q?les=20informations=20sur=20un=20spectacle=20:=20participants,?= =?UTF-8?q?=20pay=C3=A9=20ou=20non,=20donn=C3=A9=20ou=20non...=20Possibili?= =?UTF-8?q?t=C3=A9=20d'exporter=20la=20liste=20mail=20des=20participants,?= =?UTF-8?q?=20ou=20celle=20des=20noms=20=C3=A0=20envoyer=20aux=20salles=20?= =?UTF-8?q?(avec=20doublons)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bda/templates/bda-participants.html | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 bda/templates/bda-participants.html diff --git a/bda/templates/bda-participants.html b/bda/templates/bda-participants.html new file mode 100644 index 00000000..f3592148 --- /dev/null +++ b/bda/templates/bda-participants.html @@ -0,0 +1,55 @@ +{% extends "base_title.html" %} +{% load utils %} + +{% block realcontent %} +

    {{ spectacle }}

    + + + + + + + + + + + + {% for participant in participants %} + + + + + + + + + + {% endfor %} + + +
    + + + + + +{% endblock %} From f4fe231d4b032e41c6f387e34ca59030e96399ac Mon Sep 17 00:00:00 2001 From: ludo Date: Sun, 12 Jun 2016 19:10:03 +0200 Subject: [PATCH 06/21] =?UTF-8?q?rajout=C3=A9=20balise=20
    NomClipperPlacesAdresse MailPayéDonné
    {{participant.user.get_full_name}}{{participant.user.username}}{{participant.nb_places}} place{{participant.nb_places|pluralize:",s"}}{{participant.user.email}} +
    + {{participant.paid|oui_ou_non}} +
    +
    +
    + {{participant.given|oui_ou_non}} +
    +
    =20manqua?= =?UTF-8?q?nte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bda/templates/bda-participants.html | 1 + 1 file changed, 1 insertion(+) diff --git a/bda/templates/bda-participants.html b/bda/templates/bda-participants.html index f3592148..22e2564a 100644 --- a/bda/templates/bda-participants.html +++ b/bda/templates/bda-participants.html @@ -33,6 +33,7 @@ {% endfor %} +
    +{% spaceless %} +{%endspaceless%}