<tr><th>Responsable</th><td>{{ poste.responsable }}</td></tr>
</table>
-{% comment %}
<h3>Contrat</h3>
<table>
<tr><th>Régime de travail (% du temps complet)</th><td>{{ poste.regime_travail }}</td></tr>
<h3>Recrutement</h3>
<table>
- <tr><th>Local</th><td>{{ poste.local }}</td></tr>
- <tr><th>Expatrié</th><td>{{ poste.expatrie }}</td></tr>
- <tr><th>Mise à disposition</th><td>{{ poste.mise_a_disposition }}</td></tr>
+ <tr><th>Local</th><td>{{ poste.local|yesno:"Oui,Non" }}</td></tr>
+ <tr><th>Expatrié</th><td>{{ poste.expatrie|yesno:"Oui,Non" }}</td></tr>
+ <tr><th>Mise à disposition</th><td>{{ poste.mise_a_disposition|yesno:"Oui,Non" }}</td></tr>
<tr><th>Appel à candidature</th><td>{{ poste.appel }}</td></tr>
</table>
-{% endcomment %}
+<h3>Rémunération</H3>
+<table id="classement">
+ <thead>
+ <tr>
+ <th></th>
+ <th>Min.</th>
+ <th>Max.</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th>Échelon AUF</th>
+ <td>{{ poste.classement_min|default:"s/o" }}</td>
+ <td>{{ poste.classement_max|default:"s/o" }}</td>
+ </tr>
+ <tr>
+ <th>Valeur du point</th>
+ <td class="montant">{{ poste.valeur_point_min|default:"" }}</td>
+ <td class="montant">{{ poste.valeur_point_max|default:"" }}</td>
+ </tr>
+ <tr>
+ <th>Salaire de base</th>
+ <td class="montant">{{ poste.salaire_min|default:"0"|floatformat:0 }} {{ poste.devise_min.code }}</td>
+ <td class="montant">{{ poste.salaire_max|default:"0"|floatformat:0 }} {{ poste.devise_max.code }}</td>
+ </tr>
+ <tr>
+ <th>Indemnité</th>
+ <td class="montant">{{ poste.indemn_min|default:"0"|floatformat:0 }} {{ poste.devise_min.code }}</td>
+ <td class="montant">{{ poste.indemn_max|default:"0"|floatformat:0 }} {{ poste.devise_max.code }}</td>
+ </tr>
+ <tr>
+ <th>Autres</th>
+ <td class="montant">{{ poste.autre_min|default:"0"|floatformat:0 }} {{ poste.devise_min.code }}</td>
+ <td class="montant">{{ poste.autre_max|default:"0"|floatformat:0 }} {{ poste.devise_max.code }}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h3>Comparatif</H3>
+<h4>Device comparative : {{ poste.devise_comparaison }} </h4>
+<table id="classement">
+ <thead>
+ <tr>
+ <th></th>
+ <th>Min.</th>
+ <th>Max.</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th>Comp. locale</th>
+ <td class="montant">{{ poste.comp_locale_min|default:"0" }}</td>
+ <td class="montant">{{ poste.comp_locale_max|default:"0" }}</td>
+ </tr>
+ <tr>
+ <th>Comp. université</th>
+ <td class="montant">{{ poste.comp_universite_min|default:"0" }}</td>
+ <td class="montant">{{ poste.comp_universite_max|default:"0" }}</td>
+ </tr>
+ <tr>
+ <th>Comp. fonction pub.</th>
+ <td class="montant">{{ poste.comp_fonctionpub_min|default:"0" }}</td>
+ <td class="montant">{{ poste.comp_fonctionpub_max|default:"0" }}</td>
+ </tr>
+ <tr>
+ <th>Comp. ONG</th>
+ <td class="montant">{{ poste.comp_ong_min|default:"0" }}</td>
+ <td class="montant">{{ poste.comp_ong_max|default:"0" }}</td>
+ </tr>
+ <tr>
+ <th>Comp. autre</th>
+ <td class="montant">{{ poste.comp_autre_min|default:"0" }}</td>
+ <td class="montant">{{ poste.comp_autre_max|default:"0" }}</td>
+ </tr>
+ <tr>
+ <th>valeur</th>
+ <td class="montant">{{ poste.valeur_valeur_min|default:"0" }}</td>
+ <td class="montant">{{ poste.valeur_valeur_max|default:"0" }}</td>
+ </tr>
+ </tbody>
+</table>
+{% if poste.justification %}
+<h3>Justification</h3>
+{{ poste.justification }}
+{% endif %}
+
+{% if poste.date_debut or poste.date_fin %}
+<h3>Autres méta-données</h3>
+<table>
+ <tr>
+ <th>Date début</th>
+ <td>{{ poste.date_debut|default:"s/o" }}</td>
+ </tr>
+ <tr>
+ <th>Date fin</th>
+ <td>{{ poste.date_fin|default:"s/o" }}</td>
+ </tr>
+</table>
+
+{% endif %}
+
+{% if financements|length > 0 %}
+<h3>Financement</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Type</th>
+ <th>Pourcentage</th>
+ <th>Commentaire</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for f in financements %}
+ <tr>
+ <td>{{ f.type }}</td>
+ <td>{{ f.pourcentage|floatformat:"2" }}%</td>
+ <td>{{ f.commentaire }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
+{% endif %}
+
+{% include "rh/include/pieces.html" %}
+
+{% if dossiers|length > 0 %}
+<h3>Autres méta-données</h3>
+<table>
+ <tr>
+ <th>Date début</th>
+ <td>{{ poste.date_debut|default:"s/o" }}</td>
+ </tr>
+ <tr>
+ <th>Date fin</th>
+ <td>{{ poste.date_fin|default:"s/o" }}</td>
+ </tr>
+</table>
+
+{% endif %}
+
+{% if dossiers|length > 0 %}
+<h3>Dossiers</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Date début</th>
+ <th>Date fin</th>
+ <th># du poste</th>
+ <th>Actif</th>
+ <th>Employé<th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for d in dossiers %}
+ <tr>
+ <td>{{ d.date_debut }}</td>
+ <td>{{ d.date_fin }}</td>
+ <td>{{ d.id }}</td>
+ <td>{{ d.actif|yesno:"Oui,Non" }}</td>
+ <td>{{ d.employe }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
+{% endif %}
+
+{% if comparaisons|length > 0 %}
+<h3>Dossiers de comparaison</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Implantation</th>
+ <th>Nom</th>
+ <th>Montant</th>
+ <th>Devise<th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for p in comparaisons %}
+ <tr>
+ <td>{{ p.implantation }}</td>
+ <td>{{ p.nom }}</td>
+ <td>{{ p.montant|floatformat:2 }}</td>
+ <td>{{ p.devise|default:"s/o" }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
+{% endif %}
+
+{% if commentaires|length > 0 %}
+<h3>Commentaires</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Commentaire</th>
+ <th>Auteur</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for c in commentaires %}
+ <tr>
+ <td>{{ c.texte }}</td>
+ <td>{{ c.owner }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
+{% endif %}
def poste_apercu(request, poste_id):
c = {
'is_popup' : request.GET.get('_popup', False),
- 'poste' : get_object_or_404(rh.Poste, pk=poste_id)
+ 'poste' : get_object_or_404(rh.Poste, pk=poste_id),
+ 'financements' : rh.PosteFinancement.objects.filter(poste=poste_id).all(),
+ 'pieces' : rh.PostePiece.objects.filter(poste=poste_id).all(),
+ 'dossiers' : rh.Dossier.objects.filter(poste=poste_id).order_by("-date_debut").all(),
+ 'comparaisons' : rh.PosteComparaison.objects.filter(poste=poste_id).all(),
+ 'commentaires' : rh.PosteCommentaire.objects.filter(poste=poste_id).all(),
+
}
return render_to_response('admin/rh/poste/apercu.html', c, RequestContext(request))