cacher le lien de rapport modif
authorOlivier Larchevêque <olivier.larcheveque@auf.org>
Tue, 17 Jul 2012 13:55:21 +0000 (09:55 -0400)
committerOlivier Larchevêque <olivier.larcheveque@auf.org>
Tue, 17 Jul 2012 13:55:21 +0000 (09:55 -0400)
project/menu.py

index 45767bf..03e4c1a 100644 (file)
@@ -53,33 +53,22 @@ class CustomMenu(Menu):
            groups.CORRESPONDANT_RH in user_groups or\
            groups.ADMINISTRATEURS in user_groups or\
            groups.DIRECTEUR_DE_BUREAU in user_groups:
            groups.CORRESPONDANT_RH in user_groups or\
            groups.ADMINISTRATEURS in user_groups or\
            groups.DIRECTEUR_DE_BUREAU in user_groups:
-            self.children += [
-                items.MenuItem('Rapports',
-                    children=[
-                        #items.MenuItem('Rapport des postes',
-                        #     reverse('rhr_postes')),
+            rapports = [
                         items.MenuItem('Rapport des contrats',
                             reverse('rhr_contrats')),
                         items.MenuItem(u'Rapport des employés sans contrat',
                             reverse('rhr_employe_sans_contrat')),
                         items.MenuItem('Rapport des contrats',
                             reverse('rhr_contrats')),
                         items.MenuItem(u'Rapport des employés sans contrat',
                             reverse('rhr_employe_sans_contrat')),
-                        #items.MenuItem('Rapport de rémunération',
-                        #     reverse('rhr_remuneration')),
-
-                        # A corriger
-                        #items.MenuItem('Rapport des postes par service',
-                        #    reverse('rhr_postes_service')),
-                        #items.MenuItem('Rapport des postes par implantation',
-                        #     reverse('rhr_postes_implantation')),
-
-                        #items.MenuItem('Modelisation des postes',
-                        #     reverse('rhr_postes_modelisation')),
-                        #items.MenuItem('Rapport hiérarchique des postes',
-                        #     reverse('rhr_postes_hierarchie')),
                         items.MenuItem('Rapport de masse salariale',
                             reverse('rhr_masse_salariale')),
                         items.MenuItem('Rapport de masse salariale',
                             reverse('rhr_masse_salariale')),
+                    ]
+            if in_drh_or_admin(request.user):
+                rapports.append(
                         items.MenuItem('Rapport des modifications',
                             reverse('rhr_historique_des_modifications')),
                         items.MenuItem('Rapport des modifications',
                             reverse('rhr_historique_des_modifications')),
-                        ]),
+                        )
+            self.children += [
+                items.MenuItem('Rapports',
+                    children=rapports),
 
                 items.MenuItem('Organigrammes',
                     children=[
 
                 items.MenuItem('Organigrammes',
                     children=[