timetracker/src/web/tracker/templates/list_sessions.html

32 lines
1.6 KiB
HTML
Raw Normal View History

2022-12-31 13:18:27 +00:00
{% extends 'base.html' %}
2023-01-03 18:03:30 +00:00
{% block title %}Sessions{% endblock title %}
2022-12-31 13:18:27 +00:00
{% block content %}
2023-01-03 18:03:30 +00:00
{% if purchase %}
<div class="text-center text-xl mb-4 dark:text-slate-400">
<h1>Listing sessions only for purchase "{{ purchase }}"</h1>
<a class="dark:text-white hover:underline" href="{% url 'list_sessions' %}">View all sessions</a>
</div>
{% endif %}
2022-12-31 13:18:27 +00:00
<div class="grid grid-cols-4 gap-4 shadow rounded-xl max-w-screen-lg mx-auto dark:bg-slate-700 p-2 justify-center">
<div class="dark:border-white dark:text-slate-300 text-lg">Name</div>
<div class="dark:border-white dark:text-slate-300 text-lg">Start</div>
<div class="dark:border-white dark:text-slate-300 text-lg">End</div>
<div class="dark:border-white dark:text-slate-300 text-lg">Duration</div>
{% for data in dataset %}
2023-01-03 18:03:30 +00:00
<div class=""><a class="dark:text-white hover:underline" href="{% url 'list_sessions' data.purchase.id %}">{{ data.purchase }}</a></div>
2023-01-03 18:03:46 +00:00
<div class="dark:text-slate-400">{{ data.timestamp_start | date:"d/m/Y H:i" }}</div>
2023-01-04 16:27:54 +00:00
<div class="dark:text-slate-400">
{% if data.unfinished %}
Not finished yet. <button class="bg-red-700 hover:bg-orange-700 border border-red-900 hover:border-dotted hover:border-white rounded p-1 text-white text-sm">Finish now?</button>
{% elif data.duration_manual %}
MANUAL
{% else %}
{{ data.timestamp_end | date:"d/m/Y H:i" }}
{% endif %}
</div>
<div class="dark:text-slate-400">{{ data.duration_formatted }}{% if data.duration_manual %} (M){% endif %}</div>
2022-12-31 13:18:27 +00:00
{% endfor %}
</div>
{% endblock content %}