mirror of
https://github.com/bodyrep/DemoApp.git
synced 2026-01-25 14:43:00 +00:00
migrating repo to Bodyrep org
This commit is contained in:
23
views/workouts/index.jade
Normal file
23
views/workouts/index.jade
Normal file
@@ -0,0 +1,23 @@
|
||||
extends ../layout
|
||||
|
||||
block content
|
||||
h1 workouts
|
||||
|
||||
p
|
||||
a(href="/workouts/new") Create new workout
|
||||
p
|
||||
a(href="/users") List Users
|
||||
p
|
||||
a(href="/workouts") List workouts
|
||||
|
||||
|
||||
include list
|
||||
|
||||
- if (page > 0) {
|
||||
a(href="?page=" + (page - 1)) Previous
|
||||
|
||||
- }
|
||||
|
||||
- if (! lastPage) {
|
||||
a(href="?page=" + (page + 1)) Next
|
||||
- }
|
||||
5
views/workouts/list.jade
Normal file
5
views/workouts/list.jade
Normal file
@@ -0,0 +1,5 @@
|
||||
ul
|
||||
- workouts.forEach(function(workout) {
|
||||
li
|
||||
a(href="/workouts/" + encodeURIComponent(workout._id))= workout._id
|
||||
- });
|
||||
19
views/workouts/new.jade
Normal file
19
views/workouts/new.jade
Normal file
@@ -0,0 +1,19 @@
|
||||
extends ../layout
|
||||
|
||||
block content
|
||||
h1 New workout
|
||||
p THis will be a dropdown to select exercises
|
||||
input#title(name="Exercise")
|
||||
button#addExercise(type="button") Add Exercise
|
||||
|
||||
form#newworkout(method="POST", action="/workouts")
|
||||
ul
|
||||
li
|
||||
label(for="title", value="UserID")<br />
|
||||
input#title(name="userID", value=session.user._id)
|
||||
li
|
||||
label(for="datepicker", value="Date") Date<br />
|
||||
input.datepicker(name="workoutDate")
|
||||
ul#exercises
|
||||
|
||||
button(type="submit", value="Save") Save
|
||||
13
views/workouts/workout.jade
Normal file
13
views/workouts/workout.jade
Normal file
@@ -0,0 +1,13 @@
|
||||
extends ../layout
|
||||
block content
|
||||
h1= workout.title
|
||||
|
||||
div!= workout.body
|
||||
|
||||
hr
|
||||
|
||||
p
|
||||
span Workout ID:
|
||||
|
||||
a(href="/users/" + encodeURIComponent(workout._id))= workout._id
|
||||
div= workout
|
||||
Reference in New Issue
Block a user