From 28dd1fb49810609c728b1e5492f9d6d433fcec15 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Mon, 23 Sep 2013 22:29:23 -0400 Subject: [PATCH] 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 --- Open-ILS/src/templates/opac/css/style.css.tt2 | 5 ++++- Open-ILS/src/templates/opac/parts/result/paginate.tt2 | 16 +++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2 index 793ce16dfa..e8d53dc8a3 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 = '#'; -- 2.11.0