Revert "feat: #7515"

This reverts commit ac889db16b.
v1.18.x
Barış Soner Uşaklı 6 years ago
parent ac889db16b
commit 81f8cfe3da

@ -28,11 +28,6 @@
"pills.banned": "Banned",
"pills.search": "User Search",
"50-per-page": "50 per page",
"100-per-page": "100 per page",
"250-per-page": "250 per page",
"500-per-page": "500 per page",
"search.uid": "By User ID",
"search.uid-placeholder": "Enter a user ID to search",
"search.username": "By User Name",

@ -12,12 +12,6 @@ define('admin/manage/users', ['translator', 'benchpress'], function (translator,
}
navPills.removeClass('active').find('a[href="' + pathname + '"]').parent().addClass('active');
$('#results-per-page').val(ajaxify.data.resultsPerPage).on('change', function () {
var query = utils.params();
query.resultsPerPage = $('#results-per-page').val();
ajaxify.go(window.location.pathname + '?' + $.param(query));
});
function getSelectedUids() {
var uids = [];

@ -120,10 +120,7 @@ usersController.registrationQueue = function (req, res, next) {
function getUsers(set, section, min, max, req, res, next) {
var page = parseInt(req.query.page, 10) || 1;
var resultsPerPage = parseInt(req.query.resultsPerPage, 10) || 50;
if (![50, 100, 250, 500].includes(resultsPerPage)) {
resultsPerPage = 50;
}
var resultsPerPage = 50;
var start = Math.max(0, page - 1) * resultsPerPage;
var stop = start + resultsPerPage - 1;
var byScore = min !== undefined && max !== undefined;
@ -164,7 +161,6 @@ function getUsers(set, section, min, max, req, res, next) {
users: results.users,
page: page,
pageCount: Math.max(1, Math.ceil(results.count / resultsPerPage)),
resultsPerPage: resultsPerPage,
};
data[section] = true;
render(req, res, data);

@ -33,28 +33,17 @@
</div>
<ul class="nav nav-pills">
<li><a href='{config.relative_path}/admin/manage/users/latest?resultsPerPage={resultsPerPage}'>[[admin/manage/users:pills.latest]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/not-validated?resultsPerPage={resultsPerPage}'>[[admin/manage/users:pills.unvalidated]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/no-posts?resultsPerPage={resultsPerPage}'>[[admin/manage/users:pills.no-posts]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/top-posters?resultsPerPage={resultsPerPage}'>[[admin/manage/users:pills.top-posters]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/most-reputation?resultsPerPage={resultsPerPage}'>[[admin/manage/users:pills.top-rep]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/inactive?resultsPerPage={resultsPerPage}'>[[admin/manage/users:pills.inactive]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/flagged?resultsPerPage={resultsPerPage}'>[[admin/manage/users:pills.flagged]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/banned?resultsPerPage={resultsPerPage}'>[[admin/manage/users:pills.banned]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/latest'>[[admin/manage/users:pills.latest]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/not-validated'>[[admin/manage/users:pills.unvalidated]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/no-posts'>[[admin/manage/users:pills.no-posts]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/top-posters'>[[admin/manage/users:pills.top-posters]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/most-reputation'>[[admin/manage/users:pills.top-rep]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/inactive'>[[admin/manage/users:pills.inactive]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/flagged'>[[admin/manage/users:pills.flagged]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/banned'>[[admin/manage/users:pills.banned]]</a></li>
<li><a href='{config.relative_path}/admin/manage/users/search'>[[admin/manage/users:pills.search]]</a></li>
<li class="pull-right">
<form class="form-inline">
<select id="results-per-page" class="form-control">
<option value="50">[[admin/manage/users:50-per-page]]</option>
<option value="100">[[admin/manage/users:100-per-page]]</option>
<option value="250">[[admin/manage/users:250-per-page]]</option>
<option value="500">[[admin/manage/users:500-per-page]]</option>
</select>
</form>
</li>
</ul>
<br />
<div class="search {search_display}">
@ -75,9 +64,9 @@
</div>
<!-- IF inactive -->
<a href="{config.relative_path}/admin/manage/users/inactive?months=3&resultsPerPage={resultsPerPage}" class="btn btn-default">[[admin/manage/users:inactive.3-months]]</a>
<a href="{config.relative_path}/admin/manage/users/inactive?months=6&resultsPerPage={resultsPerPage}" class="btn btn-default">[[admin/manage/users:inactive.6-months]]</a>
<a href="{config.relative_path}/admin/manage/users/inactive?months=12&resultsPerPage={resultsPerPage}" class="btn btn-default">[[admin/manage/users:inactive.12-months]]</a>
<a href="{config.relative_path}/admin/manage/users/inactive?months=3" class="btn btn-default">[[admin/manage/users:inactive.3-months]]</a>
<a href="{config.relative_path}/admin/manage/users/inactive?months=6" class="btn btn-default">[[admin/manage/users:inactive.6-months]]</a>
<a href="{config.relative_path}/admin/manage/users/inactive?months=12" class="btn btn-default">[[admin/manage/users:inactive.12-months]]</a>
<!-- ENDIF inactive -->
<div class="table-responsive">

Loading…
Cancel
Save