encore un p'tit message
darcs-hash:20061219011440-f46e9-5e629710f0872fdbb8f4ed344e13a1e53aa4109a.gz
This commit is contained in:
parent
063bc503db
commit
b09061b9dc
3 changed files with 11 additions and 0 deletions
|
@ -21,6 +21,7 @@ crans.droits="Imprimeur"
|
|||
|
||||
[/impression]
|
||||
crans.activate = False
|
||||
crans.activate.errorMsg = u"Plus d'encre !"
|
||||
|
||||
[/static]
|
||||
sessionAuthenticateFilter.on=False
|
||||
|
|
|
@ -64,8 +64,10 @@ class root:
|
|||
crans.impression.etat_imprimante.etat()
|
||||
except Exception, e:
|
||||
data['Erreur_imprimante'] = str(e).replace("\"", "\\\"")
|
||||
data['errorMsg'] = u"Imprimante injoignable"
|
||||
if not cherrypy.config.get('crans.activate', True):
|
||||
data['Erreur_imprimante'] = "Config impression"
|
||||
data['errorMsg'] = cherrypy.config.get('crans.activate.errorMsg', u"Imprimante HS")
|
||||
return {'template':'impression',
|
||||
'values':data,
|
||||
'stylesheets':['impression.css'],
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
#import crans.impression
|
||||
|
||||
#if $getVar('errorMsg',False)
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
Crans.messages.setMessage('$errorMsg.replace("\'","\\\'")', 'errorMessage')
|
||||
//-->
|
||||
</script>
|
||||
#end if
|
||||
|
||||
<div id="globalDiv">
|
||||
<form id="form_impression" name="form_impression" onsubmit="Impression.popup();return false;" action="index">
|
||||
<fieldset><legend>Options d'impression</legend>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue