From 94af2307a1b750dcf813f3f39bedc2801445e554 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Larchev=C3=AAque?= Date: Mon, 23 Jan 2012 11:09:05 -0500 Subject: [PATCH 1/1] statut imp --- project/rh/catalogues.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/project/rh/catalogues.py b/project/rh/catalogues.py index c2deb97..1f69d71 100644 --- a/project/rh/catalogues.py +++ b/project/rh/catalogues.py @@ -29,7 +29,17 @@ class Implantation(object): return implantations def format_result(self, implantation): - return unicode(implantation) + statut = implantation.statut + if implantation.statut == 0: + pass + if implantation.statut == 1: + statut = u"Ouverte" + if implantation.statut == 2: + statut = u"Fermée" + if implantation.statut == 3: + pass + + return u"%s (%s) [%s]" % (implantation.nom, implantation.id, statut) def format_item(self, implantation): return self.format_result(implantation) -- 1.7.10.4