From 454dd9376b8cdc848c7ed82e511265269a519805 Mon Sep 17 00:00:00 2001 From: Michael Hafen Date: Fri, 24 Apr 2009 11:53:43 -0600 Subject: [PATCH] New feature Number of Returned Items to Show This adds a system preference controlled feature. This controls how many returned items are shown on the check-in page. Signed-off-by: Galen Charlton --- admin/systempreferences.pl | 1 + circ/returns.pl | 3 ++- installer/data/mysql/en/mandatory/sysprefs.sql | 1 + .../mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 24065f6dc8..aa5cb5c6e3 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -141,6 +141,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 e9f3e4bf6c..be2fde6d4c 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 0c1b1cd50f..f6b6e47f23 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('ceilingDueDate','','If set, date due will not be past this date. Enter date according to the dateformat System Preference',NULL,'free'); 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 15ddc1c580..a0d9b8a85d 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('ceilingDueDate','','Si présent, les dates de retour des prêts ne pourront être antérieures à cette date. Formatez cette date conformément à la préférence système dateformat.',NULL,'free'); -- 2.39.5