Allow users to toggle to progress table view when selecting an exercise
This commit is contained in:
@@ -1,7 +1,25 @@
|
||||
{% if offset == 0 %}
|
||||
<div
|
||||
<div id="exercise-history-container"
|
||||
class="w-full bg-gray-50 dark:bg-gray-800 p-4 border-t border-gray-200 dark:border-gray-700 shadow-inner overflow-x-auto">
|
||||
<h4 class="text-sm font-semibold text-gray-900 dark:text-white mb-2">History</h4>
|
||||
<div class="flex items-center justify-between sm:justify-center relative mb-4">
|
||||
<div class="flex items-center justify-center gap-2 w-full">
|
||||
<h4 class="text-sm font-semibold text-gray-900 dark:text-white">History</h4>
|
||||
</div>
|
||||
<div class="absolute right-0 z-10">
|
||||
<button
|
||||
class="inline-flex justify-center p-1 text-gray-500 rounded cursor-pointer hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:text-white dark:hover:bg-gray-600"
|
||||
title="Show Progress Graph"
|
||||
hx-get="{{ url_for('get_exercise_progress_for_user', person_id=person_id, exercise_id=exercise_id) }}"
|
||||
hx-target="#exercise-history-container" hx-swap="outerHTML">
|
||||
<svg class="w-5 h-5 border border-gray-300 rounded p-0.5" fill="none" stroke="currentColor"
|
||||
viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"></path>
|
||||
</svg>
|
||||
<span class="sr-only">Show Progress Graph</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<table class="w-full text-left text-sm text-gray-500 dark:text-gray-400">
|
||||
<thead class="text-xs text-gray-700 uppercase bg-gray-100 dark:bg-gray-700 dark:text-gray-400">
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user