summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/routes.py11
-rw-r--r--app/templates/workout/record.html45
2 files changed, 51 insertions, 5 deletions
diff --git a/app/routes.py b/app/routes.py
index 8f5d8c1..76ea96a 100644
--- a/app/routes.py
+++ b/app/routes.py
@@ -115,7 +115,16 @@ def editWorkout():
@app.route("/workout/record", methods=['GET'])
@login_required
def recordWorkout():
- return render_template('workout/record.html')
+ # Id is required
+ if 'id' not in request.args:
+ return redirect(url_for('home'))
+
+ # Matching workout required
+ workout = Workout.query.filter_by(id=int(request.args['id']), user_id=current_user.id).first()
+ if not workout:
+ return redirect(url_for('home'));
+
+ return render_template('workout/record.html', workout=workout)
@app.route("/workout/select", methods=['GET'])
@login_required
diff --git a/app/templates/workout/record.html b/app/templates/workout/record.html
index bc6b695..6463fe4 100644
--- a/app/templates/workout/record.html
+++ b/app/templates/workout/record.html
@@ -1,12 +1,49 @@
{% extends 'base/layout.html' %}
{% block content %}
-
-<div class="continer">
+<div class="container">
<div class="columns is-centered">
<div class="column">
- <!--- TODO --->
- <div>
+ <h1 class="title is-2">Record {{ workout.name }}</h1>
+ <div class="box">
+ {% for exercise in workout.exercises %}
+ <h1 class="subtitle has-text-black">{{ exercise.name }}</h1>
+ <div class="field is-horizontal">
+ <div class="field-body">
+ <div class="field">
+ <label class="label">lbs</label>
+ <div class="control">
+ <input class="input" type="number" min="0">
+ </div>
+ </div>
+ <div class="field">
+ <label class="label">Reps</label>
+ <div class="control">
+ <input class="input" type="number" min="0">
+ </div>
+ </div>
+
+ <!-- Done button -->
+ <p class="button">
+ <span class="icon is-small">
+ <i class="fa fa-check"></i>
+ </span>
+ </p>
+ </div>
+ </div>
+
+ <div class="buttons is-centered">
+ <button class="button is-primary">
+ <span class="icon is-small">
+ <i class="fa fa-plus"></i>
+ </span>
+ <span>Add Set</span>
+ </button>
+ <button class="button is-danger">Skip</button>
+ </div>
+ {% endfor %}
+ </div>
+ </div>
</div>
</div>