From 7426fab45eed5f73e821f29a8e990f3ae6d5b3f1 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 31 Oct 2018 13:53:16 +0000 Subject: [PATCH] Bug 20312: (QA follow-up) Make display syspref driven Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- installer/data/mysql/atomicupdate/bug_20312.perl | 12 ++++++++++++ installer/data/mysql/sysprefs.sql | 1 + koha-tmpl/intranet-tmpl/prog/en/includes/header.inc | 2 +- .../en/modules/admin/preferences/staff_client.pref | 6 ++++++ 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_20312.perl diff --git a/installer/data/mysql/atomicupdate/bug_20312.perl b/installer/data/mysql/atomicupdate/bug_20312.perl new file mode 100644 index 0000000000..579a839483 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_20312.perl @@ -0,0 +1,12 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + # System preferences + $dbh->do(q{ + INSERT IGNORE INTO `systempreferences` (`variable`,`value`,`explanation`,`options`,`type`) + VALUES ('showLastPatron','0','','If ON, enables the last patron feature in the intranet','YesNo'); + }); + + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 20312 - Add showLastPatron systempreference)\n"; +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index ad62255e18..2a7aaa9dcd 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -516,6 +516,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ShelfBrowserUsesHomeBranch','1','1','Use the item home branch when finding items for the shelf browser.','YesNo'), ('ShelfBrowserUsesLocation','1','1','Use the item location when finding items for the shelf browser.','YesNo'), ('ShowAllCheckins', '0', '', 'Show all checkins', 'YesNo'), +('showLastPatron','0','','If ON, enables the last patron feature in the intranet','YesNo'), ('ShowPatronImageInWebBasedSelfCheck','0','','If ON, displays patron image when a patron uses web-based self-checkout','YesNo'), ('ShowReviewer','full','none|full|first|surname|firstandinitial|username','Choose how a commenter\'s identity is presented alongside comments in the OPAC','Choice'), ('ShowReviewerPhoto','1','','If ON, photo of reviewer will be shown beside comments in OPAC','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc index 997fe50f09..a693da9abb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc @@ -148,6 +148,6 @@ [% END %] - [% INCLUDE 'last-borrower.inc' %] + [% IF Koha.Preference('showLastPatron') %][% INCLUDE 'last-borrower.inc' %][% END %] [% IF ( intranetbookbag ) %]
Your cart is empty.
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref index 1822c7ab24..512785360c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref @@ -137,6 +137,12 @@ Staff Client: no: Show yes: "Don't show" - the names of patrons that have items checked out or on hold on detail pages or the "Place Hold" screen. + - + - pref: showLastPatron + choices: + no: "Don't show" + yes: Show + - a link to the last searched patron in the staff client. - - pref: intranetbookbag choices: -- 2.39.5