mirror of
https://github.com/sstent/expressmongotest.git
synced 2026-01-26 00:52:11 +00:00
ook
This commit is contained in:
@@ -13,6 +13,7 @@ block content
|
||||
p
|
||||
a(href="/articles") List Articles
|
||||
|
||||
|
||||
ul
|
||||
- users.forEach(function(user) {
|
||||
li
|
||||
|
||||
@@ -12,5 +12,8 @@ block content
|
||||
p
|
||||
label(for="password") Password<br />
|
||||
input#password(type="password", name="password")
|
||||
p
|
||||
label(for="is_admin") Admin<br />
|
||||
input#isadmin(type="checkbox", name="is_admin", unchecked)
|
||||
p
|
||||
input(type="submit", value="Create")
|
||||
@@ -2,7 +2,7 @@ extends ../layout
|
||||
block content
|
||||
h1= user.name
|
||||
|
||||
- if (session.user)
|
||||
- if (session.user.)
|
||||
h1 Private View
|
||||
- else
|
||||
h1 Public View
|
||||
@@ -14,9 +14,9 @@ block content
|
||||
a(href="/articles/" + encodeURIComponent(article._id))= article.title
|
||||
- });
|
||||
|
||||
- if (session.user.is_admin = 'true')
|
||||
form(action="/users/" + encodeURIComponent(user.username), method="POST")
|
||||
input(name="_method", type="hidden", value="DELETE")
|
||||
input(type="submit", value="Delete")
|
||||
|
||||
form(action="/users/" + encodeURIComponent(user.username), method="POST")
|
||||
input(name="_method", type="hidden", value="DELETE")
|
||||
input(type="submit", value="Delete")
|
||||
|
||||
a(href="/users/") Back to Userlist
|
||||
a(href="/users/") Back to Userlist
|
||||
Reference in New Issue
Block a user