From 48316e8c2f5ea328ac79c24fb5b45dbd38fe0a41 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Mon, 23 Sep 2013 22:44:18 -0400 Subject: [PATCH] TPAC: Avoid paginator HTML rather than hiding it Rather than generating HTML and then hiding it via CSS, just don't generate the HTML at all. In this case, avoid generating the Previous / Next links in those cases where we're on either page one or the last page of results respectively. Signed-off-by: Dan Scott Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Dan Wells --- Open-ILS/src/templates/opac/css/style.css.tt2 | 10 +++++----- Open-ILS/src/templates/opac/parts/result/paginate.tt2 | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2 index ea6dd7c8f5..9aa09bfd1c 100644 --- a/Open-ILS/src/templates/opac/css/style.css.tt2 +++ b/Open-ILS/src/templates/opac/css/style.css.tt2 @@ -1129,7 +1129,10 @@ div#facet_sidebar { color: [% css_colors.text_alert %]; } #acct_prefs_header { float: left; } -.search_page_nav_link { cursor: pointer; } +.search_page_nav_link { + cursor: pointer; + padding-left: 1em; +} #opac.result.sort { width: 160px; } .renew-summary { font-size: [% css_fonts.size_bigger %]; font-style: italic; margin: 0.5ex 0; } .failure-text { margin-left: 4em; font-style: italic; color: [% css_colors.text_alert %]; } @@ -1190,10 +1193,7 @@ 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-list { padding-left: 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 d41822f12d..5673a85717 100644 --- a/Open-ILS/src/templates/opac/parts/result/paginate.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/paginate.tt2 @@ -18,16 +18,16 @@ - [% class = 'search_page_nav_link'; + [%- class = 'search_page_nav_link'; href = '#'; IF page > 0; href = mkurl('', {page => page - 1}); - ELSE; class = class _ ' invisible'; END; - %] + -%] [% l('Previous') %] + [%- END; - [%- # show links to 4 previous pages, the current page, and 3 more pages. + # 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 @@ -46,16 +46,16 @@ END; -%] - [%- END; -%] + [%- END; - [% class = 'search_page_nav_link'; + class = 'search_page_nav_link'; href = '#'; IF (page + 1) < page_count; href = mkurl('', {page => page + 1}); - ELSE; class = class _ ' invisible'; END; - %] + -%] [% l('Next') %] + [%- END; -%] -- 2.11.0