Merge branch 'hotfix/another_fix_for_comparison' into dev
[auf_rh_dae.git] / project / dashboard.py
index 2c53d4f..1868e05 100644 (file)
@@ -20,26 +20,57 @@ from project.rh.historique import get_active_revisions
 
 class CustomIndexDashboard(Dashboard):
     """
-    Custom index dashboard for SIGMA.
+    Custom index dashboard for SGRH.
     """
     def init_with_context(self, context):
         request = context['request']
 
         # append an app list module for "Applications"
-        self.children.append(modules.AppList(
+        self.children.append(modules.Group(
             _('Applications'),
-            models=(
-                'project.dae.models.*',
-                'project.recrutement.models.*',
-                'project.rh.models.AyantDroit',
-                'project.rh.models.Dossier',
-                'project.rh.models.DossierInactif',
-                'project.rh.models.Employe',
-                'project.rh.models.EmployeInactif',
-                'project.rh.models.Poste',
-            ),
+            display='stacked',
+            children=[
+                modules.ModelList(
+                    title='Demande d\'autorisation d\'engagement',
+                    models=(
+                        'project.dae.models.*',
+                    )
+                ),
+                modules.ModelList(
+                    title='Recrutement',
+                    models=(
+                        'auf.django.emploi.models.OffreEmploi',
+                        'project.recrutement.models.ProxyOffreEmploi',
+                        'auf.django.emploi.models.Candidat',
+                        'project.recrutement.models.ProxyCandidat',
+                        'project.recrutement.models.CandidatEvaluation',
+                        'project.recrutement.models.MesCandidatEvaluation',
+                        'project.recrutement.models.Evaluateur',
+                        'project.recrutement.models.OffreEmploiEvaluateur',
+                        'project.recrutement.models.CourrielTemplate',
+                    )
+                ),
+                modules.ModelList(
+                    title='Gestion des personnels',
+                    models=(
+                        'project.rh.models.AyantDroit',
+                        'project.rh.models.Dossier',
+                        'project.rh.models.DossierInactif',
+                        'project.rh.models.Employe',
+                        'project.rh.models.EmployeInactif',
+                        'project.rh.models.Poste',
+                    )
+                ),
+                modules.ModelList(
+                    title='Log',
+                    models=(
+                        'project.rh.models.ChangementPersonnel',
+                    )
+                ),
+            ]
         ))
 
+
         if in_drh_or_admin(request.user):
             revisions = get_active_revisions()[:10]
             children = []
@@ -88,6 +119,7 @@ class CustomIndexDashboard(Dashboard):
                 'project.rh.models.TypeRevalorisation',
                 'project.rh.models.TypeRemuneration',
                 'project.rh.models.ValeurPoint',
+                'project.rh.models.ChangementPersonnelNotifications',
             ),
             exclude=('django.contrib.*',),
         ))