From fc19334ea3bbac58c606f86d8b8338c4db388b2c Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 19 Dec 2013 12:33:45 -0500 Subject: [PATCH] Bug 10694 - Allow arbitrary backdating of returns - QA Followup 2 --- Koha/Template/Plugin/Borrowers.pm | 18 +++++++++++++++++- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Koha/Template/Plugin/Borrowers.pm b/Koha/Template/Plugin/Borrowers.pm index 45c4071..6c8808f 100644 --- a/Koha/Template/Plugin/Borrowers.pm +++ b/Koha/Template/Plugin/Borrowers.pm @@ -6,7 +6,7 @@ package Koha::Template::Plugin::Borrowers; # # Koha is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later +# Foundation; either version 3 of the License, or (at your option) any later # version. # # Koha is distributed in the hope that it will be useful, but WITHOUT ANY @@ -25,6 +25,22 @@ use Date::Calc qw/Today Add_Delta_YM check_date Date_to_Days/; use C4::Koha; +=pod + +This plugin is a home for various patron related Template Toolkit functions +to help streamline Koha and to move logic from the Perl code into the +Templates when it makes sense to do so. + +To use, first, include the line '[% USE Borrowers %]' at the top +of the template to enable the plugin. + +For example: [% IF Borrowers.IsDebarred( borrower.borrowernumber ) %] +removes the necessity of setting a template variable in Perl code to +find out if a patron is restricted even if that variable is not evaluated +in any way in the script. + +=cut + sub IsDebarred { my ( $self, $borrower ) = @_; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 0623e04..90073a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -425,7 +425,7 @@ $(document).ready(function () {
Specify return date [% INCLUDE 'date-format.inc' %]:
- + [% IF ( return_date_override_remember ) %] -- 1.7.2.5