diff --git a/templates/trip/stats.html b/templates/trip/stats.html index 160e37f..b31cb58 100644 --- a/templates/trip/stats.html +++ b/templates/trip/stats.html @@ -26,6 +26,15 @@
Trips in {{ year }}: {{ year_stats.count }}
Conferences in {{ year }}: {{ year_stats.conferences }}
{{ countries | count }} countries visited in {{ year }}: + {% set new_countries = [] %} + {% for c in countries %} + {% if c.alpha_2 not in previously_visited %} + {% set _ = new_countries.append(c) %} + {% endif %} + {% endfor %} + {% if new_countries %} + ({{ new_countries | count }} new) + {% endif %} {% for c in countries %} {{ c.flag }} {{ c.name }} ({{ c.alpha_2 }})