This adds a system preference controlled feature.  This controls how
many returned items are shown on the check-in page.
---
 admin/systempreferences.pl                         |    1 +
 circ/returns.pl                                    |    3 ++-
 installer/data/mysql/en/mandatory/sysprefs.sql     |    1 +
 .../1-Obligatoire/unimarc_standard_systemprefs.sql |    1 +
 4 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl
index 790138a..c1b27fe 100755
--- a/admin/systempreferences.pl
+++ b/admin/systempreferences.pl
@@ -140,6 +140,7 @@ $tabsysprefs{CircAutocompl}                  = 
"Circulation";
 $tabsysprefs{AllowRenewalLimitOverride}      = "Circulation";
 $tabsysprefs{canreservefromotherbranches}    = "Circulation";
 $tabsysprefs{finesMode}                      = "Circulation";
+$tabsysprefs{numReturnedItemsToShow}         = "Circulation";
 $tabsysprefs{emailLibrarianWhenHoldIsPlaced} = "Circulation";
 $tabsysprefs{globalDueDate}                  = "Circulation";
 $tabsysprefs{holdCancelLength}               = "Circulation";
diff --git a/circ/returns.pl b/circ/returns.pl
index e9f3e4b..be2fde6 100755
--- a/circ/returns.pl
+++ b/circ/returns.pl
@@ -521,11 +521,12 @@ if ($borrower) {
 }
 
 #set up so only the last 8 returned items display (make for faster loading 
pages)
+my $returned_counter = ( C4::Context->preference('numReturnedItemsToShow') ) ? 
C4::Context->preference('numReturnedItemsToShow') : 8;
 my $count = 0;
 my @riloop;
 foreach ( sort { $a <=> $b } keys %returneditems ) {
     my %ri;
-    if ( $count++ < 8 ) {
+    if ( $count++ < $returned_counter ) {
         my $barcode = $returneditems{$_};
         my $duedate = $riduedate{$_};
         my $overduetext;
diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql 
b/installer/data/mysql/en/mandatory/sysprefs.sql
index 8802096..6b39f03 100644
--- a/installer/data/mysql/en/mandatory/sysprefs.sql
+++ b/installer/data/mysql/en/mandatory/sysprefs.sql
@@ -142,6 +142,7 @@ INSERT INTO `systempreferences` 
(variable,value,explanation,options,type) VALUES
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('emailLibrarianWhenHoldIsPlaced',0,'If ON, emails the librarian whenever 
a hold is placed',NULL,'YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('holdCancelLength','','Specify how many days before a hold is 
canceled',NULL,'Integer');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('libraryAddress','','The address to use for printing receipts, overdues, 
etc. if different than physical address',NULL,'free');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('numReturnedItemsToShow','20','Number of returned items to show on the 
check-in page',NULL,'Integer');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('finesMode','test','Choose the fines mode, \'off\', \'test\' (emails 
admin report) or \'production\' (accrue overdue fines).  Requires accruefines 
cronjob.','off|test|production','Choice');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('globalDueDate','','If set, allows a global static due date for all 
checkouts','10','free');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('itemBarcodeInputFilter','','If set, allows specification of a item 
barcode input filter','whitespace|T-prefix|cuecat','Choice');
diff --git 
a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql 
b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
index 00a63cb..4f675f2 100644
--- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
+++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
@@ -152,6 +152,7 @@ INSERT INTO `systempreferences` 
(variable,value,explanation,options,type) VALUES
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('emailLibrarianWhenHoldIsPlaced',0,'Si activé, envoie un mail à la 
bibliothèque lorsqu''une réservation est posée',NULL,'YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('holdCancelLength','','Spécifie le nombre de jours avant qu''une 
réservation soit annulée',NULL,'Integer');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('libraryAddress','','L''adresse pour l''impression des reçus, des 
amendes... si elle est différente de l''adresse physique de la 
bibliothèque',NULL,'free');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('numReturnedItemsToShow','20','Nombre d''exemplaires rendus à afficher 
sur la page de retour',NULL,'Integer');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('finesMode','test','Choisissez un mode pour le calcul des amendes : Test 
ou Production.','test|production','Choice');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('globalDueDate','','Si défini, autorise une date de retour statique pour 
tous les prêts','10','free');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('itemBarcodeInputFilter','','If set, allows specification of a item 
barcode input filter','whitespace|T-prefix|cuecat','Choice');
-- 
1.5.6.3

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to