diff --git a/stages/views.py b/stages/views.py index dd64d12..9db1e15 100644 --- a/stages/views.py +++ b/stages/views.py @@ -177,6 +177,7 @@ class StudentSummaryView(DetailView): pass else: context['age_for_stage'] = self.object.age_at(period.start_date) + context['age_style'] = 'under_17' if (int(context['age_for_stage'].split()[0]) < 17) else '' return context diff --git a/templates/attribution.html b/templates/attribution.html index 0fdbbf3..c9bc996 100644 --- a/templates/attribution.html +++ b/templates/attribution.html @@ -17,6 +17,7 @@ div#student_detail { float:left; width: 40%; margin: 1em; padding: 0.5em; border: 3px solid red; min-height: 4em; border-radius: 8px; } div#previous_stages { background-color: #EEE; border-radius: 4px; } ul#previous_stages_list { display: none; padding-left: 1.5em;} + span.under_17 { color: red; } div#corp_detail { float:right; width: 40%; margin: 1em; padding: 0.5em; border: 3px solid red; min-height: 4em; border-radius: 8px; } div#corp_total, div#student_total { font-style: italic; color: gray; } diff --git a/templates/student_summary.html b/templates/student_summary.html index 26ad8eb..b9600fa 100644 --- a/templates/student_summary.html +++ b/templates/student_summary.html @@ -12,5 +12,6 @@
{{ object.first_name }} {{ object.last_name }}
{{ object.pcode }} {{ object.city }}
- Date de naissance: {{ object.birth_date }} {% if age_for_stage %}({{ age_for_stage }}){% endif %} + Date de naissance: {{ object.birth_date }} + {% if age_for_stage %}({{ age_for_stage }}){% endif %}