jschan - Anonymous imageboard software. Classic look, modern features and feel. Works without JavaScript and supports Tor, I2P, Lokinet, etc.
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.

54 lines
1.7 KiB

extends ../layout.pug
include ../mixins/managenav.pug
include ../mixins/boardheader.pug
block head
title /#{board._id}/ - Staff
block content
+boardheader('Staff')
br
+managenav('staff')
hr(size=1)
.form-wrapper.flexleft
h4.no-m-p Add Staff:
form.form-post.mv-5(action=`/forms/board/${board._id}/addstaff` method='POST' enctype='application/x-www-form-urlencoded')
input(type='hidden' name='_csrf' value=csrf)
.row
.label Username
input(type='text' name='username' required)
input(type='submit', value='Add')
hr(size=1)
h4.no-m-p Current Staff:
//-ew
- const staffEntries = Object.entries(board.staff).sort((a, b) => new Date(a[1].addedDate) - new Date(b[1].addedDate));
if staffEntries.length > 0
form.form-post.nogrow(action=`/forms/board/${board._id}/deletestaff` method='POST' enctype='application/x-www-form-urlencoded')
input(type='hidden' name='_csrf' value=csrf)
.table-container.flex-left.mv-5.text-center
table
tr
th
th Username
th Date Added
th Logs
th Permissions
for staff in staffEntries
tr
td: input(type='checkbox' name='checkedstaff' value=username)
td #{staff[0]}#{user.username === staff[0] ? ' (You)' : ''}
td
time.reltime(datetime=staff[1].addedDate) #{staff[1].addedDate.toLocaleString(undefined, {hourCycle:'h23'})}
td: a(href=`/${board._id}/manage/logs.html?username=${staff[0]}`) [View]
td
if user.username !== staff[0]
a(href=`/${board._id}/manage/editstaff/${staff[0]}.html`) [Edit]
else
a(href=`/${board._id}/manage/mypermissions.html`) [View]
h4.no-m-p Delete Selected:
input(type='submit', value='Delete')
else
p None.