From 79a412315e9ef8d09d0997c78fb918b24ed49ead Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Fri, 15 Jun 2012 22:10:15 -0400 Subject: [PATCH] TPAC: Add record detail navigation to page bottom A usability rule of thumb suggests that navigation on long pages should not require you to scroll back up to the top of the page from the bottom; that gets old fast. We already do this on search results pages; bring the same good practice to record details. Signed-off-by: Dan Scott Signed-off-by: Dan Wells --- .../src/templates/opac/parts/record/body.tt2 | 41 +------------------ .../opac/parts/record/navigation.tt2 | 38 +++++++++++++++++ Open-ILS/web/css/skin/default/opac/style.css | 8 ++-- 3 files changed, 44 insertions(+), 43 deletions(-) create mode 100644 Open-ILS/src/templates/opac/parts/record/navigation.tt2 diff --git a/Open-ILS/src/templates/opac/parts/record/body.tt2 b/Open-ILS/src/templates/opac/parts/record/body.tt2 index 664abc9dbf..0d9a58b2ca 100644 --- a/Open-ILS/src/templates/opac/parts/record/body.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/body.tt2 @@ -5,49 +5,12 @@ ctx.record_attrs = attrs; # capture for JS %]
- - [% IF ctx.search_result_index >= 0 %] -
- - [% l('◄ Search Results') %] - - [% l('Showing Item [_1] of [_2]', ctx.search_result_index + 1, ctx.hit_count) %] - - - [%- INCLUDE "opac/parts/pref_lib_display.tt2" %] -
- [% - IF ctx.prev_search_record; - prev_args = {}; - IF ctx.search_page > 0 AND - ctx.search_result_index % ((ctx.page_size * ctx.search_page)) == 0; # first record in the page - prev_args.page = ctx.search_page - 1; - END; - ctx.prev_rec_url = mkurl(ctx.prev_search_record, prev_args, stop_parms); - %] - ◄ [% l('Previous') %] - [% END %] - - [% - IF ctx.next_search_record; - next_args = {}; - IF (ctx.page_size * (ctx.search_page + 1)) == ctx.search_result_index + 1; - next_args.page = ctx.search_page + 1; - END; - ctx.next_rec_url = mkurl(ctx.next_search_record, next_args, stop_parms); - %] - [% l('Next') %] ► - [% END %] - -
-
- [% END %] + [%- INCLUDE "opac/parts/record/navigation.tt2" %] [%- IF ctx.bib_is_dead %]
[% l("This record has been deleted from the database. We recommend that you remove this title from any bookbags it may have been added to.") %]
[%- END %] [% INCLUDE "opac/parts/record/summary.tt2" %] + [%- INCLUDE "opac/parts/record/navigation.tt2" %]
diff --git a/Open-ILS/src/templates/opac/parts/record/navigation.tt2 b/Open-ILS/src/templates/opac/parts/record/navigation.tt2 new file mode 100644 index 0000000000..29b1106a68 --- /dev/null +++ b/Open-ILS/src/templates/opac/parts/record/navigation.tt2 @@ -0,0 +1,38 @@ +[% IF ctx.search_result_index >= 0 %] +
+ + [% l('◄ Search Results') %] + + [% l('Showing Item [_1] of [_2]', ctx.search_result_index + 1, ctx.hit_count) %] + + + [%- INCLUDE "opac/parts/pref_lib_display.tt2" %] +
+ [% + IF ctx.prev_search_record; + prev_args = {}; + IF ctx.search_page > 0 AND + ctx.search_result_index % ((ctx.page_size * ctx.search_page)) == 0; # first record in the page + prev_args.page = ctx.search_page - 1; + END; + ctx.prev_rec_url = mkurl(ctx.prev_search_record, prev_args, stop_parms); + %] + ◄ [% l('Previous') %] + [% END %] + + [% + IF ctx.next_search_record; + next_args = {}; + IF (ctx.page_size * (ctx.search_page + 1)) == ctx.search_result_index + 1; + next_args.page = ctx.search_page + 1; + END; + ctx.next_rec_url = mkurl(ctx.next_search_record, next_args, stop_parms); + %] + [% l('Next') %] ► + [% END %] + +
+
+[% END %] diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css index 6e697724a6..8a80c04c55 100644 --- a/Open-ILS/web/css/skin/default/opac/style.css +++ b/Open-ILS/web/css/skin/default/opac/style.css @@ -335,26 +335,26 @@ span.dash_divider { color: #666; } -#rdetail_header { +.rdetail_header { padding: 5px 7px 6px 0px; margin-left: 1em; border-bottom: 1px dotted #ccc; } -#rdetail_results a { +.rdetail_results a { color:#007a54; font-weight:bold; font-size: 1.2em; } -#rdetail_result_count { +.rdetail_result_count { color: black; font-weight: normal; padding-left: 1em; display: inline-block; } -#rdetail_result_nav { +.rdetail_result_nav { font-weight:normal; padding-left: 1em; display: inline-block; -- 2.43.2