mirror of
https://github.com/bodyrep/DemoApp.git
synced 2026-01-25 22:51:37 +00:00
fixed newexercise labels, added body to single workout page, added delete function for workouts
This commit is contained in:
@@ -1,19 +1,18 @@
|
||||
h1 New workout
|
||||
h1 New workouty
|
||||
|
||||
form#newworkout(method="POST", action="/workouts")
|
||||
ul
|
||||
li
|
||||
label(for="title", value="UserID") UserID
|
||||
input#title(name="userID", value=session.user._id)
|
||||
input#title(name="userID", value=session.user.name)
|
||||
li
|
||||
label(for="datepicker", value="Date") workoutDate
|
||||
input.datepicker(name="workoutDate")
|
||||
li
|
||||
label(for="timepicker", value="Time") workoutTime
|
||||
select(name="workoutTime")
|
||||
option(value='0100') 1 AM
|
||||
option(value='0130') 1:30 AM
|
||||
option(value='0200') 2 AM
|
||||
input#timespinner(name="workoutTime", value="08:30 PM" )
|
||||
|
||||
|
||||
ul#exercises
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ h3 Recent workouts:
|
||||
- recentworkouts.forEach(function(workout) {
|
||||
li.floatleft
|
||||
span(class="floatleft workoutentry")
|
||||
a(class="map-link", href="/workouts/" + encodeURIComponent(workout._id))= workout._id
|
||||
a(class="map-link", href="/workouts/" + encodeURIComponent(workout._id))= workout.PrettyDate
|
||||
each element in workout.elements
|
||||
p(class="workoutelement", data-musclearray=element.exerciseID.musclearray)= element.exerciseID.name
|
||||
ol
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
h1= workout.title
|
||||
|
||||
ul
|
||||
li Time: #{workouttime}
|
||||
each element in workout.elements
|
||||
li= element.exerciseID.name
|
||||
ul
|
||||
each split in element.splits
|
||||
li Reps: #{split.reps} Weight: #{split.weight}
|
||||
li.floatleft
|
||||
span(class="floatleft workoutentry")
|
||||
a(class="map-link", href="/workouts/" + encodeURIComponent(workout._id))= workout.PrettyDate
|
||||
each element in workout.elements
|
||||
p(class="workoutelement", data-musclearray=element.exerciseID.musclearray)= element.exerciseID.name
|
||||
ol
|
||||
each split in element.splits
|
||||
li Reps: #{split.reps} Weight: #{split.weight}
|
||||
span(class="floatleft SVGBODY")
|
||||
//include ../../public/images/BlankBody.svg
|
||||
span(class="clearright")
|
||||
|
||||
|
||||
|
||||
form(action="/workouts/" + encodeURIComponent(workout._id), method="POST")
|
||||
input(name="_method", type="hidden", value="DELETE")
|
||||
input(type="submit", value="Delete")
|
||||
Reference in New Issue
Block a user