@@ -, +, @@ --- Koha/Template/Plugin/Borrowers.pm | 18 +++++++++++++++++- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) --- a/Koha/Template/Plugin/Borrowers.pm +++ a/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 ) = @_; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ a/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 ) %] --