Improve visibility of parts on Place Holds screen user/kmlussier/more-visible-parts
authorKathy Lussier <klussier@masslnc.org>
Sat, 14 Feb 2015 19:10:54 +0000 (14:10 -0500)
committerKathy Lussier <klussier@masslnc.org>
Sat, 14 Feb 2015 19:44:47 +0000 (14:44 -0500)
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 select 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 <klussier@masslnc.org>
Open-ILS/src/templates/opac/css/style.css.tt2
Open-ILS/src/templates/opac/parts/config.tt2
Open-ILS/src/templates/opac/parts/place_hold.tt2

index 416e573..a809c6d 100644 (file)
@@ -1210,9 +1210,14 @@ a.dash-link:hover { text-decoration: underline !important; }
 .inactive-hold { background: [% css_colors.accent_lightest %]; }
 
 #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 %]; }
 
+.parts-radio { display: inline-block; }
+
 .mr_holds_no_formats { 
   padding: 5px;
   margin-left: 25px;
index 8b0e69f..de79f7f 100644 (file)
@@ -184,4 +184,11 @@ ctx.google_books_preview = 0;
 # TIME_FORMAT = '%H:%M'; # for 16:32 (24 hour) format
 ##############################################################################
 
+##############################################################################
+# 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';
+
 %]
index 8c70ca5..9d3eb43 100644 (file)
                     <div class='hold-items-list-title'>[% attrs.title_extended | html %]</div>
                     [% IF hdata.parts AND !this_hold_disallowed %]
                         [% IF hdata.parts.size > 0 %]
-                        <div style='padding-left: 10px'>
-                            <span><label for='select_hold_part'>[%
+                        <div style='padding-left: 10px; padding-bottom: 15px;'>
+                            [% IF enable.radio.parts == 'true' %]
+                              <span style='font-weight: bold;'><label for='select_hold_part'>[%
+                                'Select a Part:'
+                               %]</label></span>
+                              [% FOR part IN hdata.parts %]
+                                <span class='parts-radio'><input type='radio' name='part' id=[% part.id %] value=[% part.id %]>
+                                  <label for=[% part.id %]>[% part.label | html %]</label></span>
+                              [% END %]
+                              [% IF !hdata.part_required %]
+                                <input type='radio' name='part' value='' required>[% l('All Parts') %]
+                              [% END %]
+                          [% ELSE %]
+                            <span style='font-weight: bold;'><label for='select_hold_part'>[%
                                 hdata.part_required ? l('Select a Part:') : l('Select a Part (optional):')
                             %]</label></span>
                             <select id='select_hold_part' name='part'>
@@ -84,6 +96,7 @@
                                 <option value='[% part.id %]'>[% part.label | html %]</option>
                                 [% END %]
                             </select>
+                          [% END %]
                         </div>
                         [% ELSE %]
                         <input type='hidden' name='part' value=''/>