{% extends 'base.html' %}
-{% load adminmedia dae %}
+{% load adminmedia dae permissions %}
{% block title %}RH - DAE - Embauche{% endblock %}
{% block titre %}Ressources humaines{% endblock %}
{% block sous_titre %}Demande d'autorisation d'engagement{% endblock %}
{% block extrahead %}
- <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/dae.css" />
+ <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/dae.css" />
+ <link rel="stylesheet" type="text/css" media="print" href="{{ STATIC_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>
-{% if dossier|est_editable:request.user %}<a class="droite bouton-action" href="{% url embauche dossier.poste.key dossier.id %}">Modifier</a>{% endif %}
+<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 %}
<div class="visualClear"></div>
<h2 class="section">SECTION 1 - POSTE</h2>
<tbody>
<tr>
<th>Employé</th>
- <td colspan="5">{{ dossier.employe }}</td>
+ <td colspan="5">{{ dossier.employe }} ({{ dossier.employe.genre }})</td>
</tr>
</tbody>
</table>
<th>Salaire</th>
<th>Salaire EUR</th>
</tr>
- {% for dc in dossier.comparaisons.all %}
+ {% for dc in comparaisons %}
<tr>
<td>{{ dc.classement|default:"" }}</td>
<td>{{ dc.statut|default:"" }}</td>
<td>{{ dc.implantation }}</td>
<td>{{ dc.personne }}</td>
<td>{{ dc.poste }}</td>
- <td>{{ dc.montant|floatformat:0 }} {{ dc.devise }}</td>
+ <td>{{ dc.montant|floatformat:0 }} {{ dc.devise.code }}</td>
<td>{{ dc.montant_euros|floatformat:0 }} EUR</td>
</tr>
{% endfor %}
<fieldset>
<h2>Pièces jointes</h2>
<ul>
- {% for pj in dossier.dossierpiece_set.all %}
- <li><a href="{{ pj.fichier.url }}" target="_blank">{{ pj.nom }}</a></li>
- {% endfor %}
+ {% for pj in dossier.dae_dossierpieces.all %}
+ <li><a href="{% url dossier_piece pj.id pj.fichier.name|basename %}">{{ pj.nom }}</a></li>
+ {% endfor %}
</ul>
</fieldset>
</tr>
</table>
-<fieldset>
-<h2>Validations</h2>
+<h2 class="section">PIÈCES JOINTES</h2>
+
+{% if dossier.valide %}
+<a class="droite bouton-action" href="{% url embauche_ajouter_contrat dossier_id=dossier.id %}"
+ >Ajouter un contrat</a>
+<h3>Contrats</h3>
+
+<table>
+ <thead>
+ <tr>
+ <th>Type</th>
+ <th>Fichier</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for contrat in dossier.dae_contrats.all %}
+ <tr>
+ <td>{{ contrat.type_contrat }}</td>
+ <td><a href="{% url contrat contrat.id contrat.fichier.name|basename %}"
+ >{{ contrat.fichier.name|basename }}</a></td>
+ <td><a href="{% url contrat_supprimer contrat.id %}">Supprimer</a></td>
+ </tr>
+ {% empty %}
+ <tr>
+ <td colspan="0">Aucun contrat pour l'instant</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
+{% endif %}
+
+<h3>DAE numérisée</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Fichier</th>
+ {% ifhasperm 'modifier_dae_numerisee' dossier %}
+ <th></th>
+ {% endifhasperm %}
+ </tr>
+ </thead>
+ <tbody>
+ {% if dossier.dae_numerisee %}
+ <td><a href="{% url dae_numerisee dossier.id %}">Télécharger la DAE numérisée</a></td>
+ {% ifhasperm 'modifier_dae_numerisee' dossier %}
+ <td>
+ <a href="{% url dae_numerisee_supprimer dossier.id %}">Supprimer</a>
+ </td>
+ {% endifhasperm %}
+ {% else %}
+ <td>Aucune DAE numérisée pour l'instant</td>
+ {% ifhasperm 'modifier_dae_numerisee' dossier %}
+ <td>
+ <a href="{% url dae_numerisee_modifier dossier.id %}">Joindre une DAE numérisée</a>
+ </td>
+ {% endifhasperm %}
+ {% endif %}
+ </tbody>
+</table>
+
+<h2 class="section">VALIDATIONS</h2>
<table>
<tr>
{% 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>
-</fieldset>
-
-{% endblock %}
+<div class="print-only">
+ <h2>Signatures</h2>
+ <p class="signature"> ____________________________________________________________</p>
+ <p class="signature"> ____________________________________________________________</p>
+ <p class="signature"> ____________________________________________________________</p>
+</div>
+
+{% endblock %}