some mobile fixes for tables and headers

isekai-main
Barış Soner Uşaklı 2 years ago
parent e53929fcac
commit 7e05905372

@ -1,4 +1,5 @@
{
"customise": "Customise",
"custom-css": "Custom CSS/SASS",
"custom-css.description": "Enter your own CSS/SASS declarations here, which will be applied after all other styles.",
"custom-css.enable": "Enable Custom CSS/SASS",

@ -1,7 +1,9 @@
{
"skins": "Skins",
"loading": "Loading Skins...",
"homepage": "Homepage",
"select-skin": "Select Skin",
"revert-skin": "Revert Skin",
"current-skin": "Current Skin",
"skin-updated": "Skin Updated",
"applied-success": "%1 skin was succesfully applied",

@ -1,7 +1,9 @@
{
"themes": "Themes",
"checking-for-installed": "Checking for installed themes...",
"homepage": "Homepage",
"select-theme": "Select Theme",
"revert-theme": "Revert Theme",
"current-theme": "Current Theme",
"no-themes": "No installed themes found",
"revert-confirm": "Are you sure you wish to restore the default NodeBB theme?",

@ -21,6 +21,8 @@
"last-seen-never": "This key has never been used.",
"no-description": "No description specified.",
"actions": "Actions",
"edit": "Edit",
"roll": "Roll",
"delete-confirm": "Are you sure you wish to delete this token? It will not be recoverable.",
"roll-confirm": "Are you sure you wish to regenerate this token? The old token will be immediately revoked and will not be recoverable."

@ -50,29 +50,31 @@
<i class="fa fa-exclamation-triangle"></i> [[admin/advanced/errors:error.404]]
</div>
<div class="card-body">
<table class="table">
<thead>
<th>[[admin/advanced/errors:route]]</th>
<th>[[admin/advanced/errors:count]]</th>
</thead>
<tbody>
{{{ each not-found }}}
<tr>
<td>{./value}</td>
<td>{./score}</td>
</tr>
{{{ end }}}
{{{ if !not-found.length }}}
<tr>
<td colspan="2">
<div class="alert alert-success">
[[admin/advanced/errors:no-routes-not-found]]
</div>
</td>
</tr>
{{{ end }}}
</tbody>
</table>
<div class="table-responsive">
<table class="table text-sm">
<thead>
<th>[[admin/advanced/errors:route]]</th>
<th>[[admin/advanced/errors:count]]</th>
</thead>
<tbody>
{{{ each not-found }}}
<tr>
<td>{./value}</td>
<td>{./score}</td>
</tr>
{{{ end }}}
{{{ if !not-found.length }}}
<tr>
<td colspan="2">
<div class="alert alert-success">
[[admin/advanced/errors:no-routes-not-found]]
</div>
</td>
</tr>
{{{ end }}}
</tbody>
</table>
</div>
</div>
</div>
</div>

@ -1,68 +1,76 @@
<div id="customise" class="customise px-lg-4">
<ul class="nav nav-pills mb-3">
<li class="nav-item"><a class="nav-link active" href="#custom-css" data-bs-toggle="tab">[[admin/appearance/customise:custom-css]]</a></li>
<li class="nav-item"><a class="nav-link" href="#custom-js" data-bs-toggle="tab">[[admin/appearance/customise:custom-js]]</a></li>
<li class="nav-item"><a class="nav-link" href="#custom-header" data-bs-toggle="tab">[[admin/appearance/customise:custom-header]]</a></li>
</ul>
<div class="tags d-flex flex-column gap-2 px-lg-4">
<div class="d-flex border-bottom py-2 m-0 sticky-top acp-page-main-header align-items-center justify-content-between flex-wrap gap-2">
<div class="d-flex flex-wrap gap-3">
<h4 class="fw-bold tracking-tight mb-0">[[admin/appearance/customise:customise]]</h4>
<ul class="nav nav-pills text-sm">
<li class="nav-item"><a class="nav-link active" href="#custom-css" data-bs-toggle="tab">[[admin/appearance/customise:custom-css]]</a></li>
<li class="nav-item"><a class="nav-link" href="#custom-js" data-bs-toggle="tab">[[admin/appearance/customise:custom-js]]</a></li>
<li class="nav-item"><a class="nav-link" href="#custom-header" data-bs-toggle="tab">[[admin/appearance/customise:custom-header]]</a></li>
</ul>
</div>
<div class="d-flex align-items-center gap-1">
<button id="save" class="btn btn-primary btn-sm fw-semibold ff-secondary w-100 text-center text-nowrap">[[admin/admin:save-changes]]</button>
</div>
</div>
<div class="tab-content">
<div class="tab-pane fade show active" id="custom-css">
<p>
[[admin/appearance/customise:custom-css.description]]
</p>
<div id="customCSS"></div>
<input type="hidden" id="customCSS-holder" value="" data-field="customCSS" />
<div id="customise" class="customise px-2">
<div class="tab-content">
<div class="tab-pane fade show active" id="custom-css">
<p>
[[admin/appearance/customise:custom-css.description]]
</p>
<div id="customCSS"></div>
<input type="hidden" id="customCSS-holder" value="" data-field="customCSS" />
<br />
<form class="form">
<div class="form-check">
<input class="form-check-input" id="useCustomCSS" type="checkbox" data-field="useCustomCSS" />
<label class="form-check-label" for="useCustomCSS">[[admin/appearance/customise:custom-css.enable]]</label>
</div>
</form>
</div>
<br />
<form class="form">
<div class="form-check">
<input class="form-check-input" id="useCustomCSS" type="checkbox" data-field="useCustomCSS" />
<label class="form-check-label" for="useCustomCSS">[[admin/appearance/customise:custom-css.enable]]</label>
</div>
</form>
</div>
<div class="tab-pane fade" id="custom-js">
<p>
[[admin/appearance/customise:custom-js.description]]
</p>
<div id="customJS"></div>
<input type="hidden" id="customJS-holder" value="" data-field="customJS" />
<div class="tab-pane fade" id="custom-js">
<p>
[[admin/appearance/customise:custom-js.description]]
</p>
<div id="customJS"></div>
<input type="hidden" id="customJS-holder" value="" data-field="customJS" />
<br />
<form class="form">
<div class="form-check">
<input class="form-check-input" id="useCustomJS" type="checkbox" data-field="useCustomJS" />
<label class="form-check-label" for="useCustomJS">[[admin/appearance/customise:custom-js.enable]]</label>
</div>
</form>
</div>
<br />
<form class="form">
<div class="form-check">
<input class="form-check-input" id="useCustomJS" type="checkbox" data-field="useCustomJS" />
<label class="form-check-label" for="useCustomJS">[[admin/appearance/customise:custom-js.enable]]</label>
</div>
</form>
</div>
<div class="tab-pane fade" id="custom-header">
<p>
[[admin/appearance/customise:custom-header.description]]
</p>
<div class="tab-pane fade" id="custom-header">
<p>
[[admin/appearance/customise:custom-header.description]]
</p>
<div id="customHTML"></div>
<input type="hidden" id="customHTML-holder" value="" data-field="customHTML" />
<div id="customHTML"></div>
<input type="hidden" id="customHTML-holder" value="" data-field="customHTML" />
<br />
<form class="form">
<div class="form-check">
<input class="form-check-input" id="useCustomHTML" type="checkbox" data-field="useCustomHTML" />
<label class="form-check-label" for="useCustomHTML">[[admin/appearance/customise:custom-header.enable]]</label>
</div>
</form>
</div>
<br />
<form class="form">
<div class="form-check">
<input class="form-check-input" id="useCustomHTML" type="checkbox" data-field="useCustomHTML" />
<label class="form-check-label" for="useCustomHTML">[[admin/appearance/customise:custom-header.enable]]</label>
<input class="form-check-input" id="enableLiveReload" type="checkbox" data-field="enableLiveReload" checked />
<label class="form-check-label" for="enableLiveReload">[[admin/appearance/customise:custom-css.livereload]]</label>
<div class="form-text">[[admin/appearance/customise:custom-css.livereload.description]]</div>
</div>
</form>
</div>
<form class="form">
<div class="form-check">
<input class="form-check-input" id="enableLiveReload" type="checkbox" data-field="enableLiveReload" checked />
<label class="form-check-label" for="enableLiveReload">[[admin/appearance/customise:custom-css.livereload]]</label>
<div class="form-text">[[admin/appearance/customise:custom-css.livereload.description]]</div>
</div>
</form>
</div>
</div>
<!-- IMPORT admin/partials/save_button.tpl -->

@ -1,11 +1,17 @@
<div id="skins" class="skins px-lg-4">
<div class="directory row text-center" id="bootstrap_themes">
<i class="fa fa-refresh fa-spin"></i> [[admin/appearance/skins:loading]]
<div class="tags d-flex flex-column gap-2 px-lg-4">
<div class="d-flex border-bottom py-2 m-0 sticky-top acp-page-main-header align-items-center justify-content-between flex-wrap gap-2">
<div class="">
<h4 class="fw-bold tracking-tight mb-0">[[admin/appearance/skins:skins]]</h4>
</div>
<div class="d-flex align-items-center gap-1">
<div data-type="bootswatch" data-theme="" data-css="">
<button data-action="use" class="btn btn-primary btn-sm text-nowrap" type="button">[[admin/appearance/skins:revert-skin]]</button>
</div>
</div>
</div>
<div data-type="bootswatch" data-theme="" data-css="">
<button data-action="use" class="btn btn-primary position-fixed bottom-0 end-0 px-3 py-2 mb-4 me-4 rounded-circle fs-4" type="button" style="width: 64px; height: 64px;">
<i class="fa fa-fw fas fa-rotate-left"></i>
</button>
<div id="skins" class="skins px-2">
<div class="directory row text-center" id="bootstrap_themes">
<i class="fa fa-refresh fa-spin"></i> [[admin/appearance/skins:loading]]
</div>
</div>
</div>

@ -1,9 +1,16 @@
<div id="themes" class="themes px-lg-4">
<div class="directory row text-center" id="installed_themes">
<i class="fa fa-refresh fa-spin"></i> [[admin/appearance/themes:checking-for-installed]]
<div class="tags d-flex flex-column gap-2 px-lg-4">
<div class="d-flex border-bottom py-2 m-0 sticky-top acp-page-main-header align-items-center justify-content-between flex-wrap gap-2">
<div class="">
<h4 class="fw-bold tracking-tight mb-0">[[admin/appearance/themes:themes]]</h4>
</div>
<div class="d-flex align-items-center gap-1">
<button id="revert_theme" class="btn btn-primary btn-sm text-nowrap">[[admin/appearance/themes:revert-theme]]</button>
</div>
</div>
</div>
<button id="revert_theme" class="btn btn-primary position-fixed bottom-0 end-0 px-3 py-2 mb-4 me-4 rounded-circle fs-4" type="button" style="width: 64px; height: 64px;">
<i class="fa fa-fw fas fa-rotate-left"></i>
</button>
<div id="themes" class="themes px-2">
<div class="directory row text-center" id="installed_themes">
<i class="fa fa-refresh fa-spin"></i> [[admin/appearance/themes:checking-for-installed]]
</div>
</div>
</div>

@ -4,28 +4,30 @@
<!-- IMPORT admin/partials/dashboard/stats.tpl -->
<div class="alert alert-info">[[admin/dashboard:details.logins-static, {loginDays}]]</div>
<table class="table">
<thead>
<th class="text-muted">[[admin/manage/users:users.username]]</th>
<th data-sort="joindate">[[admin/dashboard:details.logins-login-time]]</th>
</thead>
<tbody>
{{{ if !sessions.length}}}
<tr>
<td colspan=4" class="text-center"><em>[[admin/dashboard:details.no-logins]]</em></td>
</tr>
{{{ end }}}
{{{ each sessions }}}
<tr>
<td class="d-flex gap-2 align-items-center">
<a href="{config.relative_path}/uid/{./user.uid}">{buildAvatar(./user, "18px", true)}</a>
<a href="{config.relative_path}/uid/{./user.uid}">{./user.username}</a>
{function.userAgentIcons} {../browser} {../version} on {../platform}
</td>
<td><span class="timeago" title="{./datetimeISO}"></span></td>
</tr>
{{{ end }}}
</tbody>
</table>
<div class="table-responsive">
<table class="table text-sm">
<thead>
<th class="text-muted">[[admin/manage/users:users.username]]</th>
<th data-sort="joindate">[[admin/dashboard:details.logins-login-time]]</th>
</thead>
<tbody>
{{{ if !sessions.length}}}
<tr>
<td colspan=4" class="text-center"><em>[[admin/dashboard:details.no-logins]]</em></td>
</tr>
{{{ end }}}
{{{ each sessions }}}
<tr>
<td class="d-flex gap-2 align-items-center">
<a href="{config.relative_path}/uid/{./user.uid}">{buildAvatar(./user, "18px", true)}</a>
<a href="{config.relative_path}/uid/{./user.uid}">{./user.username}</a>
{function.userAgentIcons} {../browser} {../version} on {../platform}
</td>
<td><span class="timeago" title="{./datetimeISO}"></span></td>
</tr>
{{{ end }}}
</tbody>
</table>
</div>
</div>
</div>

@ -1,22 +1,22 @@
<div class="row dashboard px-lg-4">
<div class="col-12">
<div class="d-flex justify-content-end gap-2 mb-3">
<form class="row row-cols-lg-auto g-3 align-items-center" method="GET">
<div class="col-12 d-flex align-items-center gap-2">
<label class="form-label mb-0" for="start">[[admin/dashboard:start]]</label>
<input type="date" class="form-control form-control-sm" id="start" name="start" value="{startDate}">
</div>
<div class="col-12 d-flex align-items-center gap-2">
<label class="form-label mb-0" for="end">[[admin/dashboard:end]]</label>
<input type="date" class="form-control form-control-sm" id="end" name="end" value="{endDate}">
</div>
<div class="col-12">
<button onclick="$('form').submit();return false;"class="btn btn-primary btn-sm" type="submit">Filter</button>
</div>
</form>
</div>
<table class="table table-sm search-list">
<form class="d-flex flex-wrap gap-3 align-sm-items-center mb-3" method="GET">
<div class="d-flex align-items-center gap-2">
<label class="form-label mb-0" for="start">[[admin/dashboard:start]]</label>
<input type="date" class="form-control form-control-sm w-auto" id="start" name="start" value="{startDate}">
</div>
<div class="d-flex align-items-center gap-2">
<label class="form-label mb-0" for="end">[[admin/dashboard:end]]</label>
<input type="date" class="form-control form-control-sm w-auto" id="end" name="end" value="{endDate}">
</div>
<div class="">
<button onclick="$('form').submit();return false;"class="btn btn-primary btn-sm" type="submit">[[admin/dashboard:filter]]</button>
</div>
</form>
<table class="table table-sm text-sm search-list">
<thead>
<th class="text-end">Count</th>
<th>Term</th>

@ -2,22 +2,23 @@
<div class="col-12">
<!-- IMPORT admin/partials/dashboard/graph.tpl -->
<!-- IMPORT admin/partials/dashboard/stats.tpl -->
<table class="table topics-list">
<tbody>
{{{ if !topics.length}}}
<tr>
<td colspan=4" class="text-center"><em>[[admin/dashboard:details.no-topics]]</em></td>
</tr>
{{{ end }}}
{{{ each topics }}}
<tr>
<td><a href="{config.relative_path}/topic/{../slug}">{../title}</a></td>
<td>[[topic:posted_by, {../user.username}]]</td>
<td><span class="timeago" data-title="{../timestampISO}"></span></td>
</tr>
{{{ end }}}
</tbody>
</table>
<div class="table-responsive">
<table class="table topics-list text-sm">
<tbody>
{{{ if !topics.length}}}
<tr>
<td colspan=4" class="text-center"><em>[[admin/dashboard:details.no-topics]]</em></td>
</tr>
{{{ end }}}
{{{ each topics }}}
<tr>
<td><a href="{config.relative_path}/topic/{../slug}">{../title}</a></td>
<td>[[topic:posted_by, {../user.username}]]</td>
<td><span class="timeago" data-title="{../timestampISO}"></span></td>
</tr>
{{{ end }}}
</tbody>
</table>
</div>
</div>
</div>

@ -3,28 +3,30 @@
<!-- IMPORT admin/partials/dashboard/graph.tpl -->
<!-- IMPORT admin/partials/dashboard/stats.tpl -->
<table class="table users-list">
<thead>
<th class="text-muted">[[admin/manage/users:users.uid]]</th>
<th class="text-muted">[[admin/manage/users:users.username]]</th>
<th class="text-muted">[[admin/manage/users:users.email]]</th>
<th data-sort="joindate">[[admin/manage/users:users.joined]]</th>
</thead>
<tbody>
{{{ if !users.length}}}
<tr>
<td colspan=4" class="text-center"><em>[[admin/dashboard:details.no-logins]]</em></td>
</tr>
{{{ end }}}
{{{ each users }}}
<tr>
<td>{../uid}</td>
<td>{../username}</td>
<td>{../email}</td>
<td><span class="timeago" title="{../joindateISO}"></span></td>
</tr>
{{{ end }}}
</tbody>
</table>
<div class="table-responsive">
<table class="table users-list text-sm">
<thead>
<th class="text-muted">[[admin/manage/users:users.uid]]</th>
<th class="text-muted">[[admin/manage/users:users.username]]</th>
<th class="text-muted">[[admin/manage/users:users.email]]</th>
<th data-sort="joindate">[[admin/manage/users:users.joined]]</th>
</thead>
<tbody>
{{{ if !users.length}}}
<tr>
<td colspan=4" class="text-center"><em>[[admin/dashboard:details.no-users]]</em></td>
</tr>
{{{ end }}}
{{{ each users }}}
<tr>
<td>{../uid}</td>
<td>{../username}</td>
<td>{../email}</td>
<td><span class="timeago" title="{../joindateISO}"></span></td>
</tr>
{{{ end }}}
</tbody>
</table>
</div>
</div>
</div>

@ -17,7 +17,7 @@
{{{ each active }}}
<li data-rid="{active.rid}" data-id="{active.id}">
<div class="d-flex gap-1 mb-3 flex-wrap">
<form class="main d-flex gap-1">
<form class="main d-flex gap-1 flex-wrap">
<div class="card card-body m-0 if-block border-info border border-2">
<label class="form-label" for="condition-if-users">[[admin/extend/rewards:condition-if-users]]</label>
<select id="condition-if-users" class="form-select form-select-sm" name="condition" data-selected="{active.condition}">
@ -52,7 +52,7 @@
</form>
</div>
<div class="d-flex justify-content-between align-items-center">
<div class="d-flex justify-content-between align-items-center gap-2">
<form class="main d-flex gap-1 align-items-start gap-2">
<div class="d-flex flex-column gap-0">
<label class="form-label" for="claimable">[[admin/extend/rewards:max-claims]]</label>
@ -63,13 +63,12 @@
<input id="claimable" class="form-control form-control-sm" type="text" name="claimable" value="{active.claimable}" placeholder="1" style="max-width: 64px;"/>
</form>
<div class="">
<div class="d-flex gap-1 align-self-start">
<button class="btn btn-light btn-sm toggle text-nowrap disable {{{ if active.disabled }}}hidden{{{ end }}}"><i class="fa fa-ban text-danger"></i> [[admin/extend/rewards:disable]]</button>
<button class="btn btn-light btn-sm toggle disable {{{ if active.disabled }}}hidden{{{ end }}}"><i class="fa fa-ban text-danger"></i> [[admin/extend/rewards:disable]]</button>
<button class="btn btn-light btn-sm toggle text-nowrap enable {{{ if !active.disabled }}}hidden{{{ end }}}"><i class="fa fa-check text-success"></i> [[admin/extend/rewards:enable]]</button>
<button class="btn btn-light btn-sm toggle enable {{{ if !active.disabled }}}hidden{{{ end }}}"><i class="fa fa-check text-success"></i> [[admin/extend/rewards:enable]]</button>
<button class="btn btn-light btn-sm delete"><i class="fa fa-trash text-danger"></i> [[admin/extend/rewards:delete]]</button>
<button class="btn btn-light btn-sm text-nowrap delete"><i class="fa fa-trash text-danger"></i> [[admin/extend/rewards:delete]]</button>
</div>
</div>

@ -6,7 +6,7 @@
</div>
<div>
<div class="d-flex gap-2 justify-content-between align-items-center mb-2">
<div class="d-flex gap-2 justify-content-between align-items-center mb-2 flex-wrap">
<h4 class="mb-0">[[admin/manage/admins-mods:administrators]]</h4>
<input id="admin-search" class="form-control form-control-sm w-auto" placeholder="[[admin/manage/admins-mods:add-administrator]]" />
</div>
@ -24,7 +24,7 @@
<hr/>
<div>
<div class="d-flex gap-2 justify-content-between align-items-center mb-2">
<div class="d-flex gap-2 justify-content-between align-items-center mb-2 flex-wrap">
<h4 class="mb-0">{{{ if globalMods.icon }}}<i class="fa {globalMods.icon}"></i> {{{ end }}}[[admin/manage/admins-mods:global-moderators]]</h4>
<input id="global-mod-search" class="form-control form-control-sm w-auto" placeholder="[[admin/manage/admins-mods:add-global-moderator]]" />
</div>
@ -62,8 +62,8 @@
<hr>
{{{ end }}}
<div class="categories category-wrapper mb-4">
<div class="d-flex gap-2 justify-content-between align-items-center mb-2">
<div class="d-flex gap-2 align-items-center">
<div class="d-flex gap-2 justify-content-between flex-column flex-md-row align-items-start align-items-md-center mb-2 flex-wrap">
<div class="d-flex flex-column flex-md-row gap-2 align-items-md-center">
<div class="d-flex gap-1 align-items-center">
{buildCategoryIcon(@value, "28px", "rounded-1")}
<h5 class="mb-0">{categoryMods.name}</h5>

@ -4,7 +4,7 @@
<h4 class="fw-bold tracking-tight mb-0">[[admin/manage/categories:manage-categories]]</h4>
</div>
<div class="d-flex gap-1">
<button id="toggle-collapse-all" class="btn-ghost-sm" data-collapsed="0">[[admin/manage/categories:collapse-all]]</button>
<button id="toggle-collapse-all" class="btn-ghost-sm text-nowrap" data-collapsed="0">[[admin/manage/categories:collapse-all]]</button>
<!-- IMPORT admin/partials/category/selector-dropdown-right.tpl -->

@ -16,51 +16,53 @@
<div class="row groups">
<div class="col-12">
<table class="table groups-list">
<thead>
<tr>
<th>[[admin/manage/groups:name]]</th>
<th>[[admin/manage/groups:badge]]</th>
<th>[[admin/manage/groups:properties]]</th>
<th></th>
</tr>
</thead>
<tbody>
{{{ each groups }}}
<tr data-groupname="{./displayName}" data-name-encoded="{./nameEncoded}">
<td>
<a href="{config.relative_path}/admin/manage/groups/{./slug}">{./displayName}</a> ({./memberCount})
<p class="description text-xs text-muted m-0">{./description}</p>
</td>
<td>
<span class="badge" style="color:{./textColor}; background-color: {./labelColor};">{{{ if ./icon }}}<i class="fa {./icon}"></i> {{{ end }}}{./userTitle}</span>
</td>
<td>
{{{ if ./system }}}
<span class="badge bg-danger">[[admin/manage/groups:system]]</span>
{{{ end }}}
{{{ if ./private }}}
<span class="badge bg-primary">[[admin/manage/groups:private]]</span>
{{{ end }}}
{{{ if ./hidden }}}
<span class="badge bg-secondary">[[admin/manage/groups:hidden]]</span>
{{{ end }}}
</td>
<div class="table-responsive">
<table class="table groups-list">
<thead>
<tr>
<th>[[admin/manage/groups:name]]</th>
<th>[[admin/manage/groups:badge]]</th>
<th>[[admin/manage/groups:properties]]</th>
<th></th>
</tr>
</thead>
<tbody>
{{{ each groups }}}
<tr data-groupname="{./displayName}" data-name-encoded="{./nameEncoded}">
<td>
<a href="{config.relative_path}/admin/manage/groups/{./slug}">{./displayName}</a> ({./memberCount})
<p class="description text-xs text-muted m-0">{./description}</p>
</td>
<td>
<span class="badge" style="color:{./textColor}; background-color: {./labelColor};">{{{ if ./icon }}}<i class="fa {./icon}"></i> {{{ end }}}{./userTitle}</span>
</td>
<td>
{{{ if ./system }}}
<span class="badge bg-danger">[[admin/manage/groups:system]]</span>
{{{ end }}}
{{{ if ./private }}}
<span class="badge bg-primary">[[admin/manage/groups:private]]</span>
{{{ end }}}
{{{ if ./hidden }}}
<span class="badge bg-secondary">[[admin/manage/groups:hidden]]</span>
{{{ end }}}
</td>
<td>
<div class="d-flex justify-content-end gap-1">
<a href="{config.relative_path}/groups/{groups.slug}" class="btn btn-light btn-sm">[[admin/admin:view]]</a>
<td>
<div class="d-flex justify-content-end gap-1">
<a href="{config.relative_path}/groups/{groups.slug}" class="btn btn-light btn-sm">[[admin/admin:view]]</a>
<a href="{config.relative_path}/admin/manage/groups/{groups.slug}" class="btn btn-light btn-sm">[[admin/admin:edit]]</a>
<a href="{config.relative_path}/admin/manage/groups/{groups.slug}" class="btn btn-light btn-sm">[[admin/admin:edit]]</a>
<button class="btn btn-light btn-sm {{{ if groups.system }}} disabled {{{ end }}}" data-action="delete"><i class="fa fa-trash text-danger"></i></button>
</div>
</td>
</tr>
{{{ end }}}
</tbody>
</table>
<button class="btn btn-light btn-sm {{{ if groups.system }}} disabled {{{ end }}}" data-action="delete"><i class="fa fa-trash text-danger"></i></button>
</div>
</td>
</tr>
{{{ end }}}
</tbody>
</table>
</div>
<!-- IMPORT admin/partials/paginator.tpl -->
</div>

@ -4,9 +4,9 @@
<div class="">
<h4 class="fw-bold tracking-tight mb-0">[[admin/manage/tags:manage-tags]]</h4>
</div>
<div class="d-flex align-items-center gap-1">
<div class="input-group">
<input class="form-control form-control-sm" type="text" id="tag-search" placeholder="[[admin/manage/tags:search]]"/>
<div class="d-flex align-items-center gap-1 flex-wrap">
<div class="input-group flex-nowrap w-auto">
<input class="form-control form-control-sm w-auto" type="text" id="tag-search" placeholder="[[admin/manage/tags:search]]"/>
<span class="input-group-text"><i class="fa fa-search"></i></span>
</div>

@ -4,10 +4,10 @@
<div class="">
<h4 class="fw-bold tracking-tight mb-0">[[admin/manage/users:manage-users]]</h4>
</div>
<div class="d-flex align-items-center gap-3">
<div class="d-flex gap-1 align-items-stretch">
<div class="input-group">
<input type="text" class="form-control form-control-sm" placeholder="[[global:search]]" id="user-search" value="{query}">
<div class="d-flex align-items-center gap-3 flex-wrap">
<div class="d-flex gap-1 align-items-stretch flex-wrap">
<div class="input-group flex-nowrap w-auto">
<input type="text" class="form-control form-control-sm w-auto" placeholder="[[global:search]]" id="user-search" value="{query}">
<span class="input-group-text px-2 search-button"><i class="fa fa-search"></i></span>
</div>
<select id="user-search-by" class="form-select form-select-sm w-auto">

@ -24,12 +24,19 @@
</div>
</div>
<div class="flex-shrink-0 d-flex gap-1 align-items-start">
<a href="{{{if ./link}}}{./link}{{{else}}}{config.relative_path}/category/{./cid}{{{end}}}" class="btn btn-light btn-sm" target="_blank">[[admin/admin:view]]</a>
<a href="./categories/{./cid}" class="btn btn-light btn-sm">[[admin/manage/categories:edit]]</a>
<a href="{{{if ./link}}}{./link}{{{else}}}{config.relative_path}/category/{./cid}{{{end}}}" class="btn btn-light btn-sm d-none d-sm-block" target="_blank">[[admin/admin:view]]</a>
<a href="./categories/{./cid}" class="btn btn-light btn-sm d-none d-sm-block">[[admin/manage/categories:edit]]</a>
<div class="category-tools">
<button class="btn btn-light btn-sm dropdown-toggle" data-bs-toggle="dropdown" type="button"><i class="fa fa-fw fa-gear text-primary"></i></button>
<ul class="dropdown-menu dropdown-menu-end p-1">
<li><a href="{{{if ./link}}}{./link}{{{else}}}{config.relative_path}/category/{./cid}{{{end}}}" class="dropdown-item rounded-1 d-block d-sm-none" target="_blank">[[admin/admin:view]]</a></li>
<li><a href="./categories/{./cid}" class="dropdown-item rounded-1 d-block d-sm-none">[[admin/manage/categories:edit]]</a></li>
<li><a class="dropdown-item rounded-1" href="./categories/{categories.cid}/analytics">[[admin/manage/categories:analytics]]</a></li>
<li><a class="dropdown-item rounded-1" href="{config.relative_path}/admin/manage/privileges/{categories.cid}">[[admin/manage/categories:privileges]]</a></li>
<li><a href="#" class="set-order dropdown-item rounded-1" data-cid="{categories.cid}" data-order="{categories.order}">[[admin/manage/categories:set-order]]</a></li>

@ -19,12 +19,12 @@
<p class="text-xs mb-0">[[admin/extend/plugins:plugin-item.more-info]] <a target="_blank" href="{./url}">{./url}</a></p>
{{{ end }}}
</div>
<div class="">
<button data-action="toggleActive" class="btn btn-light btn-sm hidden">
<div class="d-flex flex-column gap-1">
<button data-action="toggleActive" class="btn btn-light btn-sm hidden text-nowrap">
<i class="fa fa-power-off text-primary"></i> [[admin/extend/plugins:plugin-item.activate]]
</button>
<button data-action="toggleInstall" data-installed="0" class="btn btn-light btn-sm">
<button data-action="toggleInstall" data-installed="0" class="btn btn-light btn-sm text-nowrap">
<i class="fa fa-download text-primary"></i> [[admin/extend/plugins:plugin-item.install]]
</button>
</div>

@ -25,31 +25,31 @@
{{{ end }}}
</div>
<div class="controls">
<div class="controls d-flex flex-column gap-1">
{{{ if ./installed }}}
{{{ if ./isTheme }}}
<a href="{config.relative_path}/admin/appearance/themes" class="btn btn-light btn-sm"><i class="fa fa-arrow-up-right-from-square text-primary"></i> [[admin/extend/plugins:plugin-item.themes]]</a>
<a href="{config.relative_path}/admin/appearance/themes" class="btn btn-light btn-sm text-nowrap"><i class="fa fa-arrow-up-right-from-square text-primary"></i> [[admin/extend/plugins:plugin-item.themes]]</a>
{{{ else }}}
<button data-action="toggleActive" class="btn btn-light btn-sm {{{ if !./active }}}hidden{{{ end }}} {{{ if !canChangeState }}}disabled{{{ end }}}">
<button data-action="toggleActive" class="btn btn-light btn-sm text-nowrap {{{ if !./active }}}hidden{{{ end }}} {{{ if !canChangeState }}}disabled{{{ end }}}">
<i class="fa fa-power-off text-danger"></i> [[admin/extend/plugins:plugin-item.deactivate]]
</button>
<button data-action="toggleActive" class="btn btn-light btn-sm {{{ if ./active }}}hidden{{{ end }}} {{{ if !canChangeState }}}disabled{{{ end }}}">
<button data-action="toggleActive" class="btn btn-light btn-sm text-nowrap {{{ if ./active }}}hidden{{{ end }}} {{{ if !canChangeState }}}disabled{{{ end }}}">
<i class="fa fa-power-off text-primary"></i> [[admin/extend/plugins:plugin-item.activate]]
</button>
{{{ end }}}
<button data-action="toggleInstall" data-installed="1" class="btn btn-light btn-sm"><i class="fa fa-trash text-danger"></i> [[admin/extend/plugins:plugin-item.uninstall]]</button>
<button data-action="toggleInstall" data-installed="1" class="btn btn-light btn-sm text-nowrap"><i class="fa fa-trash text-danger"></i> [[admin/extend/plugins:plugin-item.uninstall]]</button>
{{{ if ./active }}}
{{{ if ./settingsRoute }}}
<a href="{config.relative_path}{./settingsRoute}" class="btn btn-light btn-sm"><i class="fa fa-wrench text-primary"></i> [[admin/extend/plugins:plugin-item.settings]]</a>
<a href="{config.relative_path}{./settingsRoute}" class="btn btn-light btn-sm text-nowrap"><i class="fa fa-wrench text-primary"></i> [[admin/extend/plugins:plugin-item.settings]]</a>
{{{ end }}}
{{{ end }}}
{{{ else }}}
<button data-action="toggleInstall" data-installed="0" class="btn btn-light btn-sm"><i class="fa fa-download text-primary"></i> [[admin/extend/plugins:plugin-item.install]]</button>
<button data-action="toggleInstall" data-installed="0" class="btn btn-light btn-sm text-nowrap"><i class="fa fa-download text-primary"></i> [[admin/extend/plugins:plugin-item.install]]</button>
{{{ end }}}
</div>

@ -1,88 +1,90 @@
<label>[[admin/manage/privileges:group-privileges]]</label>
<table class="table privilege-table">
<thead>
<tr class="privilege-table-header">
<th class="privilege-filters" colspan="100">
<div class="btn-toolbar justify-content-end gap-1">
<button type="button" data-filter="3,5" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-viewing]]</button>
<button type="button" data-filter="6,15" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-posting]]</button>
<button type="button" data-filter="16,18" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-moderation]]</button>
{{{ if privileges.columnCountGroupOther }}}
<button type="button" data-filter="19,99" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-other]]</button>
<div class="table-responsive">
<table class="table privilege-table text-sm">
<thead>
<tr class="privilege-table-header">
<th class="privilege-filters" colspan="100">
<div class="btn-toolbar justify-content-end gap-1">
<button type="button" data-filter="3,5" class="btn btn-outline-secondary btn-sm">[[admin/manage/categories:privileges.section-viewing]]</button>
<button type="button" data-filter="6,15" class="btn btn-outline-secondary btn-sm">[[admin/manage/categories:privileges.section-posting]]</button>
<button type="button" data-filter="16,18" class="btn btn-outline-secondary btn-sm">[[admin/manage/categories:privileges.section-moderation]]</button>
{{{ if privileges.columnCountGroupOther }}}
<button type="button" data-filter="19,99" class="btn btn-outline-secondary btn-sm">[[admin/manage/categories:privileges.section-other]]</button>
{{{ end }}}
</div>
</th>
</tr><tr><!-- zebrastripe reset --></tr>
<tr>
<th colspan="2">[[admin/manage/categories:privileges.section-group]]</th>
<th class="text-center">[[admin/manage/privileges:select-clear-all]]</th>
{{{ each privileges.labels.groups }}}
<th class="text-center">{@value}</th>
{{{ end }}}
</div>
</th>
</tr><tr><!-- zebrastripe reset --></tr>
<tr>
<th colspan="2">[[admin/manage/categories:privileges.section-group]]</th>
<th class="text-center">[[admin/manage/privileges:select-clear-all]]</th>
{{{ each privileges.labels.groups }}}
<th class="text-center">{@value}</th>
{{{ end }}}
</tr>
</thead>
<tbody>
{{{ each privileges.groups }}}
<tr data-group-name="{privileges.groups.nameEscaped}" data-private="{{{ if privileges.groups.isPrivate }}}1{{{ else }}}0{{{ end }}}">
<td>
{{{ if privileges.groups.isPrivate }}}
{{{ if (privileges.groups.name == "banned-users") }}}
<i class="fa fa-fw fa-exclamation-triangle text-muted" title="[[admin/manage/categories:privileges.inheritance-exception]]"></i>
</tr>
</thead>
<tbody>
{{{ each privileges.groups }}}
<tr data-group-name="{privileges.groups.nameEscaped}" data-private="{{{ if privileges.groups.isPrivate }}}1{{{ else }}}0{{{ end }}}">
<td>
{{{ if privileges.groups.isPrivate }}}
{{{ if (privileges.groups.name == "banned-users") }}}
<i class="fa fa-fw fa-exclamation-triangle text-muted" title="[[admin/manage/categories:privileges.inheritance-exception]]"></i>
{{{ else }}}
<i class="fa fa-fw fa-lock text-muted" title="[[admin/manage/categories:privileges.group-private]]"></i>
{{{ end }}}
{{{ else }}}
<i class="fa fa-fw fa-lock text-muted" title="[[admin/manage/categories:privileges.group-private]]"></i>
<i class="fa fa-fw fa-none"></i>
{{{ end }}}
{{{ else }}}
<i class="fa fa-fw fa-none"></i>
{{{ end }}}
{privileges.groups.name}
</td>
<td>
<div class="dropdown">
<button class="btn btn-outline-secondary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<i class="fa fa-copy"></i>
</button>
<ul class="dropdown-menu">
<li data-action="copyToAllGroup"><a class="dropdown-item" href="#">[[admin/manage/categories:privileges.copy-group-privileges-to-all-categories]]</a></li>
<li data-action="copyToChildrenGroup"><a class="dropdown-item" href="#">[[admin/manage/categories:privileges.copy-group-privileges-to-children]]</a></li>
<li data-action="copyPrivilegesFromGroup"><a class="dropdown-item" href="#">[[admin/manage/categories:privileges.copy-group-privileges-from]]</a></li>
</ul>
</div>
</td>
<td class="">
<div class="form-check text-center">
<input autocomplete="off" type="checkbox" class="form-check-input float-none checkbox-helper">
</div>
</td>
{function.spawnPrivilegeStates, privileges.groups.name, ../privileges}
</tr>
{{{ end }}}
</tbody>
<tfoot>
<tr>
<td colspan="3"></td>
<td colspan="{privileges.keys.groups.length}">
<div class="btn-toolbar justify-content-end gap-1">
<button type="button" class="btn btn-sm btn-outline-secondary" data-ajaxify="false" data-action="search.group">
<i class="fa fa-users"></i>
[[admin/manage/categories:privileges.search-group]]
</button>
<button type="button" class="btn btn-sm btn-outline-secondary" data-ajaxify="false" data-action="copyPrivilegesFrom">
<i class="fa fa-copy"></i>
[[admin/manage/categories:privileges.copy-from-category]]
</button>
<button type="button" class="btn btn-sm btn-outline-secondary" data-ajaxify="false" data-action="copyToChildren">
<i class="fa fa-copy"></i>
[[admin/manage/categories:privileges.copy-to-children]]
</button>
<button type="button" class="btn btn-sm btn-outline-secondary" data-ajaxify="false" data-action="copyToAll">
<i class="fa fa-copy"></i>
[[admin/manage/categories:privileges.copy-privileges-to-all-categories]]
</button>
</div>
</td>
</tr>
</tfoot>
</table>
{privileges.groups.name}
</td>
<td>
<div class="dropdown">
<button class="btn btn-outline-secondary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<i class="fa fa-copy"></i>
</button>
<ul class="dropdown-menu">
<li data-action="copyToAllGroup"><a class="dropdown-item" href="#">[[admin/manage/categories:privileges.copy-group-privileges-to-all-categories]]</a></li>
<li data-action="copyToChildrenGroup"><a class="dropdown-item" href="#">[[admin/manage/categories:privileges.copy-group-privileges-to-children]]</a></li>
<li data-action="copyPrivilegesFromGroup"><a class="dropdown-item" href="#">[[admin/manage/categories:privileges.copy-group-privileges-from]]</a></li>
</ul>
</div>
</td>
<td class="">
<div class="form-check text-center">
<input autocomplete="off" type="checkbox" class="form-check-input float-none checkbox-helper">
</div>
</td>
{function.spawnPrivilegeStates, privileges.groups.name, ../privileges}
</tr>
{{{ end }}}
</tbody>
<tfoot>
<tr>
<td colspan="3"></td>
<td colspan="{privileges.keys.groups.length}">
<div class="btn-toolbar justify-content-end gap-1 flex-nowrap">
<button type="button" class="btn btn-sm btn-outline-secondary text-nowrap" data-ajaxify="false" data-action="search.group">
<i class="fa fa-users"></i>
[[admin/manage/categories:privileges.search-group]]
</button>
<button type="button" class="btn btn-sm btn-outline-secondary text-nowrap" data-ajaxify="false" data-action="copyPrivilegesFrom">
<i class="fa fa-copy"></i>
[[admin/manage/categories:privileges.copy-from-category]]
</button>
<button type="button" class="btn btn-sm btn-outline-secondary text-nowrap" data-ajaxify="false" data-action="copyToChildren">
<i class="fa fa-copy"></i>
[[admin/manage/categories:privileges.copy-to-children]]
</button>
<button type="button" class="btn btn-sm btn-outline-secondary text-nowrap" data-ajaxify="false" data-action="copyToAll">
<i class="fa fa-copy"></i>
[[admin/manage/categories:privileges.copy-privileges-to-all-categories]]
</button>
</div>
</td>
</tr>
</tfoot>
</table>
</div>
<div class="form-text">
[[admin/manage/categories:privileges.inherit]]
</div>
@ -90,61 +92,63 @@
<hr/>
<label>[[admin/manage/privileges:user-privileges]]</label>
<table class="table privilege-table">
<thead>
<tr class="privilege-table-header">
<th class="privilege-filters" colspan="100">
<div class="btn-toolbar justify-content-end gap-1">
<button type="button" data-filter="3,5" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-viewing]]</button>
<button type="button" data-filter="6,15" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-posting]]</button>
<button type="button" data-filter="16,18" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-moderation]]</button>
{{{ if privileges.columnCountUserOther }}}
<button type="button" data-filter="19,99" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-other]]</button>
<div class="table-responsive">
<table class="table privilege-table text-sm">
<thead>
<tr class="privilege-table-header">
<th class="privilege-filters" colspan="100">
<div class="btn-toolbar justify-content-end gap-1 flex-nowrap">
<button type="button" data-filter="3,5" class="btn btn-outline-secondary btn-sm text-nowrap">[[admin/manage/categories:privileges.section-viewing]]</button>
<button type="button" data-filter="6,15" class="btn btn-outline-secondary btn-sm text-nowrap">[[admin/manage/categories:privileges.section-posting]]</button>
<button type="button" data-filter="16,18" class="btn btn-outline-secondary btn-sm text-nowrap">[[admin/manage/categories:privileges.section-moderation]]</button>
{{{ if privileges.columnCountUserOther }}}
<button type="button" data-filter="19,99" class="btn btn-outline-secondary btn-sm text-nowrap">[[admin/manage/categories:privileges.section-other]]</button>
{{{ end }}}
</div>
</th>
</tr><tr><!-- zebrastripe reset --></tr>
<tr>
<th colspan="2">[[admin/manage/categories:privileges.section-user]]</th>
<th class="text-center">[[admin/manage/privileges:select-clear-all]]</th>
{{{ each privileges.labels.users }}}
<th class="text-center">{@value}</th>
{{{ end }}}
</div>
</th>
</tr><tr><!-- zebrastripe reset --></tr>
<tr>
<th colspan="2">[[admin/manage/categories:privileges.section-user]]</th>
<th class="text-center">[[admin/manage/privileges:select-clear-all]]</th>
{{{ each privileges.labels.users }}}
<th class="text-center">{@value}</th>
</tr>
</thead>
<tbody>
{{{ each privileges.users }}}
<tr data-uid="{privileges.users.uid}"{{{ if privileges.users.banned }}} data-banned{{{ end }}}>
<td>
{buildAvatar(privileges.users, "24px", true)}
{{{ if privileges.users.banned }}}
<i class="ban fa fa-gavel text-danger" title="[[admin/manage/categories:privileges.banned-user-inheritance]]"></i>
{{{ end }}}
{privileges.users.username}
</td>
<td>
<!-- need this empty -->
</td>
<td class="">
<div class="form-check text-center">
<input autocomplete="off" type="checkbox" class="form-check-input float-none checkbox-helper">
</div>
</td>
{function.spawnPrivilegeStates, privileges.users.username, ../privileges}
</tr>
{{{ end }}}
</tr>
</thead>
<tbody>
{{{ each privileges.users }}}
<tr data-uid="{privileges.users.uid}"{{{ if privileges.users.banned }}} data-banned{{{ end }}}>
<td>
{buildAvatar(privileges.users, "24px", true)}
{{{ if privileges.users.banned }}}
<i class="ban fa fa-gavel text-danger" title="[[admin/manage/categories:privileges.banned-user-inheritance]]"></i>
{{{ end }}}
{privileges.users.username}
</td>
<td>
<!-- need this empty -->
</td>
<td class="">
<div class="form-check text-center">
<input autocomplete="off" type="checkbox" class="form-check-input float-none checkbox-helper">
</div>
</td>
{function.spawnPrivilegeStates, privileges.users.username, ../privileges}
</tr>
{{{ end }}}
</tbody>
<tfoot>
<tr>
<td colspan="3"></td>
<td colspan="{privileges.keys.users.length}">
<div class="btn-toolbar justify-content-end">
<button type="button" class="btn btn-sm btn-outline-secondary" data-ajaxify="false" data-action="search.user">
<i class="fa fa-user"></i>
[[admin/manage/categories:privileges.search-user]]
</button>
</div>
</td>
</tr>
</tfoot>
</table>
</tbody>
<tfoot>
<tr>
<td colspan="3"></td>
<td colspan="{privileges.keys.users.length}">
<div class="btn-toolbar justify-content-end">
<button type="button" class="btn btn-sm btn-outline-secondary" data-ajaxify="false" data-action="search.user">
<i class="fa fa-user"></i>
[[admin/manage/categories:privileges.search-user]]
</button>
</div>
</td>
</tr>
</tfoot>
</table>
</div>

@ -1,124 +1,128 @@
<label>[[admin/manage/privileges:group-privileges]]</label>
<table class="table privilege-table">
<thead>
{{{ if !isAdminPriv }}}
<tr class="privilege-table-header">
<th class="privilege-filters" colspan="100">
<div class="btn-toolbar justify-content-end gap-1">
<button type="button" data-filter="9,15" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-viewing]]</button>
<button type="button" data-filter="3,8" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-posting]]</button>
<button type="button" data-filter="16,18" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-moderation]]</button>
{{{ if privileges.columnCountGroupOther }}}
<button type="button" data-filter="19,99" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-other]]</button>
{{{ end }}}
</div>
</th>
</tr><tr><!-- zebrastripe reset --></tr>
{{{ end }}}
<tr>
<th colspan="2">[[admin/manage/categories:privileges.section-group]]</th>
<th class="text-center">[[admin/manage/privileges:select-clear-all]]</th>
{{{ each privileges.labels.groups }}}
<th class="text-center">{@value}</th>
<div class="table-responsive">
<table class="table privilege-table text-sm">
<thead>
{{{ if !isAdminPriv }}}
<tr class="privilege-table-header">
<th class="privilege-filters" colspan="100">
<div class="btn-toolbar justify-content-end gap-1 flex-nowrap">
<button type="button" data-filter="9,15" class="btn btn-outline-secondary btn-sm text-nowrap">[[admin/manage/categories:privileges.section-viewing]]</button>
<button type="button" data-filter="3,8" class="btn btn-outline-secondary btn-sm text-nowrap">[[admin/manage/categories:privileges.section-posting]]</button>
<button type="button" data-filter="16,18" class="btn btn-outline-secondary btn-sm text-nowrap">[[admin/manage/categories:privileges.section-moderation]]</button>
{{{ if privileges.columnCountGroupOther }}}
<button type="button" data-filter="19,99" class="btn btn-outline-secondary btn-sm text-nowrap">[[admin/manage/categories:privileges.section-other]]</button>
{{{ end }}}
</div>
</th>
</tr><tr><!-- zebrastripe reset --></tr>
{{{ end }}}
</tr>
</thead>
<tbody>
{{{ each privileges.groups }}}
<tr data-group-name="{privileges.groups.nameEscaped}" data-private="{{{ if privileges.groups.isPrivate }}}1{{{ else }}}0{{{ end }}}">
<td>
{{{ if privileges.groups.isPrivate }}}
{{{ if (privileges.groups.name == "banned-users") }}}
<i class="fa fa-fw fa-exclamation-triangle text-muted" title="[[admin/manage/categories:privileges.inheritance-exception]]"></i>
<tr>
<th colspan="2">[[admin/manage/categories:privileges.section-group]]</th>
<th class="text-center">[[admin/manage/privileges:select-clear-all]]</th>
{{{ each privileges.labels.groups }}}
<th class="text-center">{@value}</th>
{{{ end }}}
</tr>
</thead>
<tbody>
{{{ each privileges.groups }}}
<tr data-group-name="{privileges.groups.nameEscaped}" data-private="{{{ if privileges.groups.isPrivate }}}1{{{ else }}}0{{{ end }}}">
<td>
{{{ if privileges.groups.isPrivate }}}
{{{ if (privileges.groups.name == "banned-users") }}}
<i class="fa fa-fw fa-exclamation-triangle text-muted" title="[[admin/manage/categories:privileges.inheritance-exception]]"></i>
{{{ else }}}
<i class="fa fa-fw fa-lock text-muted" title="[[admin/manage/categories:privileges.group-private]]"></i>
{{{ end }}}
{{{ else }}}
<i class="fa fa-fw fa-lock text-muted" title="[[admin/manage/categories:privileges.group-private]]"></i>
<i class="fa fa-fw fa-none"></i>
{{{ end }}}
{{{ else }}}
<i class="fa fa-fw fa-none"></i>
{{{ end }}}
{privileges.groups.name}
</td>
<td></td>
<td class="text-center"><input autocomplete="off" type="checkbox" class="checkbox-helper"></td>
{function.spawnPrivilegeStates, privileges.groups.name, ../privileges}
</tr>
{{{ end }}}
</tbody>
<tfoot>
<tr>
<td colspan="3"></td>
<td colspan="{privileges.keys.groups.length}">
<div class="btn-toolbar justify-content-end">
<button type="button" class="btn btn-sm btn-outline-secondary" data-ajaxify="false" data-action="search.group">
<i class="fa fa-users"></i>
[[admin/manage/categories:privileges.search-group]]
</button>
</div>
</td>
</tr>
</tfoot>
</table>
{privileges.groups.name}
</td>
<td></td>
<td class="text-center"><input autocomplete="off" type="checkbox" class="checkbox-helper"></td>
{function.spawnPrivilegeStates, privileges.groups.name, ../privileges}
</tr>
{{{ end }}}
</tbody>
<tfoot>
<tr>
<td colspan="3"></td>
<td colspan="{privileges.keys.groups.length}">
<div class="btn-toolbar justify-content-end">
<button type="button" class="btn btn-sm btn-outline-secondary" data-ajaxify="false" data-action="search.group">
<i class="fa fa-users"></i>
[[admin/manage/categories:privileges.search-group]]
</button>
</div>
</td>
</tr>
</tfoot>
</table>
</div>
<div class="form-text">
[[admin/manage/categories:privileges.inherit]]
</div>
<hr/>
<label>[[admin/manage/privileges:user-privileges]]</label>
<table class="table privilege-table">
<thead>
{{{ if !isAdminPriv }}}
<tr class="privilege-table-header">
<th class="privilege-filters" colspan="100">
<div class="btn-toolbar justify-content-end gap-1">
<button type="button" data-filter="9,15" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-viewing]]</button>
<button type="button" data-filter="3,8" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-posting]]</button>
<button type="button" data-filter="16,18" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-moderation]]</button>
{{{ if privileges.columnCountUserOther }}}
<button type="button" data-filter="19,99" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-other]]</button>
{{{ end }}}
</div>
</th>
</tr><tr><!-- zebrastripe reset --></tr>
{{{ end }}}
<tr>
<th colspan="2">[[admin/manage/categories:privileges.section-user]]</th>
<th class="text-center">[[admin/manage/privileges:select-clear-all]]</th>
{{{ each privileges.labels.users }}}
<th class="text-center">{@value}</th>
<div class="table-responsive">
<table class="table privilege-table text-sm">
<thead>
{{{ if !isAdminPriv }}}
<tr class="privilege-table-header">
<th class="privilege-filters" colspan="100">
<div class="btn-toolbar justify-content-end gap-1 flex-nowrap">
<button type="button" data-filter="9,15" class="btn btn-outline-secondary btn-sm text-nowrap">[[admin/manage/categories:privileges.section-viewing]]</button>
<button type="button" data-filter="3,8" class="btn btn-outline-secondary btn-sm text-nowrap">[[admin/manage/categories:privileges.section-posting]]</button>
<button type="button" data-filter="16,18" class="btn btn-outline-secondary btn-sm text-nowrap">[[admin/manage/categories:privileges.section-moderation]]</button>
{{{ if privileges.columnCountUserOther }}}
<button type="button" data-filter="19,99" class="btn btn-outline-secondary btn-sm text-nowrap">[[admin/manage/categories:privileges.section-other]]</button>
{{{ end }}}
</div>
</th>
</tr><tr><!-- zebrastripe reset --></tr>
{{{ end }}}
</tr>
</thead>
<tbody>
{{{ each privileges.users }}}
<tr data-uid="{privileges.users.uid}"{{{ if privileges.users.banned }}} data-banned{{{ end }}}>
<td>
{{{ if ./picture }}}
<img class="avatar avatar-sm" src="{privileges.users.picture}" title="{privileges.users.username}" alt="" />
{{{ else }}}
<div class="avatar avatar-sm" style="background-color: {../icon:bgColor};">{../icon:text}</div>
{{{ end }}}
</td>
<td>
{{{ if privileges.users.banned }}}
<i class="ban fa fa-gavel text-danger" title="[[admin/manage/categories:privileges.banned-user-inheritance]]"></i>
<tr>
<th colspan="2">[[admin/manage/categories:privileges.section-user]]</th>
<th class="text-center">[[admin/manage/privileges:select-clear-all]]</th>
{{{ each privileges.labels.users }}}
<th class="text-center">{@value}</th>
{{{ end }}}
{privileges.users.username}
</td>
<td class="text-center"><input autocomplete="off" type="checkbox" class="checkbox-helper"></td>
{function.spawnPrivilegeStates, privileges.users.username, ../privileges}
</tr>
{{{ end }}}
</tbody>
<tfoot>
<tr>
<td colspan="3"></td>
<td colspan="{privileges.keys.users.length}">
<div class="btn-toolbar justify-content-end">
<button type="button" class="btn btn-sm btn-outline-secondary" data-ajaxify="false" data-action="search.user">
<i class="fa fa-user"></i>
[[admin/manage/categories:privileges.search-user]]
</button>
</div>
</td>
</tr>
</tfoot>
</table>
</tr>
</thead>
<tbody>
{{{ each privileges.users }}}
<tr data-uid="{privileges.users.uid}"{{{ if privileges.users.banned }}} data-banned{{{ end }}}>
<td>
{{{ if ./picture }}}
<img class="avatar avatar-sm" src="{privileges.users.picture}" title="{privileges.users.username}" alt="" />
{{{ else }}}
<div class="avatar avatar-sm" style="background-color: {../icon:bgColor};">{../icon:text}</div>
{{{ end }}}
</td>
<td>
{{{ if privileges.users.banned }}}
<i class="ban fa fa-gavel text-danger" title="[[admin/manage/categories:privileges.banned-user-inheritance]]"></i>
{{{ end }}}
{privileges.users.username}
</td>
<td class="text-center"><input autocomplete="off" type="checkbox" class="checkbox-helper"></td>
{function.spawnPrivilegeStates, privileges.users.username, ../privileges}
</tr>
{{{ end }}}
</tbody>
<tfoot>
<tr>
<td colspan="3"></td>
<td colspan="{privileges.keys.users.length}">
<div class="btn-toolbar justify-content-end">
<button type="button" class="btn btn-sm btn-outline-secondary" data-ajaxify="false" data-action="search.user">
<i class="fa fa-user"></i>
[[admin/manage/categories:privileges.search-user]]
</button>
</div>
</td>
</tr>
</tfoot>
</table>
</div>

@ -1,3 +1,3 @@
<button id="save" class="btn btn-primary position-fixed bottom-0 end-0 px-3 py-2 mb-4 me-4 rounded-circle fs-4" type="button" style="width: 64px; height: 64px;">
<button id="save" class="btn btn-primary position-fixed bottom-0 end-0 px-3 py-2 mb-lg-4 me-4 rounded-circle fs-4" type="button" style="width: 64px; height: 64px; margin-bottom: 5rem;">
<i class="fa fa-fw fas fa-floppy-disk"></i>
</button>

@ -1,12 +1,8 @@
<form role="form" class="core-api-settings px-lg-4">
<p class="lead">[[admin/settings/api:lead-text]]</p>
<p>[[admin/settings/api:intro]]</p>
<p class="text-danger">[[admin/settings/api:warning]]</p>
<div class="d-flex align-items-center justify-content-between mb-2">
<a class="" href="https://docs.nodebb.org/api">
<i class="fa fa-external-link"></i>
[[admin/settings/api:docs]]
</a>
<div component="settings/main/header" class="d-flex flex-wrap justify-content-between border-bottom py-2 m-0 sticky-top acp-page-main-header align-items-center mb-3">
<div class="px-0">
<h4 class="fw-bold tracking-tight mb-0">{title}</h4>
</div>
<div class="px-0 px-md-3">
<div class="d-flex gap-1">
<button type="button" class="btn btn-sm btn-primary text-nowrap" data-action="create">
<i class="fa fa-plus"></i>
@ -15,74 +11,85 @@
<button id="save" class="btn btn-primary btn-sm fw-semibold ff-secondary text-nowrap">[[admin/admin:save-changes]]</button>
</div>
</div>
</div>
<table class="table table-sm mb-5 text-sm" data-component="acp/tokens">
<thead>
<tr>
<th>[[admin/settings/api:token]]</th>
<th>[[admin/settings/api:description]]</th>
<th>[[admin/settings/api:uid]]</th>
<th>[[admin/settings/api:last-seen]]</th>
<th>[[admin/settings/api:created]]</th>
<th>[[admin/settings/api:actions]]</th>
</tr>
</thead>
<tbody>
{{{ each tokens }}}
<tr data-token="{./token}">
<td>
<button type="button" class="btn btn-link" data-action="copy" data-clipboard-text="{./token}"><i class="fa fa-fw fa-clipboard" aria-hidden="true"></i></button>
<div class="vr me-3" aria-hidden="true"></div>
<span class="user-select-all">{./token}</span>
</td>
<td class="align-middle">
{{{ if ./description }}}
{./description}
{{{ else }}}
<em class="text-secondary">[[admin/settings/api:no-description]]</em>
{{{ end }}}
</td>
<td class="align-middle">
{{{ if (./uid == "0") }}}
<em>[[admin/settings/api:master-token]]</em>
{{{ else }}}
{./uid}
{{{ end }}}
</td>
<td class="align-middle">
{{{ if ./lastSeen }}}
<span class="timeago" title="{./lastSeenISO}"></span>
{{{ else }}}
<em class="text-secondary">[[admin/settings/api:last-seen-never]]</em>
{{{ end }}}
</td>
<td class="align-middle">
<span class="timeago" title="{./timestampISO}"></span>
</td>
<td>
<button type="button" class="btn btn-link" data-action="edit">
<i class="fa fa-edit"></i>
</button>
<button type="button" class="btn btn-link" data-action="roll">
<i class="fa fa-refresh"></i>
</button>
<button type="button" class="btn btn-link link-danger" data-action="delete">
<i class="fa fa-trash"></i>
</button>
</td>
</tr>
{{{ end }}}
</tbody>
</table>
<form role="form" class="core-api-settings px-lg-4">
<p class="lead">[[admin/settings/api:lead-text]]</p>
<p>[[admin/settings/api:intro]]</p>
<p class="text-danger">[[admin/settings/api:warning]]</p>
<div class="d-flex align-items-center justify-content-between mb-2 flex-wrap gap-2 mb-3">
<a class="" href="https://docs.nodebb.org/api">
<i class="fa fa-external-link"></i>
[[admin/settings/api:docs]]
</a>
</div>
<div class="row mb-4">
<div class="col-sm-2 col-12 settings-header">[[admin/settings/api:settings]]</div>
<div class="col-sm-10 col-12">
<div class="form-check form-switch mb-3">
<input id="requireHttps" class="form-check-input" type="checkbox" name="requireHttps" />
<label class="form-check-label">[[admin/settings/api:require-https]]</label>
<p class="form-text">[[admin/settings/api:require-https-caveat]]</p>
</div>
<div class="mb-3">
<div class="form-check form-switch mb-3">
<input id="requireHttps" class="form-check-input" type="checkbox" name="requireHttps" />
<label class="form-check-label">[[admin/settings/api:require-https]]</label>
<p class="form-text">[[admin/settings/api:require-https-caveat]]</p>
</div>
</div>
<div class="table-responsive">
<table class="table table-sm mb-5 text-sm" data-component="acp/tokens">
<thead>
<tr>
<th>[[admin/settings/api:token]]</th>
<th>[[admin/settings/api:description]]</th>
<th>[[admin/settings/api:uid]]</th>
<th>[[admin/settings/api:last-seen]]</th>
<th>[[admin/settings/api:created]]</th>
<th>[[admin/settings/api:actions]]</th>
</tr>
</thead>
<tbody>
{{{ each tokens }}}
<tr data-token="{./token}" class="text-nowrap">
<td>
<button type="button" class="btn btn-link" data-action="copy" data-clipboard-text="{./token}"><i class="fa fa-fw fa-clipboard" aria-hidden="true"></i></button>
<div class="vr me-3" aria-hidden="true"></div>
<span class="user-select-all">{./token}</span>
</td>
<td class="align-middle">
{{{ if ./description }}}
{./description}
{{{ else }}}
<em class="text-secondary">[[admin/settings/api:no-description]]</em>
{{{ end }}}
</td>
<td class="align-middle">
{{{ if (./uid == "0") }}}
<em>[[admin/settings/api:master-token]]</em>
{{{ else }}}
{./uid}
{{{ end }}}
</td>
<td class="align-middle">
{{{ if ./lastSeen }}}
<span class="timeago" title="{./lastSeenISO}"></span>
{{{ else }}}
<em class="text-secondary">[[admin/settings/api:last-seen-never]]</em>
{{{ end }}}
</td>
<td class="align-middle">
<span class="timeago" title="{./timestampISO}"></span>
</td>
<td>
<button type="button" class="btn btn-light btn-sm" data-action="edit" title="[[admin/settings/api:edit]]">
<i class="fa fa-edit text-primary"></i>
</button>
<button type="button" class="btn btn-light btn-sm" data-action="roll" title="[[admin/settings/api:roll]]">
<i class="fa fa-refresh text-primary"></i>
</button>
<button type="button" class="btn btn-light btn-sm" data-action="delete">
<i class="fa fa-trash text-danger"></i>
</button>
</td>
</tr>
{{{ end }}}
</tbody>
</table>
</div>
</form>

Loading…
Cancel
Save