From 0470515af2d6f28f1559d5791aa0e236e65733db Mon Sep 17 00:00:00 2001 From: davin baragiotta Date: Wed, 10 Aug 2011 15:49:33 -0400 Subject: [PATCH] =?utf8?q?profil=20RH=20:=20am=C3=A9lio?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- project/lib.py | 5 +- project/media/css/sgrh.css | 1 + project/rh/templates/rh/include/dossier.html | 10 +- project/rh/templates/rh/profil.html | 263 +++++++++++++++++--------- project/settings.py | 2 +- 5 files changed, 182 insertions(+), 99 deletions(-) diff --git a/project/lib.py b/project/lib.py index 7a2e010..e73b3a1 100644 --- a/project/lib.py +++ b/project/lib.py @@ -10,7 +10,10 @@ def get_employe_from_user(user): try: ref_employe = ref.Authentification.objects.get(courriel=user.email).id employe = rh.Employe.objects.get(id=ref_employe.id) - employe.courriel = ref.Employe.objects.get(id=employe.id).courriel + ref_employe = ref.Employe.objects.get(id=employe.id) + employe.courriel = ref_employe.courriel + employe.tel_pro_poste = ref_employe.telephone_poste + employe.tel_pro_ip = ref_employe.telephone_ip except: #raise Exception(u"L'employé avec le courriel %s n'a pas été trouvé dans le référentiel." % user.email) employe = rh.Employe.objects.none() diff --git a/project/media/css/sgrh.css b/project/media/css/sgrh.css index 62e6167..9ce03aa 100644 --- a/project/media/css/sgrh.css +++ b/project/media/css/sgrh.css @@ -16,4 +16,5 @@ .droite60 { float:right; width:58%; padding-left:2%; } .nombre { text-align:right; } +.date { text-align:right; } .archive td { background-color:#e6e6e6; } diff --git a/project/rh/templates/rh/include/dossier.html b/project/rh/templates/rh/include/dossier.html index f47f19b..c689a9e 100644 --- a/project/rh/templates/rh/include/dossier.html +++ b/project/rh/templates/rh/include/dossier.html @@ -1,9 +1,7 @@ - {{ d.id }} {{ d.poste.nom }} - {{ d.date_debut }} - {{ d.date_fin|default_if_none:"" }} - - - + du + {{ d.date_debut }} + au + {{ d.date_fin|default_if_none:"" }} diff --git a/project/rh/templates/rh/profil.html b/project/rh/templates/rh/profil.html index 16bbe2d..7f4fe7d 100644 --- a/project/rh/templates/rh/profil.html +++ b/project/rh/templates/rh/profil.html @@ -9,6 +9,7 @@

{{ employe.civilite }} {{ employe }}

+ {% for d in dossiers_encours %}

{% if employe.genre.upper == 'F' %} @@ -25,46 +26,24 @@ {% endfor %}

+ {{ employe.photo }} + {% comment %} Photo + {% endcomment %}

-
-

Dépendants (ayant-droits)

- {% if employe.ayantdroits.all %} -
    - {% for ad in employe.ayantdroits.all %} -
  • {{ ad }}
  • - {% endfor %} -
- {% else %} - Aucun dépendant. - {% endif %} -
- -
-

Informations professionnelles AUF

- - - - - - - -
Date d'entrée :{{ employe.date_entree }}
- -

Informations personnelles

- {% comment %} + {% if employe.nom_affichage %} - {% endcomment %} + {% endif %} @@ -80,36 +59,19 @@
Nom d'affichage : {{ employe.nom_affichage }}
Date de naissance : {{ employe.date_naissance }}
- -
-

Coordonnées professionnelles AUF

+
+

Informations professionnelles AUF

- - - - - - - - - - - - - - - - - - + +
Courriel :{{ employe.courriel }}
Téléphone IP :{{ employe.champ }}
Téléphone :{{ employe.champ }}
Télécopie :{{ employe.champ }}
Adresse postale : - Date d'entrée :{{ employe.date_entree }}
-
+ +

Coordonnées personnelles

@@ -126,8 +88,7 @@
{{ employe.adresse }}
{% if employe.ville or employe.province %} - {{ employe.ville }} - {% if employe.ville and employe.province %}, {% endif %} + {{ employe.ville }}{% if employe.ville and employe.province %}, {% endif %} {{ employe.province }}
{% endif %} @@ -140,65 +101,185 @@
- -
-

Poste{{ dossiers_encours|pluralize }}

- Globalement, mettre les infos du poste pertinente (n'en a pas beaucoup)... - ... mais surtout les infos du dossier (le fait que cette personne occupe ce poste). - {% for d in dossiers_encours %} +
+

Coordonnées professionnelles AUF

- - - - - - - - - - + + - - + + - - + + - - + + - - + +
Nom :{{ d.poste.nom }}
Implantation :{{ d.poste.implantation }}
Type de poste :{{ d.poste.type_poste }}Courriel :{{ employe.courriel }}
Service :{{ d.poste.service }}Téléphone IP :{{ employe.tel_pro_ip|default_if_none:"" }}
Poste du responsable :{{ d.poste.responsable }}Téléphone : + {% for d in dossiers_encours %} + {% if d.poste.implantation.telephone_interne %} + {{ d.poste.implantation.telephone_interne }} + {% else %} + {{ d.poste.implantation.telephone|default_if_none:"" }} + {% endif %} + {% if employe.tel_pro_poste %} +
#{{ employe.tel_pro_poste }} + {% endif %} + {% endfor %} +
Régime de travail :{{ d.poste.regime_travail }}Télécopie : + {% for d in dossiers_encours %} + {% if d.poste.implantation.fax_interne %} + {{ d.poste.implantation.fax_interne }} + {% else %} + {{ d.poste.implantation.fax|default_if_none:"" }} + {% endif %} + {% endfor %} +
Nombre d'heures par semaine :{{ d.poste.regime_travail_nb_heure_semaine }}Adresse postale : + {% for d in dossiers_encours %} + {% comment %} + Formattage identique à annuaire intranet. + {% endcomment %} + {% with d.poste.implantation as i %} + {% if i.adresse_postale_precision_avant %} + {{ i.adresse_postale_precision_avant }}
+ {% endif %} + {% if i.adresse_postale_no %} + {{ i.adresse_postale_no }}, + {% endif %} + {% if i.adresse_postale_rue %} + {{ i.adresse_postale_rue }}
+ {% endif %} + {% if i.adresse_postale_bureau %} + {{ i.adresse_postale_bureau }} + {% endif %} + {% if i.adresse_postale_precision %} + {{ i.adresse_postale_precision }}
+ {% endif %} + {% if i.adresse_postale_boite_postale %} + {{ i.adresse_postale_boite_postale }}
+ {% endif %} + {% if i.adresse_postale_code_postal_avant_ville %} + {% if i.adresse_postale_code_postal %} + {{ i.adresse_postale_code_postal }} + {% endif %} + {{ i.adresse_postale_ville }}{% if i.adresse_postale_ville and i.adresse_postale_region %}, {% endif %} + {% if i.adresse_postale_region %} + ({{ i.adresse_postale_region }})
+ {% endif %} + {% else %} + {{ i.adresse_postale_ville }}{% if i.adresse_postale_ville and i.adresse_postale_region %}, {% endif %} + {% if i.adresse_postale_region %} + ({{ i.adresse_postale_region }}) + {% endif %} + {% if i.adresse_postale_code_postal %} + {{ i.adresse_postale_code_postal }}
+ {% endif %} + {% endif %} + {{ i.adresse_postale_pays.nom }} + {% endwith %} + {% endfor %} +
+
+
+

Dépendants (ayant-droits)

+ {% if employe.ayantdroits.all %} +
    + {% for ad in employe.ayantdroits.all %} +
  • {{ ad }}
  • + {% endfor %} +
+ {% else %} +

Aucun dépendant.

+ {% endif %} +
+
+ +
+

Poste{{ dossiers_encours|pluralize }} en cours

+ + {% for d in dossiers_encours %} +

{{ d.poste.nom }}

+

+ {{ d.poste.service }}
+ {{ d.poste.implantation.nom }}
+ {{ d.poste.implantation.adresse_physique_ville }} +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Type de poste :{{ d.poste.type_poste }}Sous la responsabilité du poste :{{ d.poste.responsable }}
Statut{{ d.statut }}Organisation d'origine{{ d.organisme_bstg|default_if_none:"Non applicable" }}
En remplacement sur ce poste ?{{ d.remplacement|yesno:"oui, non" }}
Statut résidence{{ d.statut_residence }}
Régime de travail (prévu){{ d.poste.regime_travail }}Nombre d'heures par semaine (prévu) :{{ d.poste.regime_travail_nb_heure_semaine }}
Régime de travail (réel) + {% if d.regime_travail %} + {{ d.regime_travail }} % du temps complet + {% endif %} + Nombre d'heures par semaine (réel){{ d.regime_travail_nb_heure_semaine }}
Début d'occupation{{ d.date_debut }}Fin d'occupation{{ d.date_fin|default_if_none:"Non définie" }}
+ +

Rémunération

+ {{ d.classement }}
+ +

Contrats

+ {{ d.contrats }} + {% endfor %}
+
-

Dossier{{ dossiers|pluralize }}

+

Ancien{{ dossiers|pluralize }} poste{{ dossiers|pluralize }}

- - - - - - - - - - - - {% for d in dossiers_encours %} - {% include "rh/include/dossier.html" %} - {% endfor %} {% for d in dossiers_passes %} {% include "rh/include/dossier.html" %} {% endfor %} diff --git a/project/settings.py b/project/settings.py index 7805bcd..20c2bec 100644 --- a/project/settings.py +++ b/project/settings.py @@ -16,7 +16,7 @@ ADMINS = ( MANAGERS = ADMINS TIME_ZONE = 'Canada/Montreal' -DATE_FORMAT = 'd F Y' +DATE_FORMAT = 'j F Y' LANGUAGE_CODE = 'fr-ca' # Absolute path to the directory that holds media. -- 1.7.10.4
PosteDébutFinContrat(s)DébutFin