From: Bill Erickson Date: Mon, 15 Aug 2011 18:42:45 +0000 (-0400) Subject: TTpac: show page range in results paging display X-Git-Tag: sprint4-merge-nov22~5128^2~41^2~21 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d9d36ec6b8ab9f5bfffaad4babc6025f93508aca;p=working%2FEvergreen.git TTpac: show page range in results paging display Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css index a58c132de6..b1665072a8 100644 --- a/Open-ILS/web/css/skin/default/opac/style.css +++ b/Open-ILS/web/css/skin/default/opac/style.css @@ -1020,3 +1020,5 @@ a.dash-link:hover { text-decoration: underline !important; } padding-bottom: 1ex; } .cn_browse_item { padding: 2ex; } + +.results-paginator-selected { color: red; } diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2 index 78e606e38e..6abafabbe8 100644 --- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2 @@ -22,6 +22,7 @@ + [% class = 'search_page_nav_link'; href = '#'; IF page > 0; @@ -30,10 +31,24 @@ %] [% l('Previous') %] - - + + + [% # show links to 4 previous pages, the current page, and 3 more pages. + added = 0; + pageitr = page - 5; + WHILE (pageitr = pageitr + 1) < page_count; + IF pageitr < 0; NEXT; END; + IF pageitr == page; %] + [% pageitr + 1%] + [% ELSE %] + [% pageitr + 1%] + [% END; + added = added + 1; + IF added == 8; LAST; END; + END; + %] + [% class = 'search_page_nav_link'; href = '#'; IF (page + 1) < page_count;