diff --git a/templates/attribution.html b/templates/attribution.html index aee253a..68a6c99 100644 --- a/templates/attribution.html +++ b/templates/attribution.html @@ -16,6 +16,7 @@ div#student_detail { float:left; width: 40%; margin: 1em; padding: 0.5em; border: 3px solid red; min-height: 4em; border-radius: 8px; } 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; } div.filled { border-color: green !important; } div#training_form { text-align: center; } @@ -76,6 +77,7 @@ function update_students(period_id) { }); // Keep options as data to enable filtering sel.data('options', options); + $('div#student_total').html(options.length + " étudiant-e-s").data('num', options.length); }); } @@ -101,6 +103,7 @@ function update_corporations(period_id) { } }); sel.data('options', options); + $('div#corp_total').html(options.length + " disponibilités").data('num', options.length); }); } @@ -186,9 +189,13 @@ $(document).ready(function() { return; } // Clear selected student/corp - $('option:selected', '#student_select').remove(); + $('option:selected', '#student_select').remove(); + var prev_num = $('div#student_total').data('num'); + $('div#student_total').html((prev_num - 1) + " étudiant-e-s").data('num', prev_num - 1); $('#student_detail').html('').removeClass("filled"); $('option:selected', '#corp_select').remove(); + prev_num = $('div#corp_total').data('num'); + $('div#corp_total').html((prev_num - 1) + " disponibilités").data('num', prev_num - 1); $('#corp_detail').html('').removeClass("filled"); current_student = null; current_avail = null; @@ -229,6 +236,7 @@ var current_avail = null;
+
@@ -236,6 +244,7 @@ var current_avail = null;
+
diff --git a/templates/availability_summary.html b/templates/availability_summary.html index a3af021..195787d 100644 --- a/templates/availability_summary.html +++ b/templates/availability_summary.html @@ -3,4 +3,5 @@ {{ object.corporation.street }}
{{ object.corporation.pcode }} {{ object.corporation.city }}
Tél: {{ object.corporation.tel }}
-Courriel: {{ object.corporation.courriel }} +{% if object.corporation.courriel %}Courriel: {{ object.corporation.courriel }}
{% endif %} +{% if object.comment %}{{ object.comment }}{% endif %}