Commit 95d0bdf2 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Pagination & plugin alert (BUG: 1465107)"

parents 48ccb46b bc4a12d9
......@@ -125,7 +125,7 @@ $string['first'] = 'First';
$string['firstpage'] = 'First page';
$string['last'] = 'Last';
$string['lastpage'] = 'Last page';
$string['maxitemsperpage'] = 'Maximum items per page:';
$string['maxitemsperpage1'] = 'Results per page:';
$string['accept'] = 'Accept';
$string['memberofinstitutions'] = 'Member of %s';
......
......@@ -3800,7 +3800,7 @@ function build_pagination($params) {
$params['limit'] = 10;
}
if (!isset($params['limittext'])) {
$params['limittext'] = get_string('maxitemsperpage');
$params['limittext'] = get_string('maxitemsperpage1');
}
}
else {
......@@ -4016,11 +4016,11 @@ function build_pagination($params) {
}
}
$output .= '</ul></nav>';
$output .= '<form class="form-pagination js-pagination form-inline" action="' . hsc($params['url']) . '" method="POST">
$output .= '<form class="form-pagination js-pagination form-inline pagination-page-limit dropdown" action="' . hsc($params['url']) . '" method="POST">
<label for="setlimitselect" class="set-limit"> ' . $params['limittext'] . ' </label>' .
'<select id="setlimitselect" class="js-pagination input-xs" name="limit"> '.
'<span class="picker input-sm"><select id="setlimitselect" class="js-pagination input-sm select form-control" name="limit"> '.
join(' ', $strlimitoptions) .
'</select>
'</select></span>
<input class="currentoffset" type="hidden" name="' . $params['offsetname'] . '" value="' . $params['offset'] . '"/>
<input class="pagination js-hidden hidden" type="submit" name="submit" value="' . get_string('change') . '"/>
</form>';
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -82,7 +82,7 @@ jQuery(function($) {
requestdata[checked[i].name] = 1;
}
requestdata['list'] = $(self).find('a[data-table]').attr('data-table');
requestdata['list'] = $(self).find('a[data-list]').attr('data-list');
requestdata['readone'] = $(self).find('a[data-id]').attr('data-id');
if (paginatorData) {
......
......@@ -64,7 +64,7 @@
</form>
{$deleteall|safe}
<div class="pull-right">
<div class="fullwidth">
{$activitylist['pagination']|safe}
</div>
</div>
......
......@@ -61,7 +61,7 @@
</form>
{$deleteall|safe}
<div class="pull-right">
<div class="fullwidth">
{$activitylist['pagination']|safe}
</div>
</div>
......
......@@ -21,6 +21,14 @@
}
}
.pagination-page-limit {
clear: both;
float: right;
label {
display: inline-block;
}
}
// Small
.pagination-xs {
@include pagination-size($padding-xs-vertical, $padding-xs-horizontal, $font-size-small, $border-radius-small);
......
......@@ -20,7 +20,7 @@
>thead>tr>th {
color: inherit;
vertical-align: bottom;
border-bottom: 1px solid $alert-info-border;
border-bottom: 1px solid rgba(#666, 0.05);
}
>thead>tr>th,
>thead>tr>td,
......
......@@ -48,6 +48,10 @@
}
.input-sm {
&.picker {
padding: 0;
}
&.picker,
.picker {
&:before {
margin-top: 6px;
......@@ -63,6 +67,7 @@
&:before {
margin-top: 12px;
}
&.picker select.form-control,
.picker select.form-control {
padding-top: 5px;
padding-bottom: 5px;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -12,9 +12,9 @@
{/if}
{if $upgrades['settings']['toupgradecount']}
<div class="alert alert-info" id="">
<h3>{str tag="upgrades" section=admin}</h3>
<div class="panel panel-warning" id="">
<h3 class="panel-heading">{str tag="upgrades" section=admin}</h3>
<div class="panel-body">
<p>{str tag=thefollowingupgradesareready section=admin}</p>
<table id="upgrades-table" class="table">
......@@ -38,15 +38,17 @@
</tbody>
</table>
<a class="btn btn-default" href="upgrade.php">{str tag=runupgrade section=admin}</a>
</div>
</div>
{/if}
{if $upgrades['settings']['newinstallcount']}
<div class="warning" id="runinstall">
<h3>{str tag="newplugins" section=admin}</h3>
<div class="fr"><span class="upgrade"><a class="btn" href="extensions/plugins.php">{str tag=gotoinstallpage section=admin}</a></span></div>
<h4>{str tag=thefollowingpluginsareready section=admin}</h4>
<table id="upgradestable" class="fullwidth">
<div class="panel panel-warning" id="runinstall">
<h3 class="panel-heading">{str tag="newplugins" section=admin}</h3>
<div class="panel-body">
<p>{str tag=thefollowingpluginsareready section=admin}</p>
<table id="upgradestable" class="table mbm">
<thead>
<tr>
<th>{str tag=Plugin section=admin}</th>
......@@ -55,15 +57,20 @@
</tr>
</thead>
<tbody>
{foreach from=$upgrades['settings']['newinstalls'] key=key item=upgrade}
<tr>
{foreach from=$upgrades['settings']['newinstalls'] key=key item=upgrade}
<tr>
<td><strong>{$key}</strong></td>
<td>{$upgrade->fromrelease}</td>
<td>{$upgrade->torelease} ({$upgrade->to})</td>
</tr>
{/foreach}
</tr>
{/foreach}
</tbody>
</table>
</table>
<a class="btn btn-default" href="extensions/plugins.php">
{str tag=gotoinstallpage section=admin}
<span class="mls icon icon-arrow-right"></span>
</a>
</div>
</div>
{/if}
<div class="panel-items js-masonry" data-masonry-options='{ "itemSelector": ".panel" }'>
......@@ -89,7 +96,6 @@
{/if}
<div class="panel close-site {if $closed}panel-success{else}panel-danger{/if}">
{if $closed}
<h3 class="panel-heading">{str tag=reopensite section=admin} <span class="icon icon-lock pls pull-right"></span></h3>
......@@ -106,8 +112,6 @@
</div>
</div>
<div class="panel panel-default">
<h3 class="panel-heading">{str tag=configsite section=admin} <span class="icon icon-cogs pls pull-right"></span></h3>
<ul class="list-group">
......@@ -156,8 +160,6 @@
</ul>
</div>
<div class="panel panel-default">
<h3 class="panel-heading">{str tag=configusers section=admin} <span class="icon icon-user pls pull-right"></span></h3>
<ul class="list-group">
......@@ -271,4 +273,3 @@
</div>
{include file='footer.tpl'}
......@@ -37,7 +37,7 @@
And I click on "Select all"
And I select "title" from "sort"
And I press "search_submit"
And I should see "Maximum items per page:"
And I should see "Results per page:"
And I select "1" from "limit"
And I wait until the page is ready
And I should see "1"
......
......@@ -79,7 +79,7 @@ As an admin
And I click on "Select all"
And I select "title" from "sort"
And I press "search_submit"
Then I should see "Maximum items per page:"
Then I should see "Results per page:"
And I select "1" from "limit"
And I wait until the page is ready
And I should see "A's Page 01"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment