Rapport remun: ajouts filtres
authorPA Parent <paparent@paparent.me>
Tue, 13 Dec 2011 20:44:02 +0000 (15:44 -0500)
committerPA Parent <paparent@paparent.me>
Tue, 13 Dec 2011 20:44:02 +0000 (15:44 -0500)
project/rh/templates/rh/rapports/remuneration.html
project/rh/templatetags/rapports.py

index 7fa0395..d7acc68 100644 (file)
@@ -7,12 +7,8 @@
 
 <div id="changelist-filter">
 <h2>{% trans 'Filter' %}</h2>
-{% comment %}
-{% filter_region_contrat %}
-{% filter_implantation_contrat %}
-{% filter_type_contrat %}
-{% filter_echeance_contrat %}
-{% endcomment %}
+{% filter_region_remun %}
+{% filter_implantation_remun %}
 </div>
 
 <table id="result_list">
index bd9ab10..0774940 100644 (file)
@@ -58,6 +58,18 @@ def filter_echeance_contrat(context):
             'choices': prepare_choices_date('date_fin', context)}
 
 
+@register.inclusion_tag('admin/filter_select.html', takes_context=True)
+def filter_region_remun(context):
+    return {'title': u"région",
+            'choices': prepare_choices(Region.objects.values_list('id', 'nom'), 'dossiers__poste__implantation__region', context, remove=['pays', 'nord_sud'])}
+
+
+@register.inclusion_tag('admin/filter_select.html', takes_context=True)
+def filter_implantation_remun(context):
+    return {'title': u"implantation",
+            'choices': prepare_choices(Implantation.objects.values_list('id', 'nom'), 'dossiers__poste__implantation', context)}
+
+
 def get_query_string(request, new_params=None, remove=None):
     if new_params is None: new_params = {}
     if remove is None: remove = []