This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
IcyNet.eu/views/admin/index.pug

70 lines
2.2 KiB
Plaintext

extends layout.pug
block body
.container
.content
h1 Welcome to the Admin Panel
.left
.users
h3 Registered Users
#userlist
.right
.users
h3 Bans
#banlist
.templates
script(type="x-tmpl-mustache" id="user").
<div class="user" id="user-{{id}}">
<div class="avatar">
{{#avatar_file}}
<img src="/usercontent/images/{{avatar_file}}">
{{/avatar_file}}
{{^avatar_file}}
<img src="/static/image/avatar.png">
{{/avatar_file}}
</div>
<div class="info">
<div class="stamps">
{{^activated}}
<div class="noactive" title="Not activated"><i class="fa fa-fw fa-envelope"></i></div>
{{/activated}}
</div>
<div class="display_name">{{display_name}}</div>
<div class="username">{{id}} - {{username}}</div>
<div class="email">{{email}}</div>
<div class="privilege">Privilege: {{nw_privilege}} points</div>
<div class="timestamp">{{created_at}}</div>
{{^password}}
<div class="external"><b>Used external login</b></div>
{{/password}}
{{#bannable}}
<div class="button ban" data-id="{{id}}"><i class="fa fa-fw fa-ban"></i>Ban User</div>
{{/bannable}}
</div>
</div>
script(type="x-tmpl-mustache" id="ban").
<div class="ban" id="ban-{{user.id}}">
<div class="stamps">
{{#expired}}
<div class="noactive" title="Expired"><i class="fa fa-fw fa-ban"></i></div>
{{/expired}}
</div>
<div class="display_name">User: {{user.display_name}}</div>
<div class="display_name">Admin: {{admin.display_name}}</div>
<div class="description">Reason: {{reason}}</div>
<div class="timestamp">Placed {{created_at}}</div>
<div class="timestamp">Expires {{expires_at}}</div>
<div class="button remove" data-id="{{id}}">Pardon</div>
</div>
script(type="x-tmpl-mustache" id="banNew").
<form id="fnsubmit">
<div class="message error"></div>
<input type="hidden" name="csrf" value="#{csrf}">
<input type="hidden" name="user_id" value="{{id}}">
<label for="reason">Reason</label>
<input type="text" id="reason" name="reason">
<label for="expires_at">Expires</label>
<input type="date" id="expires_at" name="expires_at">
<input type="submit" value="Create">
</form>