LP#1728147: more tweaks to grid
authorGalen Charlton <gmc@equinoxinitiative.org>
Thu, 22 Mar 2018 16:51:45 +0000 (12:51 -0400)
committerKathy Lussier <klussier@masslnc.org>
Thu, 22 Mar 2018 18:07:19 +0000 (14:07 -0400)
* Make paths to expire_time and cut_in_line more concise
* Add SMS Carrier column back
* Tweak labels of the patron first and last name columns
* Ensure that the "Call Number" column continues to be sortable
  by normalized call number label. Note that due to a quirk of
  egGrid, which doesn't currently have a way to specify that a column
  always be retrieved by a fielder query but /not/ be directly
  available as a displayable column, we also need a "Call Number Label"
  column at the moment.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>

Open-ILS/src/templates/staff/circ/holds/t_pull_list.tt2

index 6eb569c..d655968 100644 (file)
     path="current_copy.location.name" label="[% l('Shelving Location') %]">
   </eg-grid-field>
 
-  <eg-grid-field name="call_number_label" 
-    path="call_number_label" required hidden
+  <!-- Render the colum using the sort-able call number sort key, but
+       display the call number label, complete with prefix and suffix
+       in the cell. -->
+  <eg-grid-field name="call_number_sort_key" required
+    path="current_copy.call_number.label_sortkey"
     label="[% l('Call Number') %]">
+    <span>{{item.call_number_label}}</span>
   </eg-grid-field>
+  <!-- need call_number_label here so that the grid query always
+       fetches it; otherwise, the call number field above
+       won't consistently display values -->
+  <eg-grid-field name="call_number_label"
+    path="call_number_label" required hidden
+    label="[% l('Call Number Label') %]"></eg-grid-field>
 
   <eg-grid-field name="author" 
     path="current_copy.call_number.record.simple_record.author" 
       {{item.patron_barcode}}
     </a>
   </eg-grid-field>
-  <eg-grid-field label="[% l('Patron alias') %]" path="patron_alias" hidden></eg-grid-field>
-  <eg-grid-field label="[% l('Patron First') %]" path="patron_first" hidden></eg-grid-field>
-  <eg-grid-field label="[% l('Patron Last') %]" path="patron_last" hidden></eg-grid-field>
+  <eg-grid-field label="[% l('Patron Alias') %]" path="patron_alias" hidden></eg-grid-field>
+  <eg-grid-field label="[% l('Patron First Name') %]" path="patron_first" hidden></eg-grid-field>
+  <eg-grid-field label="[% l('Patron Last Name') %]" path="patron_last" hidden></eg-grid-field>
   <eg-grid-field name="pickup_lib_name" path="pickup_lib.name" 
     hidden label="[% l('Pickup Library') %]"></eg-grid-field>
   <eg-grid-field name="pickup_lib_shortname" path="pickup_lib.shortname" 
     hidden label="[% l('Request Library (Shortname)') %]"></eg-grid-field>
   <eg-grid-field name="selection_ou" path="selection_ou.shortname" 
     hidden label="[% l('Selection Locus') %]"></eg-grid-field>
+  <eg-grid-field name="sms_carrier_name" path="sms_carrier.name"
+    hidden label="[% l('SMS Carrier') %]"></eg-grid-field>
   <eg-grid-field name="sms_notify" path="sms_notify"
     hidden label="[% l('SMS Notify') %]"></eg-grid-field>
   <eg-grid-field name="email_notify" path="email_notify"
   </eg-grid-field>
   <eg-grid-field label="[% l('Edition') %]" path='mvr.edition' hidden>
   </eg-grid-field>
-  <eg-grid-field label="[% l('Top of Queue') %]" path='hold.cut_in_line' hidden>
+  <eg-grid-field label="[% l('Top of Queue') %]" path='cut_in_line' hidden>
   </eg-grid-field>
   <eg-grid-field label="[% l('Total Holds') %]" path='total_holds' hidden>
   </eg-grid-field>
   <eg-grid-field label="[% l('Request Date') %]" path='request_time' datatype="timestamp" hidden>
   </eg-grid-field>
-  <eg-grid-field label="[% l('Expire Date') %]" path='hold.expire_time' datatype="timestamp" hidden>
+  <eg-grid-field label="[% l('Expire Date') %]" path='expire_time' datatype="timestamp" hidden>
   </eg-grid-field>
 </eg-grid>