forked from NeuOL/neuola-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature] User management is now available.
- Loading branch information
Showing
10 changed files
with
233 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,9 @@ | |
.user-pic { | ||
width: 64px; | ||
} | ||
|
||
#user { | ||
.description { | ||
width: 50%; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
extends user-layout | ||
|
||
block append breadcrumb | ||
li | ||
span.divider / | ||
a(href='/admin/register'): i.icon-plus | ||
|
||
block admin-stage | ||
include user-browse | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.action-bar | ||
a(href='/admin/register').btn.btn-success 注册新用户 | ||
.clearfix | ||
|
||
table.table.table-hover#user | ||
thead | ||
tr | ||
th 用户名 | ||
th 描述 | ||
th 激活状态 | ||
th 动作 | ||
|
||
tbody | ||
for user in users | ||
tr | ||
td.name= user.name | ||
td.description= user.description ? user.description : '暂无描述。'; | ||
td.user-state | ||
if user.verified | ||
span.label.label-success 已激活 | ||
else | ||
span.label.label-warning 未激活 | ||
td | ||
a(href='/admin/users/edit/'+user.id).btn.btn-mini 编辑 | ||
| | ||
a(href='/admin/users/del/').btn.btn-mini 删除 | ||
unless user.verified | ||
| | ||
a(href='/admin/users/verify/').btn.btn-warning.btn-mini 激活 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
extends user-layout | ||
|
||
block append breadcrumb | ||
li.active | ||
span.divider / | ||
span 编辑用户 | ||
|
||
block admin-stage | ||
.main-stage-inner | ||
include user-edit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
form(action=typeof actionUrl!='undefined'?actionUrl:'/admin/register', method='POST').form-horizontal | ||
.control-group | ||
label(for='username').control-label 用户名 | ||
.controls | ||
input( | ||
type='text' | ||
name='user[name]' | ||
placeholder='Email' | ||
value=typeof user != 'undefined'?user.name:'' | ||
)#username.span6 | ||
.control-group | ||
label(for='password').control-label 密码 | ||
.controls | ||
input( | ||
type='password' | ||
name='user[pass]' | ||
placeholder='Password' | ||
)#password.span6 | ||
.control-group | ||
label(for='rpassword').control-label 重输密码 | ||
.controls | ||
input( | ||
type='password' | ||
name='user[rpass]' | ||
placeholder='Re enter password' | ||
)#rpassword.span6 | ||
.control-group | ||
label(for='description').control-label 描述 | ||
.controls | ||
textarea( | ||
name='user[description]' | ||
rows='5' | ||
)#description.span6 | ||
if typeof user != 'undefined' | ||
| #{user.description} | ||
|
||
.form-actions | ||
button(type='submit').btn.btn-primary 提交 | ||
| | ||
button(type='reset').btn 重填 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
extends layout | ||
|
||
block append breadcrumb | ||
li | ||
span.divider / | ||
a(href='/admin/users/') 用户管理 |