82 lines
2.0 KiB
HTML
82 lines
2.0 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 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 %}
|
|
|
|
<h3>Add Set</h3>
|
|
<form method="post" action="/workouts/{{ workout.id }}/add-set" class="set-row">
|
|
<label>
|
|
Exercise
|
|
<input type="text" name="exercise" required list="exercise-list">
|
|
<datalist id="exercise-list">
|
|
{% for s in sets %}
|
|
<option value="{{ s.exercise }}">
|
|
{% endfor %}
|
|
</datalist>
|
|
</label>
|
|
<label>
|
|
Set #
|
|
<input type="number" name="set_number" required min="1">
|
|
</label>
|
|
<label>
|
|
Reps
|
|
<input type="number" name="reps" min="1">
|
|
</label>
|
|
<label>
|
|
Weight
|
|
<input type="number" name="weight" step="0.5">
|
|
</label>
|
|
<label>
|
|
RPE
|
|
<input type="number" name="rpe" min="1" max="10" step="0.5">
|
|
</label>
|
|
<label>
|
|
Notes
|
|
<input type="text" name="notes">
|
|
</label>
|
|
<button type="submit">Add</button>
|
|
</form>
|
|
|
|
{% if workout.status == "plan" %}
|
|
<form method="post" action="/workouts/{{ workout.id }}/complete">
|
|
<button type="submit" class="secondary">Mark Complete</button>
|
|
</form>
|
|
{% endif %}
|
|
|
|
<a href="/workouts">Back to Workouts</a>
|
|
{% endblock %}
|