28 lines
733 B
Twig
28 lines
733 B
Twig
{% extends "base.html.twig" %}
|
|
|
|
{% block content %}
|
|
<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>
|
|
{# Display a list of records if any, else, print message #}
|
|
{% if results[0] is defined and results[0] | length > 0 %}
|
|
<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>
|
|
{% endif %}
|
|
{% endblock %}
|