ajout de l'affichage du batiment sur les inscriptions

This commit is contained in:
Romain Beuque 2014-09-03 21:10:18 +02:00
parent 8bb2d40bff
commit 291e1e51c3
2 changed files with 11 additions and 1 deletions

View File

@ -43,6 +43,16 @@ class RegistrationController(AuthenticatedBaseController):
rooms = Room.get_rooms(self.user, self.user.residence_dn) rooms = Room.get_rooms(self.user, self.user.residence_dn)
rooms = sorted(rooms, key=lambda t:t.cn.first()) rooms = sorted(rooms, key=lambda t:t.cn.first())
areas = Room.get_areas(self.user, 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
now = datetime.now() now = datetime.now()

View File

@ -39,7 +39,7 @@
<select name="room_uid"> <select name="room_uid">
<option value="">&lt;vide&gt;</option> <option value="">&lt;vide&gt;</option>
<py:for each="target_room in rooms"> <py:for each="target_room in rooms">
<option value="${target_room.uid.first()}">${target_room.cn.first()}</option> <option value="${target_room.uid.first()}">${target_room.cn.first()} [BAT-${target_room.area.cn.first()}]</option>
</py:for> </py:for>
</select> </select>
</div> </div>