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
|
@ -19,6 +19,9 @@ crans.droits="Imprimeur"
|
|||
[/gestionFactures]
|
||||
crans.droits="Imprimeur"
|
||||
|
||||
[/impression]
|
||||
crans.activate = False
|
||||
|
||||
[/static]
|
||||
sessionAuthenticateFilter.on=False
|
||||
sessionFilter.on = False
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -80,8 +80,13 @@
|
|||
</script>
|
||||
<li id="actionEtatImprimante" onclick="Impression.AJAX.getPrinterState();">
|
||||
<span style="font-weight:bold;">État imprimante:</span><br />
|
||||
<span id="etatImprimanteIci"> $etatImprimante </span>
|
||||
<span id="etatImprimanteIci"> - </span>
|
||||
</li>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
Impression.AJAX.getPrinterState();
|
||||
//-->
|
||||
</script>
|
||||
</ul>
|
||||
|
||||
#if not $getVar('Erreur_imprimante',False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue