diff --git a/intranet/pages/impression.py b/intranet/pages/impression.py index 83c42a65..1a938b79 100755 --- a/intranet/pages/impression.py +++ b/intranet/pages/impression.py @@ -2,6 +2,7 @@ import cherrypy, tempfile, shutil, os import crans.impression import crans.impression.digicode +import crans.impression.etat_imprimante FILE_UPLOAD_BASE_FOLDER = cherrypy.config.get('fileUpload.folder', "/var/impression/fichiers/") @@ -34,6 +35,11 @@ class root: data['openError'] = "Choisissez un fichier" data['fileList'] = self.getUploadedFileListFor(cherrypy.session['uid']) + try: + data['etatImprimante'] = "
".join(crans.impression.etat_imprimante.etat()) + except Exception, e: + data['etatImprimante'] = 'Imprimante hors ligne' + data['Erreur_imprimante'] = str(e) return {'template':'impression', 'values':data, 'stylesheets':['impression.css'], diff --git a/intranet/templates/impression.tmpl b/intranet/templates/impression.tmpl index 95a33498..d01a0486 100644 --- a/intranet/templates/impression.tmpl +++ b/intranet/templates/impression.tmpl @@ -1,42 +1,38 @@ #import crans.impression
-
Options d'impression
-
-
- -
+
+
+ +
Type d'impression - - -
- -
Copies et papier - - - Couleurs + +
+ +
Copies et papier + + + - -
- - - +
+ + - -
- - - + +
+ + +
Disposition @@ -45,7 +41,7 @@
-
+
@@ -60,12 +56,15 @@
  • pages:
  • Nouvelle impression
  • #end if +
  • État +imprimante:
    $etatImprimante
  • -#if not $getVar('fileName',False) +#if not $getVar('Erreur_imprimante',False) + #if not $getVar('fileName',False)

    Impression - Choix fichier

    @@ -96,24 +95,34 @@ roundElement("popupFichiers"); roundElement("insideDiv"); + #end if -#end if
    -#if $getVar('fileName',False) - -#else + #if $getVar('fileName',False) + + #else + + #end if +#else + ## desactivation de l'interface si l'imprimant a un probleme #end if diff --git a/intranet/templates/login.tmpl b/intranet/templates/login.tmpl index a29a65cc..b5a3e059 100644 --- a/intranet/templates/login.tmpl +++ b/intranet/templates/login.tmpl @@ -10,7 +10,7 @@ padding:20px; background:#eee; border:3px solid #ddd; - margin:auto auto; + margin:0 auto; } .liens { text-align:right;