From b529f00aa3ebe0c29c25a9c32130d47fa6dc0d1e Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Tue, 10 Nov 2009 12:08:57 +0100 Subject: [PATCH] MT 2050 : Fast cataloging --- C4/Reports/Guided.pm | 4 +- .../Optionnel/cataloguage_rapide.sql | 92 +++++++++++++++++++ .../Optionnel/cataloguage_rapide.txt | 1 + koha-tmpl/intranet-tmpl/prog/en/columns.def | 3 + .../modules/reports/guided_reports_start.tmpl | 2 +- reports/guided_reports.pl | 2 +- 6 files changed, 100 insertions(+), 4 deletions(-) create mode 100644 installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Optionnel/cataloguage_rapide.sql create mode 100644 installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Optionnel/cataloguage_rapide.txt diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm index a2efd533bc..a7d6f48006 100644 --- a/C4/Reports/Guided.pm +++ b/C4/Reports/Guided.pm @@ -82,7 +82,7 @@ $criteria{'1'} = [ 'items.dateaccessioned|date' ]; $criteria{'2'} = - [ 'items.itemnumber|textrange', 'items.biblionumber|textrange', 'items.barcode|textrange', 'items.holdingbranch', 'items.homebranch', 'items.onloan|daterange', 'items.ccode', 'items.itemcallnumber|textrange', 'items.itype', 'items.itemlost', 'items.location' ]; + [ 'items.itemnumber|textrange', 'items.biblionumber|textrange', 'items.barcode|textrange', 'biblio.frameworkcode', 'items.holdingbranch', 'items.homebranch', 'biblio.datecreated|daterange', 'biblio.timestamp|daterange', 'items.onloan|daterange', 'items.ccode', 'items.itemcallnumber|textrange', 'items.itype', 'items.itemlost', 'items.location' ]; $criteria{'3'} = ['borrowers.branchcode']; $criteria{'4'} = ['aqorders.datereceived|date']; $criteria{'5'} = ['borrowers.branchcode']; @@ -335,7 +335,6 @@ sub get_criteria { push @criteria_array, \%temp; } - else { my $query = "SELECT distinct($column) as availablevalues FROM $table"; @@ -344,6 +343,7 @@ sub get_criteria { my @values; while ( my $row = $sth->fetchrow_hashref() ) { push @values, $row; + if ($row->{'availablevalues'} eq '') { $row->{'default'} = 1 }; } $sth->finish(); diff --git a/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Optionnel/cataloguage_rapide.sql b/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Optionnel/cataloguage_rapide.sql new file mode 100644 index 0000000000..d787c74b2d --- /dev/null +++ b/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Optionnel/cataloguage_rapide.sql @@ -0,0 +1,92 @@ +-- phpMyAdmin SQL Dump +-- version 2.11.8.1deb1 +-- http://www.phpmyadmin.net +-- +-- Host: localhost +-- Generation Time: Nov 12, 2008 at 10:51 AM +-- Server version: 5.0.67 +-- PHP Version: 5.2.6-2ubuntu4 + +SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +INSERT INTO biblio_framework (frameworkcode,frameworktext) VALUES ('FA', 'Fast cataloging'); + +INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES +('000', 'Label', '', 0, 1, '', 'FA'), +('001', 'Numéro de notice','Numéro de notice',0,0,'','FA'), +('090','Numéro biblio (koha)','Numéro biblio (koha',0,0,'','FA'), +('100', 'Données générales de traitement', '', 0, 1, '', 'FA'), +('200', 'Titre et mention de responsabilité', 'Titre', 0, 1, '', 'FA'), +('205', 'Mention d''édition', '', 1, 0, '', 'FA'), +('210', 'Publication, production, diffusion, etc.', 'Editeur', 1, 0, '', 'FA'), +('225', 'collection', 'collection', 1, 0, '', 'FA'), +('995', 'Exemplaires', '', 0, 0, '', 'FA'); + +INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES +('000', '@', 'leader', '', 0, 0, '', 0, '', '', 'unimarc_leader.pl', NULL, 0, 'FA', '', NULL, ''), +('001', '@', 'Numéro d'identification notice','',0,0,'biblio.biblionumber',0,'','','',0,0,'FA','','',NULL), +('090', '9', 'Numéro biblio (koha)','Numéro biblio (koha)',0,0,'',-1,'','','',0,0,'FA','','',NULL), +('090', 'a', 'Numéro biblioitem (koha)','',0,0,'biblioitems.biblioitemnumber',-1,'','','',0,0,'FA','','',NULL), +('100', 'a', 'données générales de traitement', '', 0, 1, '', 1, '', '', 'unimarc_field_100.pl', NULL, 0, 'FA', '', NULL, ''), +('200', '5', 'nom de l''institution à laquelle s''applique cette zone', '', 0, 0, '', -1, '', '', '', 0, 0, 'FA', NULL, '', ''), +('200', 'a', 'titre propre', '', 1, 1, 'biblio.title', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('200', 'b', 'type de document', '', 1, 1, 'biblioitems.itemtype', 2, 'itemtypes', '', '', 0, 0, 'FA', NULL, '', ''), +('200', 'c', 'titre propre d''un auteur différent', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('200', 'd', 'titre parallèle', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('200', 'e', 'complément du titre', '', 1, 0, 'biblioitems.volume', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('200', 'f', '1ère mention de resp.', 'Auteur', 1, 0, 'biblio.author', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('200', 'g', 'mention de responsabilité suivante', 'Auteur secondaire', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('200', 'h', 'numéro de partie', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('200', 'i', 'titre de partie', '', 1, 0, 'biblio.unititle', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('200', 'v', 'numéro du volume', '', 0, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('200', 'z', 'langue du titre parallèle', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('205', 'a', 'mention d''édition', '', 0, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('205', 'b', 'autre mention d''édition', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('205', 'd', 'mention parallèle d''édition', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('205', 'f', 'mention de responsabilitérelative à l''édition', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('205', 'g', 'mention de responsabilité suivante', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('210', 'a', 'lieu de publication', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('210', 'b', 'adresse de l''éditeur, du diffuseur', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('210', 'c', 'nom de l''éditeur', '', 1, 0, 'biblioitems.publishercode', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('210', 'd', 'date de publication', '', 1, 0, 'biblioitems.publicationyear', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('210', 'e', 'lieu de fabrication', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('210', 'f', 'adresse du fabricant', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('210', 'g', 'nom du fabricant', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('210', 'h', 'date de fabrication', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('225', 'a', 'titre de la collection', '', 0, 0, 'biblioitems.collectiontitle', 2, '', '', 'unimarc_field_225a.pl', 0, 0, 'FA', NULL, '', ''), +('225', 'd', 'titre parallèle de la collection', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('225', 'e', 'complément du titre', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('225', 'f', 'mention de responsabilité', '', 1, 0, 'biblioitems.editionresponsibility', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('225', 'h', 'numéro de partie', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('225', 'i', 'titre de partie', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('225', 'v', 'numérotation du volume', '', 1, 0, 'biblioitems.collectionvolume', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('225', 'x', 'ISSN de la collection', '', 1, 0, 'biblioitems.collectionissn', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('225', 'z', 'langue du titre parallèle', '', 1, 0, '', 2, '', '', '', 0, 0, 'FA', NULL, '', ''), +('995', '2', 'Perdu', '', 0, 0, 'items.itemlost', 10, '', '', '', NULL, 1, 'FA', NULL, NULL, ''), +('995', '9', 'itemnumber (koha)', '', 0, 0, 'items.itemnumber', -1, '', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'a', 'origine du document, texte libre', '', 0, 1, '', -1, '', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'b', 'Propriétaire', '', 0, 1, 'items.homebranch', 10, 'branches', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'c', 'dépositaire permanent', '', 0, 1, 'items.holdingbranch', 10, 'branches', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'd', 'Etablissement prêteur ou déposant, donnée codée', '', 0, 0, '', -1, '', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'e', 'niveau de localisation', '', 0, 1, 'items.location', 10, 'LOC', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'f', 'Code barre', '', 0, 0, 'items.barcode', 10, '', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'g', 'code à barres, préfixe', '', 0, 0, '', -1, '', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'h', 'code à barres, incrémentation', '', 0, 0, '', -1, '', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'i', 'code à barres, suffixe', '', 0, 0, '', -1, '', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'j', 'Numéro Inventaire', '', 0, 0, 'items.stocknumber', -1, '', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'k', 'cote', 'cote', 0, 1, 'items.itemcallnumber', 10, '', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'l', 'volumaison', '', 0, 1, '', -1, '', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'm', 'date de prêt ou de dépôt', '', 0, 0, '', 10, '', '', '', NULL, 1, 'FA', NULL, NULL, ''), +('995', 'n', 'date de restitution prévue', 'à rendre pour le', 0, 0, 'items.onloan', 10, '', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'o', 'Statut', '', 0, 1, 'items.notforloan', 10, 'ETAT', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'q', 'public visé', '', 0, 0, '', -1, '', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'r', 'type de document et support matériel', '', 0, 1, '', -1, '', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 's', 'élément de tri', '', 0, 1, '', -1, '', '', '', NULL, 0, 'FA', NULL, NULL, ''), +('995', 'u', 'note', '', 0, 0, 'items.itemnotes', 10, '', '', '', NULL, 0, 'FA', NULL, NULL, ''); + diff --git a/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Optionnel/cataloguage_rapide.txt b/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Optionnel/cataloguage_rapide.txt new file mode 100644 index 0000000000..9504ec48dc --- /dev/null +++ b/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Optionnel/cataloguage_rapide.txt @@ -0,0 +1 @@ +Grille de catalogage rapide. diff --git a/koha-tmpl/intranet-tmpl/prog/en/columns.def b/koha-tmpl/intranet-tmpl/prog/en/columns.def index 2b7cf8260f..6493288a35 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/columns.def +++ b/koha-tmpl/intranet-tmpl/prog/en/columns.def @@ -95,6 +95,9 @@ statistics.usercode User Code statistics.itemnumber Item Number statistics.itemtype Item Type statistics.borrowernumber Borrower Number +biblio.frameworkcode Framework Code +biblio.datecreated Creation Date +biblio.timestamp Modification Date biblioitems.biblioitemnumber Biblioitem Number biblioitems.biblionumber Biblio Number biblioitems.volume Volume Number diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl index db7aa719d6..70fa0bfcd9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl @@ -294,7 +294,7 @@ canned reports and writing custom SQL reports.

diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index 34484eb15c..e42974da00 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -205,7 +205,7 @@ elsif ( $phase eq 'Choose these criteria' ) { my $value = $input->param( $crit . "_value" ); # If value is not defined, then it may be range values - if (!$value) { + if (!defined $value) { my $fromvalue = $input->param( "from_" . $crit . "_value" ); my $tovalue = $input->param( "to_" . $crit . "_value" ); -- 2.39.5