mirror of
https://github.com/bodyrep/DemoApp.git
synced 2026-01-25 14:43:00 +00:00
can read and display workouts
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
extends ../layout
|
||||
block content
|
||||
|
||||
h1= user.name
|
||||
|
||||
- if (session.user.name === requested)
|
||||
h1 Private View
|
||||
- if (session.user)
|
||||
- if (session.user.name === requested)
|
||||
h1 Private View
|
||||
|
||||
p
|
||||
a(href="/workouts/new") Create new workout
|
||||
p
|
||||
a(href="/workouts/new") Create new workout
|
||||
|
||||
- else
|
||||
h1 Public View
|
||||
@@ -18,5 +20,6 @@ block content
|
||||
a(href="/workouts/" + encodeURIComponent(workout._id))= workout._id
|
||||
- });
|
||||
|
||||
- if (session.user.is_admin === true)
|
||||
a(href="/users/") Goto Admin Page
|
||||
- if (session.user)
|
||||
- if (session.user.is_admin === true)
|
||||
a(href="/users/") Goto Admin Page
|
||||
Reference in New Issue
Block a user