Move trip new-country filtering into stats
This commit is contained in:
parent
ddfa77b152
commit
f22772d12d
5 changed files with 27 additions and 15 deletions
|
|
@ -27,19 +27,13 @@
|
|||
<div>Trips in {{ year }}: {{ year_stats.count }}</div>
|
||||
<div>Conferences in {{ year }}: {{ year_stats.conferences }}</div>
|
||||
<div>{{ countries | count }} countries visited in {{ year }}:
|
||||
{% set display_new_countries = [] %}
|
||||
{% for c in new_countries %}
|
||||
{% if c.alpha_2 not in previously_visited %}
|
||||
{% set _ = display_new_countries.append(c) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if display_new_countries %}
|
||||
({{ display_new_countries | count }} new)
|
||||
{% if new_countries %}
|
||||
({{ new_countries | count }} new)
|
||||
{% endif %}
|
||||
{% for c in countries %}
|
||||
<span class="d-inline-block border border-2 p-1 m-1">
|
||||
{{ c.flag }} {{ c.name }} ({{ c.alpha_2 }})
|
||||
{% if c in display_new_countries %}
|
||||
{% if c in new_countries %}
|
||||
<span class="badge text-bg-info">new</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue