Commit 634b54dc authored by Eugene Venter's avatar Eugene Venter
Browse files

Pagination changes



Bug #812113

Added 'jumplinks' and 'numbersincludeprevnext' options to some views.

Change-Id: I7bf296a11c16191369d11983c75e1252df315709
Signed-off-by: default avatarEugene Venter <eugene@catalyst.net.nz>
parent 95fd9655
......@@ -143,6 +143,8 @@ $pagination = build_pagination(array(
'count' => $groups['count'],
'limit' => $groupsperpage,
'offset' => $offset,
'jumplinks' => 6,
'numbersincludeprevnext' => 2,
'resultcounttextsingular' => get_string('group', 'group'),
'resultcounttextplural' => get_string('groups', 'group'),
));
......
......@@ -88,6 +88,8 @@ $pagination = build_pagination(array(
'count' => $results['count'],
'limit' => $groupsperpage,
'offset' => $offset,
'jumplinks' => 6,
'numbersincludeprevnext' => 2,
'resultcounttextsingular' => get_string('group', 'group'),
'resultcounttextplural' => get_string('groups', 'group'),
));
......
......@@ -224,6 +224,8 @@ $pagination = build_pagination(array(
'count' => $forum->topiccount,
'limit' => $topicsperpage,
'offset' => $offset,
'jumplinks' => 6,
'numbersincludeprevnext' => 2,
'resultcounttextsingular' => get_string('topiclower', 'interaction.forum'),
'resultcounttextplural' => get_string('topicslower', 'interaction.forum')
));
......
......@@ -1098,6 +1098,8 @@ function activitylist_html($type='all', $limit=10, $offset=0) {
'count' => $count,
'limit' => $limit,
'offset' => $offset,
'jumplinks' => 6,
'numbersincludeprevnext' => 2,
));
$result = array(
......
......@@ -1168,6 +1168,8 @@ function build_grouplist_html($query, $limit, $offset, &$count=null) {
'count' => $count,
'limit' => $limit,
'offset' => $offset,
'jumplinks' => 6,
'numbersincludeprevnext' => 2,
'resultcounttextsingular' => get_string('group', 'group'),
'resultcounttextplural' => get_string('groups', 'group'),
));
......@@ -1238,6 +1240,8 @@ function group_get_membersearch_data($results, $group, $query, $membershiptype)
'count' => $results['count'],
'limit' => $results['limit'],
'offset' => $results['offset'],
'jumplinks' => 8,
'numbersincludeprevnext' => 2,
'datatable' => 'membersearchresults',
'jsonscript' => 'group/membersearchresults.json.php',
'firsttext' => '',
......
......@@ -761,6 +761,7 @@ function build_institutions_html($filter, $showdefault, $query, $limit, $offset,
'count' => $count,
'limit' => $limit,
'offset' => $offset,
'jumplinks' => 4,
'resultcounttextsingular' => get_string('institution', 'admin'),
'resultcounttextplural' => get_string('institutions', 'admin'),
));
......
......@@ -2723,6 +2723,8 @@ function build_portfolio_search_html(&$data) {
'count' => $data->count,
'limit' => $data->limit,
'offset' => $data->offset,
'jumplinks' => 6,
'numbersincludeprevnext' => 2,
'numbersincludefirstlast' => false,
'resultcounttextsingular' => get_string('result'),
'resultcounttextplural' => get_string('results'),
......
......@@ -282,6 +282,8 @@ function build_admin_user_search_results($search, $offset, $limit) {
'url' => $searchurl,
'count' => $results['count'],
'limit' => $limit,
'jumplinks' => 8,
'numbersincludeprevnext' => 2,
'offset' => $offset,
'datatable' => 'searchresults',
'jsonscript' => 'admin/users/search.json.php',
......
......@@ -1575,6 +1575,8 @@ function build_userlist_html(&$data, $page, $admingroups) {
'count' => $data['count'],
'limit' => $data['limit'],
'offset' => $data['offset'],
'jumplinks' => 6,
'numbersincludeprevnext' => 2,
'resultcounttextsingular' => $resultcounttextsingular,
'resultcounttextplural' => $resultcounttextplural,
'extradata' => array('page' => $page),
......
......@@ -2550,6 +2550,8 @@ class View {
'count' => $data->count,
'limit' => $limit,
'offset' => $offset,
'jumplinks' => 6,
'numbersincludeprevnext' => 2,
));
return array($searchform, $data, $pagination);
......@@ -3294,6 +3296,8 @@ class View {
'count' => $results->count,
'limit' => $search->limit,
'offset' => $search->offset,
'jumplinks' => 6,
'numbersincludeprevnext' => 2,
'offsetname' => 'viewoffset',
'firsttext' => '',
'previoustext' => '',
......
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