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.
 
 
 
 
 

53 lines
1.8 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=staff[0])
td #{staff[0]}#{user.username === staff[0] ? ' '+__('(You)') : ''}
td
time.reltime(datetime=staff[1].addedDate) #{staff[1].addedDate.toLocaleString(pageLanguage, {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')}