mirror of
https://github.com/bodyrep/DemoApp.git
synced 2026-01-25 14:43:00 +00:00
34 lines
976 B
Plaintext
34 lines
976 B
Plaintext
extends ../layout
|
|
block content
|
|
h1= workout.title
|
|
|
|
div!= workout.body
|
|
|
|
hr
|
|
|
|
p
|
|
span Workout ID:
|
|
|
|
a(href="/workouts/" + encodeURIComponent(workout._id))= workout._id
|
|
div= workout
|
|
ul
|
|
li Time: #{workouttime}
|
|
each element in workout.elements
|
|
li= element.exerciseID
|
|
ul
|
|
each split in element.splits
|
|
li Reps: #{split.reps} Weight: #{split.weight}
|
|
|
|
- if (session.user)
|
|
- if (session.user.is_admin === true)
|
|
form(action="/workouts/" + encodeURIComponent(workout._id), method="POST")
|
|
input(name="_method", type="hidden", value="DELETE")
|
|
input(type="submit", value="Delete")
|
|
p
|
|
a(href="/workouts") List workouts
|
|
- else
|
|
- if (session.user._id == workout.userID)
|
|
form(action="/workouts/" + encodeURIComponent(workout._id), method="POST")
|
|
input(name="_method", type="hidden", value="DELETE")
|
|
input(type="submit", value="Delete")
|