extends layout.pug
block body
.container
.content
h1 Welcome to the Admin Panel
.left
#userlist
h3 Registered Users ({{ pagination.total }})
.pgn
span.pagenum Page {{ pagination.page }} of {{ pagination.pages }}
.button(v-if="pagination.page > 1" v-on:click="getUsers(pagination.page - 1)") Previous
.button(v-for="n in pagination.pages" v-on:click="getUsers(n)" v-bind:class="{active: n == pagination.page}") {{ n }}
.button(v-if="pagination.page < pagination.pages" v-on:click="getUsers(pagination.page + 1)") Next
.list.users
.user.list-item(v-for="user in users")
.avatar
img(v-if="user.avatar_file" v-bind:src="'/usercontent/images/' + user.avatar_file")
img(v-else src="/static/image/avatar.png")
.info
.stamps
.noactive(v-if="user.activated == false" title="Not activated.")
i.fa.fa-fw.fa-envelope
.display_name {{ user.display_name }}
.username {{ user.id }} - {{ user.username }} ({{ user.uuid }})
.email {{ user.email }}
.privilege Privilege: level {{ user.nw_privilege }}
.timestamp {{ new Date(user.created_at).toString() }}
.external(v-if="!user.password")
b Used external login
.button.ban(v-if="user.bannable" v-on:click="banning = user.id")
i.fa.fa-fw.fa-ban
|Ban User
ban-modal(:show="banning", @close="banning = 0", :id="banning")
.right
#banlist
h3 Bans ({{pagination.total}})
.message.error(v-if="error") {{ error }}
.entry(v-else)
.pgn
span.pagenum Page {{ pagination.page }} of {{ pagination.pages }}
.button(v-if="pagination.page > 1" v-on:click="getBans(pagination.page - 1)") Previous
.button(v-for="n in pagination.pages" v-on:click="getBans(n)" v-bind:class="{active: n == pagination.page}") {{ n }}
.button(v-if="pagination.page < pagination.pages" v-on:click="getBans(pagination.page + 1)") Next
.list.bans
.ban.list-item(v-for="ban in bans")
.stamps
.noactive(title="Expired" v-if="ban.expired")
.fa.fa-fw.fa-ban
.info
.section
span.key User
span.value {{ ban.user.display_name }}
.section
span.key Admin
span.value {{ ban.admin.display_name }}
.section
span.key Reason
span.value {{ ban.reason }}
.section
span.key Placed
span.value {{ new Date(ban.created_at).toString() }}
.section
span.key Expires
span.value(v-if="ban.expires_at") {{ new Date(ban.expires_at).toString() }}
span.value(v-else)
b This ban is permanent.
.button.remove(@click="pardon(ban.id)") Pardon
.templates
script(type="text/x-template" id="modal-template").
script(type="text/x-template" id="ban-modal-template").