Utilisation de CotisationComputes.is_old_member pour getemails et déplacement de getemails dans l'onglet membres.

This commit is contained in:
Yohan Bataille 2014-03-08 21:45:51 +01:00
parent 11c212be38
commit 13ec71ac2f
5 changed files with 10 additions and 10 deletions

View File

@ -22,9 +22,8 @@ class GetEmailsController(AuthenticatedBaseController):
residence_dn = Residences.get_dn_by_name(self.user, residence_name)
members = Member.get_all(self.user, residence_dn)
emails = []
current_year = CotisationComputes.current_year()
for member in members:
if len(Cotisation.cotisations_of_member(self.user, member.dn, current_year)) > 0:
if not CotisationComputes.is_old_member(member, self.user, residence_dn):
emails.append(member.mail.first())
#end if
#end for

View File

@ -60,6 +60,7 @@ def disconnect_members_from_residence(admin_user, residence_dn):
if ip is not None:
taken_attribute = ip.get("x-taken").first()
if taken_attribute is not None:
print ("[LOG] deleting taken_attribute")
admin_user.ldap_bind.delete_attr(ip.dn, IpReservation.taken_attr(taken_attribute))
#end if
#end if

View File

@ -38,11 +38,5 @@
</form>
</div>
</div>
<div class="section">
<form action="/getemails/" method="post" class="inline_block">
<input type="hidden" name="residence" value="${residence}"/>
<input type="submit" value="Récupérer toutes les adresses mails" class="button"/>
</form>
</div>
</body>
</html>

View File

@ -7,7 +7,7 @@
<body>
<xi:include href="navbar.html" />
<div class="section" >
<span class="section_name show_section_name">Adresses mails des adhérents de ${residence}</span>
<span class="section_name show_section_name">Adresses mails des adhérents ${residence}</span>
<div py:for="email in emails">
${email}<br />
</div>

View File

@ -8,7 +8,13 @@
</head>
<body>
<xi:include href="navbar.html" />
<table class="table table-hover">
<div class="section">
<form action="/getemails/" method="post" class="inline_block">
<input type="hidden" name="residence" value="${residence}"/>
<input type="submit" value="Récupérer toutes les adresses mails" class="button"/>
</form>
</div>
<table class="table table-hover">
<tr>
<th>membre</th>
<th>chambre</th>