2022-08-14 09:24:35 +02:00
|
|
|
{% extends "base.html.twig" %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
{% if results is defined and results | length > 0 %}
|
2022-08-16 19:28:19 +02:00
|
|
|
{% set taxon = results.taxon %}
|
2022-08-14 09:24:35 +02:00
|
|
|
<h2>
|
|
|
|
{% set today = "now" | date("Y-m-d") %}
|
|
|
|
{% if today == date %}
|
2022-08-16 19:28:19 +02:00
|
|
|
{{ "Today's contacts for" | trans }}
|
2022-08-14 09:24:35 +02:00
|
|
|
{% else %}
|
2022-08-16 19:28:19 +02:00
|
|
|
{{ "Contacts on " | trans }}
|
2022-08-14 09:24:35 +02:00
|
|
|
{{ date | format_datetime("full", "none") }}
|
|
|
|
{{ " for " | trans }}
|
|
|
|
{% endif %}
|
|
|
|
<span class="scientific-name">
|
2022-08-16 19:28:19 +02:00
|
|
|
{{ taxon.scientific_name }}
|
2022-08-14 09:24:35 +02:00
|
|
|
</span>
|
|
|
|
(<span class="common-name">
|
2022-08-16 19:28:19 +02:00
|
|
|
{{ taxon.common_name }}
|
2022-08-14 09:24:35 +02:00
|
|
|
</span>)
|
|
|
|
</h2>
|
|
|
|
<div class="stats">
|
2022-08-16 19:28:19 +02:00
|
|
|
{% set stat = results.stat[0] %}
|
2022-08-14 09:24:35 +02:00
|
|
|
<h3>{{ "Stats" | trans }}</h3>
|
|
|
|
<div class="contact-count">
|
|
|
|
{{ "Contact count:" | trans }}
|
2022-08-16 19:28:19 +02:00
|
|
|
<span class="counter">{{ stat.contact_count }}</span>
|
2022-08-14 09:24:35 +02:00
|
|
|
</div>
|
|
|
|
<div class="contact-confidence">
|
|
|
|
{{ "Max confidence" | trans }}
|
2022-08-16 19:28:19 +02:00
|
|
|
<span class="value">{{ stat.max_confidence }}</span>
|
2022-08-14 09:24:35 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-16 19:28:19 +02:00
|
|
|
{% set records = results.records %}
|
2022-08-14 09:24:35 +02:00
|
|
|
<div class="records">
|
|
|
|
<h3>{{ "Contact records" | trans }}</h3>
|
|
|
|
{% if records is defined and records | length > 0 %}
|
2022-08-18 05:45:38 +02:00
|
|
|
{% include "today/manage.html.twig" %}
|
2022-08-14 09:24:35 +02:00
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2022-08-18 05:45:38 +02:00
|
|
|
<th></th>
|
2022-08-14 09:24:35 +02:00
|
|
|
<th>{{ "Filename" | trans }}</th>
|
|
|
|
<th>{{ "Time" | trans }}</th>
|
|
|
|
<th>{{ "Confidence" | trans }}</th>
|
|
|
|
<th>{{ "Audio" | trans }}</th>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for record in records %}
|
2022-08-20 05:04:29 +02:00
|
|
|
<tr {{ stimulus_controller('manage-records') }}>
|
2022-08-18 05:45:38 +02:00
|
|
|
<td>
|
2022-08-20 05:04:29 +02:00
|
|
|
<input title="{{ "Select this record" | trans }}" type="checkbox" class="select-record" value="{{ record.audio_file }}" {{ stimulus_target('manage-records', 'current') }}>
|
2022-08-18 05:45:38 +02:00
|
|
|
</td>
|
2022-08-14 09:24:35 +02:00
|
|
|
<td>
|
2022-08-20 05:04:29 +02:00
|
|
|
|
2022-08-16 19:28:19 +02:00
|
|
|
{{ record.audio_file }}
|
2022-08-14 09:24:35 +02:00
|
|
|
</a>
|
|
|
|
</td>
|
2022-08-16 19:28:19 +02:00
|
|
|
<td>{{ record.date | date("H:m") }}</td>
|
|
|
|
<td>{{ record.confidence }}</td>
|
2022-08-14 09:24:35 +02:00
|
|
|
<td>
|
2022-08-20 05:04:29 +02:00
|
|
|
<div class="controlls container row">
|
|
|
|
{% include "records/player.html.twig" with { "filename": record.audio_file } only %}
|
|
|
|
{% include "records/delete_button.html.twig" with { "filename": record.audio_file } only %}
|
|
|
|
<a class="button" title="{{ "Download audio file" | trans }}" href="/media/records/{{ record.audio_file }}">
|
|
|
|
<i data-feather="download"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<button {{ stimulus_action('manage-records', 'mark_as_verified') }} class="button" title="{{ "Mark this record as verified"|trans }}">
|
|
|
|
<i data-feather="eye"></i>
|
|
|
|
</button>
|
|
|
|
</td>
|
2022-08-14 09:24:35 +02:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% else %}
|
|
|
|
<p>{{ "No records this day for this species" | trans }}</p>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|