Commit 217bf8b0 authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review
Browse files

Merge "Bug 1583416: allowing setlimit dropdown for copy page list"

parents 9cb79ac3 aa071c28
......@@ -5627,7 +5627,7 @@ class View {
if (!empty($search->collection)) {
$params['searchcollection'] = $search->collection;
}
$params['viewlimit'] = $search->limit;
$params['limit'] = $search->limit;
$smarty = smarty_core();
$smarty->assign_by_ref('results', $results->data);
......@@ -5648,6 +5648,7 @@ class View {
'previoustext' => '',
'nexttext' => '',
'lasttext' => '',
'setlimit' => true,
'resultcounttextsingular' => get_string('view', 'view'),
'resultcounttextplural' => get_string('views', 'view'),
));
......
......@@ -41,6 +41,11 @@
{$views->html|safe}
</div>
{$views->pagination.html|safe}
{if $views->pagination.javascript}
<script type="application/javascript">
{$views->pagination.javascript|safe}
</script>
{/if}
</div>
</div>
......
......@@ -49,7 +49,7 @@ $views = new StdClass;
$views->query = trim(param_variable('viewquery', ''));
$views->ownerquery = trim(param_variable('ownerquery', ''));
$views->offset = param_integer('viewoffset', 0);
$views->limit = param_integer('viewlimit', 10);
$views->limit = param_integer('limit', 10);
$views->copyableby = (object) array('group' => $groupid, 'institution' => $institution, 'owner' => null);
if ($groupid) {
$views->group = $groupid;
......@@ -134,7 +134,7 @@ addLoadEvent(function() {
EOF;
$smarty = smarty(
array('js/preview.js', 'searchtable'),
array('js/preview.js', 'searchtable', 'paginator'),
array(),
array('stylesheets' => array('style/views.css'))
);
......
......@@ -21,7 +21,7 @@ $views = new StdClass;
$views->query = trim(param_variable('viewquery', ''));
$views->ownerquery = trim(param_variable('ownerquery', ''));
$views->offset = param_integer('viewoffset', 0);
$views->limit = param_integer('viewlimit', 10);
$views->limit = param_integer('limit', 10);
$views->group = param_integer('group', null);
$views->institution = param_alphanum('institution', null);
$views->copyableby = (object) array('group' => $group, 'institution' => $institution);
......
Markdown is supported
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