feature complete.. now need a bit of testing
[auf_rh_dae.git] / project / dae / templatetags / dae.py
index 7a9622c..ebb0c2e 100644 (file)
@@ -8,6 +8,13 @@ from django import template
 from project import groups
 
 from project.dae.workflow import ETATS_EDITABLE
+from project.dae.forms import (
+    ReadOnlyRemunFormSet,
+    PosteCompReadOnlyRemunFormSet,
+    DossierCompReadOnlyRemunFormSet,
+    )
+from project.dae import models as dae
+from project.rh import models as rh
 
 
 register = template.Library()
@@ -84,3 +91,25 @@ def pagination(context, page):
             'previous_qs': previous_qs.urlencode(),
             'next_qs': next_qs.urlencode()
             }
+
+
+@register.inclusion_tag('dae/embauche-remun.html', takes_context=True)
+def remun_form(context, dossier):
+
+    return {
+        'remunForm': ReadOnlyRemunFormSet(instance=dossier)
+        }
+
+
+@register.inclusion_tag('dae/embauche-remun.html', takes_context=True)
+def poste_cmp_remun_form(context, poste_cmp):
+    return {
+        'remunForm': PosteCompReadOnlyRemunFormSet(instance=poste_cmp)
+        }
+
+
+@register.inclusion_tag('dae/embauche-remun.html', takes_context=True)
+def dossier_cmp_remun_form(context, dossier_cmp):
+    return {
+        'remunForm': DossierCompReadOnlyRemunFormSet(instance=dossier_cmp)
+        }