return [self.implantation.region]
def get_devise(self):
- return ValeurPoint.objects.filter(implantation=self.implantation).order_by('annee')[0].devise
+ return ValeurPoint.objects.filter(implantation=self.implantation, devise__archive=False).order_by('annee')[0].devise
class Poste(Poste_):
__doc__ = Poste_.__doc__
{% extends 'admin/change_form.html' %}
+
{% load i18n admin_modify adminmedia %}
+{% block extrahead %}
+ {{ block.super }}
+ <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/admin_print.css" media="print"/>
+ <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/rh_apercus.css" media="all"/>
+{% endblock %}
+
{% block breadcrumbs %}{% if not is_popup %}
<div class="breadcrumbs">
<a href="{% url admin:index %}">{% trans "Home" %}</a> ›
{% endif %}{% endblock %}
{% block content %}
-<h1>Fiche employé</h1>
-{% include "rh/include/imprimer.html" %}
-
-{% include "rh/include/employe.html" %}
-<hr style="margin-top:20px" />
-{% for dossier in dossiers %}
- {% include "rh/include/dossier.html" %}
+ {% include "rh/include/imprimer.html" %}
+ {% include "rh/include/employe.html" %}
+ {% for dossier in dossiers %}
+ <h4>{{ dossier }}</h4>
+ {% if forloop.counter0 == 0 %}
+ {% include "rh/include/dossier.html" %}
+ {% else %}
+ <p><a target="_blank" href="{% url dossier_apercu dossier.id %}">consulter</a></p>
+ {% endif %}
<hr />
-{% endfor %}
-
+ {% endfor %}
{% endblock %}
-{% if commentaires|length > 0 %}
-<div>
- {% comment %}
- <a class="noprint action-remove-block" href="#">Retirer de l'impression</a>
- {% endcomment %}
- <table>
- <thead>
- <tr>
- <th>Commentaire</th>
- <th>Auteur</th>
- <th>Date</th>
- </tr>
- </thead>
- <tbody>
- {% for c in commentaires %}
- <tr>
- <td>{{ c.texte }}</td>
- <td>{{ c.owner }}</td>
- <td>{{ c.date_creation|default:"" }}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
-</div>
+{% if commentaires %}
+<fieldset class="module aligned">
+ <h2>Commentaires</h2>
+ <table>
+ <thead>
+ <tr>
+ <th>Commentaire</th>
+ <th>Auteur</th>
+ <th>Date</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for c in commentaires %}
+ <tr>
+ <td>{{ c.texte }}</td>
+ <td>{{ c.owner }}</td>
+ <td>{{ c.date_creation|default:"" }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+</fieldset>
{% endif %}
{% include "rh/include/pieces.html" %}
+{% if contrats %}
<fieldset class="module aligned">
<h2>Contrats</h2>
<table>
{% endfor %}
</table>
</fieldset>
+{% endif %}
<fieldset class="module aligned">
<h2>Historique de rémunération</h2>
{% include "rh/include/remunerations.html" with remunerations=dossier.remunerations %}
</fieldset>
-<fieldset class="module aligned">
- <h2>Commentaires</h2>
{% include "rh/include/commentaires.html" %}
-</fieldset>
-<h2>{{ employe.nom|title }} {{employe.prenom|title }}</h2>
-<h3>Identification</h3>
-<table>
- <tr>
- <th>Nom</th>
- <td>{{ employe.nom }}</td>
- </tr>
- <tr>
- <th>Prénom</th>
- <td>{{ employe.prenom }}</td>
- </tr>
- <tr>
- <th>Nom d'affichage</th>
- <td>{{ employe.nom_affichage|default:"" }}</td>
- </tr>
- <tr>
- <th>Nationalité</th>
- <td>{{ employe.nationalite }}</td>
- </tr>
- <tr>
- <th>Date de naissance</th>
- <td>{{ employe.date_naissance }}</td>
- </tr>
- <tr>
- <th>Situation familiale</th>
- <td>{{ employe.situation_famille.nom }}</td>
- </tr>
- <tr>
- <th>Date d'entrée à l'AUF</th>
- <td>{{ employe.date_entree }}</td>
- </tr>
-</table>
+<fieldset class="module aligned">
+ <h2>Identification</h2>
+ {% include "rh/form-row.html" with label="Nom" value=employe.nom %}
+ {% include "rh/form-row.html" with label="Prénom" value=employe.prenom %}
+ {% include "rh/form-row.html" with label="Nom d'affichage" value=employe.nom_affichage|default:"" %}
+ {% include "rh/form-row.html" with label="Nationalité" value=employe.nationalite %}
+ {% include "rh/form-row.html" with label="Date de naissance" value=employe.date_naissance %}
+ {% include "rh/form-row.html" with label="Situation familiale" value=employe.situation_famille.nom %}
+ {% include "rh/form-row.html" with label="Date d'entrée à l'AUF" value=employe.date_entree %}
+</fieldset>
-<h3>Coordonnées</h3>
-<table>
- <tr>
- <th>Adresse</th>
- <td>{{ employe.adresse }}</td>
- </tr>
- <tr>
- <th>Ville</th>
- <td>{{ employe.ville }}</td>
- </tr>
- <tr>
- <th>Code postal</th>
- <td>{{ employe.code_postal }}</td>
- </tr>
- <tr>
- <th>Province</th>
- <td>{{ employe.province }}</td>
- </tr>
- <tr>
- <th>Pays</th>
- <td>{{ employe.pays }}</td>
- </tr>
- <tr>
- <th>Tél. domicile</th>
- <td>{{ employe.tel_domicile }}</td>
- </tr>
- <tr>
- <th>Tél. mobile</th>
- <td>{{ employe.tel_cellulaire }}</td>
- </tr>
-</table>
+<fieldset class="module aligned">
+ <h2>Coordonnées</h2>
+ {% include "rh/form-row.html" with label="Adresse" value=employe.adresse %}
+ {% include "rh/form-row.html" with label="Ville" value=employe.ville %}
+ {% include "rh/form-row.html" with label="Code postal" value=employe.code_postal %}
+ {% include "rh/form-row.html" with label="Province" value=employe.province %}
+ {% include "rh/form-row.html" with label="Pays" value=employe.pays %}
+ {% include "rh/form-row.html" with label="Tél. domicile" value=employe.tel_domicile %}
+ {% include "rh/form-row.html" with label="Tél. mobile" value=employe.tel_cellulaire %}
+</fieldset>
-{% if pieces|length > 0 %}
+{% if pieces %}
<fieldset class="module">
<h2>Pièces</h2>
<table>
{% include "rh/include/pieces.html" %}
-{% if dossiers|length > 0 %}
+{% if dossiers %}
<fieldset class="module aligned">
<h2>Dossiers</h2>
<table>
</div>
{% endif %}
-{% if comparaisons|length > 0 %}
+{% if comparaisons %}
<div>
<h3>Dossiers de comparaison</h3>
{% comment %}
dossiers = rh.Dossier.objects.filter(q).order_by('-date_debut')
c = {
+ 'title': u"Employe %s" % (employe, ),
'is_popup' : request.GET.get('_popup', False),
'employe' : employe,
'dossiers' : dossiers,