From 4db91211aa1a4a0a06d63315d6de043e5a93fa89 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 15 Jan 2014 11:53:56 +0100 Subject: [PATCH] Bug 6739: (follow-up) template changes for the bootstrap theme Signed-off-by: Katrin Fischer Passes QA script, t, xt and t/db_dependent/Members*. Testing notes: - Database update * Changes to kohastructure match changes done by the updatedatabase statement. Feature is activated by default! * Ran database update succesfully. * Note: Expired patrons are now blocked by default in new AND in updated installations. - System preference * Verified system preference shows up correctly. - Category configuration * Add new patron category * Edit existing patron category * Delete patron category * Check patron category summary table. => Verified all actions work as expected. => Verified chosen value for BlockExpiredPatronOpacActions is always displayed and saved correctly. * Note: The new value is missing from the summary table. * Note: The new value is also not shown when deleting a patron category. - Check functionality * Renew and place a hold for an NOT EXPIRED patron with a) category: use syspref (default) syspref: block (default) b) category: use syspref (default) syspref: don't block c) category: block syspref: don't block d) category: block syspref: block e) category: don't block sypref: block f) category: don't block syspref: don't block Holds and renewals were always possible. * Also verified that the warning from NotifyBorrowerDeparture still shows up correctly. * Verified holds and renewals are still blocked, when the user has a restriction with a date in the future. * Renew and place a hold for an EXPIRED patron with a) category: use syspref (default) syspref: block (default) Holds and renewals blocked. b) category: use syspref (default) syspref: don't block Holds an renewals possible. c) category: block syspref: don't block Holds and renewals blocked. d) category: block syspref: block Holds and renewals blocked. e) category: don't block sypref: block Holds and renewals possible. f) category: don't block syspref: don't block Holds and renewals possible. Signed-off-by: Galen Charlton --- .../bootstrap/en/modules/opac-reserve.tt | 4 +++ .../bootstrap/en/modules/opac-user.tt | 35 +++++++++++++++---- 2 files changed, 32 insertions(+), 7 deletions(-) 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 f55158423b..66fd0c734f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -77,6 +77,10 @@
ERROR: Internal error: incomplete hold request.
[% END %] + [% IF ( expired_patron ) %] +
Sorry, you cannot place holds because your library card has expired.

Please contact your librarian if you wish to renew your card.

+ [% END %] + [% ELSE %] [% IF ( none_available ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index 95c597ce63..ffcac2fc84 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -57,7 +57,25 @@ [% IF ( BORROWER_INF.warnexpired ) %]
- Please note: Your card has expired. Please contact the library for more information. + Please note: Your account has expired as of [% BORROWER_INF.warnexpired | $KohaDates %]. Please contact the library if you wish to renew your account. +
+ [% END %] + + [% IF ( RENEW_ERROR ) %] +
+ Please note: + + Your account renewal failed because of the following: + [% FOREACH error IN RENEW_ERROR.split('\|') %] + [% IF error == 'card_expired' %] + Your account has expired. Please contact the library for more information. + [% ELSIF error == 'too_many' %] + You have renewed this item the maximum number of times allowed. + [% ELSIF error == 'on_reserve' %] + This item is on hold for another patron. + [% END %] + [% END %] +
[% END %] @@ -115,7 +133,7 @@ Barcode [% END %] Call No. - [% IF ( OpacRenewalAllowed ) %] + [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %] Renew [% END %] [% IF ( OPACFinesTab ) %] @@ -201,7 +219,7 @@ Call number: [% ISSUE.itemcallnumber %] - [% IF ( OpacRenewalAllowed ) %] + [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %] [% IF ( ISSUE.status ) %] [% IF ( canrenew ) %] @@ -235,12 +253,12 @@ [% END # /FOREACH ISSUES %] - [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %] + [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %] [% END %] - [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %] + [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
@@ -657,7 +675,7 @@ var MSG_CONFIRM_SUSPEND_HOLDS = _("Are you sure you want to suspend all holds?"); var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended holds?"); - $(function() { + $(document).ready(function(){ $('#opac-user-views').tabs(); $(".js-show").show(); $(".js-hide").hide(); @@ -698,8 +716,11 @@ e.preventDefault(); $("#renewall").submit(); }); - $("#checkoutst caption").append(""); + [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %] + $("#checkoutst caption").append(""); + [% END %] [% END %] + $( ".suspend-until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future }); //]]> -- 2.39.5