ajout d'une option dans la configuration pour "teindre" l'interface
d'impression darcs-hash:20061219010730-f46e9-f4282a85ea0666b63211fc4a6f13df642c5e06f1.gz
This commit is contained in:
parent
d843ebd35e
commit
063bc503db
3 changed files with 14 additions and 3 deletions
|
@ -61,10 +61,11 @@ class root:
|
|||
|
||||
data['fileList'] = self.getUploadedFileListFor(cherrypy.session['uid'])
|
||||
try:
|
||||
data['etatImprimante'] = "<br />".join(crans.impression.etat_imprimante.etat())
|
||||
crans.impression.etat_imprimante.etat()
|
||||
except Exception, e:
|
||||
data['etatImprimante'] = 'Imprimante hors ligne'
|
||||
data['Erreur_imprimante'] = str(e).replace("\"", "\\\"")
|
||||
if not cherrypy.config.get('crans.activate', True):
|
||||
data['Erreur_imprimante'] = "Config impression"
|
||||
return {'template':'impression',
|
||||
'values':data,
|
||||
'stylesheets':['impression.css'],
|
||||
|
@ -160,6 +161,8 @@ class root:
|
|||
# methode pour recuperer l'etat de l'imprimante
|
||||
#
|
||||
def etatImprimante(self):
|
||||
if not cherrypy.config.get('crans.activate', True):
|
||||
return {"printer_state" : u"Système down"}
|
||||
try:
|
||||
return {"printer_state" : u"\\n".join(crans.impression.etat_imprimante.etat())}
|
||||
except Exception, e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue