From cb51783a3b434036ed7121f666ce60e6fb7f08b3 Mon Sep 17 00:00:00 2001 From: Kathy Lussier Date: Sat, 14 Feb 2015 14:10:54 -0500 Subject: [PATCH] lp1422802: Improve visibility of parts on Place Holds screen Users often miss the list of parts on the Place Holds screen, leading to many title-level holds on records where only one or two libraries have 'unparted' copies. This branch adds some styling to add padding around the parts selector and to bold the Select a Part text. Many thanks to Christine Morgan whose custom work at NOBLE served as an inspiration for this styling. The branch also adds a new config.tt2 option to display parts with radio buttons instead of a select menu so that all of the parts will display on the screen. With this option, no parts are pre-selected, forcing the users to actively choose a part. Signed-off-by: Kathy Lussier Signed-off-by: Ben Shum --- Open-ILS/src/templates/opac/css/style.css.tt2 | 18 +++++++- Open-ILS/src/templates/opac/parts/config.tt2 | 7 ++++ Open-ILS/src/templates/opac/parts/js.tt2 | 24 +++++++++++ Open-ILS/src/templates/opac/parts/place_hold.tt2 | 52 ++++++++++++++++-------- 4 files changed, 81 insertions(+), 20 deletions(-) diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2 index f91b5045ad..2bfe26b61e 100644 --- a/Open-ILS/src/templates/opac/css/style.css.tt2 +++ b/Open-ILS/src/templates/opac/css/style.css.tt2 @@ -1221,11 +1221,24 @@ a.dash-link:hover { text-decoration: underline !important; } .unread-patron-message { font-weight: bold; } #hold-items-list td { padding: 5px; margin-bottom: 20px; } -.hold-items-list-title { font-size: [% css_fonts.size_bigger %]; } +.hold-items-list-title { + font-size: [% css_fonts.size_bigger %]; + margin-bottom: 20px; +} .hold-items-list-problem { color: [% css_colors.text_alert %]; } .hold_success_links > span { margin: 0 2em; } +.radio-parts-selection { + width: 75%; + margin-bottom: 20px; +} + +.parts-radio-option { + display: inline-block; + width:15em; +} + .mr_holds_no_formats { padding: 5px; margin-left: 25px; @@ -1753,9 +1766,10 @@ a.preflib_change { #acct_select, #acct_prefs_select { display: inline-block; } -#acct_tabs, #acct_prefs_tabs { + #acct_tabs, #acct_prefs_tabs { display:none; } + .radio-parts-selection { width: 90%; } } @media only screen and (max-width: 600px) { diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2 index 47df01b091..15ffda282a 100644 --- a/Open-ILS/src/templates/opac/parts/config.tt2 +++ b/Open-ILS/src/templates/opac/parts/config.tt2 @@ -72,6 +72,13 @@ disable_email_change = 'false'; allow_phone_notifications = 'true'; ############################################################################## +# Format of parts selection on Place Holds screen +# Set to true to use radio buttons for parts selection on the Place Holds +# screen. The default behavior is to to display them in a select menu. +############################################################################# +enable.radio.parts = 'false'; + +############################################################################## # Misc. UI Settings ############################################################################## # Option for full details as a default, esp. impt. for e-content diff --git a/Open-ILS/src/templates/opac/parts/js.tt2 b/Open-ILS/src/templates/opac/parts/js.tt2 index f9600a5f51..e6ec184322 100644 --- a/Open-ILS/src/templates/opac/parts/js.tt2 +++ b/Open-ILS/src/templates/opac/parts/js.tt2 @@ -122,4 +122,28 @@ var aou_hash = { }; + +[% IF ctx.page == 'place_hold' %] + +[% END %] + [%- END; # want_dojo -%] diff --git a/Open-ILS/src/templates/opac/parts/place_hold.tt2 b/Open-ILS/src/templates/opac/parts/place_hold.tt2 index e9fc008bd2..8fa5c44a3f 100644 --- a/Open-ILS/src/templates/opac/parts/place_hold.tt2 +++ b/Open-ILS/src/templates/opac/parts/place_hold.tt2 @@ -7,8 +7,23 @@

[% l('Place Hold') %]

[% some_holds_allowed = -1 %] + + + [% FOR hdata IN ctx.hold_data; + attrs = {marc_xml => hdata.marc_xml}; + PROCESS get_marc_attrs args=attrs; + this_hold_disallowed = 0; + + IF CGI.param('hold_type') == 'M'; + IF hdata.metarecord_filters.formats.size == 0; + this_hold_disallowed = 1; + # if this is the first hold and it's disallowed, + # assume all holds are, until we proven otherwise + SET some_holds_allowed = 0 IF some_holds_allowed == -1; + ELSE; some_holds_allowed = 1; END; + END %] -
+ 0 AND enable.radio.parts == 'true' %] onsubmit="return validateHoldForm()" [% END %] > [% redirect = CGI.param('hold_source_page') || CGI.param('redirect_to') || CGI.referer; @@ -60,22 +75,7 @@

[% END %] - - [% FOR hdata IN ctx.hold_data; - attrs = {marc_xml => hdata.marc_xml}; - PROCESS get_marc_attrs args=attrs; - this_hold_disallowed = 0; - - IF CGI.param('hold_type') == 'M'; - IF hdata.metarecord_filters.formats.size == 0; - this_hold_disallowed = 1; - # if this is the first hold and it's disallowed, - # assume all holds are, until we proven otherwise - SET some_holds_allowed = 0 IF some_holds_allowed == -1; - ELSE; some_holds_allowed = 1; END; - END %] -
[% IF !this_hold_disallowed %] @@ -84,8 +84,23 @@
[% attrs.title_extended | html %]
[% IF hdata.parts AND !this_hold_disallowed %] [% IF hdata.parts.size > 0 %] -
-