{% block extrahead %}
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/tablesorter.css" media="screen"/>
- <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-1.5.1.min.js"></script>
- <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.tablesorter.min.js"></script>
+ <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-1.5.1.min.js"></script>
+ <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.tablesorter.min.js"></script>
<script>
- $(document).ready(function() {
+ $(document).ready(function() {
$(".tablesorter").tablesorter({
dateFormat: 'uk',
headers: {
3: {sorter: "shortDate"},
}
}
- );
+ );
});
- </script>
+ </script>
{% endblock %}
{% block title %}RH - DAE - Postes{% endblock %}
{% endif %}
<h2>Les postes en cours de validation</h2>
-{% if postes_non_valides %}
+{% if postes_en_cours %}
<table class="tablesorter">
<thead>{% include "dae/poste-header.html" %}</thead>
<tbody>
-{% for poste in postes_non_valides %}
+{% for poste in postes_en_cours %}
{% include "dae/poste-row.html" %}
{% endfor %}
</tbody>
{% else %}
<p>Il n'y a aucun poste en cours de validation.</p>
{% endif %}
-
-<h2>Les postes ayant un dossier refusé</h2>
-{% if postes_non_valides %}
-<table class="tablesorter">
-<thead>{% include "dae/poste-header.html" %}</thead>
-<tbody>
-{% for poste in postes_avec_dossier_refuse %}
- {% include "dae/poste-row.html" %}
-{% endfor %}
-</tbody>
-</table>
-{% else %}
- <p>Il n'y a aucun poste avec un dossier refusé.</p>
-{% endif %}
-
-<h2>Les postes validés</h2>
-{% if postes_valides %}
-<table class="tablesorter">
-<thead>{% include "dae/poste-header.html" %}</thead>
-<tbody>
-{% for poste in postes_valides %}
- {% include "dae/poste-row.html" %}
-{% endfor %}
-</tbody>
-</table>
-{% else %}
- <p>Il n'y a aucun poste pourvu pour l'instant.</p>
-{% endif %}
-
{% endblock %}
from dae import models as dae
from dae.forms import *
-from dae.workflow import POSTE_ETAT_DRH_FINALISATION, ETATS_VALIDE, \
- DOSSIER_ETAT_FINALISE, DOSSIER_ETAT_REGION_FINALISATION, \
- DOSSIER_ETAT_DRH_FINALISATION
+from dae.workflow import DOSSIER_ETAT_FINALISE, DOSSIER_ETAT_REGION_FINALISATION, \
+ DOSSIER_ETAT_DRH_FINALISATION, POSTE_ETAT_FINALISE
from dae.decorators import redirect_interdiction, dae_groupe_requis, \
poste_dans_ma_region_ou_service, \
dossier_dans_ma_region_ou_service, \
vars = dict()
vars['postes_a_traiter'] = dae.Poste.objects.mes_choses_a_faire(request.user).all().order_by('-date_creation')
- vars['postes_non_valides'] = dae.Poste.objects.ma_region_ou_service(request.user).filter(~Q(etat=POSTE_ETAT_DRH_FINALISATION)).order_by('-date_creation')
- vars['postes_valides'] = dae.Poste.objects.ma_region_ou_service(request.user).filter(etat=POSTE_ETAT_DRH_FINALISATION).order_by('-date_creation')
+ vars['postes_en_cours'] = dae.Poste.objects.ma_region_ou_service(request.user).filter(~Q(etat=POSTE_ETAT_FINALISE)).order_by('-date_creation')
return render_to_response('dae/postes_liste.html', vars, RequestContext(request))
if not is_user_dans_services_centraux(request.user):
return False
user_groups = request.user.groups.all()
- return grp_administrateurs in user_groups or grp_drh in user_groups or \
- grp_drh2 in user_groups
+ return grp_administrateurs in user_groups or grp_grp_drh in user_groups or \
+ grp_drh2 in user_groups
def acces_accior(self, action, request):
user_groups = request.user.groups.all()
def acces_drh_finalisation(self, action, request):
user_groups = request.user.groups.all()
- return grp_drh in user_groups or grp_drh2 in user_groups
+ return grp_administrateurs in user_groups or \
+ grp_correspondants_rh in user_groups or \
+ grp_drh in user_groups or \
+ grp_drh2 in user_groups
def acces_demande_justif(self, action, request):
user_groups = request.user.groups.all()
MAP_GROUPE_ETATS_A_FAIRE = {
- grp_correspondants_rh : (POSTE_ETAT_BROUILLON, DOSSIER_ETAT_BROUILLON, ),
+ grp_correspondants_rh : (POSTE_ETAT_BROUILLON, DOSSIER_ETAT_BROUILLON,
+ POSTE_ETAT_REGION_FINALISATION,
+ DOSSIER_ETAT_REGION_FINALISATION),
grp_service_utilisateurs : (POSTE_ETAT_SERVICE_UTILISATEURS,
DOSSIER_ETAT_SERVICE_UTILISATEURS,),
grp_administrateurs : (POSTE_ETAT_ADMINISTRATEUR,