From: Dan Scott Date: Tue, 24 Sep 2013 02:29:23 +0000 (-0400) Subject: TPAC: Reduce vertical space in results paginator X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=480602d8e706a38d390113614127f870582ce565;p=evergreen%2Fpines.git TPAC: Reduce vertical space in results paginator An unnecessary span element with inline CSS results in additional blank vertical space being generated for searches with only one page of results. Avoid creating the span (which would normally contain the list of pages), move the CSS to the style sheet, and use ems rather than hard-coded px values for the padding to adjust relative to the font size. Signed-off-by: Dan Scott Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Dan Wells --- diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2 index 5973d5f549..680ba2de27 100644 --- a/Open-ILS/src/templates/opac/css/style.css.tt2 +++ b/Open-ILS/src/templates/opac/css/style.css.tt2 @@ -1189,7 +1189,10 @@ a.dash-link:hover { text-decoration: underline !important; } padding-bottom: 1ex; } .cn_browse_item { padding: 2ex; } - +.results-paginator-list { + padding-left: 1em; + padding-right: 1em; +} .results-paginator-selected { color: [% css_colors.text_alert %]; } .inactive-hold { background: [% css_colors.accent_lightest %]; } diff --git a/Open-ILS/src/templates/opac/parts/result/paginate.tt2 b/Open-ILS/src/templates/opac/parts/result/paginate.tt2 index 066cd8c3e7..d41822f12d 100644 --- a/Open-ILS/src/templates/opac/parts/result/paginate.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/paginate.tt2 @@ -27,11 +27,13 @@ [% l('Previous') %] - - [% # show links to 4 previous pages, the current page, and 3 more pages. - added = 0; - pageitr = page - 5; - IF page_count > 1; # no need to paginate 1 page + [%- # show links to 4 previous pages, the current page, and 3 more pages. + added = 0; + pageitr = page - 5; + IF page_count > 1; # no need to paginate 1 page + -%] + + [%- WHILE (pageitr = pageitr + 1) < page_count; IF pageitr < 0; NEXT; END; IF pageitr == page; %] @@ -42,9 +44,9 @@ added = added + 1; IF added == 8; LAST; END; END; - END; - %] + -%] + [%- END; -%] [% class = 'search_page_nav_link'; href = '#';