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 @@ + +
+ + +