From 2717113e1c736391b8722c9f03c1bd4107ad834a Mon Sep 17 00:00:00 2001 From: Amit Gupta Date: Wed, 22 Dec 2010 13:28:45 +0530 Subject: [PATCH] Bug 5523 - Display list of items which are to be cataloged in the cataloguing home page. --- C4/Auth.pm | 1 + C4/Biblio.pm | 24 ++++++++++++++++++++ cataloguing/addbooks.pl | 5 ++++ installer/data/mysql/sysprefs.sql | 4 +++- installer/data/mysql/updatedatabase.pl | 7 ++++++ .../prog/en/includes/cataloguing-menu.inc | 7 ++++++ .../en/modules/admin/preferences/cataloguing.pref | 6 +++++ 7 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/cataloguing-menu.inc diff --git a/C4/Auth.pm b/C4/Auth.pm index b32136a..ee03f53 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -445,6 +445,7 @@ sub get_template_and_user { ShowReviewerPhoto => C4::Context->preference("ShowReviewerPhoto"), suggestion => "" . C4::Context->preference("suggestion"), virtualshelves => "" . C4::Context->preference("virtualshelves"), + catalgouinginprocess => C4::Context->preference("catalgouinginprocess"), OPACSerialIssueDisplayCount => C4::Context->preference("OPACSerialIssueDisplayCount"), OpacAddMastheadLibraryPulldown => C4::Context->preference("OpacAddMastheadLibraryPulldown"), OPACXSLTDetailsDisplay => C4::Context->preference("OPACXSLTDetailsDisplay"), diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 7d28ccd..009cb33 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -94,6 +94,7 @@ BEGIN { &GetFrameworkCode &TransformKohaToMarc &PrepHostMarcField + &GetInprocCount &CountItemsIssued &CountBiblioInOrders @@ -399,6 +400,29 @@ sub ModBiblioframework { return 1; } +=head2 GetInprocCount + + $count= &GetInprocCount() + +Count of items in PROC shelving location. . + +=cut + +sub GetInprocCount { + if (C4::Context->preference('NoZebra')) { + # Read the index Koha-Auth-Number for this authid and count the lines + my $result = C4::Search::NZanalyse("location=PROC"); + my @tab = split /;/,$result; + return scalar @tab; + } else { + ### ZOOM search here + my $query; + $query= "location=PROC"; + my ($err,$res,$result) = C4::Search::SimpleSearch($query,0,10); + return ($result); + } +} + =head2 DelBiblio my $error = &DelBiblio($biblionumber); diff --git a/cataloguing/addbooks.pl b/cataloguing/addbooks.pl index 7bca2f3..8b6d390 100755 --- a/cataloguing/addbooks.pl +++ b/cataloguing/addbooks.pl @@ -137,5 +137,10 @@ $template->param( z3950_search_params => C4::Search::z3950_search_args($query), ); +if (C4::Context->preference('catalgouinginprocess')) { +#Count of items in PROC shelving location. +$template->param('inproccount' =>GetInprocCount()); +} + output_html_with_http_headers $input, $cookie, $template->output; diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index d5d15d7..c1fc6f0 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -175,7 +175,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('language','en','Set the default language in the staff client.',NULL,'Languages'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('QueryAutoTruncate',1,'If ON, query truncation is enabled by default',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('QueryRemoveStopwords',0,'If ON, stopwords listed in the Administration area will be removed from queries',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NoZebraIndexes','\'title\' => \'130a,210a,222a,240a,243a,245a,245b,246a,246b,247a,247b,250a,250b,440a,830a\',\r\n\'author\' => \'100a,100b,100c,100d,110a,111a,111b,111c,111d,245c,700a,710a,711a,800a,810a,811a\',\r\n\'isbn\' => \'020a\',\r\n\'issn\' => \'022a\',\r\n\'lccn\' => \'010a\',\r\n\'biblionumber\' => \'999c\',\r\n\'itemtype\' => \'942c\',\r\n\'publisher\' => \'260b\',\r\n\'date\' => \'260c\',\r\n\'note\' => \'500a, 501a,504a,505a,508a,511a,518a,520a,521a,522a,524a,526a,530a,533a,538a,541a,546a,555a,556a,562a,563a,583a,585a,582a\',\r\n\'subject\' => \'600*,610*,611*,630*,650*,651*,653*,654*,655*,662*,690*\',\r\n\'dewey\' => \'082\',\r\n\'bc\' => \'952p\',\r\n\'callnum\' => \'952o\',\r\n\'an\' => \'6009,6109,6119\',\r\n\'homebranch\' => \'952a,952c\'','Enter a specific hash for NoZebra indexes. Enter : \'indexname\' => \'100a,245a,500*\',\'index2\' => \'...\'','70|10','Textarea'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NoZebraIndexes','\'title\' => \'130a,210a,222a,240a,243a,245a,245b,246a,246b,247a,247b,250a,250b,440a,830a\',\r\n\'author\' => \'100a,100b,100c,100d,110a,111a,111b,111c,111d,245c,700a,710a,711a,800a,810a,811a\',\r\n\'isbn\' => \'020a\',\r\n\'issn\' => \'022a\',\r\n\'lccn\' => \'010a\',\r\n\'biblionumber\' => \'999c\',\r\n\'itemtype\' => \'942c\',\r\n\'publisher\' => \'260b\',\r\n\'date\' => \'260c\',\r\n\'note\' => \'500a, 501a,504a,505a,508a,511a,518a,520a,521a,522a,524a,526a,530a,533a,538a,541a,546a,555a,556a,562a,563a,583a,585a,582a\',\r\n\'subject\' => \'600*,610*,611*,630*,650*,651*,653*,654*,655*,662*,690*\',\r\n\'dewey\' => \'082\',\r\n\'bc\' => \'952p\',\r\n\'callnum\' => \'952o\',\r\n\'an\' => \'6009,6109,6119\',\r\n\'location\' => \'952c\',\r\n\'homebranch\' => \'952a,952b\'','Enter a specific hash for NoZebra indexes. Enter : \'indexname\' => \'100a,245a,500*\',\'index2\' => \'...\'','70|10','Textarea'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacRenewalAllowed',0,'If ON, users can renew their issues directly from their OPAC account',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('PatronsPerPage','20','Number of Patrons Per Page displayed by default','20','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('HomeOrHoldingBranch','holdingbranch','Used by Circulation to determine which branch of an item to check with independent branches on, and by search to determine which branch to choose for availability ','holdingbranch|homebranch','Choice'); @@ -406,3 +406,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('NotesBlacklist','','List of notes fields that should not appear in the title notes/description separator of details',NULL,'free'); INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserCSS', '', NULL, 'Add CSS to be included in the SCO module in an embedded