From 4f9df515878d90c031c75c9d4fb5ebf486a87d4c Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Mon, 26 Jun 2017 16:23:54 -0700 Subject: [PATCH] LP#1673870: Use separate templates for ebook checkouts and holds Previously we used the same TT2 template for listing checkouts and performing a checkout, and for listing holds and placing a hold. This leads to problems; in particular, URL parameters required for checkout and hold actions were "sticky," so viewing your holds after placing a hold would show the "Place Hold" UI instead of a list of holds. This commit introduces separate templates for ebook actions as a workaround. Signed-off-by: Jeff Davis Signed-off-by: Galen Charlton Signed-off-by: Bill Erickson --- .../templates/opac/myopac/ebook_checkout.tt2 | 33 +++++++++++++++++ .../src/templates/opac/myopac/ebook_circs.tt2 | 11 ++---- .../src/templates/opac/myopac/ebook_holds.tt2 | 13 ++----- .../opac/myopac/ebook_place_hold.tt2 | 35 +++++++++++++++++++ .../templates/opac/parts/record/summary.tt2 | 4 +-- .../src/templates/opac/parts/result/table.tt2 | 4 +-- .../js/ui/default/opac/ebook_api/loggedin.js | 16 +++------ 7 files changed, 81 insertions(+), 35 deletions(-) create mode 100644 Open-ILS/src/templates/opac/myopac/ebook_checkout.tt2 create mode 100644 Open-ILS/src/templates/opac/myopac/ebook_place_hold.tt2 diff --git a/Open-ILS/src/templates/opac/myopac/ebook_checkout.tt2 b/Open-ILS/src/templates/opac/myopac/ebook_checkout.tt2 new file mode 100644 index 0000000000..2b38da3c7a --- /dev/null +++ b/Open-ILS/src/templates/opac/myopac/ebook_checkout.tt2 @@ -0,0 +1,33 @@ +[% PROCESS "opac/parts/header.tt2"; + PROCESS "opac/parts/misc_util.tt2"; + PROCESS "opac/parts/myopac/column_sort_support.tt2"; + WRAPPER "opac/parts/myopac/base.tt2"; + myopac_page = "ebook_checkout"; +%] +

[% l('Check Out E-Item') %]

+
+ +
+ [% l('Check Out E-Item') %] +
+
+ + + +
+[% END %] + diff --git a/Open-ILS/src/templates/opac/myopac/ebook_circs.tt2 b/Open-ILS/src/templates/opac/myopac/ebook_circs.tt2 index 7af1a8d102..1bee6e71cc 100644 --- a/Open-ILS/src/templates/opac/myopac/ebook_circs.tt2 +++ b/Open-ILS/src/templates/opac/myopac/ebook_circs.tt2 @@ -3,11 +3,6 @@ PROCESS "opac/parts/myopac/column_sort_support.tt2"; WRAPPER "opac/parts/myopac/base.tt2"; myopac_page = "ebook_circs"; - IF CGI.param("action") == 'checkout'; - ebook_circs_title = l('Check Out E-Item'); - ELSE; - ebook_circs_title = l('E-Items Currently Checked Out'); - END; %]

[% l('E-Items Currently Checked Out') %]

@@ -25,15 +20,13 @@
- [% ebook_circs_title %] + [% l('E-Items Currently Checked Out') %]
- - + +[% END %] + diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index c9b9919c60..f893cf6c81 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -82,14 +82,14 @@ [%- IF ebook_api.enabled == 'true' && args.ebook %]