django-ajax-selects
django-sendfile
-# LA PROD ne dispose que de reportlab 2.1, incompatible avec
-# les versions de pisa assez évoluées pour un bon rendu.
-# reportlab
-# html5lib
-# pyPDF
-# pisa
-
[versions]
django-admin-tools = 0.4.0
django = 1.2.5
auf.django.workflow = 0.14dev
django-ajax-selects = 1.1.4
django-sendfile = 0.2.1
-#reportlab = 2.5
-#html5lib = 0.90
-#pyPDF = 1.13
-#pisa = 3.0.33
[django]
recipe = auf.recipe.django
{% block extrahead %}
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/dae.css" />
+ <link rel="stylesheet" type="text/css" media="print" href="{{ MEDIA_URL }}css/print.css" />
{% endblock %}
{% block main %}
<h1 class="gauche">Demande d'autorisation d'engagement de personnel</h1>
-<a class="droite bouton-action" target="_blank" href="?mode=vpdf">Format impression</a>
+<a class="droite bouton-action" href="#" onclick="window.print(); return false;">Impression</a>
{% if dossier|est_editable:request.user %}
<a class="droite bouton-action" href="{% url embauche dossier.poste.key dossier.id %}">Modifier</a>
{% endif %}
{% endfor %}
</table>
+<form action="" method="post">
<h2>Votre validation (ou commentaire)</h2>
<p>Ce dossier est actuellement à l'état <span class="note">{{ dossier.get_etat_display }}</span>.</p>
-<form action="" method="post">
<table>
{% if validationForm.get_etats_disponibles %}{{ validationForm.commentaire }}{% endif %}
</table>
{{ validationForm.get_input_etats_as_buttons|safe }}
</form>
+<div class="print-only">
+ <h2>Signatures</h2>
+ <p class="signature"> ____________________________________________________________</p>
+ <p class="signature"> ____________________________________________________________</p>
+ <p class="signature"> ____________________________________________________________</p>
+</div>
+
{% endblock %}
+++ /dev/null
-{% load dae %}
-<html>
-
-<head>
- <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/pdf.css" />
- <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/dae.css" />
- <style>{{ css }}</style>
-</head>
-
-<body>
-<h1>Demande d'autorisation d'engagement de personnel</h1>
-
-<h2 class="section">SECTION 1 - POSTE</h2>
-{% with dossier.poste as poste %}
-{% include 'dae/poste_resume.html' %}
-{% endwith %}
-
-<h2 class="section">SECTION 2 - PERSONNEL ENGAGÉ</h2>
-<fieldset>
-<div>
- <div class="gauche"><h2>Personne</h2></div>
- <div class="droite">
- <table class="droite">
- <tbody>
- <tr>
- <th>Mobilité interne</th>
- <td colspan="3">{% if dossier.mobilite_interne %}oui{% else %}non{% endif %}
- </tr>
- </tbody>
- </table>
- </div>
-</div>
-<div class="clear"></div>
-<table id="form-employe">
- <tbody>
- <tr>
- <th>Employé</th>
- <td>{{ dossier.employe }}</td>
- </tr>
- </tbody>
-</table>
-
-</fieldset>
-
-<fieldset>
-<h2>Comparaison salariale</h2>
-<span class="info">dans la région pour les employés occupant un poste similaire</span>
-<table>
- <tbody>
- <tr>
- <th>Implantation</th>
- <th>Employé</th>
- <th>Poste</th>
- <th>Salaire</th>
- <th>Salaire EUR</th>
- </tr>
- {% for dc in dossier.comparaisons.all %}
- <tr>
- <td>{{ dc.implantation }}</td>
- <td>{{ dc.personne }}</td>
- <td>{{ dc.poste }}</td>
- <td>{{ dc.montant }} {{ dc.devise }}</td>
- <td>{{ dc.montant_euros }} EUR</td>
- </tr>
- {% endfor %}
- </tbody>
-</table>
-</fieldset>
-
-
-<div id="form-dossier">
- {% comment %}Wrapper du formulaire de dossier{% endcomment %}
- {% include "dae/embauche-dossier-consulter.html" %}
-</div>
-
-<fieldset>
- <h2>Pièces jointes</h2>
- <ul>
- {% for pj in dossier.dossierpiece_set.all %}
- <li><a href="{% url dossier_piece pj.id pj.fichier.name|basename %}">{{ pj.nom }}</a></li>
- {% endfor %}
- </ul>
-
-</fieldset>
-
-<h2 class="section">SECTION 3 - COÛT GLOBAL</h2>
-
-<fieldset>
- <table cellspacing="0" id="global-cost">
- {% include 'dae/embauche-remun-consulter.html' %}
- </table>
-</fieldset>
-
-<h2 class="section">SECTION 4 - JUSTIFICATION DE LA DEMANDE (OBLIGATOIRE)</h2>
-<h3>A - Justification du poste</h3>
-<p>{{ poste.justification }}</p>
-
-<h3>B - Justification de l'employé</h3>
-<table>
-<tr>
- <th>Nouvel employé</th>
- <th>Renouvellement, prolongation, reclassement, mobilité interne</th>
-</tr>
-<tr>
- <td>
- <h4>{{ dossier.justif_nouveau_statut_label }}</h4>
- {{ dossier.justif_nouveau_statut|default:"∅" }}
- <h4>{{ dossier.justif_nouveau_tmp_remplacement_label }}</h4>
- {{ dossier.justif_nouveau_tmp_remplacement|default:"∅" }}
- <h4>{{ dossier.justif_nouveau_salaire_label }}</h4>
- {{ dossier.justif_nouveau_salaire|default:"∅" }}
- <h4>{{ dossier.justif_nouveau_commentaire_label }}</h4>
- {{ dossier.justif_nouveau_commentaire|default:"∅" }}
- </td>
- <td>
- <h4>{{ dossier.justif_rempl_type_contrat_label }}</h4>
- {{ dossier.justif_rempl_type_contrat|default:"∅"}}
- <h4>{{ dossier.justif_rempl_statut_employe_label }}</h4>
- {{ dossier.justif_rempl_statut_employe|default:"∅"}}
- <h4>{{ dossier.justif_rempl_evaluation_label }}</h4>
- {{ dossier.justif_rempl_evaluation|default:"∅"}}
- <h4>{{ dossier.justif_rempl_salaire_label }}</h4>
- {{ dossier.justif_rempl_salaire|default:"∅" }}
- <h4>{{ dossier.justif_rempl_commentaire_label }}</h4>
- {{ dossier.justif_rempl_commentaire|default:"∅" }}
- </td>
-</tr>
-</table>
-
-<fieldset>
-<h2>Validations</h2>
-
-<table>
-<tr>
- <th>Action</th>
- <th>Commentaire</th>
-</tr>
-{% for commentaire in dossier.historique_desc %}
- {% include "dae/ligne_validation.html" %}
-{% endfor %}
-</table>
-</fieldset>
-
-<fieldset>
-<h2>Signatures</h2>
-
-<p class="signature"> ____________________________________________________________</p>
-<p class="signature"> ____________________________________________________________</p>
-<p class="signature"> ____________________________________________________________</p>
-</fieldset>
-
-</body>
-</html>
{% block extrahead %}
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/dae.css" />
+ <link rel="stylesheet" type="text/css" media="print" href="{{ MEDIA_URL }}css/print.css" />
{% endblock %}
{% block main %}
<h1 class="gauche">Demande d'autorisation de création de poste</h1>
-<a class="droite bouton-action" target="_blank" href="?mode=vpdf">Format impression</a>
+<a class="droite bouton-action" href="#" onclick="window.print(); return false;">Impression</a>
{% if poste|est_editable:request.user %}<a class="droite bouton-action" href="{% url poste poste.key %}">Modifier</a>{% endif %}
<div class="visualClear"></div>
{% endfor %}
</table>
+<form action="" method="post">
<h2>Votre validation</h2>
<p>Le poste est actuellement à l'état : <span class="note">{{ poste.get_etat_display }}</span>.</p>
-<form action="" method="post">
<table>
{% if validationForm.get_etats_disponibles %}{{ validationForm.commentaire }}{% endif %}
</table>
</form>
</fieldset>
+<div class="print-only">
+ <h2>Signatures</h2>
+ <p class="signature"> ____________________________________________________________</p>
+ <p class="signature"> ____________________________________________________________</p>
+ <p class="signature"> ____________________________________________________________</p>
+</div>
{% endblock %}
+++ /dev/null
-<html>
-
-<head>
-
- <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/pdf.css" />
- <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/dae.css" />
- <style>
- {{ css }}
- </style>
-</head>
-
-<body>
- <h1>Demande d'autorisation de création de poste</h1>
- <div class="visualClear"></div>
-
- {% include "dae/poste_resume.html" %}
-
- <fieldset>
- <h2>Validations</h2>
-
- <table>
- <tr>
- <th>Action</th>
- <th>Commentaire</th>
- </tr>
- {% for commentaire in poste.historique_desc %}
- {% include "dae/ligne_validation.html" %}
- {% endfor %}
- </table>
- </fieldset>
-
- <fieldset>
- <h2>Signatures</h2>
-
- <p class="signature"> ____________________________________________________________</p>
- <p class="signature"> ____________________________________________________________</p>
- <p class="signature"> ____________________________________________________________</p>
- </fieldset>
-
-
-</body>
liste.append(data)
return liste
-def reponse_pdf(template_src, context_dict):
- """
- Générer une réponse HTTP avec un PDF
- """
- import ho.pisa as pisa
- pisa.showLogging()
- css = ""
- for f in ('css/pdf.css', 'css/dae.css'):
- css_file = os.path.join(settings.MEDIA_ROOT, f)
- css += open(css_file, 'r').read()
- context_dict['css'] = css
-
- template = get_template(template_src)
- context = Context(context_dict)
- html = template.render(context)
- result = StringIO.StringIO()
- pdf = pisa.pisaDocument(html, result, encoding='UTF-8')
- if not pdf.err:
- return HttpResponse(result.getvalue(), mimetype='application/pdf')
- return HttpResponse("impossible de générer le pdf! %s" % html)
-
-
@dae_groupe_requis
def index(request):
return render_to_response('dae/index.html', {}, RequestContext(request))
'comparaisons_internes': comparaisons_internes
}
- mode = request.GET.get('mode', None)
- if mode is None:
- return render_to_response('dae/poste_consulter.html', vars, RequestContext(request))
- if mode == 'pdf':
- return reponse_pdf('dae/poste_pdf.html', vars)
- if mode == 'vpdf':
- return render_to_response('dae/poste_pdf.html', vars, RequestContext(request))
-
+ return render_to_response('dae/poste_consulter.html', vars, RequestContext(request))
@dae_groupe_requis
@poste_dans_ma_region_ou_service
}
mode = request.GET.get('mode', None)
- if mode is None:
- return render_to_response('dae/embauche_consulter.html', vars, RequestContext(request))
- if mode == 'pdf':
- return reponse_pdf('dae/embauche_pdf.html', vars)
- if mode == 'vpdf':
- return render_to_response('dae/embauche_pdf.html', vars, RequestContext(request))
+ return render_to_response('dae/embauche_consulter.html', vars, RequestContext(request))
@dae_groupe_requis
def embauche_choisir_poste(request):
.justifications h4 {font-weight: bold; }
.pagination { text-align: center; }
table.listing { width: 100%; }
+.print-only { display: none; }
+++ /dev/null
-p, ul { margin: 6px 0;}
-
-body { margin:0; padding:0; background:#fff; color:#454545; font:0.7em verdana, arial, helvetica, sans-serif; }
-
-h1 { margin:10px 0 0 0; padding:0; color:#d15517; font-size:120%;font-weight:bold; }
-h2 { margin:10px 0 0 0; padding:0; color:#5f5f5f; font-size:100%; }
-h3 { margin:10px 0 0 0; padding:0; color:#5f5f5f; font-size:90%; }
-h4 { margin:10px 0 0 0; padding:0; color:#5f5f5f; font-size:80%; }
-h5 { margin:10px 0 0 0; padding:0; background:inherit; color:#5f5f5f; font-size:130%; }
-
-li {margin-left: 1em; line-height:1.4em; }
-p {line-height:1.4em; text-align: justify; }
-
-a:link, a:visited { color:#0643bb; text-decoration:none; }
-a:active { color:#990000; text-decoration:none; }
-a:hover { color:#d15517; text-decoration:none; }
-a img { border:none; }
-
-strong {font-weight: bold;}
-
-form { margin:8px 17px 0 0; padding:0px; }
-fieldset {border: none; }
-label {font-weight: bold;}
-
-table { margin:10px 0px; border-collapse:collapse; padding:5px; }
-table th, table td{ font-size: 70%; border-top:1px solid #d0e8f8; border-left:1px solid #d0e8f8; padding: 5px; }
-table { border-bottom:1px solid #d0e8f8; border-right:1px solid #d0e8f8; }
-th { height:28px; border-top:2px solid #d0e8f8; padding:0 10px; background-color:#F8FBFD; font-size:14px; text-align:left; font-weight: bold;}
-td { vertical-align: top; }
-
-.cell-nombre { padding-right:0px; text-align:right; }
-.row1, .even {}
-.row2, .odd { background-color:#EFEFEF; }
-.signature {margin: 36px 0px;}
--- /dev/null
+p, ul { margin: 6px 0;}
+
+* { font-family: Verdana, Arial, Helvetica, sans-serif; }
+body { font-size: 8pt; }
+#main { padding: 0; }
+
+h1, h2, h3, h4, h5 { font-weight: bold; }
+h1 { font-size: 140%; }
+h2 { font-size: 120%; }
+h3, h4, h5 { font-size: 100%; }
+
+li {margin-left: 1em; line-height:1.4em; }
+p {line-height:1.4em; text-align: justify; }
+
+table th, table td { font-size: 100% }
+strong {font-weight: bold;}
+
+fieldset {border: none; }
+label {font-weight: bold;}
+
+.cell-nombre { padding-right:0px; text-align:right; }
+.row1, .even {}
+.row2, .odd { background-color:#EFEFEF; }
+.signature {margin: 36px 0px;}
+.info { font-size: 100%; }
+
+a.bouton-action, #header, #footer, #menu, form { display: none; }
+
+.print-only { display: block; }