mirror of https://gitgud.io/fatchan/jschan.git
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.
42 lines
1.3 KiB
42 lines
1.3 KiB
extends ../layout.pug
|
|
include ../mixins/managenav.pug
|
|
include ../mixins/boardheader.pug
|
|
|
|
block head
|
|
title /#{board._id}/ - Manage Banners
|
|
|
|
block content
|
|
+boardheader('Banners')
|
|
br
|
|
+managenav('banners')
|
|
hr(size=1)
|
|
h4.no-m-p Add Banners (Max #{globalLimits.bannerFiles.total})
|
|
.form-wrapper.flexleft.mt-10
|
|
form.form-post(action=`/forms/board/${board._id}/addbanners`, enctype='multipart/form-data', method='POST')
|
|
input(type='hidden' name='_csrf' value=csrf)
|
|
.row
|
|
- const maxFiles = globalLimits.bannerFiles.max;
|
|
.label
|
|
span Banner#{maxFiles > 1 ? 's' : ''}
|
|
span.required *
|
|
if maxFiles > 1
|
|
|
|
|
|
|
|
small (Max #{maxFiles})
|
|
span.col
|
|
include ../includes/filelabel.pug
|
|
input#file(type='file', name='file' multiple required)
|
|
.upload-list
|
|
input(type='submit', value='submit')
|
|
if board.banners.length > 0
|
|
hr(size=1)
|
|
h4.no-m-p Delete Banners:
|
|
.form-wrapper.flexleft.mt-10
|
|
form.form-post(action=`/forms/board/${board._id}/deletebanners`, enctype='application/x-www-form-urlencoded', method='POST')
|
|
input(type='hidden' name='_csrf' value=csrf)
|
|
.catalog
|
|
each banner in board.banners
|
|
label.banner-check
|
|
input(type='checkbox' name='checkedbanners' value=banner)
|
|
img.board-banner(src=`/banner/${board._id}/${banner}` loading='lazy')
|
|
input(type='submit', value='delete')
|
|
|