{% extends 'base.html' %}
-{% load adminmedia %}
+{% load adminmedia dae %}
{% block title %}RH - DAE - Embauche{% endblock %}
{% block titre %}Ressources humaines{% endblock %}
-{% block sous_titre %}Demande d'autorisation d'embauche{% endblock %}
+{% block sous_titre %}Demande d'autorisation d'engagement{% endblock %}
{% block extrahead %}
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/dae.css" />
{% endblock %}
{% block main %}
-<h1 class="gauche">Demandes d'autorisation d'engagement de personnel</h1>
-<a class="droite bouton-action" href="">PDF</a>
+<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 %}
<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>
<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>
+ <tbody>
+ <tr>
+ <th>Classement</th>
+ <th>Statut</th>
+ <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.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_euros|floatformat:0 }} 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>
+<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>
+<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>
+ <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>
- <p class="info">Les questions posées pour la justification apparaîtront après avoir enregistré le dossier.</p>
- <table>
- <tr>
- <th>NOUVEL EMPLOYÉ</th>
- <th>RENOUVELLEMENT, PROLONGATION, RECLASSEMENT, MOBILITÉ INTERNE</th>
- </tr>
- <tr>
- <td>
- {% for j in dossier.justificationnouvelemploye_set.all %}
- <h4>{{ j.question }}</h4>
- <p>{{ j.reponse }}</p>
- {% endfor %}
- </td>
- <td>
- {% for j in dossier.justificationautreemploye_set.all %}
- <h4>{{ j.question }}</h4>
- <p>{{ j.reponse }}</p>
- {% endfor %}
- </td>
- </tr>
- </table>
-
- <fieldset>
- <h2>Validation</h2>
-
- <ul>
- {% for commentaire in dossier.historique_desc %}
- <li>{{ commentaire }}</li>
- {% endfor %}
</ul>
-
- <form action="" method="post">
- <table>
- {{ validationForm }}
+
+</fieldset>
+
+<h2 class="section">SECTION 3 - COÛT GLOBAL</h2>
+
+<fieldset>
+ <table cellspacing="0" id="global-cost">
+ {% include 'dae/embauche-remun-consulter.html' %}
</table>
- <input type="submit" value="valider" />
- </form>
- </fieldset>
-
-{% endblock %}
+</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 class="justifications">
+<tr>
+ <th>Nouvel employé</th>
+ <th>Renouvellement, prolongation, reclassement, mobilité interne</th>
+</tr>
+<tr>
+ <td>
+ <h4>{{ dossier.justif_nouveau_statut_label }}</h4>
+ <p>{{ dossier.justif_nouveau_statut|default:"∅" }}
+ <h4>{{ dossier.justif_nouveau_tmp_remplacement_label }}</h4>
+ <p>{{ dossier.justif_nouveau_tmp_remplacement|default:"∅" }}</p>
+ <h4>{{ dossier.justif_nouveau_salaire_label }}</h4>
+ <p>{{ dossier.justif_nouveau_salaire|default:"∅" }}</p>
+ <h4>{{ dossier.justif_nouveau_commentaire_label }}</h4>
+ <p>{{ dossier.justif_nouveau_commentaire|default:"∅" }}</p>
+ </td>
+ <td>
+ <h4>{{ dossier.justif_rempl_type_contrat_label }}</h4>
+ <p>{{ dossier.justif_rempl_type_contrat|default:"∅"}}</p>
+ <h4>{{ dossier.justif_rempl_statut_employe_label }}</h4>
+ <p>{{ dossier.justif_rempl_statut_employe|default:"∅"}}</p>
+ <h4>{{ dossier.justif_rempl_evaluation_label }}</h4>
+ <p>{{ dossier.justif_rempl_evaluation|default:"∅"}}</p>
+ <h4>{{ dossier.justif_rempl_salaire_label }}</h4>
+ <p>{{ dossier.justif_rempl_salaire|default:"∅" }}</p>
+ <h4>{{ dossier.justif_rempl_commentaire_label }}</h4>
+ <p>{{ dossier.justif_rempl_commentaire|default:"∅" }}</p>
+ </td>
+</tr>
+</table>
+
+{% if dossier.valide %}
+<h2 class="section">CONTRATS</h2>
+<a class="droite bouton-action" href="{% url embauche_ajouter_contrat dossier_id=dossier.id %}"
+ >Ajouter un contrat</a>
+
+<table>
+ <thead>
+ <tr>
+ <th>Type</th>
+ <th>Fichier</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for contrat in dossier.contrats.all %}
+ <tr>
+ <td>{{ contrat.type }}</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 %}
+
+<h2 class="section">VALIDATIONS</h2>
+
+<table>
+<tr>
+ <th>Action</th>
+ <th>Commentaire</th>
+</tr>
+{% for commentaire in dossier.historique_desc %}
+ {% include "dae/ligne_validation.html" %}
+{% endfor %}
+</table>
+
+<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>
+
+{% endblock %}