From 5ba4400e04c3d8e4a65efbe71d1d72ea69d6bc0b Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 3 Feb 2020 22:58:36 +0000 Subject: [PATCH] Bug 24718: Get OPAC working with datetimepicker and HourBasedHolds Sponsored-by: Waikato Institute of Technology Signed-off-by: David Nind --- .../bootstrap/en/includes/holds-table.inc | 12 ++++- .../opac-tmpl/bootstrap/en/includes/timepicker.inc | 22 +++++++++ .../opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 52 ++++++++++++++-------- .../plugins/jquery-ui-timepicker-addon.min.js | 5 +++ 4 files changed, 70 insertions(+), 21 deletions(-) create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/timepicker.inc create mode 100644 koha-tmpl/opac-tmpl/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc index aea867a213..534c0ce17f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc @@ -67,7 +67,11 @@ Hold date: - [% HOLD.reservedate | $KohaDates %] + [% IF Koha.Preference("HourBasedHolds") %] + [% HOLD.reservedate | $KohaDates with_hours = 1 %] + [% ELSE %] + [% HOLD.reservedate | $KohaDates %] + [% END %] @@ -75,7 +79,11 @@ [% IF ( HOLD.expirationdate ) %] Expiration: - [% HOLD.expirationdate | $KohaDates %] + [% IF Koha.Preference("HourBasedHolds") %] + [% HOLD.expirationdate | $KohaDates with_hours = 1 %] + [% ELSE %] + [% HOLD.expirationdate | $KohaDates %] + [% END %] [% ELSE %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/timepicker.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/timepicker.inc new file mode 100644 index 0000000000..04f5d3dbc8 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/timepicker.inc @@ -0,0 +1,22 @@ + diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt index 0981abe172..3a132c4f3c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -273,14 +273,14 @@ [% IF ( reserve_in_future ) %]
  • - + [% INCLUDE 'date-format.inc' %]
  • [% END %]
  • - + [% INCLUDE 'date-format.inc' %]
  • @@ -460,6 +460,8 @@ [% INCLUDE 'opac-bottom.inc' %] [% BLOCK jsinclude %] [% INCLUDE 'calendar.inc' %] +[% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %] +[% INCLUDE 'timepicker.inc' %]