From de9909011ac9546a9ef2e3e1637d31fab28f2fa0 Mon Sep 17 00:00:00 2001 From: Yohan Bataille Date: Wed, 10 Sep 2014 17:29:22 +0200 Subject: [PATCH] =?UTF-8?q?Nouvelle=20fonctionnalit=C3=A9=20:=20r=C3=A9cup?= =?UTF-8?q?=C3=A9rer=20les=20adresses=20mails=20des=20adh=C3=A9rents=20?= =?UTF-8?q?=C3=A0=20jour=20de=20leur=20cotisation=20uniquement.=20=C3=87a?= =?UTF-8?q?=20ne=20change=20rien=20en=20d=C3=A9but=20d'ann=C3=A9e=20mais?= =?UTF-8?q?=20c'est=20important=20vers=20la=20fin.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Brie/brie/controllers/getemails.py | 20 +++++++++++++++++++ .../templates/getemails/cotisation_paid.html | 16 +++++++++++++++ Brie/brie/templates/search/member_local.html | 4 ++++ 3 files changed, 40 insertions(+) create mode 100644 Brie/brie/templates/getemails/cotisation_paid.html diff --git a/Brie/brie/controllers/getemails.py b/Brie/brie/controllers/getemails.py index 54d6ac1..94d4bd1 100644 --- a/Brie/brie/controllers/getemails.py +++ b/Brie/brie/controllers/getemails.py @@ -34,5 +34,25 @@ class GetEmailsController(AuthenticatedBaseController): "emails" : emails } #end def + + @expose("brie.templates.getemails.cotisation_paid") + def cotisation_paid(self, residence): + residence_name = residence + residence_dn = Residences.get_dn_by_name(self.user, residence_name) + members = Member.get_all(self.user, residence_dn) + emails = [] + for member in members: + if CotisationComputes.is_cotisation_paid(member.dn, self.user, residence_dn): + emails.append(member.mail.first()) + #end if + #end for + + return { + "user" : self.user, + "residence" : residence_name, + "emails" : emails + } + #end def + #end class diff --git a/Brie/brie/templates/getemails/cotisation_paid.html b/Brie/brie/templates/getemails/cotisation_paid.html new file mode 100644 index 0000000..e5ee961 --- /dev/null +++ b/Brie/brie/templates/getemails/cotisation_paid.html @@ -0,0 +1,16 @@ + + + + + + + + +
+ Adresses mails des adhérents ${residence} avec un logement attribué et une cotisation à jour. +
+ ${email}
+
+
+ + diff --git a/Brie/brie/templates/search/member_local.html b/Brie/brie/templates/search/member_local.html index eebb0f8..f9d4502 100644 --- a/Brie/brie/templates/search/member_local.html +++ b/Brie/brie/templates/search/member_local.html @@ -13,6 +13,10 @@ +
+ + +