Add breadcrumb navigation to workout page
This commit is contained in:
@@ -10,6 +10,7 @@ class Workout:
|
|||||||
SELECT
|
SELECT
|
||||||
w.workout_id,
|
w.workout_id,
|
||||||
w.person_id,
|
w.person_id,
|
||||||
|
p.name AS person_name,
|
||||||
w.start_date,
|
w.start_date,
|
||||||
w.note,
|
w.note,
|
||||||
t.topset_id,
|
t.topset_id,
|
||||||
@@ -23,6 +24,8 @@ class Workout:
|
|||||||
CASE WHEN wt.workout_id IS NOT NULL THEN TRUE ELSE FALSE END AS is_selected
|
CASE WHEN wt.workout_id IS NOT NULL THEN TRUE ELSE FALSE END AS is_selected
|
||||||
FROM
|
FROM
|
||||||
workout w
|
workout w
|
||||||
|
LEFT JOIN
|
||||||
|
person p ON w.person_id = p.person_id
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
topset t ON w.workout_id = t.workout_id
|
topset t ON w.workout_id = t.workout_id
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
@@ -44,6 +47,7 @@ class Workout:
|
|||||||
workout_data = {
|
workout_data = {
|
||||||
"workout_id": data[0]["workout_id"],
|
"workout_id": data[0]["workout_id"],
|
||||||
"person_id": data[0]["person_id"],
|
"person_id": data[0]["person_id"],
|
||||||
|
"person_name": data[0]["person_name"],
|
||||||
"start_date": data[0]["start_date"],
|
"start_date": data[0]["start_date"],
|
||||||
"note": data[0]["note"],
|
"note": data[0]["note"],
|
||||||
"tags": [],
|
"tags": [],
|
||||||
|
|||||||
@@ -2,6 +2,44 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="flex" aria-label="Breadcrumb">
|
||||||
|
<ol class="inline-flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse">
|
||||||
|
<li class="inline-flex items-center">
|
||||||
|
<a hx-get="{{ url_for('dashboard') }}" hx-push-url="true" hx-target="#container"
|
||||||
|
class="inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white cursor-pointer">
|
||||||
|
<svg class="w-3 h-3 mr-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor"
|
||||||
|
viewBox="0 0 20 20">
|
||||||
|
<path
|
||||||
|
d="m19.707 9.293-2-2-7-7a1 1 0 0 0-1.414 0l-7 7-2 2a1 1 0 0 0 1.414 1.414L2 10.414V18a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v4a1 1 0 0 0 1 1h3a2 2 0 0 0 2-2v-7.586l.293.293a1 1 0 0 0 1.414-1.414Z" />
|
||||||
|
</svg>
|
||||||
|
Home
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="flex items-center">
|
||||||
|
<svg class="rtl:rotate-180 w-3 h-3 text-gray-400 mx-1" aria-hidden="true"
|
||||||
|
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
|
||||||
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||||
|
d="m1 9 4-4-4-4" />
|
||||||
|
</svg>
|
||||||
|
<a hx-get="{{ url_for('get_calendar', person_id=person_id) }}" hx-push-url="true" hx-target="#container"
|
||||||
|
class="ms-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ms-2 dark:text-gray-400 dark:hover:text-white cursor-pointer">{{person_name}}</a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li aria-current="page">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<svg class="rtl:rotate-180 w-3 h-3 text-gray-400 mx-1" aria-hidden="true"
|
||||||
|
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
|
||||||
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||||
|
d="m1 9 4-4-4-4" />
|
||||||
|
</svg>
|
||||||
|
<span class="ms-1 text-sm font-medium text-gray-500 md:ms-2 dark:text-gray-400">Workout</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</nav>
|
||||||
|
|
||||||
<div class='p-0 md:p-4 m-0 md:m-2'>
|
<div class='p-0 md:p-4 m-0 md:m-2'>
|
||||||
<div class="relative w-full h-full">
|
<div class="relative w-full h-full">
|
||||||
<!-- Modal content -->
|
<!-- Modal content -->
|
||||||
|
|||||||
Reference in New Issue
Block a user