lp1691237 webstaff: fix Format Dates and Format Times
authorJason Etheridge <jason@equinoxinitiative.org>
Mon, 5 Jun 2017 21:32:55 +0000 (17:32 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 19 Jun 2017 16:15:46 +0000 (12:15 -0400)
This change deprecates the existing Format Dates and Format Times settings
and adds two settings for use with the webstaff client:

    Format Dates with this pattern
    Format Date+Time with this pattern

These settings use format strings as documented here:

https://docs.angularjs.org/api/ng/filter/date

There is overlap with how the Dojo formats worked, but also some differences.

The original Format Dates and Format Times settings worked together, but the
new settings work independently.  Certain field elements will use one, and
certain field elements will use the other.  These distinctions are hard-coded
in the various UI templates, with the idea being that timestamp fields in
which the date component alone is sufficient information (for example, DOB)
will use the Format Dates setting.  Fields where the time component is
important (for example, Checkout Time) will use the Format Date+Time setting.

When the settings Format Dates and Format Date+Time are unset, we will default
to "shortDate" (M/d/yy) and "short" (M/d/yy h:mm a), respectively.

Signed-off-by: Jason Etheridge <jason@equinoxinitiative.org>
Signed-off-by: Andrea Neiman <abneiman@equinoxinitiative.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
59 files changed:
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.webstaff_date_format_ou_settings.sql [new file with mode: 0644]
Open-ILS/src/templates/staff/admin/local/circ/neg_balance_users.tt2
Open-ILS/src/templates/staff/admin/local/rating/badge.tt2
Open-ILS/src/templates/staff/admin/server/config/marc_field.tt2
Open-ILS/src/templates/staff/admin/workstation/t_log.tt2
Open-ILS/src/templates/staff/cat/catalog/t_holds.tt2
Open-ILS/src/templates/staff/cat/item/t_circ_list_pane.tt2
Open-ILS/src/templates/staff/cat/item/t_circs_pane.tt2
Open-ILS/src/templates/staff/cat/item/t_holds_pane.tt2
Open-ILS/src/templates/staff/cat/item/t_list.tt2
Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2
Open-ILS/src/templates/staff/cat/share/t_record_summary.tt2
Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2
Open-ILS/src/templates/staff/cat/z3950/t_list.tt2
Open-ILS/src/templates/staff/circ/checkin/t_checkin.tt2
Open-ILS/src/templates/staff/circ/checkin/t_checkin_table.tt2
Open-ILS/src/templates/staff/circ/holds/t_pull_list.tt2
Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2
Open-ILS/src/templates/staff/circ/patron/t_alerts.tt2
Open-ILS/src/templates/staff/circ/patron/t_bill_history_payments.tt2
Open-ILS/src/templates/staff/circ/patron/t_bill_history_xacts.tt2
Open-ILS/src/templates/staff/circ/patron/t_bills_list.tt2
Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2
Open-ILS/src/templates/staff/circ/patron/t_group.tt2
Open-ILS/src/templates/staff/circ/patron/t_holds_list.tt2
Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2
Open-ILS/src/templates/staff/circ/patron/t_messages.tt2
Open-ILS/src/templates/staff/circ/patron/t_notes.tt2
Open-ILS/src/templates/staff/circ/patron/t_pending_list.tt2
Open-ILS/src/templates/staff/circ/patron/t_search_results.tt2
Open-ILS/src/templates/staff/circ/patron/t_summary.tt2
Open-ILS/src/templates/staff/circ/patron/t_xact_details.tt2
Open-ILS/src/templates/staff/circ/renew/t_renew.tt2
Open-ILS/src/templates/staff/circ/share/t_bill_patron_dialog.tt2
Open-ILS/src/templates/staff/circ/share/t_circ_exists_dialog.tt2
Open-ILS/src/templates/staff/circ/share/t_copy_in_transit_dialog.tt2
Open-ILS/src/templates/staff/circ/share/t_hold_details.tt2
Open-ILS/src/templates/staff/circ/share/t_hold_shelf_dialog.tt2
Open-ILS/src/templates/staff/circ/share/t_transit_dialog.tt2
Open-ILS/src/templates/staff/circ/transits/t_list.tt2
Open-ILS/src/templates/staff/share/print_templates/t_bill_payment.tt2
Open-ILS/src/templates/staff/share/print_templates/t_bills_current.tt2
Open-ILS/src/templates/staff/share/print_templates/t_bills_historical.tt2
Open-ILS/src/templates/staff/share/print_templates/t_checkin.tt2
Open-ILS/src/templates/staff/share/print_templates/t_checkout.tt2
Open-ILS/src/templates/staff/share/print_templates/t_hold_shelf_slip.tt2
Open-ILS/src/templates/staff/share/print_templates/t_hold_transit_slip.tt2
Open-ILS/src/templates/staff/share/print_templates/t_holds_for_bib.tt2
Open-ILS/src/templates/staff/share/print_templates/t_holds_for_patron.tt2
Open-ILS/src/templates/staff/share/print_templates/t_in_house_use_list.tt2
Open-ILS/src/templates/staff/share/print_templates/t_item_status.tt2
Open-ILS/src/templates/staff/share/print_templates/t_items_out.tt2
Open-ILS/src/templates/staff/share/print_templates/t_patron_note.tt2
Open-ILS/src/templates/staff/share/print_templates/t_renew.tt2
Open-ILS/src/templates/staff/share/print_templates/t_transit_list.tt2
Open-ILS/src/templates/staff/share/print_templates/t_transit_slip.tt2
Open-ILS/web/js/ui/default/staff/services/grid.js
Open-ILS/web/js/ui/default/staff/services/startup.js

index 2ec447a..ffa6732 100644 (file)
@@ -16836,3 +16836,43 @@ VALUES (
     'ebook_api',
     'string'
 );
+
+INSERT into config.org_unit_setting_type (
+     name
+    ,grp
+    ,label
+    ,description
+    ,datatype
+) VALUES ( ----------------------------------------
+     'webstaff.format.dates'
+    ,'gui'
+    ,oils_i18n_gettext(
+         'webstaff.format.dates'
+        ,'Format Dates with this pattern'
+        ,'coust'
+        ,'label'
+    )
+    ,oils_i18n_gettext(
+         'webstaff.format.dates'
+        ,'Format Dates with this pattern (examples: "yyyy-MM-dd" for "2010-04-26", "MMM d, yyyy" for "Apr 26, 2010").  This will be used in areas where a date without a timestamp is sufficient, like Date of Birth.'
+        ,'coust'
+        ,'description'
+    )
+    ,'string'
+), ( ----------------------------------------
+     'webstaff.format.date_and_time'
+    ,'gui'
+    ,oils_i18n_gettext(
+         'webstaff.format.date_and_time'
+        ,'Format Date+Time with this pattern'
+        ,'coust'
+        ,'label'
+    )
+    ,oils_i18n_gettext(
+         'webstaff.format.date_and_time'
+        ,'Format Date+Time with this pattern (examples: "yy-MM-dd h:m:s.SSS a" for "16-04-05 2:07:20.666 PM", "yyyy-dd-MMM HH:mm" for "2016-05-Apr 14:07").  This will be used in areas of the client where a date with a timestamp is needed, like Checkout, Due Date, or Record Created.'
+        ,'coust'
+        ,'description'
+    )
+    ,'string'
+);
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.webstaff_date_format_ou_settings.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.webstaff_date_format_ou_settings.sql
new file mode 100644 (file)
index 0000000..a7ac6af
--- /dev/null
@@ -0,0 +1,68 @@
+BEGIN;
+
+--SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT into config.org_unit_setting_type (
+     name
+    ,grp
+    ,label
+    ,description
+    ,datatype
+) VALUES ( ----------------------------------------
+     'webstaff.format.dates'
+    ,'gui'
+    ,oils_i18n_gettext(
+         'webstaff.format.dates'
+        ,'Format Dates with this pattern'
+        ,'coust'
+        ,'label'
+    )
+    ,oils_i18n_gettext(
+         'webstaff.format.dates'
+        ,'Format Dates with this pattern (examples: "yyyy-MM-dd" for "2010-04-26", "MMM d, yyyy" for "Apr 26, 2010").  This will be used in areas where a date without a timestamp is sufficient, like Date of Birth.'
+        ,'coust'
+        ,'description'
+    )
+    ,'string'
+), ( ----------------------------------------
+     'webstaff.format.date_and_time'
+    ,'gui'
+    ,oils_i18n_gettext(
+         'webstaff.format.date_and_time'
+        ,'Format Date+Time with this pattern'
+        ,'coust'
+        ,'label'
+    )
+    ,oils_i18n_gettext(
+         'webstaff.format.date_and_time'
+        ,'Format Date+Time with this pattern (examples: "yy-MM-dd h:m:s.SSS a" for "16-04-05 2:07:20.666 PM", "yyyy-dd-MMM HH:mm" for "2016-05-Apr 14:07").  This will be used in areas of the client where a date with a timestamp is needed, like Checkout, Due Date, or Record Created.'
+        ,'coust'
+        ,'description'
+    )
+    ,'string'
+);
+
+UPDATE
+    config.org_unit_setting_type
+SET
+    label = 'Deprecated: ' || label -- FIXME: Is this okay?
+WHERE
+    name IN ('format.date','format.time')
+;
+
+-- for testing, setting removal:
+--DELETE FROM actor.org_unit_setting WHERE name IN (
+--     'webstaff.format.dates'
+--    ,'webstaff.format.date_and_time'
+--);
+--DELETE FROM config.org_unit_setting_type_log WHERE field_name IN (
+--     'webstaff.format.dates'
+--    ,'webstaff.format.date_and_time'
+--);
+--DELETE FROM config.org_unit_setting_type WHERE name IN (
+--     'webstaff.format.dates'
+--    ,'webstaff.format.date_and_time'
+--);
+--UPDATE config.org_unit_setting_type SET label = REPLACE(label,'Deprecated: ','') WHERE name in ('format.date','format.time');
+
+COMMIT;
index 9501f6a..8291796 100644 (file)
   features="-sort,-multisort"
   items-provider="grid_provider"
   grid-controls="grid_controls"
-  persist-key="admin.local.circ.neg_balance_users">
+  persist-key="admin.local.circ.neg_balance_users"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-action handler="get_user"
     label="[% l('Retrieve Patron') %]"></eg-grid-action>
 
   <eg-grid-field label="[% l('Barred') %]" path='usr.barred'></eg-grid-field>
-  <eg-grid-field label="[% l('Date of Birth') %]" path='usr.dob'></eg-grid-field>
+  <eg-grid-field label="[% l('Date of Birth') %]" dateformat="{{$root.egDateFormat}}" datatype="timestamp" path='usr.dob'></eg-grid-field>
   <eg-grid-field label="[% l('Last Name') %]" path='usr.family_name'></eg-grid-field>
   <eg-grid-field label="[% l('First Name') %]" path='usr.first_given_name'></eg-grid-field>
   <eg-grid-field label="[% l('Middle Name') %]" path='usr.second_given_name'></eg-grid-field>
index a67249d..ce66fc0 100644 (file)
@@ -43,7 +43,8 @@
     idl-class="rb"
     grid-controls="gridControls"
     features="-multiselect"
-    persist-key="admin.local.rating.badge">
+    persist-key="admin.local.rating.badge"
+    dateformat="{{$root.egDateAndTimeFormat}}">
    
     <eg-grid-action label="[% l('Add badge') %]" handler="create_rb"></eg-grid-action> 
     <eg-grid-action label="[% l('Edit badge') %]" handler="update_rb"></eg-grid-action> 
index 3316ab6..b9dbdc1 100644 (file)
@@ -37,7 +37,8 @@
     idl-class="cmrcfld"
     grid-controls="gridControls"
     features="-multiselect"
-    persist-key="admin.server.config.marc_field">
+    persist-key="admin.server.config.marc_field"
+    dateformat="{{$root.egDateAndTimeFormat}}">
 
     <eg-grid-menu-item handler="new_record" label="[% l('New Record') %]"></eg-grid-menu-item>
     <eg-grid-action handler="edit_record" label="[% l('Edit Record') %]"></eg-grid-action>
index 014d74d..50c9bc5 100644 (file)
@@ -11,7 +11,7 @@
   items-provider="grid_work_log_provider"
   grid-controls="grid_controls"
   persist-key="admin.workstation.work_log"
->
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-menu-item handler="refresh_ui" 
     label="[% l('Refresh') %]"></eg-grid-menu-item>
@@ -27,7 +27,7 @@
   <eg-grid-field path='amount' label="[% l('Amount') %]" hidden></eg-grid-field>
   <eg-grid-field path='user' label="[% l('Patron') %]"></eg-grid-field>
   <eg-grid-field path='item' label="[% l('Item') %]"></eg-grid-field>
-  <eg-grid-field path='when' label="[% l('When') %]"></eg-grid-field>
+  <eg-grid-field path='when' label="[% l('When') %]" datatype="timestamp"></eg-grid-field>
   <eg-grid-field path='actor' label="[% l('Staff') %]" hidden></eg-grid-field>
 </eg-grid>
 
@@ -40,7 +40,7 @@
   items-provider="grid_patron_log_provider"
   grid-controls="grid_controls"
   persist-key="admin.workstation.patron_log"
->
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-menu-item handler="load_item" 
     label="[% l('Retrieve Item') %]"></eg-grid-menu-item>
@@ -53,7 +53,7 @@
   <eg-grid-field path='amount' label="[% l('Amount') %]" hidden></eg-grid-field>
   <eg-grid-field path='user' label="[% l('Patron') %]"></eg-grid-field>
   <eg-grid-field path='item' label="[% l('Item') %]"></eg-grid-field>
-  <eg-grid-field path='when' label="[% l('When') %]"></eg-grid-field>
+  <eg-grid-field path='when' label="[% l('When') %]" datatype="timestamp"></eg-grid-field>
   <eg-grid-field path='actor' label="[% l('Staff') %]" hidden></eg-grid-field>
 </eg-grid>
 
index aafa779..1756822 100644 (file)
@@ -15,7 +15,8 @@
     features="-sort,-multisort"
     items-provider="hold_grid_data_provider"
     grid-controls="hold_grid_controls"
-    persist-key="cat.catalog.holds">
+    persist-key="cat.catalog.holds"
+    dateformat="{{$root.egDateAndTimeFormat}}">
 
     <eg-grid-menu-item handler="detail_view" 
       label="[% l('Detail View') %]"></eg-grid-menu-item>
@@ -65,9 +66,9 @@
 
     <eg-grid-field label="[% l('Patron Barcode') %]">{{item.patron_barcode}}</eg-grid-field>
     <eg-grid-field label="[% l('Patron alias') %]">{{item.patron_alias}}</eg-grid-field>
-    <eg-grid-field label="[% l('Request Date') %]" path='hold.request_time'></eg-grid-field>
-    <eg-grid-field label="[% l('Capture Date') %]" path='hold.capture_time'></eg-grid-field>
-    <eg-grid-field label="[% l('Available Date') %]" path='hold.shelf_time'></eg-grid-field>
+    <eg-grid-field label="[% l('Request Date') %]" path='hold.request_time' datatype="timestamp"></eg-grid-field>
+    <eg-grid-field label="[% l('Capture Date') %]" path='hold.capture_time' datatype="timestamp"></eg-grid-field>
+    <eg-grid-field label="[% l('Available Date') %]" path='hold.shelf_time' datatype="timestamp"></eg-grid-field>
     <eg-grid-field label="[% l('Hold Type') %]" path='hold.hold_type'></eg-grid-field>
     <eg-grid-field label="[% l('Pickup Library') %]" path='hold.pickup_lib.shortname'></eg-grid-field>
 
index 698869b..3cab22b 100644 (file)
   </div>
   <div class="flex-row">
     <div class="flex-cell">[% l('Check Out Date') %]</div>
-    <div class="flex-cell well">{{circ.xact_start() | date:'short'}}</div>
+    <div class="flex-cell well">{{circ.xact_start() | date:egDateAndTimeFormat}}</div>
     <div class="flex-cell">[% l('Due Date') %]</div>
-    <div class="flex-cell well">{{circ.due_date() | date:'short'}}</div>
+    <div class="flex-cell well">{{circ.due_date() | date:egDateAndTimeFormat}}</div>
     <div class="flex-cell">[% l('Stop Fines Time') %]</div>
-    <div class="flex-cell well">{{circ.stop_fines_time() | date:'short'}}</div>
+    <div class="flex-cell well">{{circ.stop_fines_time() | date:egDateAndTimeFormat}}</div>
     <div class="flex-cell">[% l('Checkin Time') %]</div>
-    <div class="flex-cell well">{{circ.checkin_time() | date:'short'}}</div>
+    <div class="flex-cell well">{{circ.checkin_time() | date:egDateAndTimeFormat}}</div>
   </div>
   <div class="flex-row">
     <div class="flex-cell">[% l('Check Out Library') %]</div>
index 512f5c3..8a165b3 100644 (file)
@@ -37,7 +37,7 @@
   <div class="flex-row">
     <div class="flex-cell">[% l('Checkout Date') %]</div>
     <div class="flex-cell well">
-      {{prev_circ_summary.start_time() | date:'short'}}
+      {{prev_circ_summary.start_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
 
@@ -51,7 +51,7 @@
   <div class="flex-row">
     <div class="flex-cell">[% l('Last Renewed On') %]</div>
     <div class="flex-cell well">
-      {{prev_circ_summary.last_renewal_time() | date:'short'}}
+      {{prev_circ_summary.last_renewal_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
 
   <div class="flex-row">
     <div class="flex-cell">[% l('Stop Fines Time') %]</div>
     <div class="flex-cell well">
-      {{prev_circ_summary.last_stop_fines_time() | date:'short'}}
+      {{prev_circ_summary.last_stop_fines_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
   <div class="flex-row">
     <div class="flex-cell">[% l('Checkin Time') %]</div>
     <div class="flex-cell well">
-      {{prev_circ_summary.last_checkin_time() | date:'short'}}
+      {{prev_circ_summary.last_checkin_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
   <div class="flex-row">
     <div class="flex-cell">[% l('Checkin Scan Time') %]</div>
     <div class="flex-cell well">
-      {{prev_circ_summary.last_checkin_scan_time() | date:'short'}}
+      {{prev_circ_summary.last_checkin_scan_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
   <div class="flex-row">
   <div class="flex-row">
     <div class="flex-cell">[% l('Checkout Date') %]</div>
     <div class="flex-cell well">
-      {{circ.xact_start() | date:'short'}}
+      {{circ.xact_start() | date:egDateAndTimeFormat}}
     </div>
   </div>
 
   <div class="flex-row">
     <div class="flex-cell">[% l('Last Renewed On') %]</div>
     <div class="flex-cell well">
-      {{circ_summary.last_renewal_time() | date:'short'}}
+      {{circ_summary.last_renewal_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
 
   <div class="flex-row">
     <div class="flex-cell">[% l('Stop Fines Time') %]</div>
     <div class="flex-cell well">
-      {{circ.stop_fines_time() | date:'short'}}
+      {{circ.stop_fines_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
 
   <div class="flex-row">
     <div class="flex-cell">[% l('Checkin Time') %]</div>
     <div class="flex-cell well">
-      {{circ.checkin_time() | date:'short'}}
+      {{circ.checkin_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
 
   <div class="flex-row">
     <div class="flex-cell">[% l('Checkin Scan Time') %]</div>
     <div class="flex-cell well">
-      {{circ.checkin_scan_time() | date:'short'}}
+      {{circ.checkin_scan_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
 
index 601c128..b66ba06 100644 (file)
   <div class="flex-row">
     <div class="flex-cell">[% l('Request Date') %]</div>
     <div class="flex-cell well">
-      {{hold.request_time() | date:'short'}}
+      {{hold.request_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
   <div class="flex-row">
     <div class="flex-cell">[% l('Capture Date') %]</div>
     <div class="flex-cell well">
-      {{hold.capture_time() | date:'short'}}
+      {{hold.capture_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
   <div class="flex-row">
     <div class="flex-cell">[% l('Shelf Time') %]</div>
     <div class="flex-cell well">
-      {{hold.shelf_time() | date:'short'}}
+      {{hold.shelf_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
   <div class="flex-row">
     <div class="flex-cell">[% l('Shelf Expire Time') %]</div>
     <div class="flex-cell well">
-      {{hold.shelf_expire_time() | date:'short'}}
+      {{hold.shelf_expire_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
   <div class="flex-row">
     <div class="flex-cell">[% l('Hold Expire Time') %]</div>
     <div class="flex-cell well">
-      {{hold.expire_time() | date:'short'}}
+      {{hold.expire_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
   <div class="flex-row">
   <div class="flex-row">
     <div class="flex-cell">[% l('Transit Send Time') %]</div>
     <div class="flex-cell well">
-      {{transit.source_send_time() | date:'short'}}
+      {{transit.source_send_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
   <div class="flex-row">
     <div class="flex-cell">[% l('Transit Receive Time') %]</div>
     <div class="flex-cell well">
-      {{transit.source_recv_time() | date:'short'}}
+      {{transit.source_recv_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
 </div>
index 42dd3f2..176527c 100644 (file)
@@ -5,7 +5,8 @@
   main-label="[% l('Item Status') %]"
   items-provider="gridDataProvider"
   grid-controls="gridControls"
-  persist-key="cat.items">
+  persist-key="cat.items"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-action handler="add_copies_to_bucket"
     label="[% l('Add Items to Bucket') %]"></eg-grid-action>
@@ -61,9 +62,8 @@
   <eg-grid-field label="[% l('Alert Message') %]"  path='alert_message' visible></eg-grid-field>
   <eg-grid-field label="[% l('Barcode') %]"        path='barcode' visible></eg-grid-field>
   <eg-grid-field label="[% l('Call Number') %]"    path="call_number.label" visible></eg-grid-field>
-  <eg-grid-field label="[% l('Due Date') %]"       path="_circ.due_date" visible>
-    {{item['_circ']['due_date'] | date:'short'}}
-  </eg-grid-field>
+  <eg-grid-field label="[% l('Due Date') %]"       path="_circ.due_date" datatype="timestamp" visible></eg-grid-field>
+
   <eg-grid-field label="[% l('Location') %]"       path="location.name" visible></eg-grid-field>
   <eg-grid-field label="[% l('Copy Status') %]"    path="status.name" visible></eg-grid-field>
   <eg-grid-field label="[% l('Title') %]"       
   <eg-grid-field label="[% l('Acquisition Cost') %]"     path="cost" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Age-Based Hold Protection') %]"  path="age_protect" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Author') %]"               path="call_number.record.simple_record.author"  hidden></eg-grid-field>
-  <eg-grid-field label="[% l('Checkin Date') %]"         path="_circ_summary.last_checkin_time" hidden>
-    {{item['_circ_summary']['last_checkin_time'] | date:'short'}}
-  </eg-grid-field>
-  <eg-grid-field label="[% l('Checkin Scan Date') %]"    path="_circ_summary.last_checkin_scan_time" hidden>
-    {{item['_circ_summary.last_checkin_scan_time'] | date:'short'}}
-  </eg-grid-field>
+  <eg-grid-field label="[% l('Checkin Date') %]"         path="_circ_summary.last_checkin_time" datatype="timestamp" hidden></eg-grid-field>
+  <eg-grid-field label="[% l('Checkin Scan Date') %]"    path="_circ_summary.last_checkin_scan_time" datatype="timestamp" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Checkin Workstation') %]"  path="_circ_summary.last_checkin_workstation" hidden></eg-grid-field>
-  <eg-grid-field label="[% l('Checkout Date') %]"  path="_circ_summary.start_time" hidden>
-    {{item['_circ_summary']['start_time'] | date:'short'}}
-  </eg-grid-field>
+  <eg-grid-field label="[% l('Checkout Date') %]"  path="_circ_summary.start_time" datatype="timestamp" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Checkout Workstation') %]"  path="_circ_summary.checkout_workstation" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Checkout/Renewal Library') %]"  path="_circ.circ_lib.name" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Circulation ID') %]"        path="_circ.id" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Copy ID') %]"               path="id" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Copy Number') %]"           path="copy_number" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Created By') %]"            path="creator" hidden></eg-grid-field>
-  <eg-grid-field label="[% l('Date Created') %]"          path="create_date" hidden>
-    {{item['create_date'] | date:'short'}}
-  </eg-grid-field>
-  <eg-grid-field label="[% l('Date Last Edited') %]"      path="edit_date" hidden>
-    {{item['edit_date'] | date:'short'}}
-  </eg-grid-field>
-  <eg-grid-field label="[% l('Date Record Created') %]"   path="call_number.record.create_date" hidden>
-    {{item['call_number.record.create_date'] | date:'short'}}
-  </eg-grid-field>
-  <eg-grid-field label="[% l('Date Record Last Edited') %]"    path="call_number.record.edit_date" hidden>
-    {{item['call_number.record.create_date'] | date:'short'}}
-  </eg-grid-field>
+  <eg-grid-field label="[% l('Date Created') %]"          path="create_date" datatype="timestamp" hidden></eg-grid-field>
+  <eg-grid-field label="[% l('Date Last Edited') %]"      path="edit_date" datatype="timestamp" hidden></eg-grid-field>
+  <eg-grid-field label="[% l('Date Record Created') %]"   path="call_number.record.create_date" datatype="timestamp" hidden></eg-grid-field>
+  <eg-grid-field label="[% l('Date Record Last Edited') %]"    path="call_number.record.edit_date" datatype="timestamp" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Deleted?') %]"              path="deleted" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Document ID') %]"           path="call_number.record.id" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Edited By') %]"             path="editor" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Fine Level') %]"            path="fine_level" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Fines Stopped') %]"         path="_circ_summary.last_stop_fines" hidden></eg-grid-field>
-  <eg-grid-field label="[% l('Fines Stopped Time') %]"    path="_circ_summary.last_stop_fines_time" hidden>
-    {{item['_circ_summary']['last_stop_fines_time'] | date:'short'}}
-  </eg-grid-field>
+  <eg-grid-field label="[% l('Fines Stopped Time') %]"    path="_circ_summary.last_stop_fines_time" datatype="timestamp" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Floating?') %]"             path="floating" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Holdable?') %]"             path="holdable" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Holds Count') %]"           path="holds_count" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Quality') %]"               path="call_number.record.simple_record.quality" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Reference?') %]"            path="ref" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Remaining Renewals') %]"    path="_circ.renewals_remaining" hidden></eg-grid-field>
-  <eg-grid-field label="[% l('Status Changed Time') %]"   path="status_changed_time" hidden>
-    {{item['status_changed_time'] | date:'short'}}
-  </eg-grid-field>
+  <eg-grid-field label="[% l('Status Changed Time') %]"   path="status_changed_time" datatype="timestamp" hidden></eg-grid-field>
   <eg-grid-field label="[% l('TCN') %]"                   path="call_number.record.tcn_value" hidden></eg-grid-field>
   <eg-grid-field label="[% l('TCN Source') %]"            path="call_number.record.tcn_source" hidden></eg-grid-field>
-  <eg-grid-field label="[% l('Transaction Complete') %]"  path="_circ.xact_finish" hidden>
-    {{item['_circ']['xact_finish'] | date:'short'}}
-  </eg-grid-field>
+  <eg-grid-field label="[% l('Transaction Complete') %]"  path="_circ.xact_finish" datatype="timestamp" hidden></eg-grid-field>
 </eg-grid>
 </eg-grid>
 
index 2b5d135..9c60191 100644 (file)
@@ -34,7 +34,7 @@
     <div class="flex-cell well">{{copy.call_number().label()}}</div>
 
     <div class="flex-cell">[% l('Due Date') %]</div>
-    <div class="flex-cell well">{{circ.due_date() | date:'short'}}</div>
+    <div class="flex-cell well">{{circ.due_date() | date:egDateAndTimeFormat}}</div>
   </div>
 
   <div class="flex-row">
@@ -53,7 +53,7 @@
     </div>
 
     <div class="flex-cell">[% l('Checkout Date') %]</div>
-    <div class="flex-cell well">{{circ.xact_start() | date:'short'}}</div>
+    <div class="flex-cell well">{{circ.xact_start() | date:egDateAndTimeFormat}}</div>
   </div>
 
   <div class="flex-row">
@@ -78,7 +78,7 @@
 
   <div class="flex-row">
     <div class="flex-cell">[% l('Date Created') %]</div>
-    <div class="flex-cell well">{{copy.create_date() | date:'short'}}</div>
+    <div class="flex-cell well">{{copy.create_date() | date:egDateAndTimeFormat}}</div>
     <div class="flex-cell">[% l('Fine Level') %]</div>
     <div class="flex-cell well">{{circ.duration_rule().name()}}</div>
 
@@ -91,7 +91,7 @@
 
   <div class="flex-row">
     <div class="flex-cell">[% l('Date Active') %]</div>
-    <div class="flex-cell well">{{copy.active_date() | date:'short'}}</div>
+    <div class="flex-cell well">{{copy.active_date() | date:egDateAndTimeFormat}}</div>
 
     <div class="flex-cell">[% l('Reference') %]</div>
     <div class="flex-cell well">{{copy.ref()}}</div>
 
   <div class="flex-row">
     <div class="flex-cell">[% l('Status Changed') %]</div>
-    <div class="flex-cell well">{{copy.status_changed_time() | date:'short'}}</div>
+    <div class="flex-cell well">{{copy.status_changed_time() | date:egDateAndTimeFormat}}</div>
 
     <div class="flex-cell">[% l('OPAC Visible') %]</div>
     <div class="flex-cell well">{{copy.opac_visible()}}</div>
     <div class="flex-cell">[% l('Checkin Time') %]</div>
     <div class="flex-cell well">
       {{circ.checkin_time() || 
-        circ_summary.last_checkin_time() | date:'short'}}
+        circ_summary.last_checkin_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
 
     <div class="flex-cell">[% l('Checkin Scan Time') %]</div>
     <div class="flex-cell well">
       {{circ.checkin_scan_time() || 
-        circ_summary.last_checkin_scan_time() | date:'short'}}
+        circ_summary.last_checkin_scan_time() | date:egDateAndTimeFormat}}
     </div>
   </div>
 
index 045bd93..0675dba 100644 (file)
     <div class="flex-cell">{{record.owner().shortname()}}</div>
 
     <div class="flex-cell strong-text">[% l('Last Edited On:') %]</div>
-    <div class="flex-cell">{{record.edit_date() | date:'short'}}</div>
+    <div class="flex-cell">{{record.edit_date() | date:$root.egDateAndTimeFormat}}</div>
   </div><!-- flex-row -->
 </div>
 
index 886d41c..ba58c12 100644 (file)
                           grid-controls="workingGridControls"
                           on-select="handleItemSelect"
                           after-select="afterItemSelect"
-                          persist-key="cat.volcopy.copies">
+                          persist-key="cat.volcopy.copies"
+                          dateformat="{{$root.egDateAndTimeFormat}}">
         
                           <eg-grid-menu-item disabled="disableSave" handler="workingToComplete"
                            label="[% l('Store Selected') %]"></eg-grid-menu-item>
         
                         
                           <eg-grid-field label="[% l('Barcode') %]"     path='barcode' visible></eg-grid-field>
-                          <eg-grid-field label="[% l('Created') %]"     path="create_date" visible></eg-grid-field>
+                          <eg-grid-field label="[% l('Created') %]"     path="create_date" datatype="timestamp" visible></eg-grid-field>
                           <eg-grid-field label="[% l('Activated') %]"   path="active_date" visible></eg-grid-field>
                           <eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
                           <eg-grid-field label="[% l('Copy ID') %]"     path="id" hidden></eg-grid-field>
                  features="-pagination,-actions,-index"
                  items-provider="completedGridDataProvider"
                  grid-controls="completedGridControls"
-                 persist-key="cat.volcopy.copies.complete">
+                 persist-key="cat.volcopy.copies.complete"
+                 dateformat="{{$root.egDateAndTimeFormat}}">
                
                  <eg-grid-menu-item standalone="true" handler="completeToWorking"
                   label="[% l('Edit Selected') %]"></eg-grid-menu-item>
                   label="[% l('Save & Exit') %]"></eg-grid-menu-item>
         
                  <eg-grid-field label="[% l('Barcode') %]"     path='barcode' visible></eg-grid-field>
-                 <eg-grid-field label="[% l('Created') %]"     path="create_date" visible></eg-grid-field>
-                 <eg-grid-field label="[% l('Activated') %]"   path="active_date" visible></eg-grid-field>
+                 <eg-grid-field label="[% l('Created') %]"     path="create_date" datatype="timestamp" visible></eg-grid-field>
+                 <eg-grid-field label="[% l('Activated') %]"   path="active_date" datatype="timestamp" visible></eg-grid-field>
                  <eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
                  <eg-grid-field label="[% l('Circ Library') %]" flesher="orgById" path="circ_lib.name" visible></eg-grid-field>
                  <eg-grid-field label="[% l('Shelving Location') %]" flesher="locationById" path="location.name" visible></eg-grid-field>
index 5e2ab8b..e687c93 100644 (file)
@@ -87,7 +87,8 @@
   features="-display,-sort,-multisort,-multiselect"
   items-provider="z3950SearchGridProvider"
   grid-controls="gridControls"
-  persist-key="cat.z3950_results">
+  persist-key="cat.z3950_results"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-menu-item handler="showInCatalog" disabled="cant_showInCatalog"
     label="[% l('Show in Catalog') %]"></eg-grid-menu-item>
     <eg-grid-field label="[% l('Publisher') %]" path="publisher" visible></eg-grid-field>
     <eg-grid-field label="[% l('Service') %]" path="service" visible></eg-grid-field>
     <eg-grid-field label="[% l('TCN') %]" path="tcn" visible></eg-grid-field>
-    <eg-grid-field label
     <eg-grid-field path="*" hidden></eg-grid-field>
 </eg-grid>
index ccc7e5d..42d6e67 100644 (file)
@@ -9,7 +9,7 @@
   <div class="col-md-12">
     <div ng-if="is_backdate()" class="alert-danger pad-all-min">
       [% l('Backdated Check In [_1]', 
-        '{{checkinArgs.backdate | date:"shortDate"}}') %]
+        '{{checkinArgs.backdate | date:$root.egDateFormat}}') %]
     </div>
     <div ng-if="modifiers.no_precat_alert" class="alert-danger pad-all-min">
       [% l('Ignore Pre-Cataloged Items') %]
index 2dadf6f..e7d809b 100644 (file)
@@ -6,7 +6,8 @@
   main-label="[% l('Items Checked In') %]"
   items-provider="gridDataProvider"
   grid-controls="gridControls"
-  persist-key="{{grid_persist_key}}">
+  persist-key="{{grid_persist_key}}"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-action 
     handler="fetchLastCircPatron"
     path='circ.id'></eg-grid-field>
 
   <eg-grid-field label="[% l('Checkin Date') %]"    
-    path='circ.checkin_time' dateformat='short'></eg-grid-field>
+    path='circ.checkin_time' datatype="timestamp"></eg-grid-field>
 
   <eg-grid-field label="[% l('Family Name') %]"    
     path='au.family_name'></eg-grid-field>
 
   <eg-grid-field label="[% l('Finish') %]"    
-    path='circ.stop_fines_time'></eg-grid-field>
+    path='circ.stop_fines_time' datatype="timestamp"></eg-grid-field>
 
   <eg-grid-field label="[% l('Location') %]"    
     path='acp.location.name'></eg-grid-field>
@@ -69,7 +70,7 @@
   </eg-grid-field>
 
   <eg-grid-field label="[% l('Due Date') %]"    
-    path='circ.due_date' dateformat='short' hidden></eg-grid-field>
+    path='circ.due_date' datatype="timestamp" hidden></eg-grid-field>
 
   <eg-grid-field label="[% l('Author') %]"      
     path="author" hidden></eg-grid-field>
index 4016967..e30ed91 100644 (file)
@@ -2,7 +2,8 @@
   id-field="id"
   idl-class="ahopl"
   grid-controls="gridControls"
-  persist-key="circ.holds.pull">
+  persist-key="circ.holds.pull"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-menu-item handler="detail_view" 
     label="[% l('Detail View') %]"></eg-grid-menu-item>
     path='queue_position' hidden></eg-grid-field>
   <eg-grid-field label="[% l('Hold ID') %]" path='id' required hidden>
   </eg-grid-field>
-  <eg-grid-field label="[% l('Request Date') %]" path='request_time' hidden>
+  <eg-grid-field label="[% l('Request Date') %]" path='request_time' datatype="timestamp" hidden>
   </eg-grid-field>
 </eg-grid>
 
index 87dde9b..73c3cd1 100644 (file)
@@ -7,7 +7,8 @@
   features="-sort,-multisort"
   items-provider="gridDataProvider"
   grid-controls="gridControls"
-  persist-key="circ.holds.shelf">
+  persist-key="circ.holds.shelf"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-menu-item handler="detail_view" 
     label="[% l('Detail View') %]"></eg-grid-menu-item>
@@ -69,9 +70,9 @@
     </a>
   </eg-grid-field>
 
-  <eg-grid-field label="[% l('Request Date') %]" path='hold.request_time'></eg-grid-field>
-  <eg-grid-field label="[% l('Capture Date') %]" path='hold.capture_time'></eg-grid-field>
-  <eg-grid-field label="[% l('Available Date') %]" path='hold.shelf_time'></eg-grid-field>
+  <eg-grid-field label="[% l('Request Date') %]" path='hold.request_time' datatype="timestamp"></eg-grid-field>
+  <eg-grid-field label="[% l('Capture Date') %]" path='hold.capture_time' datatype="timestamp"></eg-grid-field>
+  <eg-grid-field label="[% l('Available Date') %]" path='hold.shelf_time' datatype="timestamp"></eg-grid-field>
   <eg-grid-field label="[% l('Hold Type') %]" path='hold.hold_type'></eg-grid-field>
   <eg-grid-field label="[% l('Pickup Library') %]" path='hold.pickup_lib.shortname'></eg-grid-field>
   <eg-grid-field label="[% l('Post-Clear') %]" path='post_clear'></eg-grid-field>
index 9281362..ec1b8a9 100644 (file)
@@ -64,7 +64,7 @@
               <div>{{penalty.note()}}</div><!-- force newline -->
             </div>
             <div class="col-md-2">
-              {{penalty.set_date() | date:'shortDate'}}
+              {{penalty.set_date() | date:$root.egDateFormat}}
             </div>
           </div>
         </div>
index c4fa9d3..9c1a53a 100644 (file)
@@ -4,14 +4,15 @@
   <eg-grid
     idl-class="mp"
     id-field="id"
-    grid-controls="gridControls">
+    grid-controls="gridControls"
+    dateformat="{{$root.egDateAndTimeFormat}}">
 
     <eg-grid-action 
       label="[% l('Full Details') %]" handler="showFullDetails"></eg-grid-action>
 
     <eg-grid-field path="amount" label="[% l('Amount') %]"></eg-grid-field>
     <eg-grid-field path="id" label="[% l('Payment ID') %]"></eg-grid-field>
-    <eg-grid-field path="payment_ts" label="[% l('Payment Time') %]"></eg-grid-field>
+    <eg-grid-field path="payment_ts" label="[% l('Payment Time') %]" datatype="timestamp"></eg-grid-field>
     <eg-grid-field path="note" label="[% l('Note') %]"></eg-grid-field>
     <eg-grid-field path="voided" label="[% l('Voided') %]"></eg-grid-field>
     <eg-grid-field path="xact.summary.xact_type" label="[% l('Transaction Type') %]"></eg-grid-field>
index accbd36..d3bb64f 100644 (file)
@@ -4,7 +4,8 @@
   <eg-grid
     idl-class="mbt"
     id-field="id"
-    grid-controls="gridControls">
+    grid-controls="gridControls"
+    dateformat="{{$root.egDateAndTimeFormat}}">
 
     <eg-grid-action 
       label="[% l('Add Billing') %]" handler="addBilling"></eg-grid-action>
@@ -15,8 +16,8 @@
 
     <eg-grid-field path="summary.balance_owed"></eg-grid-field>
     <eg-grid-field path="id" label="[% l('Bill #') %]"></eg-grid-field>
-    <eg-grid-field path="xact_finish" label="[% l('Finish') %]"></eg-grid-field>
-    <eg-grid-field path="xact_start" label="[% l('Start') %]"></eg-grid-field>
+    <eg-grid-field path="xact_finish" label="[% l('Finish') %]" datatype="timestamp"></eg-grid-field>
+    <eg-grid-field path="xact_start" label="[% l('Start') %]" datatype="timestamp"></eg-grid-field>
     <eg-grid-field path="summary.total_owed" label="[% l('Total Billed') %]"></eg-grid-field>
     <eg-grid-field path="summary.total_paid" label="[% l('Total Paid') %]"></eg-grid-field>
     <eg-grid-field path="summary.xact_type" label="[% l('Type') %]"></eg-grid-field>
@@ -41,7 +42,7 @@
       path="circulation.target_copy.id" required hidden></eg-grid-field>
 
     <!-- needed for grid query -->
-    <eg-grid-field path="summary.last_payment_ts" required hidden></eg-grid-field>
+    <eg-grid-field path="summary.last_payment_ts" datatype="timestamp" required hidden></eg-grid-field>
 
     <eg-grid-field path="summary.*" hidden></eg-grid-field>
     <eg-grid-field path="circulation.target_copy.*" hidden></eg-grid-field>
index cde7cbf..6d176be 100644 (file)
@@ -5,7 +5,8 @@
   sort="gridSort"
   grid-controls="gridControls"
   revision="gridRevision"
-  persist-key="circ.patron.bills">
+  persist-key="circ.patron.bills"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-menu-item label="[% l('Bill Patron') %]" 
     handler="showBillDialog"></eg-grid-menu-item>
@@ -49,7 +50,7 @@
 
   <eg-grid-field label="[% ('Balance Owed') %]" path='summary.balance_owed'></eg-grid-field>
   <eg-grid-field label="[% ('Bill #') %]" path='id'></eg-grid-field>
-  <eg-grid-field label="[% ('Start') %]" path='xact_start'></eg-grid-field>
+  <eg-grid-field label="[% ('Start') %]" path='xact_start' datatype="timestamp"></eg-grid-field>
   <eg-grid-field label="[% ('Total Billed') %]" path='summary.total_owed'></eg-grid-field>
   <eg-grid-field label="[% ('Total Paid') %]" path='summary.total_paid'></eg-grid-field>
   <eg-grid-field label="[% ('Type') %]" path='xact_type'></eg-grid-field>
index b2df987..1abdf45 100644 (file)
@@ -62,7 +62,8 @@
   features="-sort,-multisort"
   items-provider="gridDataProvider"
   grid-controls="gridControls"
-  persist-key="circ.patron.checkout">
+  persist-key="circ.patron.checkout"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-field label="[% l('Alert Msg') %]"   
     path="acp.alert_message"></eg-grid-field>
@@ -87,7 +88,7 @@
     path="acn.label"></eg-grid-field>
 
   <eg-grid-field label="[% l('Due Date') %]"    
-    path='circ.due_date' dateformat='short'></eg-grid-field>
+    path='circ.due_date' datatype="timestamp"></eg-grid-field>
 
   <eg-grid-field label="[% l('Family Name') %]"    
     path='au.family_name'></eg-grid-field>
index aa273ea..d70e746 100644 (file)
@@ -12,7 +12,8 @@
 <eg-grid
   idl-class="au"
   sort="gridSort"
-  grid-controls="gridControls">
+  grid-controls="gridControls"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-action handler="moveToGroup"
     label="[% l('Move Another Patron To This Group') %]"></eg-grid-action>
@@ -32,7 +33,7 @@
 
   <eg-grid-field path="active"></eg-grid-field>
   <eg-grid-field path="barred"></eg-grid-field>
-  <eg-grid-field path="dob"></eg-grid-field>
+  <eg-grid-field path="dob" dateformat="{{$root.egDateFormat}}" datatype="timestamp"></eg-grid-field>
   <eg-grid-field path="family_name"></eg-grid-field>
   <eg-grid-field path="first_given_name"></eg-grid-field>
   <eg-grid-field path="master_account"></eg-grid-field>
@@ -45,7 +46,7 @@
   <eg-grid-field path="id" hidden required></eg-grid-field>
   <eg-grid-field path="usrgroup" hidden required></eg-grid-field>
   <eg-grid-field path="deleted" hidden required></eg-grid-field>
-  <eg-grid-field path="create_date" hidden required></eg-grid-field>
+  <eg-grid-field path="create_date" datatype="timestamp" hidden required></eg-grid-field>
 
   <!--
   <eg-grid-field path=".*"></eg-grid-field>
index 2e12f43..665ca04 100644 (file)
@@ -2,7 +2,8 @@
   id-field="id"
   features="-sort,-multisort"
   items-provider="gridDataProvider"
-  persist-key="circ.patron.holds">
+  persist-key="circ.patron.holds"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-menu-item handler="place_hold" 
     label="[% l('Place Hold') %]"></eg-grid-menu-item>
@@ -54,9 +55,9 @@
 
   <eg-grid-field label="[% l('Patron Barcode') %]" hidden>{{item.patron_barcode}}</eg-grid-field>
   <eg-grid-field label="[% l('Patron alias') %]" hidden>{{item.patron_alias}}</eg-grid-field>
-  <eg-grid-field label="[% l('Request Date') %]" path='hold.request_time'></eg-grid-field>
-  <eg-grid-field label="[% l('Capture Date') %]" path='hold.capture_time'></eg-grid-field>
-  <eg-grid-field label="[% l('Available Date') %]" path='hold.shelf_time'></eg-grid-field>
+  <eg-grid-field label="[% l('Request Date') %]" path='hold.request_time' datatype="timestamp"></eg-grid-field>
+  <eg-grid-field label="[% l('Capture Date') %]" path='hold.capture_time' datatype="timestamp"></eg-grid-field>
+  <eg-grid-field label="[% l('Available Date') %]" path='hold.shelf_time' datatype="timestamp"></eg-grid-field>
   <eg-grid-field label="[% l('Hold Type') %]" path='hold.hold_type'></eg-grid-field>
   <eg-grid-field label="[% l('Pickup Library') %]" path='hold.pickup_lib.shortname'></eg-grid-field>
 
index a5a1ed7..f7b4020 100644 (file)
   id-field="id"
   features="-sort,-multisort"
   items-provider="gridDataProvider"
-  persist-key="circ.patron.items_out.noncat">
+  persist-key="circ.patron.items_out.noncat"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-field label="[% l('Circ ID') %]" path='id'></eg-grid-field>
   <eg-grid-field label="[% l('Item Type') %]" path='item_type.name'></eg-grid-field>
   <eg-grid-field label="[% l('Checkout Library') %]" path='circ_lib.shortname'></eg-grid-field>
-  <eg-grid-field label="[% l('Checkout Date') %]" path='circ_time' dateformat='short'></eg-grid-field>
-  <eg-grid-field label="[% l('Due Date') %]" path='duedate' dateformat='short'></eg-grid-field>
+  <eg-grid-field label="[% l('Checkout Date') %]" path='circ_time' datatype="timestamp"></eg-grid-field>
+  <eg-grid-field label="[% l('Due Date') %]" path='duedate' datatype="timestamp"></eg-grid-field>
   <eg-grid-field label="[% l('Checkout Staff') %]" path='staff.usrname'></eg-grid-field>
 </eg-grid>
 
@@ -47,7 +48,8 @@
   id-field="id"
   features="-sort,-multisort"
   items-provider="gridDataProvider"
-  persist-key="circ.patron.items_out">
+  persist-key="circ.patron.items_out"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-action handler="print_receipt"
     label="[% l('Print Item Receipt') %]"></eg-grid-action>
@@ -78,7 +80,7 @@
       {{item.target_copy().barcode()}}
     </a>
   </eg-grid-field>
-  <eg-grid-field label="[% l('Due Date') %]" path='due_date' dateformat='short'></eg-grid-field>
+  <eg-grid-field label="[% l('Due Date') %]" path='due_date' datatype="timestamp"></eg-grid-field>
   <eg-grid-field label="[% l('Workstation') %]" path='workstation.name'></eg-grid-field>
   <eg-grid-field label="[% l('Checkin Workstation') %]" path='checkin_workstation.name'></eg-grid-field>
   <eg-grid-field label="[% l('Checkout / Renewal Library') %]" path='circ_lib.shortname'></eg-grid-field>
index f6a9e2f..d02988f 100644 (file)
@@ -3,7 +3,8 @@
 <div class="pad-vert"></div>
 <eg-grid
   idl-class="ausp"
-  grid-controls="activeGridControls">
+  grid-controls="activeGridControls"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-menu-item handler="createPenalty"
     label="[% l('Apply Penalty / Message') %]"></eg-grid-menu-item>
@@ -15,7 +16,7 @@
   <eg-grid-action label="[% l('Archive Penalty / Message') %]" 
     handler="archivePenalty"></eg-grid-action>
 
-  <eg-grid-field path="set_date" label="[% l('Applied On') %]"></eg-grid-field>
+  <eg-grid-field path="set_date" label="[% l('Applied On') %]" datatype="timestamp"></eg-grid-field>
   <eg-grid-field path="standing_penalty.label"></eg-grid-field>
   <eg-grid-field path="org_unit.shortname" label="[% l('Library') %]"></eg-grid-field>
   <eg-grid-field path="note"></eg-grid-field>
 </div>
 <eg-grid
   idl-class="ausp"
-  grid-controls="archiveGridControls">
+  grid-controls="archiveGridControls"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
-  <eg-grid-field path="set_date" label="[% l('Applied On') %]"></eg-grid-field>
+  <eg-grid-field path="set_date" label="[% l('Applied On') %]" datatype="timestamp"></eg-grid-field>
   <eg-grid-field path="standing_penalty.label"></eg-grid-field>
   <eg-grid-field path="org_unit.shortname" label="[% l('Library') %]"></eg-grid-field>
   <eg-grid-field path="note"></eg-grid-field>
index b83f317..0fe8693 100644 (file)
@@ -14,7 +14,7 @@
         <div class="pull-right">
           <span class="pad-horiz alert alert-warning" ng-if="note.pub() == 't'">[% l('Patron Visible') %]</span>
           <span class="pad-horiz alert alert-info" ng-if="note.pub() == 'f'">[% l('Staff Only') %]</span>
-          <span class="pad-horiz">{{note.create_date() | date:'short'}}</span>
+          <span class="pad-horiz">{{note.create_date() | date:$root.egDateAndTimeFormat}}</span>
           <span>[% l('Created by [_1]', '{{note.creator().usrname()}}') %]</span>
         </div>
       </div>
index 3809d12..a5510c1 100644 (file)
@@ -13,7 +13,8 @@
   features="-sort,-multisort"
   items-provider="grid_data_provider"
   grid-controls="grid_controls"
-  persist-key="circ.pending_patrons.list">
+  persist-key="circ.pending_patrons.list"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-menu-item handler="load_patron" 
     label="[% l('Load Patron') %]"></eg-grid-menu-item>
index cec4dd7..6981f10 100644 (file)
@@ -6,7 +6,8 @@
   main-label="[% l('Patron Search Results') %]"
   grid-controls="gridControls"
   items-provider="patronSearchGridProvider"
-  persist-key="circ.patron.search">
+  persist-key="circ.patron.search"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-menu-item handler="merge_patrons"
     disabled="need_two_selected"
@@ -18,9 +19,9 @@
   <eg-grid-field label="[% ('Last Name') %]" path='family_name' visible sortable multisortable></eg-grid-field>
   <eg-grid-field label="[% ('First Name') %]" path='first_given_name' visible sortable multisortable></eg-grid-field>
   <eg-grid-field label="[% ('Middle Name') %]" path='second_given_name' visible sortable multisortable></eg-grid-field>
-  <eg-grid-field label="[% ('DoB') %]" path='dob' visible sortable multisortable></eg-grid-field>
+  <eg-grid-field label="[% ('DoB') %]" path='dob' dateformat="{{$root.egDateFormat}}" datatype="timestamp" visible sortable multisortable></eg-grid-field>
   <eg-grid-field label="[% ('Home Library') %]" path='home_ou.shortname' visible></eg-grid-field>
-  <eg-grid-field label="[% ('Created On') %]" path='create_date' visible sortable multisortable></eg-grid-field>
+  <eg-grid-field label="[% ('Created On') %]" path='create_date' datatype="timestamp" visible sortable multisortable></eg-grid-field>
 
   <eg-grid-field label="[% ('Mailing:Street 1') %]" path='mailing_address.street1' visible></eg-grid-field>
   <eg-grid-field label="[% ('Mailing:Street 2') %]" path='mailing_address.street2'></eg-grid-field>
index 690a2f6..c3180bf 100644 (file)
@@ -10,7 +10,7 @@
         {{penalty.note() || penalty.standing_penalty().label()}}
       </div>
       <div class="col-md-3">
-        {{penalty.set_date() | date:'shortDate'}}
+        {{penalty.set_date() | date:$root.egDateFormat}}
       </div>
     </div>
     <div class="row patron-summary-divider">
       ng-class="{'patron-summary-alert' : !patron().dob()}">
       <a class="col-md-5" ng-if="obscure_dob()" ng-click="show_dob(true)">[% l('Date of Birth') %]</a>
       <div class="col-md-5" ng-if="!obscure_dob()">[% l('Date of Birth') %]</div>
-      <div class="col-md-7" ng-show="now_show_dob()">{{patron().dob() | date:'shortDate'}}</div>
+      <div class="col-md-7" ng-show="now_show_dob()">{{patron().dob() | date:$root.egDateFormat}}</div>
     </div>
     <div class="row">
       <div class="col-md-5">[% l('Last Activity') %]</div>
-      <div class="col-md-7">{{patron().usr_activity()[0].event_time() | date:'shortDate'}}</div>
+      <div class="col-md-7">{{patron().usr_activity()[0].event_time() | date:$root.egDateFormat}}</div>
     </div>
     <div class="row">
       <div class="col-md-5">[% l('Last Updated') %]</div>
-      <div class="col-md-7">{{patron().last_update_time() | date:'shortDate'}}</div>
+      <div class="col-md-7">{{patron().last_update_time() | date:$root.egDateFormat}}</div>
     </div>
     <div class="row">
       <div class="col-md-5">[% l('Create Date') %]</div>
-      <div class="col-md-7">{{patron().create_date() | date:'shortDate'}}</div>
+      <div class="col-md-7">{{patron().create_date() | date:$root.egDateFormat}}</div>
     </div>
     <div class="row"
       ng-class="{'patron-summary-alert' : isPatronExpired()}">
       <div class="col-md-5">[% l('Expire Date') %]</div>
-      <div class="col-md-7">{{patron().expire_date() | date:'shortDate'}}</div>
+      <div class="col-md-7">{{patron().expire_date() | date:$root.egDateFormat}}</div>
     </div>
     <div class="row patron-summary-divider" 
       ng-class="{'patron-summary-alert' : patron_stats().fines.balance_owed}">
index 9e83fe3..5f13cc7 100644 (file)
   <div class="col-md-2 strong-text">[% l('Total Paid') %]</div>
   <div class="col-md-2">{{xact.summary().total_paid() | currency}}</div>
   <div class="col-md-2 strong-text">[% l('Checked Out') %]</div>
-  <div class="col-md-2">{{xact.circulation().xact_start() | date:'short'}}</div>
+  <div class="col-md-2">{{xact.circulation().xact_start() | date:$root.egDateAndTimeFormat}}</div>
 </div>
 <div class="row">
   <div class="col-md-2 strong-text">[% l('Start') %]</div>
-  <div class="col-md-2">{{xact.xact_start() | date:'short'}}</div>
+  <div class="col-md-2">{{xact.xact_start() | date:$root.egDateAndTimeFormat}}</div>
   <div class="col-md-2 strong-text">[% l('Total Billed') %]</div>
   <div class="col-md-2">{{xact.summary().balance_owed() | currency}}</div>
   <div class="col-md-2 strong-text">[% l('Due Date') %]</div>
-  <div class="col-md-2">{{xact.circulation().due_date() | date:'short'}}</div>
+  <div class="col-md-2">{{xact.circulation().due_date() | date:$root.egDateAndTimeFormat}}</div>
 </div>
 <div class="row">
   <div class="col-md-2 strong-text">[% l('Finish') %]</div>
-  <div class="col-md-2">{{xact.xact_finish() | date:'short'}}</div>
+  <div class="col-md-2">{{xact.xact_finish() | date:$root.egDateAndTimeFormat}}</div>
   <div class="col-md-2 strong-text">[% l('Renewal?') %]</div>
   <div class="col-md-2">
     <span ng-if="xact.circulation.desk_renewal == 't'">[% l('Desk') %]</span>
@@ -37,7 +37,7 @@
     <span ng-if="xact.circulation.opac_renewal == 't'">[% l('OPAC') %]</span>
   </div>
   <div class="col-md-2 strong-text">[% l('Checked In') %]</div>
-  <div class="col-md-2">{{xact.circulation().checkin_time() | date:'short'}}</div>
+  <div class="col-md-2">{{xact.circulation().checkin_time() | date:$root.egDateAndTimeFormat}}</div>
 </div>
 
 <div ng-if="xact.circulation()">
 
     <div class="col-md-2 strong-text">[% l('Created') %]</div>
     <div class="col-md-2">
-      {{xact.circulation().target_copy().create_date() | date:'short'}}
+      {{xact.circulation().target_copy().create_date() | date:$root.egDateAndTimeFormat}}
     </div>
   </div>
   <div class="row">
     <div class="col-md-2 strong-text">[% l('Edited') %]</div>
     <div class="col-md-2">
-      {{xact.circulation().target_copy().edit_date() | date:'short'}}
+      {{xact.circulation().target_copy().edit_date() | date:$root.egDateAndTimeFormat}}
     </div>
     <div class="col-md-2 strong-text">[% l('Age Protect') %]</div>
     <div class="col-md-2">
   id-field="id"
   grid-controls="xactGridControls"
   auto-fields="true"
-  page-size="10">
+  page-size="10"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-action 
     label="[% l('Void Billings') %]" handler="voidBillings"></eg-grid-action>
   id-field="id"
   auto-fields="true"
   grid-controls="paymentGridControls"
-  page-size="10">
+  page-size="10"
+  dateformat="{{$root.egDateAndTimeFormat}}">
   <eg-grid-action 
     label="[% l('Edit Note') %]" handler="editPaymentNotes"></eg-grid-action>
 
   <eg-grid-field path="cash_payment.cash_drawer.name" 
     label="[% l('Cash Drawer') %]"></eg-grid-field>
+
 </eg-grid>
 
index d3debaa..2a7871e 100644 (file)
@@ -45,7 +45,8 @@
   features="-sort,-multisort"
   items-provider="gridDataProvider"
   grid-controls="gridControls"
-  persist-key="circ.renew">
+  persist-key="circ.renew"
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-action 
     handler="fetchLastCircPatron"
@@ -90,7 +91,7 @@
     path="acn.label"></eg-grid-field>
 
   <eg-grid-field label="[% l('Due Date') %]"    
-    path='circ.due_date' dateformat='short'></eg-grid-field>
+    path='circ.due_date' datatype="timestamp"></eg-grid-field>
 
   <eg-grid-field label="[% l('Family Name') %]"    
     path='au.family_name'></eg-grid-field>
index 9594f54..f6d55aa 100644 (file)
         </div>
         <div class="row">
           <div class="col-md-3">[% l('Start') %]</div>
-          <div class="col-md-3">{{xact.xact_start | date:'short'}}</div>
+          <div class="col-md-3">{{xact.xact_start | date:$root.egDateAndTimeFormat}}</div>
           <div class="col-md-3">[% l('Total Billed') %]</div>
           <div class="col-md-3">{{xact.summary.balance_owed | currency}}</div>
         </div>
         <div class="row">
           <div class="col-md-3">[% l('Finish') %]</div>
-          <div class="col-md-3">{{xact.xact_finish | date:'short'}}</div>
+          <div class="col-md-3">{{xact.xact_finish | date:$root.egDateAndTimeFormat}}</div>
           <div class="col-md-3">[% l('Renewal?') %]</div>
           <div class="col-md-3">
             <span ng-if="xact.circulation.desk_renewal == 't'">[% l('Desk') %]</span>
index 8772d5f..d4b4aeb 100644 (file)
@@ -8,13 +8,13 @@
       </div>
       <div class="modal-body">
         <div ng-if="sameUser">
-          [% |l("{{circDate | date:'shortDate'}}") %]
+          [% |l("{{circDate | date:$root.egDateFormat}}") %]
           There is an open circulation on the requested item.  
           This item was already checked out to this user on [_1].
           [% END %]
         </div>
         <div ng-if="!sameUser">
-          [% |l("{{circDate | date:'shortDate'}}") %]
+          [% |l("{{circDate | date:$root.egDateFormat}}") %]
           There is an open circulation on the requested item.  
           This copy was checked out by another patron on [_1].
           [% END %]
index 022c4cf..440ac48 100644 (file)
@@ -12,7 +12,7 @@
     <div class="pad-vert"></div>
     <div class="row">
       <div class="col-md-4">[% l('Transit Date:') %]</div>
-      <div class="col-md-8">{{transit.source_send_time() | date:'short'}}</div>
+      <div class="col-md-8">{{transit.source_send_time() | date:$root.egDateAndTimeFormat}}</div>
     </div>
     <div class="row">
       <div class="col-md-4">[% l('Transit Source:') %]</div>
index 1117ae1..1da860e 100644 (file)
@@ -2,11 +2,11 @@
 <h4 class="pad-vert">[% l('Hold Details') %]</h4>
 <div class="flex-row">
   <div class="flex-cell">[% l('Request Date') %]</div>
-  <div class="flex-cell well">{{hold.request_time() | date:'short'}}</div>
+  <div class="flex-cell well">{{hold.request_time() | date:$root.egDateAndTimeFormat}}</div>
   <div class="flex-cell">[% l('Capture Date') %]</div>
-  <div class="flex-cell well">{{hold.capture_time() | date:'short'}}</div>
+  <div class="flex-cell well">{{hold.capture_time() | date:$root.egDateAndTimeFormat}}</div>
   <div class="flex-cell">[% l('Available On') %]</div>
-  <div class="flex-cell well">{{hold.shelf_time() | date:'short'}}</div>
+  <div class="flex-cell well">{{hold.shelf_time() | date:$root.egDateAndTimeFormat}}</div>
  </div>
 <div class="flex-row">
   <div class="flex-cell">[% l('Hold Type') %]</div>
@@ -48,7 +48,7 @@
   <div class="flex-cell">[% l('Cancel Cause') %]</div>
   <div class="flex-cell well">{{hold.cancel_cause().label()}}</div>
   <div class="flex-cell">[% l('Cancel Time') %]</div>
-  <div class="flex-cell well">{{hold.cancel_time() | date:'short'}}</div>
+  <div class="flex-cell well">{{hold.cancel_time() | date:$root.egDateAndTimeFormat}}</div>
   <div class="flex-cell">[% l('Cancel Note') %]</div>
   <div class="flex-cell well">{{hold.cancel_note()}}</div>
 </div>
             <div class="col-md-6 strong-text">{{notify.method()}}</div>
             <div class="col-md-6">
               <div class="pull-right">
-                <span class="pad-horiz">{{notify.notify_time() | date:'short'}}</span>
+                <span class="pad-horiz">{{notify.notify_time() | date:$root.egDateAndTimeFormat}}</span>
                 <span>[% l('Created by [_1]', '{{notify.notify_staff().usrname()}}') %]</span>
               </div>
             </div>
index 22e74e1..7fe8a99 100644 (file)
     <br/>
     <div>
       <span>[% l('Request Date:') %]</span>
-      <span>{{hold.request_time | date:'shortDate'}}</span>
+      <span>{{hold.request_time | date:$root.egDateFormat}}</span>
     </div>
     <div>
       <span>[% l('Slip Date:') %]</span>
-      <span>{{today | date:'shortDate'}}</span>
+      <span>{{today | date:$root.egDateFormat}}</span>
     </div>
   </div>
   <div class="modal-footer">
index 2562e6a..5eba16e 100644 (file)
         <br/>
         <div>
           <span>[% l('Request Date:') %]</span>
-          <span>{{hold.request_time | date:'shortDate'}}</span>
+          <span>{{hold.request_time | date:$root.egDateFormat}}</span>
         </div>
       </div>
       <div>
         <div>
           <span>[% l('Slip Date:') %]</span>
-          <span>{{today | date:'shortDate'}}</span>
+          <span>{{today | date:$root.egDateFormat}}</span>
         </div>
       </div>
     </div>
index 984bc23..89e6972 100644 (file)
@@ -31,7 +31,7 @@
   features="-sort,-multisort"
   grid-controls="grid_controls"
   persist-key="circ.transits.list"
->
+  dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-menu-item handler="add_copies_to_bucket" 
     label="[% l('Add Items to Bucket') %]"></eg-grid-menu-item>
   <eg-grid-field path='target_copy.call_number.record.simple_record.author' hidden></eg-grid-field>
   <eg-grid-field path='source.shortname' label="[% l('Source Library') %]" sortable></eg-grid-field>
   <eg-grid-field path='dest.shortname' label="[% l('Destination Library') %]" sortable></eg-grid-field>
-  <eg-grid-field path='source_send_time' dateformat='short' sortable></eg-grid-field>
+  <eg-grid-field path='source_send_time' datatype="timestamp" sortable></eg-grid-field>
   <eg-grid-field path='hold_transit_copy.hold.hold_type'></eg-grid-field>
-  <eg-grid-field path='hold_transit_copy.hold.request_time' hidden></eg-grid-field>
-  <eg-grid-field path='hold_transit_copy.hold.capture_time' hidden></eg-grid-field>
-  <eg-grid-field path='hold_transit_copy.hold.expire_time' hidden></eg-grid-field>
+  <eg-grid-field path='hold_transit_copy.hold.request_time' datatype="timestamp" hidden></eg-grid-field>
+  <eg-grid-field path='hold_transit_copy.hold.capture_time' datatype="timestamp" hidden></eg-grid-field>
+  <eg-grid-field path='hold_transit_copy.hold.expire_time' datatype="timestamp" hidden></eg-grid-field>
   <eg-grid-field path='hold_transit_copy.hold.usr.family_name' hidden></eg-grid-field>
   <eg-grid-field path='hold_transit_copy.hold.usr.first_given_name' hidden></eg-grid-field>
   <eg-grid-field path='hold_transit_copy.hold.usr.card.barcode' label="[% l('Patron Barcode') %]" hidden></eg-grid-field>
index 632569b..2f2cfec 100644 (file)
@@ -77,4 +77,4 @@ A receipt of your  transaction:<hr/>
 </p> 
 <hr/>
 <br/><br/> 
-{{current_location.shortname}} {{today | date:'short'}}
+{{current_location.shortname}} {{today | date:$root.egDateAndTimeFormat}}
index 21b53c2..d75850f 100644 (file)
@@ -1,4 +1,4 @@
-<!-
+<!--
 Template for printing a list of current bills. Data specific
 to this template includes:
 
@@ -18,7 +18,7 @@ You have the following bills:
     <table> 
       <tr valign="top">
         <td>[% l('Date:') %]</td>
-        <td>{{xact.xact_start | date:'short'}}</td>
+        <td>{{xact.xact_start | date:$root.egDateAndTimeFormat}}</td>
       </tr> 
       <tr valign="top">
         <td>[% l('Type') %]:</td>
@@ -54,6 +54,6 @@ You have the following bills:
   </div><!-- ng-repeat -->
 </dl>
 <hr/>
-{{current_location.shortname}} {{today | date:'short'}}
+{{current_location.shortname}} {{today | date:$root.egDateAndTimeFormat}}
 <br/><br/>
 
index 44fcd57..57efdc5 100644 (file)
@@ -1,4 +1,4 @@
-<!-
+<!--
 Template for printing a list of past bills. Data specific
 to this template includes:
 
@@ -18,7 +18,7 @@ You had the following bills:
     <table> 
       <tr valign="top">
         <td>[% l('Date:') %]</td>
-        <td>{{xact.xact_start | date:'short'}}</td>
+        <td>{{xact.xact_start | date:$root.egDateAndTimeFormat}}</td>
       </tr> 
       <tr valign="top">
         <td>[% l('Type') %]:</td>
@@ -54,6 +54,6 @@ You had the following bills:
   </div><!-- ng-repeat -->
 </dl>
 <hr/>
-{{current_location.shortname}} {{today | date:'short'}}
+{{current_location.shortname}} {{today | date:$root.egDateAndTimeFormat}}
 <br/><br/>
 
index 3aa276c..ee94ae6 100644 (file)
@@ -24,6 +24,6 @@ template includes:
     </li>
   </ol>
   <hr/>
-  <div>{{current_location.shortname}} {{today | date:'short'}}</div>
+  <div>{{current_location.shortname}} {{today | date:$root.egDateAndTimeFormat}}</div>
   <br/>
 </div>
index dc88446..808f52c 100644 (file)
@@ -18,11 +18,11 @@ Template for printing checkout receipts; fields available include:
       <div>{{checkout.title}}</div>
       <div>[% l('Barcode: [_1] Due: [_2]', 
         '{{checkout.copy.barcode}}',
-        '{{checkout.circ.due_date | date:"short"}}') %]</div>
+        '{{checkout.circ.due_date | date:$root.egDateAndTimeFormat}}') %]</div>
     </li>
   </ol>
   <hr/>
-  <div>{{current_location.shortname}} {{today | date:'short'}}</div>
+  <div>{{current_location.shortname}} {{today | date:$root.egDateAndTimeFormat}}</div>
   <div>[% l('You were helped by [_1]', '{{staff.first_given_name}}') %]</div>
 <br/>
 
index aef5b8a..c7ff7c8 100644 (file)
@@ -45,8 +45,8 @@ Template for printing hold request slips. Fields include:
   <br/>
 
   <div>[% l('Request Date: [_1]', 
-    '{{hold.request_time | date:"short"}}') %]</div>
-  <div>[% l('Slip Date: [_1]', '{{today | date:"short"}}') %]</div>
+    '{{hold.request_time | date:$root.egDateAndTimeFormat}}') %]</div>
+  <div>[% l('Slip Date: [_1]', '{{today | date:$root.egDateAndTimeFormat}}') %]</div>
   <div>[% l('Printed by [_1] at [_2]', 
     '{{staff.first_given_name}}', '{{current_location.shortname}}') %]</div>
 
index a0aa6ef..511881c 100644 (file)
@@ -54,8 +54,8 @@ Template for printing hold transit slips. Fields include:
   <br/>
 
   <div>[% l('Request Date: [_1]', 
-    '{{hold.request_time | date:"short"}}') %]</div>
-  <div>[% l('Slip Date: [_1]', '{{today | date:"short"}}') %]</div>
+    '{{hold.request_time | date:$root.egDateAndTimeFormat}}') %]</div>
+  <div>[% l('Slip Date: [_1]', '{{today | date:$root.egDateAndTimeFormat}}') %]</div>
   <div>[% l('Printed by [_1] at [_2]', 
     '{{staff.first_given_name}}', '{{current_location.shortname}}') %]</div>
 
index 2a2f965..e3c8c68 100644 (file)
@@ -27,7 +27,7 @@ bib record. Fields include:
     </thead>
     <tbody>
       <tr ng-repeat="hold in holds">
-        <td>{{hold.hold.request_time | date:'short'}}</td>
+        <td>{{hold.hold.request_time | date:$root.egDateAndTimeFormat}}</td>
         <td>{{hold.patron_barcode}}</td>
         <td>{{hold.patron_last}}</td>
         <td>{{hold.patron_alias}}</td>
@@ -36,7 +36,7 @@ bib record. Fields include:
     </tbody>
   </table>
   <hr/>
-  <div>{{current_location.shortname}} {{today | date:'short'}}</div>
+  <div>{{current_location.shortname}} {{today | date:$root.egDateAndTimeFormat}}</div>
   <div>[% l('Printed by [_1]', '{{staff.first_given_name}}') %]</div>
 <br/>
 
index 0f3a5da..d48bb51 100644 (file)
@@ -16,7 +16,7 @@ Template for printing a list of hold requests for a patron. Fields include:
     </li>
   </ol>
   <hr/>
-  <div>{{current_location.shortname}} {{today | date:'short'}}</div>
+  <div>{{current_location.shortname}} {{today | date:$root.egDateAndTimeFormat}}</div>
   <div>[% l('You were helped by [_1]', '{{staff.first_given_name}}') %]</div>
 <br/>
 
index 8bf8533..17caa2f 100644 (file)
@@ -24,5 +24,5 @@ in_house_uses - list; each entry contains:
     </li>
   </ol>
   <hr/>
-  <div>{{current_location.shortname}} {{today | date:'short'}}</div>
+  <div>{{current_location.shortname}} {{today | date:$root.egDateAndTimeFormat}}</div>
 <br/>
index 0de9e1e..8d279b3 100644 (file)
@@ -22,5 +22,5 @@ with a variety of keys, including
     </li>
   </ol>
   <hr/>
-  <div>{{current_location.shortname}} {{today | date:'short'}}</div>
+  <div>{{current_location.shortname}} {{today | date:$root.egDateAndTimeFormat}}</div>
 <br/>
index 10564b1..91e565a 100644 (file)
@@ -18,11 +18,11 @@ Fields include:
       <div>{{checkout.title}}</div>
       <div>[% l('Barcode: [_1] Due: [_2]', 
         '{{checkout.copy.barcode}}',
-        '{{checkout.circ.due_date | date:"short"}}') %]</div>
+        '{{checkout.circ.due_date | date:$root.egDateAndTimeFormat}}') %]</div>
     </li>
   </ol>
   <hr/>
-  <div>{{current_location.shortname}} {{today | date:'short'}}</div>
+  <div>{{current_location.shortname}} {{today | date:$root.egDateAndTimeFormat}}</div>
   <div>[% l('You were helped by [_1]', '{{staff.first_given_name}}') %]</div>
 <br/>
 
index da75ec4..bc6c7c7 100644 (file)
@@ -15,7 +15,7 @@ Template for printing a patron note. Fields include:
   '{{note.usr.second_given_name}}',
   '{{note.usr.card.barcode}}') %]</h3>
 
-<p>[% l('Created on [_1]', '{{note.create_date | date:"short"}}') %]</p>
+<p>[% l('Created on [_1]', '{{note.create_date | date:$root.egDateAndTimeFormat}}') %]</p>
 <b>{{note.title}}</b>
 <br/>
 <p>{{note.value}}</p>
index d5046b2..3e17647 100644 (file)
@@ -17,11 +17,11 @@ Template for printing a renewal receipt. Fields include:
       <div>{{renewal.title}}</div>
       <div>[% l('Barcode: [_1] Due: [_2]', 
         '{{renewal.copy.barcode}}',
-        '{{renewal.circ.due_date | date:"short"}}') %]</div>
+        '{{renewal.circ.due_date | date:$root.egDateAndTimeFormat}}') %]</div>
     </li>
   </ol>
   <hr/>
-  <div>{{current_location.shortname}} {{today | date:'short'}}</div>
+  <div>{{current_location.shortname}} {{today | date:$root.egDateAndTimeFormat}}</div>
   <div>[% l('You were helped by [_1]', '{{staff.first_given_name}}') %]</div>
 <br/>
 
index 09e8333..d347c48 100644 (file)
@@ -20,11 +20,11 @@ transits - list; each entry contains:
       <div>[% l('From: [_1] To: [_2] <br> When: [_3] <br> Barcode: [_4] Title: [_5]',
         '{{transit.source.shortname}}',
         '{{transit.dest.shortname}}',
-        "{{transit.source_send_time | date:'short'}}",
+        "{{transit.source_send_time | date:$root.egDateAndTimeFormat}}",
         '{{transit.target_copy.barcode}}',
         '{{transit.target_copy.call_number.record.simple_record.title}}') %]</div>
     </li>
   </ol>
   <hr/>
-  <div>{{current_location.shortname}} {{today | date:'short'}}</div>
+  <div>{{current_location.shortname}} {{today | date:$root.egDateAndTimeFormat}}</div>
 <br/>
index ccf9e8c..a9b7124 100644 (file)
@@ -33,7 +33,7 @@ Template for printing a transit slip. Fields include:
 
   <br/>
 
-  <div>[% l('Slip Date: [_1]', '{{today | date:"short"}}') %]</div>
+  <div>[% l('Slip Date: [_1]', '{{today | date:$root.egDateAndTimeFormat}}') %]</div>
   <div>[% l('Printed by [_1] at [_2]', 
     '{{staff.first_given_name}}', '{{current_location.shortname}}') %]</div>
 
index 7cbf9f2..5fe4355 100644 (file)
@@ -63,6 +63,8 @@ angular.module('egGridMod',
             // optional context menu label
             menuLabel : '@',
 
+            dateformat : '@', // optional: passed down to egGridValueFilter
+
             // Hash of control functions.
             //
             //  These functions are defined by the calling scope and 
@@ -179,7 +181,8 @@ angular.module('egGridMod',
                     idlClass : grid.idlClass,
                     defaultToHidden : (features.indexOf('-display') > -1),
                     defaultToNoSort : (features.indexOf('-sort') > -1),
-                    defaultToNoMultiSort : (features.indexOf('-multisort') > -1)
+                    defaultToNoMultiSort : (features.indexOf('-multisort') > -1),
+                    defaultDateFormat : $scope.dateformat
                 });
                 $scope.canMultiSelect = (features.indexOf('-multiselect') == -1);
 
@@ -1170,6 +1173,7 @@ angular.module('egGridMod',
         cols.defaultToHidden = args.defaultToHidden;
         cols.defaultToNoSort = args.defaultToNoSort;
         cols.defaultToNoMultiSort = args.defaultToNoMultiSort;
+        cols.defaultDateFormat = args.defaultDateFormat;
 
         // resets column width, visibility, and sort behavior
         // Visibility resets to the visibility settings defined in the 
@@ -1414,6 +1418,10 @@ angular.module('egGridMod',
                 (!cols.defaultToNoMultiSort && !column.nonmultisortable))
                 column.multisortable = true;
 
+            if (cols.defaultDateFormat && ! column.dateformat) {
+                column.dateformat = cols.defaultDateFormat;
+            }
+
             cols.columns.push(column);
 
             // Track which columns are visible by default in case we
index 670248c..682317b 100644 (file)
@@ -14,8 +14,8 @@
 angular.module('egCoreMod')
 
 .factory('egStartup', 
-       ['$q','$rootScope','$location','$window','egIDL','egAuth','egEnv',
-function($q,  $rootScope,  $location,  $window,  egIDL,  egAuth,  egEnv) {
+       ['$q','$rootScope','$location','$window','egIDL','egAuth','egEnv','egOrg',
+function($q,  $rootScope,  $location,  $window,  egIDL,  egAuth,  egEnv , egOrg ) {
 
     var service = { promise : null }
 
@@ -67,6 +67,19 @@ function($q,  $rootScope,  $location,  $window,  egIDL,  egAuth,  egEnv) {
                         deferred.reject('egEnv did not resolve')
                     }
                 );
+                egOrg.settings([
+                    'webstaff.format.dates',
+                    'webstaff.format.date_and_time'
+                ]).then(
+                    function(set) {
+                        $rootScope.egDateFormat = set['webstaff.format.dates'] || 'shortDate';
+                        $rootScope.egDateAndTimeFormat = set['webstaff.format.date_and_time'] || 'short';
+                        deferred.resolve();
+                    },
+                    function() {
+                        deferred.reject('egOrg did not resolve');
+                    }
+                );
             },
 
             // testAuthToken rejected