@@ -, +, @@ remove tabs --- C4/Circulation.pm | 16 ++++++++-------- Koha/Illrequest.pm | 18 +++++++++--------- .../bug_23112_add_CirculateILL_syspref.perl | 6 ++++++ installer/data/mysql/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/circulation.pref | 14 +++++++------- .../intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 14 +++++++------- 6 files changed, 38 insertions(+), 31 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_23112_add_CirculateILL_syspref.perl --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -2131,14 +2131,14 @@ sub AddReturn { DelUniqueDebarment({ borrowernumber => $borrowernumber, type => 'OVERDUES' }); } - # Check if this item belongs to a biblio record that is attached to an - # ILL request, if it is we need to update the ILL request's status - if (C4::Context->preference('CirculateILL')) { - my $request = Koha::Illrequests->find( - { biblio_id => $item->biblio->biblionumber } - ); - $request->status('RET') if $request; - } + # Check if this item belongs to a biblio record that is attached to an + # ILL request, if it is we need to update the ILL request's status + if (C4::Context->preference('CirculateILL')) { + my $request = Koha::Illrequests->find( + { biblio_id => $item->biblio->biblionumber } + ); + $request->status('RET') if $request; + } # Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer if (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'}){ --- a/Koha/Illrequest.pm +++ a/Koha/Illrequest.pm @@ -499,15 +499,15 @@ sub _core_status_graph { next_actions => [ ], ui_method_icon => 'fa-upload', }, - RET => { - prev_actions => [ 'CHK' ], - id => 'RET', - name => 'Returned to library', - ui_method_name => 'Check in', - method => 'check_in', - next_actions => [ 'COMP' ], - ui_method_icon => 'fa-download', - } + RET => { + prev_actions => [ 'CHK' ], + id => 'RET', + name => 'Returned to library', + ui_method_name => 'Check in', + method => 'check_in', + next_actions => [ 'COMP' ], + ui_method_icon => 'fa-download', + } }; } --- a/installer/data/mysql/atomicupdate/bug_23112_add_CirculateILL_syspref.perl +++ a/installer/data/mysql/atomicupdate/bug_23112_add_CirculateILL_syspref.perl @@ -0,0 +1,6 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CirculateILL', '0', 'If enabled, it is possible to circulate ILL requested items from within ILL', '', 'YesNo'); | ); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 23112 - Add CirculateILL syspref)\n"; +} --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -120,6 +120,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('CircAutoPrintQuickSlip','qslip',NULL,'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window, Display a print slip window or Clear the screen.','Choice'), ('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'), ('CircSidebar','0',NULL,'Activate or deactivate the navigation sidebar on all Circulation pages','YesNo'), +('CirculateILL','0','','If enabled, it is possible to circulate ILL items from within ILL','YesNo'), ('ClaimsBccCopy','0','','Bcc the ClaimAcquisition and ClaimIssues alerts','YesNo'), ('ClaimReturnedChargeFee', 'ask', 'ask|charge|no_charge', 'Controls whether or not a lost item fee is charged for return claims', 'Choice'), ('ClaimReturnedLostValue', '', '', 'Sets the LOST AV value that represents "Claims returned" as a lost value', 'Free'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -855,13 +855,13 @@ Circulation: yes: Enable no: Disable - unmediated Interlibrary loan requests. If enabled and the ILL backend supports it, the newly created requests are immediately requested by backend. - - - - pref: CirculateILL - default: 0 - choices: - yes: Enable - no: Disable - - the circulation of ILL requested items + - + - pref: CirculateILL + default: 0 + choices: + yes: Enable + no: Disable + - the circulation of ILL requested items Fines Policy: - - pref: finesCalendar --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -133,7 +133,7 @@ [% ELSE %]
- There was a problem checking this item out, please check for problems with the patron's account + There was a problem checking this item out, please check for problems with the patron's account
[% END %] [% END %] @@ -154,9 +154,9 @@ [% FOREACH stat IN whole.value.statistical %] [% IF stat.borrowernumber == params.inhouse %] - + [% ELSE %] - + [% END %] [% END %] @@ -193,7 +193,7 @@ [% IF items.size == 1 %]
  • - [% items.0.barcode %] + [% items.0.barcode | html %]
  • [% END %]
  • @@ -206,7 +206,7 @@ [% ELSE %] [% FOREACH branch IN whole.value.libraries.unblessed %] [% IF branch.branchcode == branchcode %] - [% branch.branchname %] + [% branch.branchname | html %] [% END %] [% END %] [% END %] @@ -225,8 +225,8 @@ [% IF items.size == 1 %] - - + + [% END %] --