@@ -, +, @@ checkout --- C4/SIP/ILS/Transaction/Checkout.pm | 12 ++++---- Koha/Schema/Result/Category.pm | 18 ++++++------ .../bug_19787_-_SIP_Message_sysprefs.perl | 14 ++++++++++ installer/data/mysql/sysprefs.sql | 6 ++++ .../intranet-tmpl/prog/en/includes/prefs-menu.inc | 10 +++++++ .../prog/en/modules/admin/preferences/sip.pref | 32 ++++++++++++++++++++++ 6 files changed, 77 insertions(+), 15 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_19787_-_SIP_Message_sysprefs.perl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/sip.pref --- a/C4/SIP/ILS/Transaction/Checkout.pm +++ a/C4/SIP/ILS/Transaction/Checkout.pm @@ -68,26 +68,26 @@ sub do_checkout { } else { foreach my $confirmation (keys %{$needsconfirmation}) { if ($confirmation eq 'RENEW_ISSUE'){ - $self->screen_msg("Item already checked out to you: renewing item."); + $self->screen_msg( C4::Context->preference('RenewItemSIPMessage') ); } elsif ($confirmation eq 'RESERVED' or $confirmation eq 'RESERVE_WAITING') { my $x = $self->{item}->available($patron->borrowernumber); if ($x) { - $self->screen_msg("Item was reserved for you."); + $self->screen_msg( C4::Context->preference('ReservedWaitingSIPMessage') ); } else { - $self->screen_msg("Item is reserved for another patron upon return."); + $self->screen_msg( C4::Context->preference('ReservedSIPMessage') ); $noerror = 0; } } elsif ($confirmation eq 'ISSUED_TO_ANOTHER') { - $self->screen_msg("Item already checked out to another patron. Please return item for check-in."); + $self->screen_msg( C4::Context->preference('CheckedToAnotherSIPMessage') ); $noerror = 0; last; } elsif ($confirmation eq 'DEBT') { - $self->screen_msg('Outstanding Fines block issue'); + $self->screen_msg( C4::Context->preference('DebtSIPMessage') ); $noerror = 0; last; } elsif ($confirmation eq 'HIGHHOLDS') { $overridden_duedate = $needsconfirmation->{$confirmation}->{returndate}; - $self->screen_msg('Loan period reduced for high-demand item'); + $self->screen_msg( C4::Context->preference('HighHoldsSIPMessage') ); } elsif ($confirmation eq 'RENTALCHARGE') { if ($self->{fee_ack} ne 'Y') { $noerror = 0; --- a/Koha/Schema/Result/Category.pm +++ a/Koha/Schema/Result/Category.pm @@ -133,11 +133,6 @@ __PACKAGE__->table("categories"); data_type: 'tinyint' is_nullable: 1 -=head2 exclude_from_local_holds_priority - - data_type: 'tinyint' - is_nullable: 1 - =head2 min_password_length data_type: 'smallint' @@ -148,6 +143,11 @@ __PACKAGE__->table("categories"); data_type: 'tinyint' is_nullable: 1 +=head2 exclude_from_local_holds_priority + + data_type: 'tinyint' + is_nullable: 1 + =cut __PACKAGE__->add_columns( @@ -204,12 +204,12 @@ __PACKAGE__->add_columns( { data_type => "tinyint", is_nullable => 1 }, "change_password", { data_type => "tinyint", is_nullable => 1 }, - "exclude_from_local_holds_priority", - { data_type => "tinyint", is_nullable => 1 }, "min_password_length", { data_type => "smallint", is_nullable => 1 }, "require_strong_password", { data_type => "tinyint", is_nullable => 1 }, + "exclude_from_local_holds_priority", + { data_type => "tinyint", is_nullable => 1 }, ); =head1 PRIMARY KEY @@ -302,8 +302,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-09-02 12:50:50 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JOzFLxLwouaTl5dQJrOdZA +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-09-15 10:31:51 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wlBdudAHY6dDNX0J4OUgFg __PACKAGE__->add_columns( '+exclude_from_local_holds_priority' => { is_boolean => 1 }, --- a/installer/data/mysql/atomicupdate/bug_19787_-_SIP_Message_sysprefs.perl +++ a/installer/data/mysql/atomicupdate/bug_19787_-_SIP_Message_sysprefs.perl @@ -0,0 +1,14 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES + ('RenewItemSIPMessage','Item already checked out to you: renewing item.',NULL,'Message to be shown when renewing item in self-checkout','Free'), + ('ReservedSIPMessage','Item was reserved for you.',NULL,'Message to be shown when attempting to check out an item in self-checkout reserved by another patron','Free'), + ('ReservedWaitingSIPMessage','Item is reserved for another patron upon return.',NULL,'Message to be shown when checking out an item in self-checkout that the user has reserved', 'Free'), + ('CheckedToAnotherSIPMessage','Item already checked out to another person.', NULL, 'Message to be shown when attempting to check out an item in self-checkout already checked out by another patron', 'Free'), + ('DebtSIPMessage','Outstanding fines, block checkout.',NULL,'Message to be shown when patron attempting to check out in self-checkout has outstanding fines','Free'), + ('HighHoldsSIPMessage','Loan period reduced for high-demand item',NULL,'Message to be shown when checking out a high demand item','Free') + }); + + NewVersion( $DBversion, 19787, "Add SIP message system preferences (RenewItemSIPMessage, ReservedSIPMessage, ReservedWaitingSIPMessage, CheckedToAnotherSIPMessage, DebtSIPMessage, HighHoldsSIPMessage)" ); +} --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -122,6 +122,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('casServerUrl','https://localhost:8443/cas','','URL of the cas server','Free'), ('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'), ('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'), +('CheckedToAnotherSIPMessage','Item already checked out to another person.', NULL, 'Message to be shown when attempting to check out an item in self-checkout already checked out by another patron', 'Free'), ('CheckPrevCheckout','hardno','hardyes|softyes|softno|hardno','By default, for every item checked out, should we warn if the patron has borrowed that item in the past?','Choice'), ('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'), @@ -143,6 +144,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('CustomCoverImages','0',NULL,'If enabled, the custom cover images will be displayed in the staff interface. CustomCoverImagesURL must be defined.','YesNo'), ('CustomCoverImagesURL','',NULL,'Define an URL serving book cover images, using the following patterns: %issn%, %isbn%, FIXME ADD MORE (use it with CustomCoverImages and/or OPACCustomCoverImages)','free'), ('dateformat','us','metric|us|iso|dmydot','Define global date format (us mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy-mm-dd, dmydot dd.mm.yyyy)','Choice'), +('DebtSIPMessage','Outstanding fines, block issue.',NULL,'Message to be shown when patron attempting to check out in self-checkout has outstanding fines','Free'), ('DebugLevel','2','0|1|2','Define the level of debugging information sent to the browser when errors are encountered (set to 0 in production). 0=none, 1=some, 2=most','Choice'), ('decreaseLoanHighHolds',NULL,'','Decreases the loan period for items with number of holds above the threshold specified in decreaseLoanHighHoldsValue','YesNo'), ('decreaseLoanHighHoldsControl', 'static', 'static|dynamic', "Chooses between static and dynamic high holds checking", 'Choice'), @@ -222,6 +224,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('hidelostitems','0','','If ON, disables display of\"lost\" items in OPAC.','YesNo'), ('HidePatronName','0','','If this is switched on, patron\'s cardnumber will be shown instead of their name on the holds and catalog screens','YesNo'), ('hide_marc','0',NULL,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)','YesNo'), +('HighHoldsSIPMessage','Loan period reduced for high-demand item',NULL,'Message to be shown when checking out a high demand item','Free'), ('HighlightOwnItemsOnOPAC','0','','If on, and a patron is logged into the OPAC, items from his or her home library will be emphasized and shown first in search results and item details.','YesNo'), ('HighlightOwnItemsOnOPACWhich','PatronBranch','PatronBranch|OpacURLBranch','Decides which branch\'s items to emphasize. If PatronBranch, emphasize the logged in user\'s library\'s items. If OpacURLBranch, highlight the items of the Apache var BRANCHCODE defined in Koha\'s Apache configuration file.','Choice'), ('HoldFeeMode','not_always','any_time_is_placed|not_always|any_time_is_collected','Set the hold fee mode','Choice'), @@ -537,6 +540,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('RenewalLog','0','','If ON, log information about renewals','YesNo'), ('RenewalPeriodBase','date_due','date_due|now','Set whether the renewal date should be counted from the date_due or from the moment the Patron asks for renewal ','Choice'), ('RenewalSendNotice','0','',NULL,'YesNo'), +('RenewItemSIPMessage','Item already checked out to you: renewing item.',NULL,'Message to be shown when checking out an item already checked out to that user in self-checkout','Free'), ('RenewSerialAddsSuggestion','0',NULL,'If ON, adds a new suggestion at serial subscription renewal','YesNo'), ('RentalFeesCheckoutConfirmation', '0', NULL , 'Allow user to confirm when checking out an item with rental fees.', 'YesNo'), ('RentalsInNoissuesCharge','1',NULL,'Rental charges block checkouts (added to noissuescharge).','YesNo'), @@ -544,6 +548,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ReportsLog','0',NULL,'If ON, log information about reports.','YesNo'), ('RequestOnOpac','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'), ('RequireStrongPassword','1','','Require a strong login password for staff and patrons','YesNo'), +('ReservedSIPMessage','Item was reserved for you.',NULL,'Message to be shown when attempting to check out an item in self-checkout reserved by another patron','Free'), +('ReservedWaitingSIPMessage','Item is reserved for another patron upon return.',NULL,'Message to be shown when checking out an item in self-checkout that the user has reserved', 'Free'), ('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'), ('ReservesMaxPickUpDelay','7','','Define the Maximum delay to pick up an item on hold','Integer'), ('ReservesNeedReturns','1','','If ON, a hold placed on an item available in this library must be checked-in, otherwise, a hold on a specific item, that is in the library & available is considered available','YesNo'), --- a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc @@ -138,6 +138,16 @@ [% END %] + [% IF ( sip ) %] +
  • + SIP + [% PROCESS subtabs %] + [% ELSE %] +
  • + SIP + [% END %] +
  • + [% IF ( staff_interface ) %]
  • Staff interface --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/sip.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/sip.pref @@ -0,0 +1,32 @@ +SIP: + Custom SIP messages: + - + - "When renewing an item in self-checkout, show the message:" + - pref: RenewItemSIPMessage + class: multi + - or leave blank to show no message. + - + - "When checking out an item in self-checkout reserved to another patron, show the message:" + - pref: ReservedSIPMessage + class: multi + - or leave blank to show no message. + - + - "When checking out an item in self-checkout that the user has reserved, show the message:" + - pref: ReservedWaitingSIPMessage + class: multi + - or leave blank to show no message. + - + - "When checking out an item in self-checkout that is already checked out to another patron, show the message:" + - pref: CheckedToAnotherSIPMessage + class: multi + - or leave blank to show no message. + - + - "When patron attempting to check out an item in self-checkout has outstanding fines, show the message:" + - pref: DebtSIPMessage + class: multi + - or leave blank to show no message. + - + - "When checking out an item in high demand, show the message:" + - pref: HighHoldsSIPMessage + class: multi + - or leave blank to show no message. --