feat: #8412 breadcrumbs for ip-blacklist/post queue/flags

v1.18.x
Julian Lam 5 years ago
parent 7fe9c1a26d
commit 35a06a8419

@ -45,7 +45,6 @@
"no-notes": "No shared notes.",
"history": "Account & Flag History",
"back": "Back to Flags List",
"no-history": "No flag history.",
"state-all": "All states",

@ -4,6 +4,7 @@ const user = require('../user');
const meta = require('../meta');
const analytics = require('../analytics');
const usersController = require('./admin/users');
const helpers = require('./helpers');
const globalModsController = module.exports;
@ -21,6 +22,7 @@ globalModsController.ipBlacklist = async function (req, res, next) {
title: '[[pages:ip-blacklist]]',
rules: rules,
analytics: analyticsData,
breadcrumbs: helpers.buildBreadcrumbs([{ text: '[[pages:ip-blacklist]]' }]),
});
};

@ -12,6 +12,7 @@ const plugins = require('../plugins');
const pagination = require('../pagination');
const privileges = require('../privileges');
const utils = require('../utils');
const helpers = require('./helpers');
const modsController = module.exports;
modsController.flags = {};
@ -94,6 +95,7 @@ modsController.flags.list = async function (req, res, next) {
filters: filters,
title: '[[pages:flags]]',
pagination: pagination.create(flagsData.page, flagsData.pageCount, req.query),
breadcrumbs: helpers.buildBreadcrumbs([{ text: '[[pages:flags]]' }]),
});
};
@ -141,6 +143,10 @@ modsController.flags.detail = async function (req, res, next) {
categories: results.categories,
filters: req.session.flags_filters || [],
privileges: results.privileges,
breadcrumbs: helpers.buildBreadcrumbs([
{ text: '[[pages:flags]]', url: '/flags' },
{ text: '[[pages:flag-details, ' + req.params.flagId + ']]' },
]),
}));
};
@ -193,6 +199,7 @@ modsController.postQueue = async function (req, res, next) {
title: '[[pages:post-queue]]',
posts: postData,
pagination: pagination.create(page, pageCount),
breadcrumbs: helpers.buildBreadcrumbs([{ text: '[[pages:post-queue]]' }]),
});
};

@ -1,3 +1,5 @@
<!-- IMPORT partials/breadcrumbs.tpl -->
<div class="row ip-blacklist">
<div class="col-lg-12">
<p class="lead">
@ -40,7 +42,7 @@
</div>
<div class="panel-footer"><small>[[admin/manage/ip-blacklist:analytics.blacklist-hourly]]</small></div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<div><canvas id="blacklist:daily" height="250"></canvas></div>

@ -1,3 +1,5 @@
<!-- IMPORT partials/breadcrumbs.tpl -->
<div class="row">
<div class="col-xs-12">
<div class="post-queue panel panel-primary preventSlideout">

Loading…
Cancel
Save