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

24 lines
1.2 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>
<div class="dark:text-slate-400">{{ data.timestamp_end | date:"d/m/Y H:i" }}</div>
2022-12-31 13:18:27 +00:00
<div class="dark:text-slate-400">{{ data.time_delta }}</div>
{% endfor %}
</div>
{% endblock content %}