From 291e1e51c373a98c9406995c54449238713f32dd Mon Sep 17 00:00:00 2001 From: Romain Beuque Date: Wed, 3 Sep 2014 21:10:18 +0200 Subject: [PATCH] ajout de l'affichage du batiment sur les inscriptions --- Brie/brie/controllers/registration.py | 10 ++++++++++ Brie/brie/templates/registration/index.html | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Brie/brie/controllers/registration.py b/Brie/brie/controllers/registration.py index c6cd785..9ca0f0f 100644 --- a/Brie/brie/controllers/registration.py +++ b/Brie/brie/controllers/registration.py @@ -43,6 +43,16 @@ class RegistrationController(AuthenticatedBaseController): rooms = Room.get_rooms(self.user, self.user.residence_dn) 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() diff --git a/Brie/brie/templates/registration/index.html b/Brie/brie/templates/registration/index.html index 22cb05e..10d1f95 100644 --- a/Brie/brie/templates/registration/index.html +++ b/Brie/brie/templates/registration/index.html @@ -39,7 +39,7 @@