{% extends 'base.html' %}
-{% load adminmedia %}
+{% load adminmedia dae permissions %}
{% 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" />
+ <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>Demandes d'autorisation d'engagement de personnel</h1>
+<h1 class="gauche">Demande d'autorisation d'engagement de personnel</h1>
+<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>
{% with dossier.poste as poste %}
{% include 'dae/poste_resume.html' %}
<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>Employé</th>
- <th>Poste</th>
- <th>Date fin contrat</th>
- <th>Salaire</th>
- <th>Salaire EUR</th>
- <th>Implantation</th>
- <th>Famille Emploi</th>
- </tr>
- {% for d in comparaison_dossiers %}
- <tr>
- <td>{{ d.employe }}</td>
- <td>{{ d.poste1.type_poste.nom }} {{ d.complement1 }}</td>
- <td>{{ d.contrat_date_fin|default:"en cours" }}</td>
- <td>{{ d.get_salaire_display }}</td>
- <td>{{ d.get_salaire_euro_display }}</td>
- <td>{{ d.poste1.implantation }}</td>
- <td>{{ d.poste1.type_poste.famille_emploi.nom }}</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 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.code }}</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>
- {% for pj in dossier.dossierpiece_set.all %}
- <li><a href="{{ pj.fichier.url }}" target="_blank">{{ pj.nom }}</a></li>
+<fieldset>
+ <h2>Pièces jointes</h2>
+ <ul>
+ {% 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>
-
- <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>
+ </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 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>
+
+<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>
- {% for j in dossier.justificationautreemploye_set.all %}
- <h4>{{ j.question }}</h4>
- <p>{{ j.reponse }}</p>
- {% endfor %}
+ <a href="{% url dae_numerisee_modifier dossier.id %}">Joindre une DAE numérisée</a>
</td>
- </tr>
- </table>
-{% endblock %}
+ {% endifhasperm %}
+ {% endif %}
+ </tbody>
+</table>
+<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>
+
+<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>
+
+<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 %}