From 968c5865e71196bcda562d38be9db4e09b83ebb2 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Fri, 18 Oct 2019 08:56:21 +0100 Subject: [PATCH] Bug 23838: Add renewals modal This patch adds the display of the renewals modal when appropriate. A "View" link is displayed next to renewals count where appropriate. Clicking the link opens the modal that displays the logged renewals. Sponsored-by: Loughborough University Signed-off-by: Myka Kennedy Stephens Signed-off-by: Owen Leonard Signed-off-by: Bouzid Fergani Signed-off-by: Ben Veasey Rescued-by: Martin Renvoize I rescued this patchset by squashing previous work and updating it to utilise the new renewals API routes introduced in bug 30275. Signed-off-by: Martin Renvoize Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../includes/patron-renewal-modal-strings.inc | 4 +++ .../prog/en/includes/patron-renewal-modal.inc | 18 +++++++++++++ .../prog/en/modules/members/readingrec.tt | 10 +++++++- .../prog/js/patron-renewal-modal.js | 25 +++++++++++++++++++ members/readingrec.pl | 5 ++-- 5 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/patron-renewal-modal-strings.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/patron-renewal-modal.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/js/patron-renewal-modal.js diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-renewal-modal-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-renewal-modal-strings.inc new file mode 100644 index 0000000000..dde6014c0d --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-renewal-modal-strings.inc @@ -0,0 +1,4 @@ + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-renewal-modal.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-renewal-modal.inc new file mode 100644 index 0000000000..d77875f6b4 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-renewal-modal.inc @@ -0,0 +1,18 @@ + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt index a4b6f1aca3..aecec7bd25 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -109,7 +109,12 @@ [% issue.barcode | html %] - [% issue.renewals_count | html %] + + [% issue.renewals_count | html %] + [% IF issue.renewals_count > 0 %] + [ View ] + [% END %] + [% issue.issuedate |$KohaDates with_hours => 1 %] @@ -154,6 +159,9 @@ [% Asset.js("js/members-menu.js") | $raw %] [% INCLUDE 'datatables.inc' %] [% INCLUDE 'columns_settings.inc' %] + [% INCLUDE 'patron-renewal-modal.inc' %] + [% INCLUDE 'patron-renewal-modal-strings.inc' %] + [% Asset.js("js/patron-renewal-modal.js") | $raw %]