From 791b7884a107032ae22ae10a1a13e69cf564af0f Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Wed, 28 Mar 2012 23:10:17 -0400 Subject: [PATCH] TPAC: Centralized preferred library indicator Create an explicit "Preferred library: Foobar" entry at the top of the page (on the same line as pagination information), and include a subtle checkmark to enable users to quickly jump to their "Search preferences" settings and change their preferred library. This enables us to remove the "(Preferred library)" note in the copy counts for search results. At the same time, move from a table display (for a single row? what?) to a simple div/span layout for the search results. Signed-off-by: Dan Scott --- Open-ILS/src/templates/opac/parts/pref_lib_display.tt2 | 7 +++++++ Open-ILS/src/templates/opac/parts/record/body.tt2 | 1 + Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 | 2 +- Open-ILS/src/templates/opac/parts/result/paginate.tt2 | 15 ++++++--------- Open-ILS/web/css/skin/default/opac/style.css | 9 +++++++++ 5 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 Open-ILS/src/templates/opac/parts/pref_lib_display.tt2 diff --git a/Open-ILS/src/templates/opac/parts/pref_lib_display.tt2 b/Open-ILS/src/templates/opac/parts/pref_lib_display.tt2 new file mode 100644 index 0000000000..635c766658 --- /dev/null +++ b/Open-ILS/src/templates/opac/parts/pref_lib_display.tt2 @@ -0,0 +1,7 @@ +[%- IF ctx.pref_ou && ctx.pref_ou != ctx.search_ou; %] +[% + l('Preferred library: [_1][_2][_3]', '', ctx.get_aou(ctx.pref_ou).name, ''); + %][% l('?') %] + +[%- END; %] diff --git a/Open-ILS/src/templates/opac/parts/record/body.tt2 b/Open-ILS/src/templates/opac/parts/record/body.tt2 index c5d9ec8923..631b94b355 100644 --- a/Open-ILS/src/templates/opac/parts/record/body.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/body.tt2 @@ -13,6 +13,7 @@ [% 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; diff --git a/Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 b/Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 index d95d3a7c33..c183744c64 100644 --- a/Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 @@ -28,7 +28,7 @@ attrs.plib_copy_counts.$depth.available, attrs.plib_copy_counts.$depth.count, ou_name) | html - %] [% l('(Preferred)') %] + %]
[%- END %] [%- END %] diff --git a/Open-ILS/src/templates/opac/parts/result/paginate.tt2 b/Open-ILS/src/templates/opac/parts/result/paginate.tt2 index bcce1c8a87..edcc817b48 100644 --- a/Open-ILS/src/templates/opac/parts/result/paginate.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/paginate.tt2 @@ -1,17 +1,16 @@ [% BLOCK results_count_header %]
- - - - - - -
[% ctx.bookbag ? l('List Contents') : l('Search Results') %] + [% ctx.bookbag ? l('List Contents') : l('Search Results') %] + [% |l(ctx.result_start, ctx.result_stop, ctx.hit_count) %] Results [_1] - [_2] of [_3] [% END %] [% |l(page + 1, page_count) %](page [_1] of [_2])[% END %] - + + [%- INCLUDE "opac/parts/pref_lib_display.tt2" %] + [% class = 'search_page_nav_link'; @@ -51,9 +50,7 @@ [% l('Next') %] -
+
[% END %] diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css index 0279eea4d7..f36511c64b 100644 --- a/Open-ILS/web/css/skin/default/opac/style.css +++ b/Open-ILS/web/css/skin/default/opac/style.css @@ -1413,3 +1413,12 @@ table.result_holdings_table thead tr { table.result_holdings_table thead tr th { font-weight: bold; } +span.preflib { + margin: 0 2em 0 2em; +} +a.preflib_change { + vertical-align: super; + font-size: smaller; + line-height: normal; + text-decoration: none; +} -- 2.11.0