Nouvelle fonctionnalité : récupérer les adresses mails des adhérents à jour de leur cotisation uniquement. Ça ne change rien en début d'année mais c'est important vers la fin.
This commit is contained in:
parent
32e6eb744a
commit
de9909011a
@ -34,5 +34,25 @@ class GetEmailsController(AuthenticatedBaseController):
|
|||||||
"emails" : emails
|
"emails" : emails
|
||||||
}
|
}
|
||||||
#end def
|
#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
|
#end class
|
||||||
|
|
||||||
|
16
Brie/brie/templates/getemails/cotisation_paid.html
Normal file
16
Brie/brie/templates/getemails/cotisation_paid.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<html xmlns:py="http://genshi.edgewall.org/" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/css/common.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="/css/show.css" />
|
||||||
|
<xi:include href="common-css-header.html" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<xi:include href="navbar.html" />
|
||||||
|
<div class="section" >
|
||||||
|
<span class="section_name show_section_name">Adresses mails des adhérents ${residence} avec un logement attribué et une cotisation à jour.</span>
|
||||||
|
<div py:for="email in emails">
|
||||||
|
${email}<br />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -13,6 +13,10 @@
|
|||||||
<input type="hidden" name="residence" value="${residence}"/>
|
<input type="hidden" name="residence" value="${residence}"/>
|
||||||
<input type="submit" value="Récupérer toutes les adresses mails" class="button"/>
|
<input type="submit" value="Récupérer toutes les adresses mails" class="button"/>
|
||||||
</form>
|
</form>
|
||||||
|
<form action="/getemails/cotisation_paid" method="post" class="inline_block">
|
||||||
|
<input type="hidden" name="residence" value="${residence}"/>
|
||||||
|
<input type="submit" value="Récupérer les adresses mails des adhérents actifs" class="button"/>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<tr>
|
<tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user