ajout du uid wifi + affichage des batiments sur la liste des chambres

This commit is contained in:
Romain Beuque 2014-09-03 20:56:01 +02:00
parent fe01287064
commit 3243ae87f8
3 changed files with 16 additions and 2 deletions

View File

@ -154,6 +154,18 @@ class MemberModificationController(AuthenticatedRestController):
#end if #end if
rooms = sorted(rooms, key=lambda t:t.cn.first()) rooms = sorted(rooms, key=lambda t:t.cn.first())
areas = Room.get_areas(self.user, residence_dn)
for room in rooms:
for area in areas:
if area.dn in room.dn:
room.area = area
break
#end if
#end for
#end for
show_values["rooms"] = rooms show_values["rooms"] = rooms
cotisations = show_values["cotisations"] cotisations = show_values["cotisations"]

View File

@ -79,6 +79,8 @@ To: """ + member.cn.first().decode("utf-8").encode("ascii", "ignore") + """ <"""
Subject: Votre mot de passe WiFi : residence universitaire Subject: Votre mot de passe WiFi : residence universitaire
Bienvenue dans votre residence etudiante de Paris Sud Bienvenue dans votre residence etudiante de Paris Sud
Votre nom de connexion est : """ + member_uid + """
Votre mot de passe WiFi est : """ + password Votre mot de passe WiFi est : """ + password
message = message.encode("utf-8") message = message.encode("utf-8")

View File

@ -34,8 +34,8 @@
<py:if test="room_ldap is not None"> <py:if test="room_ldap is not None">
<py:for each="target_room in rooms"> <py:for each="target_room in rooms">
<py:choose test="target_room.uid.first()"> <py:choose test="target_room.uid.first()">
<option value="${target_room.uid.first()}" py:when="room_ldap.uid.first()" selected="selected">${target_room.cn.first()} (actuelle)</option> <option value="${target_room.uid.first()}" py:when="room_ldap.uid.first()" selected="selected">${target_room.cn.first()} [BAT-${target_room.area.cn.first()}] (actuelle)</option>
<option value="${target_room.uid.first()}" py:otherwise="">${target_room.cn.first()}</option> <option value="${target_room.uid.first()}" py:otherwise="">${target_room.cn.first()} [BAT-${target_room.area.cn.first()}]</option>
</py:choose> </py:choose>
</py:for> </py:for>
</py:if> </py:if>