You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.9 KiB
64 lines
2.9 KiB
extends ../layouts/main
|
|
block content
|
|
|
|
div(uk-grid).uk-grid-small
|
|
div(class="uk-width-1-1 uk-width-2-3@l")
|
|
form(method="POST", action=`/admin/user/${userAccount._id}`).uk-form
|
|
.uk-card.uk-card-secondary.uk-card-small
|
|
.uk-card-header
|
|
.uk-text-large= userAccount.displayName || userAccount.email
|
|
div= userAccount.username
|
|
|
|
.uk-card-body
|
|
input(type="hidden", name="username", value= userAccount.username)
|
|
input(type="hidden", name="displayName", value= userAccount.displayName)
|
|
.uk-margin
|
|
label(for="bio").uk-form-label.sr-only Bio
|
|
textarea(id="bio", name="bio", rows="4", placeholder= "Enter profile bio").uk-textarea.uk-resize-vertical= userAccount.bio
|
|
|
|
.uk-margin
|
|
div(uk-grid)
|
|
div(class="uk-width-1-1 uk-width-1-2@m")
|
|
fieldset
|
|
legend Flags
|
|
.uk-margin
|
|
div(uk-grid).uk-grid-small
|
|
label
|
|
input(id="is-admin", name="isAdmin", type="checkbox", checked= userAccount.flags.isAdmin)
|
|
| Admin
|
|
label
|
|
input(id="is-moderator", name="isModerator", type="checkbox", checked= userAccount.flags.isModerator)
|
|
| Moderator
|
|
|
|
div(class="uk-width-1-1 uk-width-1-2@m")
|
|
fieldset
|
|
legend Permissions
|
|
.uk-margin
|
|
div(uk-grid).uk-grid-small
|
|
label
|
|
input(id="can-login", name="canLogin", type="checkbox", checked= userAccount.permissions.canLogin)
|
|
| Can Login
|
|
label
|
|
input(id="can-chat", name="canChat", type="checkbox", checked= userAccount.permissions.canChat)
|
|
| Can Chat
|
|
label
|
|
input(id="can-create-links", name="canCreateLinks", type="checkbox", checked= userAccount.permissions.canCreateLinks)
|
|
| Can Create Links
|
|
.uk-card-footer
|
|
button(type="submit").uk-button.uk-button-primary Update User
|
|
|
|
div(class="uk-width-1-1 uk-width-1-3@l")
|
|
|
|
.uk-card.uk-card-secondary.uk-card-small
|
|
.uk-card-header
|
|
h4.uk-card-title #{userAccount.displayName || userAccount.username}'s Links
|
|
.uk-card-body
|
|
ul.uk-list
|
|
each link in userLinks
|
|
li
|
|
div(uk-grid).uk-grid-small
|
|
.uk-width-expand
|
|
a(href= link.href)= link.label
|
|
.uk-width-auto
|
|
a(href=`/admin/link/${link._id}`).uk-button.uk-button-default.uk-button-small
|
|
+renderButtonIcon('fa-pen', 'Edit')
|