2022-08-14 09:24:35 +02:00
|
|
|
{% extends "base.html.twig" %}
|
|
|
|
|
|
|
|
{% block content %}
|
2022-08-14 09:40:44 +02:00
|
|
|
<h2>
|
|
|
|
{% set today = "now" | date("Y-m-d") %}
|
|
|
|
{% if today == date %}
|
|
|
|
{{ "Today's detected species" | trans }}
|
|
|
|
{% else %}
|
|
|
|
{{ "Detected species on" | trans }}
|
|
|
|
{{ date | format_datetime("full", "none") }}
|
|
|
|
{% endif %}
|
|
|
|
</h2>
|
2022-08-16 19:28:19 +02:00
|
|
|
{% set endpoint = "today" %}
|
|
|
|
{% include "utils/calendar.html.twig" %}
|
2022-08-14 09:40:44 +02:00
|
|
|
{# Display a list of records if any, else, print message #}
|
2022-08-15 11:42:28 +02:00
|
|
|
{% if results is defined and results | length > 0 %}
|
2022-08-14 09:40:44 +02:00
|
|
|
<ul>
|
|
|
|
{% for sp in results %}
|
|
|
|
<li class="species">
|
|
|
|
<a href="./species/{{ sp['taxon_id'] }}">
|
|
|
|
<span class="scientific-name">{{ sp["scientific_name"] }}
|
|
|
|
(</span>
|
|
|
|
<span class="common-name">{{ sp["common_name"] }}</span>)
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2022-08-15 11:42:28 +02:00
|
|
|
{% else %}
|
|
|
|
<p>{{ "No species detected this day" | trans }}</p>
|
2022-08-14 09:40:44 +02:00
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|