Bugzilla – Attachment 99151 Details for
Bug 15522
New interface for revamped circulation rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15522: Remove old circulation rules interface
Bug-15522-Remove-old-circulation-rules-interface.patch (text/plain), 93.19 KB, created by
Jonathan Druart
on 2020-02-18 08:20:58 UTC
(
hide
)
Description:
Bug 15522: Remove old circulation rules interface
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-18 08:20:58 UTC
Size:
93.19 KB
patch
obsolete
>From e501bce5f4f74760b1f9fc2b0e1c621cb1b556bf Mon Sep 17 00:00:00 2001 >From: Jesse Weaver <pianohacker@gmail.com> >Date: Tue, 17 Oct 2017 16:58:07 -0600 >Subject: [PATCH] Bug 15522: Remove old circulation rules interface > >--- > admin/clone-rules.pl | 70 -- > admin/smart-rules.pl | 622 ------------ > .../intranet-tmpl/prog/en/includes/admin-menu.inc | 2 +- > .../prog/en/modules/admin/admin-home.tt | 4 +- > .../prog/en/modules/admin/clone-rules.tt | 77 -- > .../prog/en/modules/admin/smart-rules.tt | 1043 -------------------- > .../intranet-tmpl/prog/js/src/admin/policy/app.js | 2 +- > 7 files changed, 4 insertions(+), 1816 deletions(-) > delete mode 100755 admin/clone-rules.pl > delete mode 100755 admin/smart-rules.pl > delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/admin/clone-rules.tt > delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt > >diff --git a/admin/clone-rules.pl b/admin/clone-rules.pl >deleted file mode 100755 >index cefc11ede8..0000000000 >--- a/admin/clone-rules.pl >+++ /dev/null >@@ -1,70 +0,0 @@ >-#!/usr/bin/perl >-# vim: et ts=4 sw=4 >-# Copyright BibLibre >-# >-# 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 <http://www.gnu.org/licenses>. >- >- >-# This script clones issuing rules from a library to another >-# parameters : >-# - frombranch : the branch we want to clone issuing rules from >-# - tobranch : the branch we want to clone issuing rules to >-# >-# The script can be called with one of the parameters, both or none >- >-use Modern::Perl; >-use CGI qw ( -utf8 ); >-use C4::Context; >-use C4::Output; >-use C4::Auth; >-use C4::Koha; >-use C4::Debug; >-use Koha::CirculationRules; >- >-my $input = new CGI; >- >-my ($template, $loggedinuser, $cookie) >- = get_template_and_user({template_name => "admin/clone-rules.tt", >- query => $input, >- type => "intranet", >- authnotrequired => 0, >- flagsrequired => {parameters => 'manage_circ_rules'}, >- debug => 1, >- }); >- >-my $frombranch = $input->param("frombranch"); >-my $tobranch = $input->param("tobranch"); >- >-$template->param(frombranch => $frombranch) if ($frombranch); >-$template->param(tobranch => $tobranch) if ($tobranch); >- >-if ($frombranch && $tobranch && $frombranch ne $tobranch) { >- $frombranch = ( $frombranch ne '*' ? $frombranch : undef ); >- $tobranch = ( $tobranch ne '*' ? $tobranch : undef ); >- >- Koha::CirculationRules->search({branchcode => $tobranch})->delete; >- >- my $rules = Koha::CirculationRules->search({ branchcode => $frombranch }); >- $rules->clone($tobranch); >-} else { >- $template->param(error => 1); >-} >- >-$template->param(result => 1); >- >- >-output_html_with_http_headers $input, $cookie, $template->output; >- >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >deleted file mode 100755 >index 75ed5164ca..0000000000 >--- a/admin/smart-rules.pl >+++ /dev/null >@@ -1,622 +0,0 @@ >-#!/usr/bin/perl >-# Copyright 2000-2002 Katipo Communications >-# copyright 2010 BibLibre >-# >-# 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 <http://www.gnu.org/licenses>. >- >-use Modern::Perl; >-use CGI qw ( -utf8 ); >-use C4::Context; >-use C4::Output; >-use C4::Auth; >-use C4::Koha; >-use C4::Debug; >-use Koha::DateUtils; >-use Koha::Database; >-use Koha::Logger; >-use Koha::RefundLostItemFeeRules; >-use Koha::Libraries; >-use Koha::CirculationRules; >-use Koha::Patron::Categories; >-use Koha::Caches; >-use Koha::Patrons; >- >-my $input = CGI->new; >-my $dbh = C4::Context->dbh; >- >-# my $flagsrequired; >-# $flagsrequired->{circulation}=1; >-my ($template, $loggedinuser, $cookie) >- = get_template_and_user({template_name => "admin/smart-rules.tt", >- query => $input, >- type => "intranet", >- authnotrequired => 0, >- flagsrequired => {parameters => 'manage_circ_rules'}, >- debug => 1, >- }); >- >-my $type=$input->param('type'); >- >-my $branch = $input->param('branch'); >-unless ( $branch ) { >- if ( C4::Context->preference('DefaultToLoggedInLibraryCircRules') ) { >- $branch = Koha::Libraries->search->count() == 1 ? undef : C4::Context::mybranch(); >- } >- else { >- $branch = C4::Context::only_my_library() ? ( C4::Context::mybranch() || '*' ) : '*'; >- } >-} >- >-my $logged_in_patron = Koha::Patrons->find( $loggedinuser ); >- >-my $can_edit_from_any_library = $logged_in_patron->has_permission( {parameters => 'manage_circ_rules_from_any_libraries' } ); >-$template->param( restricted_to_own_library => not $can_edit_from_any_library ); >-$branch = C4::Context::mybranch() unless $can_edit_from_any_library; >- >-$branch = '*' if $branch eq 'NO_LIBRARY_SET'; >- >-my $op = $input->param('op') || q{}; >-my $language = C4::Languages::getlanguage(); >- >-my $cache = Koha::Caches->get_instance; >-$cache->clear_from_cache( Koha::CirculationRules::GUESSED_ITEMTYPES_KEY ); >- >-if ($op eq 'delete') { >- my $itemtype = $input->param('itemtype'); >- my $categorycode = $input->param('categorycode'); >- $debug and warn "deleting $1 $2 $branch"; >- >- Koha::CirculationRules->set_rules( >- { >- categorycode => $categorycode eq '*' ? undef : $categorycode, >- branchcode => $branch eq '*' ? undef : $branch, >- itemtype => $itemtype eq '*' ? undef : $itemtype, >- rules => { >- maxissueqty => undef, >- maxonsiteissueqty => undef, >- rentaldiscount => undef, >- fine => undef, >- finedays => undef, >- maxsuspensiondays => undef, >- suspension_chargeperiod => undef, >- firstremind => undef, >- chargeperiod => undef, >- chargeperiod_charge_at => undef, >- issuelength => undef, >- lengthunit => undef, >- hardduedate => undef, >- hardduedatecompare => undef, >- renewalsallowed => undef, >- renewalperiod => undef, >- norenewalbefore => undef, >- auto_renew => undef, >- no_auto_renewal_after => undef, >- no_auto_renewal_after_hard_limit => undef, >- reservesallowed => undef, >- holds_per_record => undef, >- holds_per_day => undef, >- onshelfholds => undef, >- opacitemholds => undef, >- overduefinescap => undef, >- cap_fine_to_replacement_price => undef, >- article_requests => undef, >- note => undef, >- } >- } >- ); >-} >-elsif ($op eq 'delete-branch-cat') { >- my $categorycode = $input->param('categorycode'); >- if ($branch eq "*") { >- if ($categorycode eq "*") { >- Koha::CirculationRules->set_rules( >- { >- branchcode => undef, >- categorycode => undef, >- rules => { >- max_holds => undef, >- patron_maxissueqty => undef, >- patron_maxonsiteissueqty => undef, >- } >- } >- ); >- Koha::CirculationRules->set_rules( >- { >- branchcode => undef, >- itemtype => undef, >- rules => { >- holdallowed => undef, >- hold_fulfillment_policy => undef, >- returnbranch => undef, >- } >- } >- ); >- } else { >- Koha::CirculationRules->set_rules( >- { >- categorycode => $categorycode, >- branchcode => undef, >- rules => { >- max_holds => undef, >- patron_maxissueqty => undef, >- patron_maxonsiteissueqty => undef, >- } >- } >- ); >- } >- } elsif ($categorycode eq "*") { >- Koha::CirculationRules->set_rules( >- { >- branchcode => $branch, >- categorycode => undef, >- rules => { >- patron_maxissueqty => undef, >- patron_maxonsiteissueqty => undef, >- } >- } >- ); >- Koha::CirculationRules->set_rules( >- { >- branchcode => $branch, >- rules => { >- holdallowed => undef, >- hold_fulfillment_policy => undef, >- returnbranch => undef, >- max_holds => undef, >- } >- } >- ); >- } else { >- Koha::CirculationRules->set_rules( >- { >- categorycode => $categorycode, >- branchcode => $branch, >- rules => { >- max_holds => undef, >- patron_maxissueqty => undef, >- patron_maxonsiteissueqty => undef, >- } >- } >- ); >- } >-} >-elsif ($op eq 'delete-branch-item') { >- my $itemtype = $input->param('itemtype'); >- if ($branch eq "*") { >- if ($itemtype eq "*") { >- Koha::CirculationRules->set_rules( >- { >- branchcode => undef, >- itemtype => undef, >- rules => { >- holdallowed => undef, >- hold_fulfillment_policy => undef, >- returnbranch => undef, >- } >- } >- ); >- } else { >- Koha::CirculationRules->set_rules( >- { >- branchcode => undef, >- itemtype => $itemtype, >- rules => { >- holdallowed => undef, >- hold_fulfillment_policy => undef, >- returnbranch => undef, >- } >- } >- ); >- } >- } elsif ($itemtype eq "*") { >- Koha::CirculationRules->set_rules( >- { >- branchcode => $branch, >- itemtype => undef, >- rules => { >- holdallowed => undef, >- hold_fulfillment_policy => undef, >- returnbranch => undef, >- } >- } >- ); >- } else { >- Koha::CirculationRules->set_rules( >- { >- branchcode => $branch, >- itemtype => $itemtype, >- rules => { >- holdallowed => undef, >- hold_fulfillment_policy => undef, >- returnbranch => undef, >- } >- } >- ); >- } >-} >-# save the values entered >-elsif ($op eq 'add') { >- my $br = $branch; # branch >- my $bor = $input->param('categorycode'); # borrower category >- my $itemtype = $input->param('itemtype'); # item type >- my $fine = $input->param('fine'); >- my $finedays = $input->param('finedays'); >- my $maxsuspensiondays = $input->param('maxsuspensiondays'); >- $maxsuspensiondays = undef if $maxsuspensiondays eq q||; >- $maxsuspensiondays = '' if $maxsuspensiondays eq q||; >- my $suspension_chargeperiod = $input->param('suspension_chargeperiod') || 1; >- my $firstremind = $input->param('firstremind'); >- my $chargeperiod = $input->param('chargeperiod'); >- my $chargeperiod_charge_at = $input->param('chargeperiod_charge_at'); >- my $maxissueqty = $input->param('maxissueqty'); >- my $maxonsiteissueqty = $input->param('maxonsiteissueqty'); >- my $renewalsallowed = $input->param('renewalsallowed'); >- my $renewalperiod = $input->param('renewalperiod'); >- my $norenewalbefore = $input->param('norenewalbefore'); >- $norenewalbefore = '' if $norenewalbefore =~ /^\s*$/; >- my $auto_renew = $input->param('auto_renew') eq 'yes' ? 1 : 0; >- my $no_auto_renewal_after = $input->param('no_auto_renewal_after'); >- $no_auto_renewal_after = '' if $no_auto_renewal_after =~ /^\s*$/; >- my $no_auto_renewal_after_hard_limit = $input->param('no_auto_renewal_after_hard_limit') || ''; >- $no_auto_renewal_after_hard_limit = eval { dt_from_string( $input->param('no_auto_renewal_after_hard_limit') ) } if ( $no_auto_renewal_after_hard_limit ); >- $no_auto_renewal_after_hard_limit = output_pref( { dt => $no_auto_renewal_after_hard_limit, dateonly => 1, dateformat => 'iso' } ) if ( $no_auto_renewal_after_hard_limit ); >- my $reservesallowed = $input->param('reservesallowed'); >- my $holds_per_record = $input->param('holds_per_record'); >- my $holds_per_day = $input->param('holds_per_day'); >- $holds_per_day =~ s/\s//g; >- $holds_per_day = '' if $holds_per_day !~ /^\d+/; >- my $onshelfholds = $input->param('onshelfholds') || 0; >- $maxissueqty =~ s/\s//g; >- $maxissueqty = '' if $maxissueqty !~ /^\d+/; >- $maxonsiteissueqty =~ s/\s//g; >- $maxonsiteissueqty = '' if $maxonsiteissueqty !~ /^\d+/; >- my $issuelength = $input->param('issuelength'); >- $issuelength = $issuelength eq q{} ? undef : $issuelength; >- my $lengthunit = $input->param('lengthunit'); >- my $hardduedate = $input->param('hardduedate') || undef; >- $hardduedate = eval { dt_from_string( $input->param('hardduedate') ) } if ( $hardduedate ); >- $hardduedate = output_pref( { dt => $hardduedate, dateonly => 1, dateformat => 'iso' } ) if ( $hardduedate ); >- my $hardduedatecompare = $input->param('hardduedatecompare'); >- my $rentaldiscount = $input->param('rentaldiscount'); >- my $opacitemholds = $input->param('opacitemholds') || 0; >- my $article_requests = $input->param('article_requests') || 'no'; >- my $overduefinescap = $input->param('overduefinescap') || ''; >- my $cap_fine_to_replacement_price = $input->param('cap_fine_to_replacement_price') eq 'on'; >- my $note = $input->param('note'); >- $debug and warn "Adding $br, $bor, $itemtype, $fine, $maxissueqty, $maxonsiteissueqty, $cap_fine_to_replacement_price"; >- >- my $rules = { >- maxissueqty => $maxissueqty, >- maxonsiteissueqty => $maxonsiteissueqty, >- rentaldiscount => $rentaldiscount, >- fine => $fine, >- finedays => $finedays, >- maxsuspensiondays => $maxsuspensiondays, >- suspension_chargeperiod => $suspension_chargeperiod, >- firstremind => $firstremind, >- chargeperiod => $chargeperiod, >- chargeperiod_charge_at => $chargeperiod_charge_at, >- issuelength => $issuelength, >- lengthunit => $lengthunit, >- hardduedate => $hardduedate, >- hardduedatecompare => $hardduedatecompare, >- renewalsallowed => $renewalsallowed, >- renewalperiod => $renewalperiod, >- norenewalbefore => $norenewalbefore, >- auto_renew => $auto_renew, >- no_auto_renewal_after => $no_auto_renewal_after, >- no_auto_renewal_after_hard_limit => $no_auto_renewal_after_hard_limit, >- reservesallowed => $reservesallowed, >- holds_per_record => $holds_per_record, >- holds_per_day => $holds_per_day, >- onshelfholds => $onshelfholds, >- opacitemholds => $opacitemholds, >- overduefinescap => $overduefinescap, >- cap_fine_to_replacement_price => $cap_fine_to_replacement_price, >- article_requests => $article_requests, >- note => $note, >- }; >- >- Koha::CirculationRules->set_rules( >- { >- categorycode => $bor eq '*' ? undef : $bor, >- itemtype => $itemtype eq '*' ? undef : $itemtype, >- branchcode => $br eq '*' ? undef : $br, >- rules => $rules, >- } >- ); >- >-} >-elsif ($op eq "set-branch-defaults") { >- my $categorycode = $input->param('categorycode'); >- my $patron_maxissueqty = $input->param('patron_maxissueqty'); >- my $patron_maxonsiteissueqty = $input->param('patron_maxonsiteissueqty'); >- my $holdallowed = $input->param('holdallowed'); >- my $hold_fulfillment_policy = $input->param('hold_fulfillment_policy'); >- my $returnbranch = $input->param('returnbranch'); >- my $max_holds = $input->param('max_holds'); >- $patron_maxissueqty =~ s/\s//g; >- $patron_maxissueqty = '' if $patron_maxissueqty !~ /^\d+/; >- $patron_maxonsiteissueqty =~ s/\s//g; >- $patron_maxonsiteissueqty = '' if $patron_maxonsiteissueqty !~ /^\d+/; >- $holdallowed =~ s/\s//g; >- $holdallowed = undef if $holdallowed !~ /^\d+/; >- $max_holds =~ s/\s//g; >- $max_holds = '' if $max_holds !~ /^\d+/; >- >- if ($branch eq "*") { >- Koha::CirculationRules->set_rules( >- { >- itemtype => undef, >- branchcode => undef, >- rules => { >- holdallowed => $holdallowed, >- hold_fulfillment_policy => $hold_fulfillment_policy, >- returnbranch => $returnbranch, >- } >- } >- ); >- Koha::CirculationRules->set_rules( >- { >- categorycode => undef, >- branchcode => undef, >- rules => { >- patron_maxissueqty => $patron_maxissueqty, >- patron_maxonsiteissueqty => $patron_maxonsiteissueqty, >- } >- } >- ); >- } else { >- Koha::CirculationRules->set_rules( >- { >- itemtype => undef, >- branchcode => $branch, >- rules => { >- holdallowed => $holdallowed, >- hold_fulfillment_policy => $hold_fulfillment_policy, >- returnbranch => $returnbranch, >- } >- } >- ); >- Koha::CirculationRules->set_rules( >- { >- categorycode => undef, >- branchcode => $branch, >- rules => { >- patron_maxissueqty => $patron_maxissueqty, >- patron_maxonsiteissueqty => $patron_maxonsiteissueqty, >- } >- } >- ); >- } >- Koha::CirculationRules->set_rule( >- { >- branchcode => $branch, >- categorycode => undef, >- rule_name => 'max_holds', >- rule_value => $max_holds, >- } >- ); >-} >-elsif ($op eq "add-branch-cat") { >- my $categorycode = $input->param('categorycode'); >- my $patron_maxissueqty = $input->param('patron_maxissueqty'); >- my $patron_maxonsiteissueqty = $input->param('patron_maxonsiteissueqty'); >- my $max_holds = $input->param('max_holds'); >- $patron_maxissueqty =~ s/\s//g; >- $patron_maxissueqty = '' if $patron_maxissueqty !~ /^\d+/; >- $patron_maxonsiteissueqty =~ s/\s//g; >- $patron_maxonsiteissueqty = '' if $patron_maxonsiteissueqty !~ /^\d+/; >- $max_holds =~ s/\s//g; >- $max_holds = undef if $max_holds !~ /^\d+/; >- >- if ($branch eq "*") { >- if ($categorycode eq "*") { >- Koha::CirculationRules->set_rules( >- { >- categorycode => undef, >- branchcode => undef, >- rules => { >- max_holds => $max_holds, >- patron_maxissueqty => $patron_maxissueqty, >- patron_maxonsiteissueqty => $patron_maxonsiteissueqty, >- } >- } >- ); >- } else { >- Koha::CirculationRules->set_rules( >- { >- categorycode => $categorycode, >- branchcode => undef, >- rules => { >- max_holds => $max_holds, >- patron_maxissueqty => $patron_maxissueqty, >- patron_maxonsiteissueqty => $patron_maxonsiteissueqty, >- } >- } >- ); >- } >- } elsif ($categorycode eq "*") { >- Koha::CirculationRules->set_rules( >- { >- categorycode => undef, >- branchcode => $branch, >- rules => { >- max_holds => $max_holds, >- patron_maxissueqty => $patron_maxissueqty, >- patron_maxonsiteissueqty => $patron_maxonsiteissueqty, >- } >- } >- ); >- } else { >- Koha::CirculationRules->set_rules( >- { >- categorycode => $categorycode, >- branchcode => $branch, >- rules => { >- max_holds => $max_holds, >- patron_maxissueqty => $patron_maxissueqty, >- patron_maxonsiteissueqty => $patron_maxonsiteissueqty, >- } >- } >- ); >- } >-} >-elsif ($op eq "add-branch-item") { >- my $itemtype = $input->param('itemtype'); >- my $holdallowed = $input->param('holdallowed'); >- my $hold_fulfillment_policy = $input->param('hold_fulfillment_policy'); >- my $returnbranch = $input->param('returnbranch'); >- >- $holdallowed =~ s/\s//g; >- $holdallowed = undef if $holdallowed !~ /^\d+/; >- >- if ($branch eq "*") { >- if ($itemtype eq "*") { >- Koha::CirculationRules->set_rules( >- { >- itemtype => undef, >- branchcode => undef, >- rules => { >- holdallowed => $holdallowed, >- hold_fulfillment_policy => $hold_fulfillment_policy, >- returnbranch => $returnbranch, >- } >- } >- ); >- } else { >- Koha::CirculationRules->set_rules( >- { >- itemtype => $itemtype, >- branchcode => undef, >- rules => { >- holdallowed => $holdallowed, >- hold_fulfillment_policy => $hold_fulfillment_policy, >- returnbranch => $returnbranch, >- } >- } >- ); >- } >- } elsif ($itemtype eq "*") { >- Koha::CirculationRules->set_rules( >- { >- itemtype => undef, >- branchcode => $branch, >- rules => { >- holdallowed => $holdallowed, >- hold_fulfillment_policy => $hold_fulfillment_policy, >- returnbranch => $returnbranch, >- } >- } >- ); >- } else { >- Koha::CirculationRules->set_rules( >- { >- itemtype => $itemtype, >- branchcode => $branch, >- rules => { >- holdallowed => $holdallowed, >- hold_fulfillment_policy => $hold_fulfillment_policy, >- returnbranch => $returnbranch, >- } >- } >- ); >- } >-} >-elsif ( $op eq 'mod-refund-lost-item-fee-rule' ) { >- >- my $refund = $input->param('refund'); >- >- if ( $refund eq '*' ) { >- if ( $branch ne '*' ) { >- # only do something for $refund eq '*' if branch-specific >- Koha::CirculationRules->set_rules( >- { >- branchcode => $branch, >- rules => { >- refund => undef >- } >- } >- ); >- } >- } else { >- Koha::CirculationRules->set_rules( >- { >- branchcode => $branch, >- rules => { >- refund => $refund >- } >- } >- ); >- } >-} >- >-my $refundLostItemFeeRule = Koha::RefundLostItemFeeRules->find({ branchcode => ($branch eq '*') ? undef : $branch }); >-$template->param( >- refundLostItemFeeRule => $refundLostItemFeeRule, >- defaultRefundRule => Koha::RefundLostItemFeeRules->_default_rule >-); >- >-my $patron_categories = Koha::Patron::Categories->search({}, { order_by => ['description'] }); >- >-my $itemtypes = Koha::ItemTypes->search_with_localization; >- >-my $humanbranch = ( $branch ne '*' ? $branch : undef ); >- >-my $definedbranch = Koha::CirculationRules->search({ branchcode => $humanbranch })->count ? 1 : 0; >- >-$template->param(show_branch_cat_rule_form => 1); >- >-$template->param( >- patron_categories => $patron_categories, >- itemtypeloop => $itemtypes, >- humanbranch => $humanbranch, >- current_branch => $branch, >- definedbranch => $definedbranch, >-); >-output_html_with_http_headers $input, $cookie, $template->output; >- >-exit 0; >- >-# sort by patron category, then item type, putting >-# default entries at the bottom >-sub by_category_and_itemtype { >- unless (by_category($a, $b)) { >- return by_itemtype($a, $b); >- } >-} >- >-sub by_category { >- my ($a, $b) = @_; >- if ($a->{'default_humancategorycode'}) { >- return ($b->{'default_humancategorycode'} ? 0 : 1); >- } elsif ($b->{'default_humancategorycode'}) { >- return -1; >- } else { >- return $a->{'humancategorycode'} cmp $b->{'humancategorycode'}; >- } >-} >- >-sub by_itemtype { >- my ($a, $b) = @_; >- if ($a->{default_translated_description}) { >- return ($b->{'default_translated_description'} ? 0 : 1); >- } elsif ($b->{'default_translated_description'}) { >- return -1; >- } else { >- return lc $a->{'translated_description'} cmp lc $b->{'translated_description'}; >- } >-} >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc >index dedf3b55bc..bfcc514f8e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc >@@ -33,7 +33,7 @@ > <li><a href="/cgi-bin/koha/admin/categories.pl">Patron categories</a></li> > [% END %] > [% IF ( CAN_user_parameters_manage_circ_rules ) %] >- <li><a href="/cgi-bin/koha/admin/smart-rules.pl">Circulation and fines rules</a></li> >+ <li><a href="/cgi-bin/koha/admin/policy.pl">Circulation, fines, and holds rules</a></li> > [% END %] > [% IF ( CAN_user_parameters_manage_patron_attributes ) %] > <li><a href="/cgi-bin/koha/admin/patron-attr-types.pl">Patron attribute types</a></li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt >index 4e7675de3e..adce489118 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt >@@ -83,8 +83,8 @@ > <dd>Define patron categories.</dd> > [% END %] > [% IF CAN_user_parameters_manage_circ_rules %] >- <dt><a href="/cgi-bin/koha/admin/smart-rules.pl">Circulation and fines rules</a></dt> >- <dd>Define circulation and fines rules for combinations of libraries, patron categories, and item types</dd> >+ <dt><a href="/cgi-bin/koha/admin/policy.pl">Circulation, fines, and holds rules</a></dt> >+ <dd>Define circulation, fines, and holds rules for combinations of libraries, patron categories, and item types</dd> > [% END %] > [% IF ( CAN_user_parameters_manage_patron_attributes ) %] > <dt><a href="/cgi-bin/koha/admin/patron-attr-types.pl">Patron attribute types</a></dt> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/clone-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/clone-rules.tt >deleted file mode 100644 >index d7ff05068d..0000000000 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/clone-rules.tt >+++ /dev/null >@@ -1,77 +0,0 @@ >-[% USE raw %] >-[% USE Asset %] >-[% USE Branches %] >-[% SET footerjs = 1 %] >-[% INCLUDE 'doc-head-open.inc' %] >-<title>Koha › Administration › Circulation and fine rules › Clone circulation and fine rules</title> >-[% INCLUDE 'doc-head-close.inc' %] >-</head> >-<body id="admin_clone-rules" class="admin"> >-[% INCLUDE 'header.inc' %] >-[% INCLUDE 'prefs-admin-search.inc' %] >- >-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <a href="/cgi-bin/koha/admin/smart-rules.pl">Circulation and fine rules</a> › Clone circulation and fine rules</div> >- >-<div class="main container-fluid"> >- <div class="row"> >- <div class="col-sm-10 col-sm-push-2"> >- <main> >- >- <h2>Cloning circulation and fine rules >- [% IF frombranch %] from "[% Branches.GetName( frombranch ) | html %]"[% END %] >- [% IF tobranch %] to "[% Branches.GetName( tobranch ) | html %]"[% END %] >- </h2> >- >- [% IF ( result ) %] >- [% IF ( error ) %] >- <div class="dialog alert">Cloning of circulation and fine rules failed!</div> >- [% ELSE %] >- <div class="dialog message"><p>The rules have been cloned.</p></div> >- [% END %] >- <a href="/cgi-bin/koha/admin/smart-rules.pl">Return to circulation and fine rules</a> >- [% ELSE %] >- >- <p class="help">Use carefully! If the destination library already has circulation and fine rules, they will be deleted without warning!</p> >- <form action="/cgi-bin/koha/admin/clone-rules.pl" method="post"> >- [% UNLESS ( frombranch ) %] >- <fieldset> >- <legend>Please choose a library to clone rules from:</legend> >- <label for="frombranch">Source library:</label> >- <select name="frombranch" id="frombranch"> >- <option value="">Default</option> >- [% PROCESS options_for_libraries libraries => Branches.all() %] >- </select> >- [% IF ( tobranch ) %]<input type="hidden" name="tobranch" value="[% tobranch | html %]" />[% END %] >- </fieldset> >- [% END %] >- >- [% UNLESS ( tobranch ) %] >- <fieldset> >- <legend>Please choose the library to clone the rules to:</legend> >- <label for="tobranch">Destination library:</label> >- <select name="tobranch" id="tobranch"> >- <option value="">Default</option> >- [% PROCESS options_for_libraries libraries => Branches.all() %] >- </select> >- [% IF ( frombranch ) %]<input type="hidden" name="frombranch" value="[% frombranch | html %]" />[% END %] >- </fieldset> >- [% END %] >- <input type="submit" value="Submit" /> >- </form> >- >- [% END %] >- </main> >- </div> <!-- /.col-sm-10.col-sm-push-2 --> >- >- <div class="col-sm-2 col-sm-pull-10"> >- <aside> >- [% INCLUDE 'admin-menu.inc' %] >- </aside> >- </div> <!-- /.col-sm-2.col-sm-pull-10 --> >- </div> <!-- /.row --> >- >-[% MACRO jsinclude BLOCK %] >- [% Asset.js("js/admin-menu.js") | $raw %] >-[% END %] >- >-[% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >deleted file mode 100644 >index ed737af2cd..0000000000 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ /dev/null >@@ -1,1043 +0,0 @@ >-[% USE raw %] >-[% USE Asset %] >-[% USE Koha %] >-[% USE KohaDates %] >-[% USE Branches %] >-[% USE Categories %] >-[% USE ItemTypes %] >-[% USE CirculationRules %] >-[% SET footerjs = 1 %] >- >-[% SET branchcode = humanbranch || undef %] >- >-[% SET categorycodes = [] %] >-[% FOREACH pc IN patron_categories %] >- [% categorycodes.push( pc.id ) %] >-[% END %] >-[% categorycodes.push(undef) %] >- >-[% SET itemtypes = [] %] >-[% FOREACH i IN itemtypeloop %] >- [% itemtypes.push( i.itemtype ) %] >-[% END %] >-[% itemtypes.push(undef) %] >- >-[% INCLUDE 'doc-head-open.inc' %] >-<title>Koha › Administration › Circulation and fine rules</title> >-[% INCLUDE 'doc-head-close.inc' %] >-</head> >- >-<body id="admin_smart-rules" class="admin"> >-[% INCLUDE 'header.inc' %] >-[% INCLUDE 'prefs-admin-search.inc' %] >- >-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › Circulation and fine rules</div> >- >-<div class="main container-fluid"> >- <div class="row"> >- <div class="col-sm-10 col-sm-push-2"> >- <main> >- >- <h1 class="parameters"> >- [% IF humanbranch %] >- Defining circulation and fine rules for "[% Branches.GetName( humanbranch ) | html %]" >- [% ELSE %] >- Defining circulation and fine rules for all libraries >- [% END %] >- </h1> >- <div class="help"> >- <p>The rules are applied from most specific to less specific, using the first found in this order:</p> >- <ul> >- <li>same library, same patron category, same item type</li> >- <li>same library, same patron category, all item types</li> >- <li>same library, all patron categories, same item type</li> >- <li>same library, all patron categories, all item types</li> >- <li>default (all libraries), same patron category, same item type</li> >- <li>default (all libraries), same patron category, all item types</li> >- <li>default (all libraries), all patron categories, same item type</li> >- <li>default (all libraries), all patron categories, all item types</li> >- </ul> >- <p>To modify a rule, create a new one with the same patron category and item type.</p> >- </div> >- <div> >- [% UNLESS restricted_to_own_library %] >- <form method="get" action="/cgi-bin/koha/admin/smart-rules.pl" id="selectlibrary"> >- Select a library : >- <select name="branch" id="branch" style="width:20em;"> >- <option value="*">Standard rules for all libraries</option> >- [% PROCESS options_for_libraries libraries => Branches.all( selected => current_branch, unfiltered => 1 ) %] >- </select> >- </form> >- [% IF ( definedbranch ) %] >- <form action="/cgi-bin/koha/admin/clone-rules.pl" method="post"> >- <label for="tobranch"><strong>Clone these rules to:</strong></label> >- <input type="hidden" name="frombranch" value="[% current_branch | html %]" /> >- <select name="tobranch" id="tobranch"> >- [% PROCESS options_for_libraries libraries => Branches.all( unfiltered => 1 ) %] >- </select> >- <input type="submit" id="clone_rules" value="Clone" /> >- </form> >- [% END %] >- [% END %] >- >- <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl"> >- <input type="hidden" name="op" value="add" /> >- <input type="hidden" name="branch" value="[% current_branch | html %]"/> >- <table id="default-circulation-rules"> >- <thead> >- <tr> >- <th>Patron category</th> >- <th>Item type</th> >- <th>Actions</th> >- <th>Note</th> >- <th>Current checkouts allowed</th> >- <th>Current on-site checkouts allowed</th> >- <th>Loan period</th> >- <th>Unit</th> >- <th>Hard due date</th> >- <th>Fine amount</th> >- <th>Fine charging interval</th> >- <th>When to charge</th> >- <th>Fine grace period</th> >- <th>Overdue fines cap (amount)</th> >- <th>Cap fine at replacement price</th> >- <th>Suspension in days (day)</th> >- <th>Max. suspension duration (day)</th> >- <th>Suspension charging interval</th> >- <th>Renewals allowed (count)</th> >- <th>Renewal period</th> >- <th>No renewal before</th> >- <th>Automatic renewal</th> >- <th>No automatic renewal after</th> >- <th>No automatic renewal after (hard limit)</th> >- <th>Holds allowed (total)</th> >- <th>Holds allowed (daily)</th> >- <th>Holds per record (count)</th> >- <th>On shelf holds allowed</th> >- <th>OPAC item level holds</th> >- <th>Article requests</th> >- <th>Rental discount (%)</th> >- <th>Actions</th> >- </tr> >- </thead> >- <tbody> >- [% SET row_count = 0 %] >- [% FOREACH c IN categorycodes %] >- [% FOREACH i IN itemtypes %] >- [% SET note = CirculationRules.Search( branchcode, c, i, 'note' ) %] >- [% SET maxissueqty = CirculationRules.Search( branchcode, c, i, 'maxissueqty' ) %] >- [% SET maxonsiteissueqty = CirculationRules.Search( branchcode, c, i, 'maxonsiteissueqty' ) %] >- [% SET issuelength = CirculationRules.Search( branchcode, c, i, 'issuelength' ) %] >- [% SET lengthunit = CirculationRules.Search( branchcode, c, i, 'lengthunit' ) %] >- [% SET hardduedate = CirculationRules.Search( branchcode, c, i, 'hardduedate' ) %] >- [% SET hardduedatecompare = CirculationRules.Search( branchcode, c, i, 'hardduedatecompare' ) %] >- [% SET fine = CirculationRules.Search( branchcode, c, i, 'fine' ) %] >- [% SET chargeperiod = CirculationRules.Search( branchcode, c, i, 'chargeperiod' ) %] >- [% SET chargeperiod_charge_at = CirculationRules.Search( branchcode, c, i, 'chargeperiod_charge_at' ) %] >- [% SET firstremind = CirculationRules.Search( branchcode, c, i, 'firstremind' ) %] >- [% SET overduefinescap = CirculationRules.Search( branchcode, c, i, 'overduefinescap' ) %] >- [% SET cap_fine_to_replacement_price = CirculationRules.Search( branchcode, c, i, 'cap_fine_to_replacement_price' ) %] >- [% SET finedays = CirculationRules.Search( branchcode, c, i, 'finedays' ) %] >- [% SET maxsuspensiondays = CirculationRules.Search( branchcode, c, i, 'maxsuspensiondays' ) %] >- [% SET suspension_chargeperiod = CirculationRules.Search( branchcode, c, i, 'suspension_chargeperiod' ) %] >- [% SET renewalsallowed = CirculationRules.Search( branchcode, c, i, 'renewalsallowed' ) %] >- [% SET renewalperiod = CirculationRules.Search( branchcode, c, i, 'renewalperiod' ) %] >- [% SET norenewalbefore = CirculationRules.Search( branchcode, c, i, 'norenewalbefore' ) %] >- [% SET auto_renew = CirculationRules.Search( branchcode, c, i, 'auto_renew' ) %] >- [% SET no_auto_renewal_after = CirculationRules.Search( branchcode, c, i, 'no_auto_renewal_after' ) %] >- [% SET no_auto_renewal_after_hard_limit = CirculationRules.Search( branchcode, c, i, 'no_auto_renewal_after_hard_limit' ) %] >- [% SET reservesallowed = CirculationRules.Search( branchcode, c, i, 'reservesallowed' ) %] >- [% SET holds_per_day = CirculationRules.Search( branchcode, c, i, 'holds_per_day' ) %] >- [% SET holds_per_record = CirculationRules.Search( branchcode, c, i, 'holds_per_record' ) %] >- [% SET onshelfholds = CirculationRules.Search( branchcode, c, i, 'onshelfholds' ) %] >- [% SET opacitemholds = CirculationRules.Search( branchcode, c, i, 'opacitemholds' ) %] >- [% SET article_requests = CirculationRules.Search( branchcode, c, i, 'article_requests' ) %] >- [% SET rentaldiscount = CirculationRules.Search( branchcode, c, i, 'rentaldiscount' ) %] >- >- [% SET show_rule = maxissueqty || maxonsiteissueqty || issuelength || lengthunit || hardduedate || hardduedatebefore || hardduedateexact || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalsallowed || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || article_requests %] >- [% IF show_rule %] >- [% SET row_count = row_count + 1 %] >- <tr row_countd="row_[% row_count | html %]"> >- <td> >- [% IF c == undef %] >- <em>All</em> >- [% ELSE %] >- [% Categories.GetName(c) | html %] >- [% END %] >- </td> >- <td> >- [% IF i == undef %] >- <em>All</em> >- [% ELSE %] >- [% ItemTypes.GetDescription(i) | html %] >- [% END %] >- </td> >- <td class="actions"> >- <a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a> >- <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=[% i || '*' | html %]&categorycode=[% c || '*' | html %]&branch=[% current_branch | html %]"><i class="fa fa-trash"></i> Delete</a> >- </td> >- <td> >- [% IF note.defined && note != '' %] >- <a name="viewnote" data-toggle="popover" title="Note" data-content="[% note | html %]" data-placement="top" data-trigger="hover">View note</a> >- [% ELSE %]<span> </span>[% END %] >- </td> >- <td> >- [% IF maxissueqty.defined && maxissueqty != '' %] >- [% maxissueqty | html %] >- [% ELSE %] >- <span>Unlimited</span> >- [% END %] >- </td> >- <td> >- [% IF maxonsiteissueqty.defined && maxonsiteissueqty != '' %] >- [% maxonsiteissueqty | html %] >- [% ELSE %] >- <span>Unlimited</span> >- [% END %] >- </td> >- <td>[% issuelength | html %]</td> >- <td> >- [% IF ( lengthunit == 'days' ) %] >- Days >- [% ELSIF ( lengthunit == 'hours') %] >- Hours >- [% ELSE %] >- Undefined >- [% END %] >- </td> >- <td> >- [% IF ( hardduedate ) %] >- [% IF ( hardduedatecompare == '-1' ) %] >- before [% hardduedate | $KohaDates %] >- <input type="hidden" name="hardduedatecomparebackup" value="-1" /> >- [% ELSIF ( hardduedatecompare == '0' ) %] >- on [% hardduedate | $KohaDates %] >- <input type="hidden" name="hardduedatecomparebackup" value="0" /> >- [% ELSIF ( hardduedatecompare == '1' ) %] >- after [% hardduedate | $KohaDates %] >- <input type="hidden" name="hardduedatecomparebackup" value="1" /> >- [% END %] >- [% ELSE %] >- <span>None defined</span> >- [% END %] >- </td> >- <td>[% fine | html %]</td> >- <td>[% chargeperiod | html %]</td> >- <td>[% IF chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %]</td> >- <td>[% firstremind | html %]</td> >- <td>[% overduefinescap FILTER format("%.2f") %]</td> >- <td> >- [% IF cap_fine_to_replacement_price %] >- <input type="checkbox" checked="checked" disabled="disabled" /> >- [% ELSE %] >- <input type="checkbox" disabled="disabled" /> >- [% END %] >- </td> >- <td>[% finedays | html %]</td> >- <td>[% maxsuspensiondays | html %]</td> >- <td>[% suspension_chargeperiod | html %]</td> >- <td>[% renewalsallowed | html %]</td> >- <td>[% renewalperiod | html %]</td> >- <td>[% norenewalbefore | html %]</td> >- <td> >- [% IF auto_renew %] >- <span>Yes</span> >- [% ELSE %] >- <span>No</span> >- [% END %] >- </td> >- <td>[% no_auto_renewal_after | html %]</td> >- <td>[% no_auto_renewal_after_hard_limit | $KohaDates %]</td> >- <td> >- [% IF reservesallowed.defined && reservesallowed != '' %] >- [% reservesallowed | html %] >- [% ELSE %] >- <span>Unlimited</span> >- [% END %] >- </td> >- <td> >- [% IF holds_per_day.defined && holds_per_day != '' %] >- [% holds_per_day | html %] >- [% ELSE %] >- <span>Unlimited</span> >- [% END %] >- </td> >- <td>[% holds_per_record | html %]</td> >- <td> >- [% IF onshelfholds == 1 %] >- <span>Yes</span> >- [% ELSIF onshelfholds == 2 %] >- <span>If all unavailable</span> >- [% ELSE %] >- <span>If any unavailable</span> >- [% END %] >- </td> >- <td> >- [% IF opacitemholds == 'F'%] >- <span>Force</span> >- [% ELSIF opacitemholds == 'Y'%] >- <span>Allow</span> >- [% ELSE %] >- <span>Don't allow</span> >- [% END %] >- </td> >- <td> >- [% IF article_requests == 'no' %] >- <span>No</span> >- [% ELSIF article_requests == 'yes' %] >- <span>Yes</span> >- [% ELSIF article_requests == 'bib_only' %] >- <span>Record only</span> >- [% ELSIF article_requests == 'item_only' %] >- <span>Item only</span> >- [% END %] >- </td> >- <td>[% rentaldiscount | html %]</td> >- <td class="actions"> >- <a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a> >- <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=[% i || '*' | uri %]&categorycode=[% c || '*' | uri %]&branch=[% current_branch | uri %]"><i class="fa fa-trash"></i> Delete</a> >- </td> >- </tr> >- [% END %] >- [% END %] >- [% END %] >- <tr id="edit_row"> >- <td> >- <select name="categorycode" id="categorycode"> >- <option value="*">All</option> >- [% FOREACH patron_category IN patron_categories%] >- <option value="[% patron_category.categorycode | html %]">[% patron_category.description | html %]</option> >- [% END %] >- </select> >- </td> >- <td> >- <select name="itemtype" id="matrixitemtype" style="width:13em;"> >- <option value="*">All</option> >- [% FOREACH itemtypeloo IN itemtypeloop %] >- <option value="[% itemtypeloo.itemtype | html %]">[% itemtypeloo.translated_description | html %]</option> >- [% END %] >- </select> >- </td> >- <td class="actions"> >- <input type="hidden" name="branch" value="[% current_branch | html %]"/> >- <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button> >- <button name="cancel" class="clear_edit btn btn-default btn-xs"><i class="fa fa-undo"></i> Clear</button> >- </td> >- <td><input type="text" name="note" id="note" size="15" value="" maxlength="100"></td> >- <td><input type="text" name="maxissueqty" id="maxissueqty" size="3" /></td> >- <td><input type="text" name="maxonsiteissueqty" id="maxonsiteissueqty" size="3" /></td> >- <td><input type="text" name="issuelength" id="issuelength" size="3" /> </td> >- <td> >- <select name="lengthunit" id="lengthunit"> >- <option value="days" selected="selected">Days</option> >- <option value="hours">Hours</option> >- </select> >- </td> >- <td> >- <select name="hardduedatecompare" id="hardduedatecompare"> >- <option value="-1">Before</option> >- <option value="0">Exactly on</option> >- <option value="1">After</option> >- </select> >- <input type="text" size="10" id="hardduedate" name="hardduedate" value="[% hardduedate | html %]" class="datepicker" /> >- <div class="hint">[% INCLUDE 'date-format.inc' %]</div> >- </td> >- <td><input type="text" name="fine" id="fine" size="4" /></td> >- <td><input type="text" name="chargeperiod" id="chargeperiod" size="2" /></td> >- <td> >- <select name="chargeperiod_charge_at" id="chargeperiod_charge_at"> >- <option value="0">End of interval</option> >- <option value="1">Start of interval</option> >- </select> >- </td> >- <td><input type="text" name="firstremind" id="firstremind" size="2" /> </td> >- <td><input type="text" name="overduefinescap" id="overduefinescap" size="6" /> </td> >- <td><input type="checkbox" name="cap_fine_to_replacement_price" id="cap_fine_to_replacement_price" /></td> >- <td><input type="text" name="finedays" id="fined" size="3" /> </td> >- <td><input type="text" name="maxsuspensiondays" id="maxsuspensiondays" size="3" /> </td> >- <td><input type="text" name="suspension_chargeperiod" id="suspension_chargeperiod" size="3" /> </td> >- <td><input type="text" name="renewalsallowed" id="renewalsallowed" size="2" /></td> >- <td><input type="text" name="renewalperiod" id="renewalperiod" size="3" /></td> >- <td><input type="text" name="norenewalbefore" id="norenewalbefore" size="3" /></td> >- <td> >- <select name="auto_renew" id="auto_renew"> >- <option value="no" selected>No</option> >- <option value="yes">Yes</option> >- </select> >- </td> >- <td><input type="text" name="no_auto_renewal_after" id="no_auto_renewal_after" size="3" /></td> >- <td> >- <input type="text" size="10" name="no_auto_renewal_after_hard_limit" id="no_auto_renewal_after_hard_limit" value="[% no_auto_renewal_after_hard_limit | html %]" class="datepicker"/> >- <div class="hint">[% INCLUDE 'date-format.inc' %]</div> >- </td> >- <td><input type="text" name="reservesallowed" id="reservesallowed" size="2" /></td> >- <td><input type="text" name="holds_per_day" id="holds_per_day" size="2" /></td> >- <td><input type="text" name="holds_per_record" id="holds_per_record" size="2" /></td> >- <td> >- <select name="onshelfholds" id="onshelfholds"> >- <option value="1">Yes</option> >- <option value="0">If any unavailable</option> >- <option value="2">If all unavailable</option> >- </select> >- </td> >- <td> >- <select id="opacitemholds" name="opacitemholds"> >- <option value="N">Don't allow</option> >- <option value="Y">Allow</option> >- <option value="F">Force</option> >- </select> >- </td> >- <td> >- <select id="article_requests" name="article_requests"> >- <option value="no">No</option> >- <option value="yes">Yes</option> >- <option value="bib_only">Record only</option> >- <option value="item_only">Item only</option> >- </select> >- </td> >- <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td> >- <td class="actions"> >- <input type="hidden" name="branch" value="[% current_branch | html %]"/> >- <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button> >- <button name="cancel" class="clear_edit btn btn-default btn-xs"><i class="fa fa-undo"></i> Clear</button> >- </td> >- </tr> >- <tfoot> >- <tr> >- <th>Patron category</th> >- <th>Item type</th> >- <th> </th> >- <th>Note</th> >- <th>Current checkouts allowed</th> >- <th>Current on-site checkouts allowed</th> >- <th>Loan period</th> >- <th>Unit</th> >- <th>Hard due date</th> >- <th>Fine amount</th> >- <th>Fine charging interval</th> >- <th>Charge when?</th> >- <th>Fine grace period</th> >- <th>Overdue fines cap (amount)</th> >- <th>Cap fine at replacement price</th> >- <th>Suspension in days (day)</th> >- <th>Max. suspension duration (day)</th> >- <th>Suspension charging interval</th> >- <th>Renewals allowed (count)</th> >- <th>Renewal period</th> >- <th>No renewal before</th> >- <th>Automatic renewal</th> >- <th>No automatic renewal after</th> >- <th>No automatic renewal after (hard limit)</th> >- <th>Holds allowed (total)</th> >- <th>Holds allowed (daily)</th> >- <th>Holds per record (count)</th> >- <th>On shelf holds allowed</th> >- <th>OPAC item level holds</th> >- <th>Article requests</th> >- <th>Rental discount (%)</th> >- <th> </th> >- </tr> >- </tfoot> >- </tbody> >- </table> >- </form> >- </div> >- <div id="defaults-for-this-library" class="container"> >- <h3>Default checkout, hold and return policy[% IF humanbranch %] for [% Branches.GetName( humanbranch ) | html %][% END %]</h3> >- <p>You can set a default maximum number of checkouts, hold policy and return policy that will be used if none is defined below for a particular item type or category.</p> >- <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl"> >- <input type="hidden" name="op" value="set-branch-defaults" /> >- <input type="hidden" name="branch" value="[% current_branch | html %]"/> >- <table> >- <tr> >- <th> </th> >- <th>Total current checkouts allowed</th> >- <th>Total current on-site checkouts allowed</th> >- <th>Maximum total holds allowed (count)</th> >- <th>Hold policy</th> >- <th>Hold pickup library match</th> >- <th>Return policy</th> >- <th>Actions</th> >- </tr> >- <tr> >- <td><em>Defaults</em></td> >- <td> >- [% SET patron_maxissueqty = CirculationRules.Search( current_branch, undef, undef, 'patron_maxissueqty' ) %] >- <input type="text" name="patron_maxissueqty" size="3" value="[% patron_maxissueqty | html %]"/> >- </td> >- <td> >- [% SET patron_maxonsiteissueqty = CirculationRules.Search( current_branch, undef, undef, 'patron_maxonsiteissueqty' ) %] >- <input type="text" name="patron_maxonsiteissueqty" size="3" value="[% patron_maxonsiteissueqty | html %]"/> >- </td> >- <td> >- [% SET rule_value = CirculationRules.Search( current_branch, undef , undef, 'max_holds' ) %] >- <input name="max_holds" size="3" value="[% rule_value | html %]" /> >- </td> >- <td> >- <select name="holdallowed"> >- [% SET holdallowed = CirculationRules.Search( current_branch, undef, undef, 'holdallowed' ) %] >- <option value=""> >- Not set >- </option> >- >- [% IF holdallowed == 2 %] >- <option value="2" selected="selected"> >- [% ELSE %] >- <option value="2"> >- [% END %] >- From any library >- </option> >- >- [% IF holdallowed == 3 %] >- <option value="3" selected="selected"> >- [% ELSE %] >- <option value="3"> >- [% END %] >- From local hold group >- </option> >- >- [% IF holdallowed == 1 %] >- <option value="1" selected="selected"> >- [% ELSE %] >- <option value="1"> >- [% END %] >- From home library >- </option> >- >- [% IF holdallowed == 0 %] >- <option value="0" selected="selected"> >- [% ELSE %] >- <option value="0"> >- [% END %] >- No holds allowed >- </option> >- </select> >- </td> >- <td> >- <select name="hold_fulfillment_policy"> >- [% SET hold_fulfillment_policy = CirculationRules.Search( current_branch, undef, undef, 'hold_fulfillment_policy' ) %] >- >- <option value=""> >- Not set >- </option> >- >- [% IF hold_fulfillment_policy == 'any' %] >- <option value="any" selected="selected"> >- any library >- </option> >- [% ELSE %] >- <option value="any"> >- any library >- </option> >- [% END %] >- >- [% IF hold_fulfillment_policy == 'holdgroup' %] >- <option value="holdgroup" selected="selected"> >- item's hold group >- </option> >- [% ELSE %] >- <option value="holdgroup"> >- item's hold group >- </option> >- [% END %] >- >- [% IF hold_fulfillment_policy == 'patrongroup' %] >- <option value="patrongroup" selected="selected"> >- patron's hold group >- </option> >- [% ELSE %] >- <option value="patrongroup"> >- patron's hold group >- </option> >- [% END %] >- >- [% IF hold_fulfillment_policy == 'homebranch' %] >- <option value="homebranch" selected="selected"> >- item's home library >- </option> >- [% ELSE %] >- <option value="homebranch"> >- item's home library >- </option> >- [% END %] >- >- [% IF hold_fulfillment_policy == 'holdingbranch' %] >- <option value="holdingbranch" selected="selected"> >- item's holding library >- </option> >- [% ELSE %] >- <option value="holdingbranch"> >- item's holding library >- </option> >- [% END %] >- </select> >- </td> >- <td> >- <select name="returnbranch"> >- [% SET returnbranch = CirculationRules.Search( current_branch, undef, undef, 'returnbranch' ) %] >- >- <option value=""> >- Not set >- </option> >- >- [% IF returnbranch == 'homebranch' %] >- <option value="homebranch" selected="selected"> >- [% ELSE %] >- <option value="homebranch"> >- [% END %] >- Item returns home >- </option> >- [% IF returnbranch == 'holdingbranch' %] >- <option value="holdingbranch" selected="selected"> >- [% ELSE %] >- <option value="holdingbranch"> >- [% END %] >- Item returns to issuing library >- </option> >- [% IF returnbranch == 'noreturn' %] >- <option value="noreturn" selected="selected"> >- [% ELSE %] >- <option value="noreturn"> >- [% END %] >- Item floats >- </option> >- </select> >- </td> >- <td class="actions"> >- <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button> >- <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=*&branch=[% current_branch | html %]" id="unset"><i class="fa fa-undo"></i> Unset</a> >- </td> >- </tr> >- </table> >- </form> >- </div> >- [% IF ( show_branch_cat_rule_form ) %] >- <div id="holds-policy-by-patron-category" class="container"> >- <h3>[% IF humanbranch %]Checkout, hold policy by patron category for [% Branches.GetName( humanbranch ) | html %][% ELSE %]Default checkout, hold policy by patron category[% END %]</h3> >- <p>For this library, you can specify the maximum number of loans that >- a patron of a given category can make, regardless of the item type. >- </p> >- <p>If the total amount loanable for a given patron category is left blank, >- no limit applies, except possibly for a limit you define for a specific item type. >- </p> >- <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl"> >- <input type="hidden" name="op" value="add-branch-cat" /> >- <input type="hidden" name="branch" value="[% current_branch | html %]"/> >- <table> >- <tr> >- <th>Patron category</th> >- <th>Total current checkouts allowed</th> >- <th>Total current on-site checkouts allowed</th> >- <th>Total holds allowed</th> >- <th> </th> >- </tr> >- [% FOREACH c IN categorycodes %] >- [% NEXT UNLESS c %] >- [% SET patron_maxissueqty = CirculationRules.Search( branchcode, c, undef, 'patron_maxissueqty' ) %] >- [% SET patron_maxonsiteissueqty = CirculationRules.Search( branchcode, c, undef, 'patron_maxonsiteissueqty' ) %] >- [% SET max_holds = CirculationRules.Search( branchcode, c, undef, 'max_holds' ) %] >- >- [% IF ( patron_maxissueqty.defined && patron_maxissueqty != '' ) || ( patron_maxonsiteissueqty.defined && patron_maxonsiteissueqty != '' ) || ( max_holds.defined && max_holds != '' ) %] >- <tr> >- <td> >- [% IF c == undef %] >- <em>Default</em> >- [% ELSE %] >- [% Categories.GetName(c) | html %] >- [% END %] >- </td> >- <td> >- [% IF patron_maxissueqty.defined && patron_maxissueqty != '' %] >- [% patron_maxissueqty | html %] >- [% ELSE %] >- <span>Unlimited</span> >- [% END %] >- </td> >- <td> >- [% IF patron_maxonsiteissueqty.defined && patron_maxonsiteissueqty != '' %] >- [% patron_maxonsiteissueqty | html %] >- [% ELSE %] >- <span>Unlimited</span> >- [% END %] >- </td> >- <td> >- [% IF max_holds.defined && max_holds != '' %] >- [% max_holds | html %] >- [% ELSE %] >- <span>Unlimited</span> >- [% END %] >- </td> >- >- <td class="actions"> >- <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=[% c | html %]&branch=[% current_branch | html %]"><i class="fa fa-trash"></i> Delete</a> >- </td> >- </tr> >- [% END %] >- [% END %] >- <tr> >- <td> >- <select name="categorycode"> >- [% FOREACH patron_category IN patron_categories%] >- <option value="[% patron_category.categorycode | html %]">[% patron_category.description | html %]</option> >- [% END %] >- </select> >- </td> >- <td><input name="patron_maxissueqty" size="3" type="text" /></td> >- <td><input name="patron_maxonsiteissueqty" size="3" type="text" /></td> >- <td><input name="max_holds" size="3" type="text" /></td> >- <td class="actions"><button type="submit" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Add</td> >- </tr> >- </table> >- </form> >- </div> >- [% END %] >- >- <div id="refund-lost-item-fee-on-return" class="container"> >- [% IF current_branch == '*' %] >- <h3>Default lost item fee refund on return policy</h3> >- [% ELSE %] >- <h3>Lost item fee refund on return policy for [% Branches.GetName(current_branch) | html %]</h3> >- [% END %] >- <p>Specify the default policy for lost item fees on return. >- </p> >- <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl"> >- <input type="hidden" name="op" value="mod-refund-lost-item-fee-rule" /> >- <input type="hidden" name="branch" value="[% current_branch | html %]" /> >- <table> >- <tr> >- <th>Refund lost item fee</th> >- <th> </th> >- </tr> >- <tr> >- <td> >- <select name="refund"> >- [#% Default branch %#] >- [% IF ( current_branch == '*' ) %] >- [% IF ( defaultRefundRule ) %] >- <option value="1" selected="selected"> >- [% ELSE %] >- <option value="1"> >- [% END %] >- Yes >- </option> >- [% IF ( not defaultRefundRule ) %] >- <option value="0" selected="selected"> >- [% ELSE %] >- <option value="0"> >- [% END %] >- No >- </option> >- [% ELSE %] >- [#% Branch-specific %#] >- [% IF ( not refundLostItemFeeRule ) %] >- <option value="*" selected="selected"> >- [% ELSE %] >- <option value="*"> >- [% END %] >- [% IF defaultRefundRule %] >- Use default (Yes) >- [% ELSE %] >- Use default (No) >- [% END %] >- </option> >- [% IF ( not refundLostItemFeeRule ) %] >- <option value="1">Yes</option> >- <option value="0">No</option> >- [% ELSE %] >- [% IF ( refundLostItemFeeRule.rule_value ) %] >- <option value="1" selected="selected"> >- [% ELSE %] >- <option value="1"> >- [% END %] >- Yes >- </option> >- [% IF ( not refundLostItemFeeRule.rule_value ) %] >- <option value="0" selected="selected"> >- [% ELSE %] >- <option value="0"> >- [% END %] >- No >- </option> >- [% END %] >- [% END %] >- </select> >- </td> >- <td class="actions"> >- <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button> >- </td> >- </td> >- </tr> >- </table> >- </form> >- </div> >- >- <div id="holds-policy-by-item-type" class="container"> >- <h3>[% IF humanbranch %]Holds policy by item type for [% Branches.GetName( humanbranch ) | html %][% ELSE %]Default holds policy by item type[% END %]</h3> >- <p> >- For this library, you can edit rules for given itemtypes, regardless >- of the patron's category. >- </p> >- <p> >- Currently, this means hold policies. >- The various policies have the following effects: >- </p> >- <ul> >- <li><strong>From any library:</strong> Patrons from any library may put this item on hold. <cite>(default if none is defined)</cite></li> >- <li><strong>From local hold group:</strong> Only patrons from libraries in the same item's home library hold groups may put this book on hold.</li> >- <li><strong>From home library:</strong> Only patrons from the item's home library may put this book on hold.</li> >- <li><strong>No holds allowed:</strong> No patron may put this book on hold.</li> >- </ul> >- <p><strong>Note: </strong>If the system preference 'AllowHoldPolicyOverride' is enabled, these policies can be overridden by your circulation staff.</br /> >- <strong>Important: </strong>The policies are applied based on the ReservesControlBranch system preference which is set to <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReservesControlBranch">[% Koha.Preference('ReservesControlBranch') | html %]</a>. >- </p> >- >- <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl"> >- <input type="hidden" name="op" value="add-branch-item" /> >- <input type="hidden" name="branch" value="[% current_branch | html %]"/> >- <table> >- <tr> >- <th>Item type</th> >- <th>Hold policy</th> >- <th>Hold pickup library match</th> >- <th>Return policy</th> >- <th> </th> >- </tr> >- [% FOREACH i IN itemtypeloop %] >- [% SET holdallowed = CirculationRules.Search( branchcode, undef, i.itemtype, 'holdallowed' ) %] >- [% SET hold_fulfillment_policy = CirculationRules.Search( branchcode, undef, i.itemtype, 'hold_fulfillment_policy' ) %] >- [% SET returnbranch = CirculationRules.Search( branchcode, undef, i.itemtype, 'returnbranch' ) %] >- >- [% IF holdallowed || hold_fulfillment_policy || returnbranch %] >- <tr> >- <td> >- [% i.translated_description | html %] >- </td> >- <td> >- [% IF holdallowed == 2 %] >- <span>From any library</span> >- [% ELSIF holdallowed == 3 %] >- <span>From local hold group</span> >- [% ELSIF holdallowed == 1 %] >- <span>From home library</span> >- [% ELSE %] >- <span>No holds allowed</span> >- [% END %] >- </td> >- <td> >- [% IF hold_fulfillment_policy == 'any' %] >- <span>any library</span> >- [% ELSIF hold_fulfillment_policy == 'homebranch' %] >- <span>item's home library</span> >- [% ELSIF hold_fulfillment_policy == 'holdgroup' %] >- <span>item's hold group</span> >- [% ELSIF hold_fulfillment_policy == 'patrongroup' %] >- <span>patron's hold group</span> >- [% ELSIF hold_fulfillment_policy == 'holdingbranch' %] >- <span>item's holding library</span> >- [% END %] >- </td> >- <td> >- [% IF returnbranch == 'homebranch' %] >- <span>Item returns home</span> >- [% ELSIF returnbranch == 'holdingbranch' %] >- <span>Item returns to issuing branch</span> >- [% ELSIF returnbranch == 'noreturn' %] >- <span>Item floats</span> >- [% END %] >- </td> >- <td class="actions"> >- <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-item&itemtype=[% i.itemtype | uri %]&branch=[% current_branch | uri %]"><i class="fa fa-trash"></i> Delete</a> >- </td> >- </tr> >- [% END %] >- [% END %] >- <tr> >- <td> >- <select name="itemtype"> >- [% FOREACH itemtypeloo IN itemtypeloop %] >- <option value="[% itemtypeloo.itemtype | html %]">[% itemtypeloo.translated_description | html %]</option> >- [% END %] >- </select> >- </td> >- <td> >- <select name="holdallowed"> >- <option value="2">From any library</option> >- <option value="3">From local hold group</option> >- <option value="1">From home library</option> >- <option value="0">No holds allowed</option> >- </select> >- </td> >- <td> >- <select name="hold_fulfillment_policy"> >- <option value="any"> >- any library >- </option> >- >- <option value="holdgroup"> >- item's hold group >- </option> >- >- <option value="patrongroup"> >- patron's hold group >- </option> >- >- <option value="homebranch"> >- item's home library >- </option> >- >- <option value="holdingbranch"> >- item's holding library >- </option> >- </select> >- </td> >- <td> >- <select name="returnbranch"> >- <option value="homebranch">Item returns home</option> >- <option value="holdingbranch">Item returns to issuing library</option> >- <option value="noreturn">Item floats</option> >- </select> >- </td> >- <td class="actions"><button type="submit" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Add</button></td> >- </tr> >- </table> >- </form> >- </div> >- </main> >- </div> <!-- /.col-sm-10.col-sm-push-2 --> >- >- <div class="col-sm-2 col-sm-pull-10"> >- <aside> >- [% INCLUDE 'admin-menu.inc' %] >- </aside> >- </div> <!-- /.col-sm-2.col-sm-pull-10 --> >- </div> <!-- /.row --> >- >-[% MACRO jsinclude BLOCK %] >- [% Asset.js("js/admin-menu.js") | $raw %] >- [% INCLUDE 'calendar.inc' %] >- <script> >- >- function clear_edit(){ >- var cancel = confirm(_("Are you sure you want to cancel your changes?")); >- if ( !cancel ) return; >- $('#default-circulation-rules td').removeClass('highlighted-row'); >- var edit_row = $("#edit_row"); >- $(edit_row).find("input").each(function(){ >- var type = $(this).attr("type"); >- if (type != "button" && type != "submit" ) { >- $(this).val(""); >- $(this).prop('disabled', false); >- } >- if ( type == "checkbox" ) { >- $(this).prop('checked', false); >- } >- }); >- $(edit_row).find("select").prop('disabled', false); >- $(edit_row).find("select option:first").attr("selected", "selected"); >- $(edit_row).find("td:last input[name='clear']").remove(); >- } >- >- var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this rule? This cannot be undone."); >- >- $(document).ready(function() { >- $('[data-toggle="popover"]').popover(); >- >- $(".delete").on("click",function(){ >- return confirmDelete(MSG_CONFIRM_DELETE); >- }); >- >- $("#clone_rules").on("click",function(){ >- var library_dropdown = document.getElementById("branch"); >- var selected_library = library_dropdown.options[library_dropdown.selectedIndex].value; >- var selected_library_text = $("#branch option:selected").text(); >- var to_library = $("#tobranch option:selected").text(); >- var MSG_CONFIRM_CLONE; >- if (selected_library === "*") { >- MSG_CONFIRM_CLONE = _("Are you sure you want to clone this standard rule to %s library? This will override the existing rules in this library.").format(to_library); >- return confirmClone(MSG_CONFIRM_CLONE); >- } else { >- MSG_CONFIRM_CLONE = _("Are you sure you want to clone this circulation and fine rule from %s to %s library? This will override the existing rules in this library.").format(selected_library_text, to_library); >- return confirmClone(MSG_CONFIRM_CLONE); >- } >- }); >- >- $('#selectlibrary').find("input:submit").hide(); >- $('#branch').change(function() { >- $('#selectlibrary').submit(); >- }); >- $(".editrule").click(function(){ >- if ( $("#edit_row").find("input[type='text']").filter(function(){return this.value.length > 0 }).length > 0 ) { >- var edit = confirm(_("Are you sure you want to edit another rule?")); >- if (!edit) return false; >- } >- $('#default-circulation-rules td').removeClass('highlighted-row'); >- $(this).parent().parent().find("td").each(function (i) { >- $(this).addClass('highlighted-row'); >- itm = $(this).text(); >- itm = itm.replace(/^\s*|\s*$/g,''); >- var current_column = $("#edit_row td:eq("+i+")"); >- if ( i == 3 ) { >- // specific processing for the Note column >- var note = $(this).find("a[name='viewnote']").data("content"); >- $(current_column).find("input[type='text']").val(note); >- } else if ( i == 8 ) { >- // specific processing for the Hard due date column >- var select_value = $(this).find("input[type='hidden'][name='hardduedatecomparebackup']").val(); >- var input_value = ''; >- if (typeof select_value === 'undefined'){ >- select_value = '-1'; >- }else { >- input_value = itm.split(' ')[1]; >- } >- $(current_column).find("input[type='text']").val(input_value); >- $(current_column).find("select").val(select_value); >- } else if ( i == 14 ) { >- // specific processing for cap_fine_to_replacement_price >- var cap_fine_to_replacement_price = $(this).find("input[type='checkbox']"); >- $('#cap_fine_to_replacement_price').prop('checked', cap_fine_to_replacement_price.is(':checked') ); >- $('#overduefinescap').prop('disabled', cap_fine_to_replacement_price.is(':checked') ); >- } else { >- $(current_column).find("input[type='text']").val(itm); >- // select the corresponding option >- $(current_column).find("select option").each(function(){ >- opt = $(this).text().toLowerCase(); >- opt = opt.replace(/^\s*|\s*$/g,''); >- if ( opt == itm.toLowerCase() ) { >- $(this).attr('selected', 'selected'); >- } >- }); >- if ( i == 0 || i == 1 ) { >- // Disable the 2 first columns, we cannot update them. >- var val = $(current_column).find("select option:selected").val(); >- var name = "categorycode"; >- if ( i == 1 ) { >- name="itemtype"; >- } >- // Remove potential previous input added >- $(current_column).find("input").remove(); >- $(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />"); >- } else if ( i == 4 || i == 5 || i == 25 ) { >- // If the value is not an integer for >- // - "Current checkouts allowed" >- // - "Current on-site checkouts allowed" >- // - "Holds allowed (daily)" >- // The value is "Unlimited" (or an equivalent translated string) >- // an it should be set to an empty string >- if( !((parseFloat(itm) == parseInt(itm)) && !isNaN(itm)) ) { >- $(current_column).find("input[type='text']").val(""); >- } >- } >- } >- }); >- $("#default-circulation-rules tr:last td:eq(0) select").prop('disabled', true); >- $("#default-circulation-rules tr:last td:eq(1) select").prop('disabled', true); >- return false; >- }); >- $(".clear_edit").on("click",function(e){ >- e.preventDefault(); >- clear_edit(); >- }); >- }); >- </script> >-[% END %] >-[% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/src/admin/policy/app.js b/koha-tmpl/intranet-tmpl/prog/js/src/admin/policy/app.js >index 7b3743e523..d35e7970d5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/src/admin/policy/app.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/src/admin/policy/app.js >@@ -212,7 +212,7 @@ export default class PolicyApp extends React.Component { > } > > return <section> >- <h1>{__( "Circulation, fine and hold policy" )}</h1> >+ <h1>{__( "Circulation, fines and holds rules" )}</h1> > <PolicyAppToolbar > branch={this.state.branch} > group={this.state.kindGroup} >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15522
:
68231
|
68232
|
68233
|
68234
|
68235
|
71048
|
71049
|
71050
|
71051
|
71052
|
72239
|
72242
|
91977
|
91978
|
91979
|
91980
|
91981
|
91982
|
91983
|
91984
|
94201
|
94202
|
94203
|
94204
|
94205
|
94206
|
94207
|
94208
|
99148
|
99149
|
99150
|
99151
|
99152
|
99153
|
99154
|
99155
|
99156
|
99157
|
99199
|
99200
|
99201
|
99202
|
99203
|
99204
|
99205
|
99206
|
99207
|
99208
|
99209
|
99210
|
99211
|
99213
|
99214
|
99215
|
101918
|
101919
|
101920
|
101921
|
101922
|
101923
|
101924
|
101925
|
101926
|
101927
|
101934
|
101935
|
101936
|
101937
|
101938
|
101939
|
101940
|
101941
|
101942
|
101943
|
101944
|
101945
|
101946
|
101947
|
106913
|
106914
|
106915
|
106916
|
106917
|
106918
|
106919
|
106920
|
106921
|
106922
|
106923
|
106924
|
106925
|
106926
|
112056
|
112057
|
112058
|
112059
|
112060
|
112061