From 73a7d9bf42f3fab8b0ae99c6fdcc26bf187852a1 Mon Sep 17 00:00:00 2001 From: chove Date: Sun, 28 Nov 2004 22:14:11 +0100 Subject: [PATCH] les clubs ne sont pas obligs d'avoir un local (ex : les clubs qui n'ont qu'un compte sur zamok sans machine) darcs-hash:20041128211411-4ec08-f7a3f2702930d83e5a37cc3d84ae00130925f066.gz --- gestion/annuaires.py | 3 ++- gestion/gest_crans.py | 3 +++ gestion/ldap_crans.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gestion/annuaires.py b/gestion/annuaires.py index 81eb2d6a..822c10be 100755 --- a/gestion/annuaires.py +++ b/gestion/annuaires.py @@ -529,7 +529,8 @@ def locaux_clubs() : 'Bcl1' : 'Krobot', 'Gcl0' : 'Med' , 'Pcl0' : 'Bds' , - 'Hcl0' : 'Eileo' } + 'Hcl0' : 'Eileo', + 'EXT' : 'Club sans local' } # Ajout des locaux d'étage A, B et C for b in 'ABC' : for i in range(2,7) : diff --git a/gestion/gest_crans.py b/gestion/gest_crans.py index 014057ef..49c9f65f 100755 --- a/gestion/gest_crans.py +++ b/gestion/gest_crans.py @@ -611,7 +611,10 @@ def set_local(club) : arg+= u'--default-item "%s" ' % club.chbre() arg+= u'--menu "Choisissez le local du club :" 0 0 0 ' key = locaux.keys() + # on tri par ordre alphébétique avec 'EXT' à la fin + key.pop(key.index('EXT')) key.sort() + key.append('EXT') for k in key : arg+= u'"%s" "%s" ' % ( k , locaux[k] ) annul , result = dialog(arg) diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 0677e5de..51eeaeaf 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -1618,7 +1618,7 @@ class club(base_proprietaire) : if new==None : return decode(self._data.get('chbre',[''])[0]) - annu = annuaires.locaux_clubs() + annu = annuaires.locaux_clubs() if new not in annu.keys() : raise ValueError(u'Local invalide',annu)