Commit afe2ad54 authored by Robert Lyon's avatar Robert Lyon

Bug 1515484: Fix the site page list pagination to use json

This is 6 of 6 patches to standardize pagination

behatnotneeded

Change-Id: I70f77d04efa55a14680da5427acc1310b517ec3b
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent f053fad7
......@@ -65,9 +65,12 @@ $smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('views', $views);
$smarty->assign('institution', 'mahara');
$smarty->assign('querystring', get_querystring());
$html = $smarty->fetch('view/indexresults.tpl');
$smarty->assign('viewresults', $html);
$smarty->assign('pagination', $pagination['html']);
$smarty->assign('query', param_variable('query', null));
$smarty->assign('querystring', get_querystring());
$smarty->assign('searchform', $searchform);
$smarty->assign('createviewform', $createviewform);
$smarty->display('view/index.tpl');
......@@ -78,8 +78,18 @@ if (!empty($groupid)) {
}
}
else if (!empty($institution)) {
define('INSTITUTIONALADMIN', 1);
list($searchform, $data, $pagination) = View::views_by_owner(null, $institution);
if ($institution == 'mahara') {
define('ADMIN', 1);
$templateviews = View::get_template_views();
list($searchform, $data, $pagination) = View::views_by_owner(null, 'mahara');
if ($data->data && $offset == '0') {
$data->data = array_merge($templateviews, $data->data);
}
}
else {
define('INSTITUTIONALADMIN', 1);
list($searchform, $data, $pagination) = View::views_by_owner(null, $institution);
}
}
else {
list($searchform, $data, $pagination) = View::views_by_owner();
......
......@@ -3657,6 +3657,7 @@ class View {
else if ($institution) {
if ($institution == 'mahara') {
$url = get_config('wwwroot') . 'admin/site/views.php';
$queryparams[] = 'institution=' . $institution;
}
else {
$url = get_config('wwwroot') . 'view/institutionviews.php';
......
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