2022-08-19 07:46:41 +02:00
|
|
|
{% extends 'base.html.twig' %}
|
2022-08-14 09:24:35 +02:00
|
|
|
|
|
|
|
{% block content %}
|
2022-08-19 07:46:41 +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>
|
|
|
|
{% set endpoint = 'today' %}
|
|
|
|
{% include 'utils/calendar.html.twig' %}
|
|
|
|
{# Display a list of records if any, else, print message #}
|
|
|
|
{% if results is defined and (results|length) > 0 %}
|
|
|
|
<ul>
|
|
|
|
{% for sp in results %}
|
|
|
|
<li class="species">
|
|
|
|
<span class="scientific-name">
|
|
|
|
{{ sp['scientific_name'] }}
|
|
|
|
(
|
|
|
|
</span>
|
|
|
|
<span class="common-name">{{ sp['common_name'] }}</span>)
|
|
|
|
<span class="link">
|
|
|
|
<a href="./species/{{ sp['taxon_id'] }}">
|
|
|
|
<i data-feather="link"></i>
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% else %}
|
|
|
|
<p>
|
|
|
|
{{ 'No species detected this day'|trans }}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2022-08-14 09:40:44 +02:00
|
|
|
{% endblock %}
|