mirror of
https://github.com/bodyrep/DemoApp.git
synced 2026-01-25 06:32:11 +00:00
fixed newexercise labels, added body to single workout page, added delete function for workouts
This commit is contained in:
@@ -2,6 +2,9 @@ script(src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js')
|
||||
script(src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js')
|
||||
script(src='http://jzaefferer.github.com/jquery-validation/jquery.validate.js')
|
||||
//script(src='/javascripts/jquery.svg.min.js')
|
||||
script(src='/javascripts/globalize.js')
|
||||
script(src='/javascripts/cultures/globalize.culture.en-US.js')
|
||||
|
||||
script(src='/javascripts/scripts.js')
|
||||
|
||||
//script(src='/javascripts/livevalidation_standalone.compressed.js')
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
div#top
|
||||
|
||||
- if (session.user)
|
||||
|
||||
|
||||
span
|
||||
b UserName
|
||||
span= session.user.name
|
||||
button.home-link(value= encodeURIComponent(session.user.name)) Home
|
||||
button.home-link(value= encodeURIComponent(session.user.username)) Home
|
||||
span
|
||||
b  UserID
|
||||
span= session.user._id
|
||||
|
||||
@@ -6,11 +6,11 @@ h2= user.name
|
||||
- if (session.user.username === requested)
|
||||
h2 Private View
|
||||
div
|
||||
button.recent-link(value= encodeURIComponent(session.user.name) ) Recent workouts
|
||||
button.recent-link(value= encodeURIComponent(session.user.username) ) Recent workouts
|
||||
div
|
||||
button.newex-link(value="/workouts/new") Create new workout
|
||||
div
|
||||
button.map-link(value="/users/admin/edit") Edit User
|
||||
button.map-link(value="/users/" + encodeURIComponent(session.user.username) + "/edit") Edit User
|
||||
div
|
||||
button Placeholder2
|
||||
- else
|
||||
|
||||
@@ -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