fitness-web/app/templates/workout_detail.html

54 lines
1.3 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ workout.name }}{% endblock %}
{% block content %}
<h1>{{ workout.name }}</h1>
<p><strong>Date:</strong> {{ workout.date }} | <strong>Status:</strong> {{ workout.status }}</p>
{% if phase %}
<p><strong>Phase:</strong> {{ phase.name }}</p>
{% endif %}
{% if workout.notes %}
<p>{{ workout.notes }}</p>
{% endif %}
<h2>Sets</h2>
{% if sets %}
<table>
<thead>
<tr>
<th>Exercise</th>
<th>Set</th>
<th>Reps</th>
<th>Weight</th>
<th>RPE</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
{% for s in sets %}
<tr>
<td>{{ s.exercise }}</td>
<td>{{ s.set_number }}</td>
<td>{{ s.reps or '—' }}</td>
<td>{{ s.weight or '—' }}</td>
<td>{{ s.rpe or '—' }}</td>
<td>{{ s.notes or '' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>No sets logged yet.</p>
{% endif %}
{% if workout.status == "plan" %}
<button type="submit" class="secondary"
hx-post="/workouts/{{ workout.id }}/complete"
hx-target="#main-content"
hx-select="#main-content"
hx-swap="innerHTML"
hx-push-url="/workouts/{{ workout.id }}">Mark Complete</button>
{% endif %}
<a href="/workouts">Back to Workouts</a>
{% endblock %}