@@ -, +, @@ --- admin/transfer_limits.pl | 43 ++ .../modules/admin/branch_transfer_limits.tt | 9 +- .../prog/en/modules/admin/transfer_limits.tt | 437 ++++++++++++++++++ 3 files changed, 488 insertions(+), 1 deletion(-) create mode 100755 admin/transfer_limits.pl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/admin/transfer_limits.tt --- a/admin/transfer_limits.pl +++ a/admin/transfer_limits.pl @@ -0,0 +1,43 @@ +#!/usr/bin/perl + +# copyright 2020 ByWater Solutions +# +# This file is part of Koha. +# +# 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 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 WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + +use CGI qw ( -utf8 ); +use C4::Auth; +use C4::Context; +use C4::Output; +use C4::Koha; +use C4::Circulation + qw{ IsBranchTransferAllowed DeleteBranchTransferLimits CreateBranchTransferLimit }; + +my $input = new CGI; + +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "admin/transfer_limits.tt", + query => $input, + type => "intranet", + flagsrequired => { parameters => 'manage_transfers' }, + debug => 1, + } +); + +output_html_with_http_headers $input, $cookie, $template->output; + --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt @@ -28,7 +28,14 @@

Check the boxes for the libraries you allow your items to be transferred to.

-
[% IF ( limitType == 'ccode' ) %]For all collection codes: [% ELSE %]For all item types: [% END %] Select all | Clear all
+
+ [% IF ( limitType == 'ccode' ) %]For all collection codes: [% ELSE %]For all item types: [% END %] + Select all + | + Clear all + | + Switch to advanced editor +
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transfer_limits.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transfer_limits.tt @@ -0,0 +1,437 @@ +[% USE raw %] +[% USE To %] +[% USE Asset %] +[% USE Branches %] +[% USE Koha %] +[% USE ItemTypes %] +[% USE AuthorisedValues %] +[% SET footerjs = 1 %] +[% INCLUDE 'doc-head-open.inc' %] +Koha › Administration › Library checkin and transfer policy +[% INCLUDE 'doc-head-close.inc' %] + + + +[% SET BranchTransferLimitsType = Koha.Preference('BranchTransferLimitsType') %] +[% SET branches = Branches.all %] + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'prefs-admin-search.inc' %] + + + +
+
+
+
+

Checkin and transfer policy

+ +

+ [% IF BranchTransferLimitsType == "itemtype" %] + + + [% ELSE #BranchTransferLimitsType == "ccode" %] + + + [% END %] + + + + Loading... + +

+ +

Check the boxes for the libraries you allow your items to be transferred to.

+
+ Check all + | + Uncheck all + | + Switch to basic editor +
+ + + + + + + + [% FOREACH to IN branches %] + + [% END %] + + + + + + [% FOREACH b IN branches %] + + [% END %] + + + + + [% FOREACH from IN branches %] + + + + [% FOREACH to IN branches %] + + [% END %] + + [% END %] + +
   +

Check

+

Uncheck

+
 From / To[% b.branchname | html %]
+

Check

+

Uncheck

+
[% from.branchname | html %] + [% IF to.branchcode == from.branchcode %] +   + [% ELSE %] + + + [% END %] +
+
+
+ +
+ +
+
+ +[% MACRO jsinclude BLOCK %] + [% Asset.js("js/admin-menu.js") | $raw %] + [% INCLUDE 'datatables.inc' %] + [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] + +[% END %] +[% INCLUDE 'intranet-bottom.inc' %] --