From gmcharlt at gmail.com Mon Nov 1 00:50:16 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sun, 31 Oct 2010 19:50:16 -0400 Subject: [Koha-patches] Pull request - git://git.librarypolice.com/git/koha-galen.git bug5332-tested Message-ID: <1288569016-3083-1-git-send-email-gmcharlt@gmail.com> Fixes and improvements to the --revert and --progress-interval options added by Doug Kingston. The following changes since commit 795ebedecd1bd8dc4759f9911d11341313423f29: Galen Charlton (1): remove extraneous semicolon are available in the git repository at: git://git.librarypolice.com/git/koha-galen.git bug5332-tested Doug Kingston (1): bug 5332: Add batch revert capability (--revert) to commit_biblios_file.pl. Galen Charlton (3): bug 5332: typo and whitespace fixes bug 5332: functionality and doc fixes bug 5332: add --progress-interval to stage_biblios_file.pl misc/commit_biblios_file.pl | 82 +++++++++++++++++++++++++++++++----------- misc/stage_biblios_file.pl | 19 ++++++---- 2 files changed, 71 insertions(+), 30 deletions(-) From henridamien.laurent at biblibre.com Mon Nov 1 02:37:52 2010 From: henridamien.laurent at biblibre.com (Henri-Damien LAURENT) Date: Mon, 1 Nov 2010 14:37:52 +1300 Subject: [Koha-patches] [PATCH] Analytical record : UNIMARC support added Message-ID: <1288575472-29930-1-git-send-email-henridamien.laurent@biblibre.com> This is a followup proposition for analytical record support with UNIMARC. Previous patches only implemented the MARC21 support. This is a generalize the support. --- C4/Biblio.pm | 23 ++++++++++++++++------- 1 files changed, 16 insertions(+), 7 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index a58f03e..bdeb74a 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1558,27 +1558,36 @@ sub GetMarcSeries { $marchostsarray = GetMarcHosts($record,$marcflavour); -Get all host records (773s) from the MARC record and returns them in an array. +Get all host records (773s MARC21, 461 UNIMARC) from the MARC record and returns them in an array. =cut sub GetMarcHosts { my ( $record, $marcflavour ) = @_; - my ( $tag ); + my ( $tag,$title_subf,$bibnumber_subf,$itemnumber_subf); + $marcflavour ||="MARC21"; if ( $marcflavour eq "MARC21" ) { $tag = "773"; - + $title_subf = "a"; + $bibnumber_subf ="w"; + $itemnumber_subf='o'; + } + elsif ($marcflavour eq "UNIMARC") { + $tag = "461"; + $title_subf = "t"; + $bibnumber_subf ="0"; + $itemnumber_subf='9'; } my @marchosts; - foreach my $field ( $record->field('773')) { + foreach my $field ( $record->field($tag)) { my @fields_loop; - my $hostbiblionumber = $field->subfield("w"); - my $hosttitle = $field->subfield("a"); - my $hostitemnumber=$field->subfield("o"); + my $hostbiblionumber = $field->subfield("$title_subf"); + my $hosttitle = $field->subfield($bibnumber_subf); + my $hostitemnumber=$field->subfield($itemnumber_subf); push @fields_loop, { hostbiblionumber => $hostbiblionumber, hosttitle => $hosttitle, hostitemnumber => $hostitemnumber}; push @marchosts, { MARCHOSTS_FIELDS_LOOP => \@fields_loop }; -- 1.7.0.4 From gmcharlt at gmail.com Mon Nov 1 03:35:12 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sun, 31 Oct 2010 22:35:12 -0400 Subject: [Koha-patches] [PATCH] history updates - recent releases Message-ID: <1288578912-4326-1-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- docs/history.txt | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/docs/history.txt b/docs/history.txt index e119577..2dd63e0 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -492,6 +492,7 @@ May 4 2010 Koustubha Kale becomes the 112th committer to have a patch accepted May 4 2010 Community Handover meeting http://wiki.koha-community.org/wiki/Community_Handover_IRC_Meeting,_4_May_2010 May 5 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_Meeting,_May_5_2010 May 5 2010 Matthew Hunt becomes the 113th committer to have a patch accepted +May 17 2010 Koha 3.0.6 released May 19 2010 Marcel de Rooy becomes the 114th committer to have a patch accepted July 19 2010 Andrew Chilton becomes the 115th committer to have a patch accepted June 2 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_2_June_2010 @@ -501,6 +502,7 @@ July 13 2010 License meeting http://wiki.koha-community.org/wiki/License_Upgrade August 11 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_11_August_2010 September 1 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_1_September_2010 September 29 2010 Eric Olsen becomes the 116th committer to have a patch accepted +October 22 2010 Koha 3.2.0 released October 25-31 2010 Kohacon10 in Wellington October 30 2010 Brian Engard becomes the 117th committer to have a patch accepted October 30 2010 Daniel Grobani becomes the 118th committer to have a patch accepted -- 1.7.0 From M.de.Rooy at rijksmuseum.nl Mon Nov 1 09:27:17 2010 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 1 Nov 2010 08:27:17 +0000 Subject: [Koha-patches] [PATCH] Enhancement 5320 (Estimate optionally next planned date for serials without periodicity) Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3119A49A@S-MAIL-1B.rijksmuseum.intra> For periodicity Irregular, Unknown or "Without periodicity", it would be helpful if Koha could suggest a next planned date when receiving an issue based on the time interval between the last two receivals of this serial. This option is triggered by new local-use preference SerialEstimatePlannedDate. If this option exists and contains uppercase W for without periodicity, I for irregular or U for unknown, or a combination of those characters, the option is enabled for these particular periodicities. Behavior does not change for other periodicities. --- C4/Serials.pm | 36 +++++++++++++++++++++++++++++++++++- 1 files changed, 35 insertions(+), 1 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 32e46be..3835e2e 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -2178,7 +2178,12 @@ sub GetNextDate(@) { # warn "DOW $dayofweek"; if ( $subscription->{periodicity} % 16 == 0 ) { # 'without regularity' || 'irregular' - return 0; + return 0 unless _estimate_option_enabled($subscription->{periodicity}); + my $estimate_days=_get_estimate_for_no_periodicity($subscription); + if(!$estimate_days) { #return today + ($year, $month, $day)= (localtime)[5,4,3]; $year+=1900; $month++; + } + @resultdate = Add_Delta_Days($year,$month,$day,$estimate_days); } # daily : n / week @@ -2305,6 +2310,35 @@ sub GetNextDate(@) { return "$resultdate"; } +sub _estimate_option_enabled { #check preference + my $periodicity= shift; + my $pref=C4::Context->preference('SerialEstimatePlannedDate'); + my $period_char= substr("WIU",-1+$periodicity/16,1); + #16=Without,32=Irreg,48=Unknwn + return $pref=~ /$period_char/; +} +sub _get_estimate_for_no_periodicity { + my ($subscription) = @_; + + my $dbh= C4::Context->dbh; + my $sth= $dbh->prepare('SELECT + YEAR(COALESCE(publisheddate,planneddate)), + MONTH(COALESCE(publisheddate,planneddate)), + DAY(COALESCE(publisheddate,planneddate)) + FROM serial + WHERE subscriptionid = ? AND + (planneddate IS NOT NULL OR publisheddate IS NOT NULL) + ORDER BY serialid DESC LIMIT 2'); + $sth->execute($subscription->{subscriptionid}); + my $dates= $sth->fetchall_arrayref; #last two non-null dates + $sth->finish; + return if @$dates<2 || + !check_date(@{$dates->[1]}) || !check_date(@{$dates->[0]}); + + #pass args in chronological order to Delta_Days, return difference in days + #check on positive result + my $d; return ($d=Delta_Days(@{$dates->[1]}, @{$dates->[0]}))>0? $d: 1; +} =head2 itemdata -- 1.6.0.6 From gmcharlt at gmail.com Mon Nov 1 13:25:20 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 1 Nov 2010 08:25:20 -0400 Subject: [Koha-patches] Pull request - git://git.librarypolice.com/git/koha-galen.git bug5308 Message-ID: <1288614320-5717-1-git-send-email-gmcharlt@gmail.com> Tested Srdjan Jankovic's patch + a followup to add foreign key constraints. The following changes since commit 8af6165f537c6324fa9184f3b0788ebf287820f8: Chris Cormack (1): Merge remote branch 'kc/new/background_jobs_tested' into kcmaster are available in the git repository at: git://git.librarypolice.com/git/koha-galen.git bug5308 Galen Charlton (1): bug 5308: add foreign key constraints as well Srdjan Jankovic (1): bug 5308: subscriptionroutinglist more strict installer/data/mysql/kohastructure.sql | 11 ++++++++--- installer/data/mysql/updatedatabase.pl | 27 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) From chris at bigballofwax.co.nz Tue Nov 2 02:54:46 2010 From: chris at bigballofwax.co.nz (Chris Cormack) Date: Tue, 2 Nov 2010 14:54:46 +1300 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] bug 5149 fix broken link to noItemTypeImages preference In-Reply-To: <1288354848-13325-1-git-send-email-gmcharlt@gmail.com> References: <1288354848-13325-1-git-send-email-gmcharlt@gmail.com> Message-ID: This patch no longer applies Applying: bug 5149 fix broken link to noItemTypeImages preference Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl Could you please rebase, and fix the conflict and resend the patch please The follow up patch of course no longer applies also. Chris On 30 October 2010 01:20, Galen Charlton wrote: > From: Nicole Engard > > Signed-off-by: Galen Charlton > --- > ?.../prog/en/modules/admin/itemtypes.tmpl ? ? ? ? ? | ? ?2 +- > ?1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl > index 4c34695..8111182 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl > @@ -162,7 +162,7 @@ Item Types Administration > ? ? ?
  • > ? ? ? ? ? " /> ? ? ?
  • > ? ? ? > - ? ? ? ?
  • Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
  • > + ? ? ? ?
  • Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
  • > ? ? ? ? > ? ? ? ? ? ? ? ?
    > ? ? ? ? ? ? ? ?
    Choose an Icon:
    > -- > 1.7.0 > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > From gmcharlt at gmail.com Tue Nov 2 03:09:09 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 1 Nov 2010 22:09:09 -0400 Subject: [Koha-patches] [PATCH 1/2] bug 5149 fix broken link to noItemTypeImages preference Message-ID: <1288663750-9142-1-git-send-email-gmcharlt@gmail.com> From: Nicole Engard Signed-off-by: Galen Charlton --- .../prog/en/modules/admin/itemtypes.tmpl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl index a36c4ee..1703e78 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl @@ -162,7 +162,7 @@ Item Types Administration
  • " />
  • -
  • Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
  • +
  • Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
  • Choose an Icon:
    -- 1.7.0 From gmcharlt at gmail.com Tue Nov 2 03:09:10 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 1 Nov 2010 22:09:10 -0400 Subject: [Koha-patches] [PATCH 2/2] bug 5149: follow-up - remove extraneous character in link In-Reply-To: <1288663750-9142-1-git-send-email-gmcharlt@gmail.com> References: <1288663750-9142-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1288663750-9142-2-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- .../prog/en/modules/admin/itemtypes.tmpl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl index 1703e78..6e77c88 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl @@ -162,7 +162,7 @@ Item Types Administration
  • " />
  • -
  • Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
  • +
  • Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
  • Choose an Icon:
    -- 1.7.0 From gmcharlt at gmail.com Tue Nov 2 03:09:34 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 1 Nov 2010 22:09:34 -0400 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] bug 5149 fix broken link to noItemTypeImages preference In-Reply-To: References: <1288354848-13325-1-git-send-email-gmcharlt@gmail.com> Message-ID: Hi, On Mon, Nov 1, 2010 at 9:54 PM, Chris Cormack wrote: > Could you please rebase, and fix the conflict and resend the patch please > The follow up patch of course no longer applies also. Done. Regards, Galen -- Galen Charlton gmcharlt at gmail.com From jcamins at cpbibliography.com Tue Nov 2 04:16:52 2010 From: jcamins at cpbibliography.com (Jared Camins-Esakov) Date: Mon, 1 Nov 2010 23:16:52 -0400 Subject: [Koha-patches] [PATCH] Add MARC21 field 545 to to framework fix bug 5226 Message-ID: <1288667812-4495-1-git-send-email-jcamins@cpbibliography.com> Adds MARC21 field 545 to the English, French, German, and Polish MARC21 frameworks. The labels for the field still need to be translated into French and Polish. --- .../marc21/mandatory/marc21_framework_DEFAULT.sql | 3 ++- .../marc21/mandatory/marc21_framework_DEFAULT.sql | 1 + .../Obligatoire/marc21_framework_DEFAULT.sql | 1 + .../marc21/mandatory/marc21_framework_DEFAULT.sql | 1 + installer/data/mysql/updatedatabase.pl | 13 +++++++++++++ 5 files changed, 18 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/de-DE/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/de-DE/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql index 35c22a0..015c94e 100644 --- a/installer/data/mysql/de-DE/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/de-DE/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql @@ -346,6 +346,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat ('541', 'Fu?note zur Herkunft', 'Fu?note zur Herkunft', 1, 0, NULL, ''), ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''), ('544', 'Fu?note zum Standort anderer Archivmaterialien', 'Fu?note zum Standort anderer Archivmaterialien', 1, 0, NULL, ''), + ('545', 'Fu?note zu biografischen oder historischen Daten', 'Fu?note zu biografischen oder historischen Daten', 1, 0, NULL, ''), ('546', 'Fu?note zur Sprache', 'Fu?note zur Sprache', 1, 0, NULL, ''), ('547', 'Fu?note zu fr?heren Titeln', 'Fu?note zu fr?heren Titeln', 1, 0, NULL, ''), ('550', 'Fu?note zur herausgebenden K?rperschaft', 'Fu?note zur herausgebenden K?rperschaft', 1, 0, NULL, ''), @@ -3981,4 +3982,4 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('998', 'p', 'PROC (RLIN)', 'PROC (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, '', '', '', NULL), ('998', 's', 'CC (RLIN)', 'CC (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, '', '', '', NULL), ('998', 't', 'RTYP (RLIN)', 'RTYP (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, '', '', '', NULL), - ('998', 'w', 'PLINK (RLIN)', 'PLINK (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, '', '', '', NULL); \ No newline at end of file + ('998', 'w', 'PLINK (RLIN)', 'PLINK (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, '', '', '', NULL); diff --git a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql index a5e7d77..f770bc2 100644 --- a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql @@ -346,6 +346,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat ('541', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, ''), ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''), ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, ''), + ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''), ('546', 'LANGUAGE NOTE', 'LANGUAGE NOTE', 1, 0, NULL, ''), ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, ''), ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, ''), diff --git a/installer/data/mysql/fr-FR/marcflavour/marc21/Obligatoire/marc21_framework_DEFAULT.sql b/installer/data/mysql/fr-FR/marcflavour/marc21/Obligatoire/marc21_framework_DEFAULT.sql index 5877662..0bd0f33 100644 --- a/installer/data/mysql/fr-FR/marcflavour/marc21/Obligatoire/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/fr-FR/marcflavour/marc21/Obligatoire/marc21_framework_DEFAULT.sql @@ -346,6 +346,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat ('541', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, ''), ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''), ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, ''), + ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''), ('546', 'LANGUAGE NOTE', 'LANGUAGE NOTE', 1, 0, NULL, ''), ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, ''), ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, ''), diff --git a/installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql index be49737..274caac 100644 --- a/installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql @@ -345,6 +345,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat ('541','ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE','IMMEDIATE SOURCE OF ACQUISITION NOTE',1,0,NULL,''), ('543','SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]','SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]',1,0,NULL,''), ('544','LOCATION OF OTHER ARCHIVAL MATERIALS NOTE','LOCATION OF OTHER ARCHIVAL MATERIALS NOTE',1,0,NULL,''), + ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''), ('546','UWAGA O J?ZYKU','LANGUAGE NOTE',1,0,NULL,''), ('547','Z?O?ONA UWAGA O POPRZEDNIM TYTULE','FORMER TITLE COMPLEXITY NOTE',1,0,NULL,''), ('550','UWAGA DOTYCZ?CA INSTYTUCJI SPRAWCZEJ','ISSUING BODY NOTE',1,0,NULL,''), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 523c533..c412e35 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3799,6 +3799,19 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.03.00.XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + if (C4::Context->preference("marcflavour") eq 'MARC21') { + if (C4::Context->preference("opaclanguages") eq "de") { + $dbh->do("INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES ('545', 'Fu?note zu biografischen oder historischen Daten', 'Fu?note zu biografischen oder historischen Daten', 1, 0, NULL, '');"); + } else { + $dbh->do("INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, '');"); + } + } + print "Upgrade to $DBversion done (add MARC21 field 545 to framework)\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table -- 1.7.0.4 From gmcharlt at gmail.com Tue Nov 2 18:00:22 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Tue, 2 Nov 2010 13:00:22 -0400 Subject: [Koha-patches] [PATCH] Add MARC21 field 545 to to framework fix bug 5226 In-Reply-To: <1288667812-4495-1-git-send-email-jcamins@cpbibliography.com> References: <1288667812-4495-1-git-send-email-jcamins@cpbibliography.com> Message-ID: Hi, On Mon, Nov 1, 2010 at 11:16 PM, Jared Camins-Esakov wrote: > Adds MARC21 field 545 to the English, French, German, and Polish MARC21 > frameworks. The labels for the field still need to be translated into > French and Polish. This is not complete - it lacks inserts into marc_subfield_structure for the subfields. Regards, Galen -- Galen Charlton gmcharlt at gmail.com From jcamins at cpbibliography.com Tue Nov 2 18:02:14 2010 From: jcamins at cpbibliography.com (Jared Camins-Esakov) Date: Tue, 2 Nov 2010 13:02:14 -0400 Subject: [Koha-patches] [PATCH] Add MARC21 field 545 to to framework fix bug 5226 In-Reply-To: References: <1288667812-4495-1-git-send-email-jcamins@cpbibliography.com> Message-ID: Galen, As far as I can tell, the subfields are already loaded into the database. Once you add the field, all the subfields start showing up. Regards, Jared On Tue, Nov 2, 2010 at 1:00 PM, Galen Charlton wrote: > Hi, > > On Mon, Nov 1, 2010 at 11:16 PM, Jared Camins-Esakov > wrote: > > Adds MARC21 field 545 to the English, French, German, and Polish MARC21 > > frameworks. The labels for the field still need to be translated into > > French and Polish. > > This is not complete - it lacks inserts into marc_subfield_structure > for the subfields. > > Regards, > > Galen > -- > Galen Charlton > gmcharlt at gmail.com > -- Jared Camins-Esakov Freelance bibliographer, C & P Bibliography Services, LLC (phone) +1 (917) 727-3445 (e-mail) jcamins at cpbibliography.com (web) http://www.cpbibliography.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmcharlt at gmail.com Tue Nov 2 20:01:36 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Tue, 2 Nov 2010 15:01:36 -0400 Subject: [Koha-patches] [PATCH] Add MARC21 field 545 to to framework fix bug 5226 In-Reply-To: References: <1288667812-4495-1-git-send-email-jcamins@cpbibliography.com> Message-ID: Hi, On Tue, Nov 2, 2010 at 1:02 PM, Jared Camins-Esakov wrote: > As far as I can tell, the subfields are already loaded into the database. > Once you add the field, all the subfields start showing up. You're correct - I was imagining a foreign key constraint that does not currently exist. Regards, Galen -- Galen Charlton gmcharlt at gmail.com From chris.nighswonger at gmail.com Wed Nov 3 02:39:43 2010 From: chris.nighswonger at gmail.com (Chris Nighswonger) Date: Tue, 2 Nov 2010 21:39:43 -0400 Subject: [Koha-patches] [PATCH 2/2] bug 4991: follow-up tweaks In-Reply-To: <1288748383-14277-1-git-send-email-chris.nighswonger@gmail.com> References: <1288748383-14277-1-git-send-email-chris.nighswonger@gmail.com> Message-ID: <1288748383-14277-2-git-send-email-chris.nighswonger@gmail.com> From: Galen Charlton * make some strings translatable * display library name instead of code in add/edit holiday panel * minor textual fixes to hints Signed-off-by: Galen Charlton Signed-off-by: Chris Nighswonger --- .../prog/en/modules/tools/holidays.tmpl | 22 ++++++++++---------- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl index 423c7da..38b12dd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl @@ -21,7 +21,7 @@ $("#showHoliday").slideDown("fast"); $('#showDaynameOutput').html(dayName); $('#showDayname').val(dayName); - $('#showBranchNameOutput').html($("#branch").val()); + $('#showBranchNameOutput').html($("#branch :selected").text()); $('#showBranchName').val($("#branch").val()); $('#showDayOutput').html(day); $('#showDay').val(day); @@ -35,14 +35,14 @@ $('#showHolidayType').val(holidayType); if (holidayType == 'exception') { - $("#showOperationDelLabel").html('Delete this exception.'); - $("#holtype").attr("class","key exception").html("Holiday exception"); + $("#showOperationDelLabel").html(_('Delete this exception.')); + $("#holtype").attr("class","key exception").html(_("Holiday exception")); } else if(holidayType == 'weekday') { - $("#showOperationDelLabel").html('Delete this holiday.'); - $("#holtype").attr("class","key repeatableday").html("Repeatable holiday"); + $("#showOperationDelLabel").html(_('Delete this holiday.')); + $("#holtype").attr("class","key repeatableday").html(_("Repeatable holiday")); } else { - $("#showOperationDelLabel").html('Delete this holiday.'); - $("#holtype").attr("class","key holiday").html("Unique holiday"); + $("#showOperationDelLabel").html(_('Delete this holiday.')); + $("#holtype").attr("class","key holiday").html(_("Unique holiday")); } if (exceptionPosibility == 1) { @@ -58,7 +58,7 @@ $("#newHoliday").slideDown("fast"); $("#newDaynameOutput").html(dayName); $("#newDayname").val(dayName); - $("#newBranchNameOutput").html($('#branch').val()); + $("#newBranchNameOutput").html($('#branch :selected').text()); $("#newBranchName").val($('#branch').val()); $("#newDayOutput").html(day); $("#newDay").val(day); @@ -201,7 +201,7 @@

    Add new holiday

    1. - Library + Library:
    2. @@ -224,7 +224,7 @@
    3. . [?] -
      Make a single holiday. For example, selecting August 1st, 2012 will make it holiday, but will not affect August 1st in other years.
      +
      Make a single holiday. For example, selecting August 1st, 2012 will make it a holiday, but will not affect August 1st in other years.
    4. . @@ -234,7 +234,7 @@
    5. . [?] -
      This will take this day and month as a reference to make it holiday. Through this option, you can repeat this rule for every year. For example, selecting August 1st will make August 1st a holiday every year.
      +
      This will take this day and month as a reference to make it a holiday. Through this option, you can repeat this rule for every year. For example, selecting August 1st will make August 1st a holiday every year.
    6. -- 1.7.0 From f.demians at tamil.fr Wed Nov 3 18:38:35 2010 From: f.demians at tamil.fr (=?utf-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Wed, 3 Nov 2010 18:38:35 +0100 Subject: [Koha-patches] [PATCH] Bug 4472 Apply it to MARC21 Message-ID: <1288805915-16093-1-git-send-email-f.demians@tamil.fr> For French installation of Koha using MARC21, the same issues as UNIMARC affects handling of   by translation scripts. --- .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 1 + .../prog/en/xslt/MARC21slim2OPACResults.xsl | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl index e31dbe7..e6a5d01 100755 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -1,5 +1,6 @@ +]> +]> Note that OPACXSLTResultsDisplay and OPACXSLTDetailsDisplay are boolean parameters in 3.2.x, not string parameters. Signed-off-by: Galen Charlton --- installer/data/mysql/updatedatabase.pl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6490549..a6f6be6 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3448,11 +3448,11 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { my $value = C4::Context->preference("XSLTResultsDisplay"); $dbh->do( "INSERT INTO systempreferences (variable,value,type) - VALUES('OPACXSLTResultsDisplay',$value,'YesNo')"); + VALUES('OPACXSLTResultsDisplay',?,'YesNo')", {}, $value ? 1 : 0); $value = C4::Context->preference("XSLTDetailsDisplay"); $dbh->do( "INSERT INTO systempreferences (variable,value,type) - VALUES('OPACXSLTDetailsDisplay',$value,'YesNo')"); + VALUES('OPACXSLTDetailsDisplay',?,'YesNo')", {}, $value ? 1 : 0); print "Upgrade done (added two new syspref: OPACXSLTResultsDisplay and OPACXSLTDetailDisplay). You may have to go in Admin > System preference to tweak XSLT related syspref both in OPAC and Search tabs.\n "; SetVersion ($DBversion); } -- 1.7.0 From chris.nighswonger at gmail.com Wed Nov 3 21:31:03 2010 From: chris.nighswonger at gmail.com (Chris Nighswonger) Date: Wed, 3 Nov 2010 16:31:03 -0400 Subject: [Koha-patches] [PATCH] Bug 5363 - Removing unused module (C4::Cache::FastMemcached) Message-ID: <1288816263-20541-1-git-send-email-chris.nighswonger@gmail.com> From: Chris Cormack Signed-off-by: Chris Nighswonger --- C4/Cache.pm | 1 - C4/Cache/FastMemcached.pm | 95 --------------------------------------------- t/Cache_FastMemcached.t | 14 ------- 3 files changed, 0 insertions(+), 110 deletions(-) delete mode 100644 C4/Cache/FastMemcached.pm delete mode 100755 t/Cache_FastMemcached.t diff --git a/C4/Cache.pm b/C4/Cache.pm index ebe881a..151a3fa 100644 --- a/C4/Cache.pm +++ b/C4/Cache.pm @@ -50,7 +50,6 @@ use Carp; use base qw(Class::Accessor); use C4::Cache::Memcached; -use C4::Cache::FastMemcached; __PACKAGE__->mk_ro_accessors( qw( cache ) ); diff --git a/C4/Cache/FastMemcached.pm b/C4/Cache/FastMemcached.pm deleted file mode 100644 index 96dc08e..0000000 --- a/C4/Cache/FastMemcached.pm +++ /dev/null @@ -1,95 +0,0 @@ -package Koha::Cache::FastMemcached; - -# Copyright 2009 Chris Cormack and The Koha Dev Team -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with Koha; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -use strict; -use warnings; -use Carp; - -use Cache::Memcached::Fast; -use IO::Compress::Gzip; -use IO::Uncompress::Gunzip; -use Storable; - -use base qw(C4::Cache); - -sub _cache_handle { - my $class = shift; - my $params = shift; - - my @servers = split /,/, $params->{'cache_servers'}; - - return Cache::Memcached::Fast->new( - { - servers => \@servers, - namespace => $params->{'namespace'} || 'KOHA', - connect_timeout => $params->{'connect_timeout'} || 2, - io_timeout => $params->{'io_timeout'} || 2, - close_on_error => 1, - compress_threshold => 100_000, - compress_ratio => 0.9, - compress_methods => - [ \&IO::Compress::Gzip::gzip, \&IO::Uncompress::Gunzip::gunzip ], - max_failures => 3, - failure_timeout => 2, - ketama_points => 150, - nowait => 1, - hash_namespace => 1, - serialize_methods => [ \&Storable::freeze, \&Storable::thaw ], - utf8 => 1, - } - ); -} - -sub set_in_cache { - my ( $self, $key, $value, $expiry ) = @_; - croak "No key" unless $key; - - if ( defined $expiry ) { - return $self->cache->set( $key, $value, $expiry ); - } - else { - return $self->cache->set( $key, $value ); - } -} - -sub get_from_cache { - my ( $self, $key ) = @_; - croak "No key" unless $key; - return $self->cache->get($key); -} - -sub clear_from_cache { - my ( $self, $key ) = @_; - croak "No key" unless $key; - return $self->cache->delete($key); -} - -sub flush_all { - my $self = shift; - return $self->cache->flush_all; -} - -1; -__END__ - -=head1 NAME - - C4::Cache::FastMemcached - memcached::fast subclass of C4::Cache - -=cut diff --git a/t/Cache_FastMemcached.t b/t/Cache_FastMemcached.t deleted file mode 100755 index 589e9b1..0000000 --- a/t/Cache_FastMemcached.t +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/perl -# -# This Koha test module is a stub! -# Add more tests here!!! - -use strict; -use warnings; - -use Test::More tests => 1; - -BEGIN { - use_ok('C4::Cache::FastMemcached'); -} - -- 1.7.0 From M.de.Rooy at rijksmuseum.nl Thu Nov 4 10:26:52 2010 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Thu, 4 Nov 2010 09:26:52 +0000 Subject: [Koha-patches] [PATCH] Bug 5066 (Incorrect use of localtime function when calling _session_log) Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3119B52D@S-MAIL-1B.rijksmuseum.intra> --- C4/Auth.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 6ba852d..58ce63e 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -717,7 +717,7 @@ sub checkauth { ( $return, $cardnumber ) = checkpw( $dbh, $userid, $password, $query ); } if ($return) { - _session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},localtime); + _session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},scalar localtime); if ( $flags = haspermission( $userid, $flagsrequired ) ) { $loggedin = 1; } -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Thu Nov 4 12:32:05 2010 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Thu, 4 Nov 2010 11:32:05 +0000 Subject: [Koha-patches] [PATCH] Bug 4515 (Few very small errors in opac-search.pl) Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3119B5C7@S-MAIL-1B.rijksmuseum.intra> Loop on results should stop before $i==@servers. Adding fix for warnings on undefined values in comparison for lines 485, 488 and 510. --- opac/opac-search.pl | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 30bc34a..b1be022 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -431,7 +431,7 @@ if ($@ || $error) { # At this point, each server has given us a result set # now we build that set for template display my @sup_results_array; -for (my $i=0;$i<=@servers;$i++) { +for (my $i=0;$i<@servers;$i++) { my $server = $servers[$i]; if ($server && $server =~/biblioserver/) { # this is the local bibliographic server $hits = $results_hashref->{$server}->{"hits"}; @@ -482,10 +482,10 @@ for (my $i=0;$i<=@servers;$i++) { } # Adding the new search if needed - if ($borrowernumber eq '') { + if (!$borrowernumber || $borrowernumber eq '') { # To a cookie (the user is not logged in) - if ($params->{'offset'} eq '') { + if (($params->{'offset'}||'') eq '') { push @recentSearches, { "query_desc" => $query_desc || "unknown", @@ -507,7 +507,7 @@ for (my $i=0;$i<=@servers;$i++) { } else { # To the session (the user is logged in) - if ($params->{'offset'} eq '') { + if (($params->{'offset'}||'') eq '') { AddSearchHistory($borrowernumber, $cgi->cookie("CGISESSID"), $query_desc, $query_cgi, $total); $template->param(ShowOpacRecentSearchLink => 1); } -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Thu Nov 4 12:38:45 2010 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Thu, 4 Nov 2010 11:38:45 +0000 Subject: [Koha-patches] [PATCH] Bug 4515 (Few very small errors in opac-search.pl) RESENT fixing whitespace warning Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3119B5E5@S-MAIL-1B.rijksmuseum.intra> Loop on results should stop before $i==@servers. Adding fix for warnings on undefined values in comparison for lines 485, 488 and 510. --- opac/opac-search.pl | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 30bc34a..b1be022 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -431,7 +431,7 @@ if ($@ || $error) { # At this point, each server has given us a result set # now we build that set for template display my @sup_results_array; -for (my $i=0;$i<=@servers;$i++) { +for (my $i=0;$i<@servers;$i++) { my $server = $servers[$i]; if ($server && $server =~/biblioserver/) { # this is the local bibliographic server $hits = $results_hashref->{$server}->{"hits"}; @@ -482,10 +482,10 @@ for (my $i=0;$i<=@servers;$i++) { } # Adding the new search if needed - if ($borrowernumber eq '') { + if (!$borrowernumber || $borrowernumber eq '') { # To a cookie (the user is not logged in) - if ($params->{'offset'} eq '') { + if (($params->{'offset'}||'') eq '') { push @recentSearches, { "query_desc" => $query_desc || "unknown", @@ -507,7 +507,7 @@ for (my $i=0;$i<=@servers;$i++) { } else { # To the session (the user is logged in) - if ($params->{'offset'} eq '') { + if (($params->{'offset'}||'') eq '') { AddSearchHistory($borrowernumber, $cgi->cookie("CGISESSID"), $query_desc, $query_cgi, $total); $template->param(ShowOpacRecentSearchLink => 1); } -- 1.6.0.6 From cnighswonger at foundations.edu Thu Nov 4 19:44:21 2010 From: cnighswonger at foundations.edu (Chris Nighswonger) Date: Thu, 4 Nov 2010 14:44:21 -0400 Subject: [Koha-patches] Pull Request Message-ID: The following changes since commit 414b2ace4fa5804d27e927b9b573dcb973761c87: Chris Cormack (1): Merge remote branch 'kc/new/signoffs' into kcmaster are available in the git repository at: git://git.koha-community.org/wip/koha-fbc.git trivial_bugs Chris Nighswonger (1): Fixing up a regexp to stop a trivial warn misc/migration_tools/bulkmarcimport.pl | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) From cnighswonger at foundations.edu Thu Nov 4 19:45:17 2010 From: cnighswonger at foundations.edu (Chris Nighswonger) Date: Thu, 4 Nov 2010 14:45:17 -0400 Subject: [Koha-patches] Pull Request Message-ID: The following changes since commit 414b2ace4fa5804d27e927b9b573dcb973761c87: Chris Cormack (1): Merge remote branch 'kc/new/signoffs' into kcmaster are available in the git repository at: git://git.koha-community.org/wip/koha-fbc.git k_bug_5366 Chris Nighswonger (1): Bug 5366 - Standing enh req for code changes enabling database agnosticism C4/Biblio.pm | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) From cnighswonger at foundations.edu Thu Nov 4 21:28:49 2010 From: cnighswonger at foundations.edu (Chris Nighswonger) Date: Thu, 4 Nov 2010 16:28:49 -0400 Subject: [Koha-patches] [Bug 5366] Pull Request Message-ID: The following changes since commit 414b2ace4fa5804d27e927b9b573dcb973761c87: Chris Cormack (1): Merge remote branch 'kc/new/signoffs' into kcmaster are available in the git repository at: git://git.koha-community.org/wip/koha-fbc.git k_bug_5366 Chris Nighswonger (2): [1/2] Bug 5366 - Standing enh req for code changes enabling database agnosticism [2/2] Bug 5366 - Standing enh req for code changes enabling database agnosticism C4/Biblio.pm | 7 ++++--- C4/ImportBatch.pm | 12 ++++-------- tools/stage-marc-import.pl | 9 ++++++++- 3 files changed, 16 insertions(+), 12 deletions(-) From f.demians at tamil.fr Fri Nov 5 12:23:08 2010 From: f.demians at tamil.fr (=?utf-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 5 Nov 2010 12:23:08 +0100 Subject: [Koha-patches] [PATCH] Bug 5368 Browse Shelf link appears when no itemcallnumber Message-ID: <1288956188-7901-1-git-send-email-f.demians@tamil.fr> Suppress Browse Shelf link on OPAC detail page when there is no item call number. [3.2] Should also apply on 3.2 --- .../opac-tmpl/prog/en/modules/opac-detail.tmpl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl index b1fdf84..1e5e2b7 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -398,7 +398,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { " title="" alt="" /> "> - (&shelfbrowse_itemnumber=#shelfbrowser">Browse Shelf) + (&shelfbrowse_itemnumber=#shelfbrowser">Browse Shelf) "> -- 1.5.6.5 From gmcharlt at gmail.com Fri Nov 5 14:13:21 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 5 Nov 2010 09:13:21 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] (MT 2985) simplify CanBookBeReserved Message-ID: <1288962801-27121-1-git-send-email-gmcharlt@gmail.com> From: Nahuel ANGELINETTI The function was too complex for so simple stuff, not we check if one of all items of the record can be issued. [Note by Galen Charlton: not only does this patch simplify the routine, it also makes it behave correctly.] Signed-off-by: Galen Charlton --- C4/Reserves.pm | 73 +++---------------------------------------------------- 1 files changed, 4 insertions(+), 69 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 9b7014e..fcf9209 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -380,76 +380,11 @@ sub GetReservesFromBorrowernumber { sub CanBookBeReserved{ my ($borrowernumber, $biblionumber) = @_; - my $dbh = C4::Context->dbh; - my $biblio = GetBiblioData($biblionumber); - my $borrower = C4::Members::GetMember(borrowernumber=>$borrowernumber); - my $controlbranch = C4::Context->preference('ReservesControlBranch'); - my $itype = C4::Context->preference('item-level_itypes'); - my $reservesrights= 0; - my $reservescount = 0; - - # we retrieve the user rights - my @args; - my $rightsquery = "SELECT categorycode, itemtype, branchcode, reservesallowed - FROM issuingrules - WHERE categorycode IN (?, '*')"; - push @args,$borrower->{categorycode}; - - if($controlbranch eq "ItemHomeLibrary"){ - $rightsquery .= " AND branchcode = '*'"; - }elsif($controlbranch eq "PatronLibrary"){ - $rightsquery .= " AND branchcode IN (?,'*')"; - push @args, $borrower->{branchcode}; - } - - if(not $itype){ - $rightsquery .= " AND itemtype IN (?,'*')"; - push @args, $biblio->{itemtype}; - }else{ - $rightsquery .= " AND itemtype = '*'"; - } - - $rightsquery .= " ORDER BY categorycode DESC, itemtype DESC, branchcode DESC"; - my $sthrights = $dbh->prepare($rightsquery); - $sthrights->execute(@args); - - if(my $row = $sthrights->fetchrow_hashref()){ - $reservesrights = $row->{reservesallowed}; - } - - @args = (); - # we count how many reserves the borrower have - my $countquery = "SELECT count(*) as count - FROM reserves - LEFT JOIN items USING (itemnumber) - LEFT JOIN biblioitems ON (reserves.biblionumber=biblioitems.biblionumber) - LEFT JOIN borrowers USING (borrowernumber) - WHERE borrowernumber = ? - "; - push @args, $borrowernumber; - - if(not $itype){ - $countquery .= "AND itemtype = ?"; - push @args, $biblio->{itemtype}; + my @items = GetItemsInfo($biblionumber); + foreach my $item (@items){ + return 1 if CanItemBeReserved($borrowernumber, $item->{itemnumber}); } - - if($controlbranch eq "PatronLibrary"){ - $countquery .= " AND borrowers.branchcode = ? "; - push @args, $borrower->{branchcode}; - } - - my $sthcount = $dbh->prepare($countquery); - $sthcount->execute(@args); - - if(my $row = $sthcount->fetchrow_hashref()){ - $reservescount = $row->{count}; - } - if($reservescount < $reservesrights){ - return 1; - }else{ - return 0; - } - + return 0; } =head2 CanItemBeReserved -- 1.7.0 From savitra.sirohi at osslabs.biz Fri Nov 5 14:25:53 2010 From: savitra.sirohi at osslabs.biz (savitra.sirohi at osslabs.biz) Date: Fri, 5 Nov 2010 18:55:53 +0530 Subject: [Koha-patches] [PATCH] Analytical records - some code cleanup Message-ID: <1288963553-30622-1-git-send-email-savitra.sirohi@osslabs.biz> From: Amit Gupta --- cataloguing/addbiblio.pl | 29 +++++++++++++++++------------ 1 files changed, 17 insertions(+), 12 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index a306dd3..4e56fad 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -346,6 +346,8 @@ sub create_input { ); # always expand all subfields of a mandatory field $subfield_data{visibility} = "" if $tagslib->{$tag}->{mandatory}; + # expand all subfields of 773 if there is a host item provided in the input + $subfield_data{visibility} ="" if ($tag eq 773 and $cgi->param('hostitemnumber')); # it's an authorised field if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) { $subfield_data{marc_value} = @@ -677,6 +679,14 @@ sub build_tabs ($$$$$) { # if breeding is empty } else { + my $hostbiblionumber; + my $hostitemnumber; + my $hostrecord; + if ($tag eq 773){ + $hostbiblionumber = $input->param('hostbiblionumber'); + $hostitemnumber = $input->param('hostitemnumber'); + $hostrecord = &GetMarcBiblio($hostbiblionumber); + } my @subfields_data; foreach my $subfield ( sort( keys %{ $tagslib->{$tag} } ) ) { next if ( length $subfield != 1 ); @@ -693,12 +703,7 @@ sub build_tabs ($$$$$) { # always include in the form regardless of the hidden setting - bug 2206 next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop ); - - # populating host record details for analytical records - my $hostbiblionumber = $input->param('hostbiblionumber'); - my $hostitemnumber = $input->param('hostitemnumber'); if ( $tag eq 773 and $hostbiblionumber){ - my $hostrecord = &GetMarcBiblio($hostbiblionumber); if ($subfield eq "w"){ push( @subfields_data, @@ -706,34 +711,34 @@ sub build_tabs ($$$$$) { $tag, $subfield,$hostbiblionumber, $index_tag, $tabloop, $record, $authorised_values_sth,$input )); + next; } - elsif ($subfield eq "a"){ + if ($subfield eq "a"){ push( @subfields_data, &create_input( $tag, $subfield,$hostrecord->subfield('245',"a"), $index_tag, $tabloop, $record, $authorised_values_sth,$input )); + next; } - elsif ($subfield eq "o"){ + if ($subfield eq "o"){ push( @subfields_data, &create_input( $tag, $subfield,$hostitemnumber, $index_tag, $tabloop, $record, $authorised_values_sth,$input )); + next; } - - } - else { - push( + } + push( @subfields_data, &create_input( $tag, $subfield, '', $index_tag, $tabloop, $record, $authorised_values_sth,$input ) ); - } } if ( $#subfields_data >= 0 ) { my %tag_data = ( -- 1.5.4.5 From savitra.sirohi at osslabs.biz Fri Nov 5 14:26:43 2010 From: savitra.sirohi at osslabs.biz (savitra.sirohi at osslabs.biz) Date: Fri, 5 Nov 2010 18:56:43 +0530 Subject: [Koha-patches] [PATCH] Analytical records - support for holds from the OPAC Message-ID: <1288963603-30665-1-git-send-email-savitra.sirohi@osslabs.biz> From: Amit Gupta Signed-off-by: Amit Gupta --- .../opac-tmpl/prog/en/modules/opac-reserve.tmpl | 10 ++++++++++ opac/opac-reserve.pl | 19 ++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl index 812c91b..59c9a2f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl @@ -457,6 +457,9 @@ Vol Info Information + + Host Record + @@ -499,15 +502,22 @@ Not for loan () + + You have already requested this item. + WaitingOn hold for patron atexpected at since . + Not on hold   + + " >Host Record + diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index bcd47a7..01cd576 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -195,6 +195,12 @@ if ( $query->param('place_reserve') ) { $branch = $borr->{'branchcode'}; } + #item may belong to a host biblio, if yes change biblioNum to hosts bilbionumber + my $hostbiblioNum = GetBiblionumberFromItemnumber($itemNum); + if ($hostbiblioNum ne $biblioNum) { + $biblioNum = $hostbiblioNum; + } + my $biblioData = $biblioDataHash{$biblioNum}; my $found; @@ -390,6 +396,11 @@ foreach my $biblioNum (@biblionumbers) { my ($reservedate,$reservedfor,$expectedAt) = GetReservesFromItemnumber($itemNum); my $ItemBorrowerReserveInfo = GetMemberDetails( $reservedfor, 0); + # the item could be reserved for this borrower vi a host record, flag this + if ($reservedfor eq $borrowernumber){ + $itemLoopIter->{already_reserved} = 1; + } + if ( defined $reservedate ) { $itemLoopIter->{backgroundcolor} = 'reserved'; $itemLoopIter->{reservedate} = format_date($reservedate); @@ -431,6 +442,12 @@ foreach my $biblioNum (@biblionumbers) { $itemLoopIter->{nocancel} = 1; } + # if the items belongs to a host record, show link to host record + if ($itemInfo->{biblionumber} ne $biblioNum){ + $biblioLoopIter{hostitemsflag} = 1; + $itemLoopIter->{hostbiblionumber} = $itemInfo->{biblionumber}; + } + # If there is no loan, return and transfer, we show a checkbox. $itemLoopIter->{notforloan} = $itemLoopIter->{notforloan} || 0; @@ -444,7 +461,7 @@ foreach my $biblioNum (@biblionumbers) { $policy_holdallowed = 0; } - if (IsAvailableForItemLevelRequest($itemNum) and $policy_holdallowed and CanItemBeReserved($borrowernumber,$itemNum)) { + if (IsAvailableForItemLevelRequest($itemNum) and $policy_holdallowed and CanItemBeReserved($borrowernumber,$itemNum) and ($itemLoopIter->{already_reserved} ne 1)) { $itemLoopIter->{available} = 1; $numCopiesAvailable++; } -- 1.5.4.5 From savitra.sirohi at osslabs.biz Fri Nov 5 14:27:08 2010 From: savitra.sirohi at osslabs.biz (savitra.sirohi at osslabs.biz) Date: Fri, 5 Nov 2010 18:57:08 +0530 Subject: [Koha-patches] [PATCH] Analytical records - minor correction to sub GetMarcHosts Message-ID: <1288963628-30698-1-git-send-email-savitra.sirohi@osslabs.biz> From: Amit Gupta --- C4/Biblio.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index bdeb74a..eb0b248 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1585,8 +1585,8 @@ sub GetMarcHosts { my @fields_loop; - my $hostbiblionumber = $field->subfield("$title_subf"); - my $hosttitle = $field->subfield($bibnumber_subf); + my $hostbiblionumber = $field->subfield("$bibnumber_subf"); + my $hosttitle = $field->subfield($title_subf); my $hostitemnumber=$field->subfield($itemnumber_subf); push @fields_loop, { hostbiblionumber => $hostbiblionumber, hosttitle => $hosttitle, hostitemnumber => $hostitemnumber}; push @marchosts, { MARCHOSTS_FIELDS_LOOP => \@fields_loop }; -- 1.5.4.5 From cfouts at ptfs.com Fri Nov 5 20:51:43 2010 From: cfouts at ptfs.com (cfouts at ptfs.com) Date: Fri, 5 Nov 2010 19:51:43 +0000 Subject: [Koha-patches] [PATCH] Refactor GetIssuingRule and GetLoanLength Message-ID: <1288986703-18128-1-git-send-email-cfouts@ptfs.com> From: Clay Fouts This refactors GetIssuingRule and GetLoanLength to make only a single DB query, caching the result. This dramatically improves XSLT processing of search results if the search returns bibs with large numbers of items. --- C4/Circulation.pm | 141 ++++++++++++++++------------------------------------- 1 files changed, 43 insertions(+), 98 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 10c3c11..d0b9720 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1071,121 +1071,66 @@ sub AddIssue { return ($datedue); # not necessarily the same as when it came in! } -=head2 GetLoanLength +=head2 GetIssuingRule - my $loanlength = &GetLoanLength($borrowertype,$itemtype,branchcode) +Get the issuing rule for an itemtype, a borrower type and a branch +Returns a hashref from the issuingrules table. -Get loan length for an itemtype, a borrower type and a branch +my $irule = &GetIssuingRule($categorycode, $itemtype, $branchcode) =cut -sub GetLoanLength { - my ( $borrowertype, $itemtype, $branchcode ) = @_; - my $dbh = C4::Context->dbh; - my $sth = - $dbh->prepare( -"select issuelength from issuingrules where categorycode=? and itemtype=? and branchcode=? and issuelength is not null" - ); -# warn "in get loan lenght $borrowertype $itemtype $branchcode "; -# try to find issuelength & return the 1st available. -# check with borrowertype, itemtype and branchcode, then without one of those parameters - $sth->execute( $borrowertype, $itemtype, $branchcode ); - my $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( $borrowertype, "*", $branchcode ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( "*", $itemtype, $branchcode ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( "*", "*", $branchcode ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( $borrowertype, $itemtype, "*" ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( $borrowertype, "*", "*" ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( "*", $itemtype, "*" ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( "*", "*", "*" ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - # if no rule is set => 21 days (hardcoded) - return 21; -} - -=head2 GetIssuingRule +our $irule_cache = undef; - my $irule = &GetIssuingRule($borrowertype,$itemtype,branchcode) +sub _populate_irule_cache() { + my ($categorycode, $itemtype, $branchcode) = @_; -FIXME - This is a copy-paste of GetLoanLength -as a stop-gap. Do not wish to change API for GetLoanLength -this close to release, however, Overdues::GetIssuingRules is broken. + $irule_cache = C4::Context->dbh->selectall_hashref( + 'SELECT * FROM issuingrules WHERE issuelength IS NOT NULL', + ['categorycode', 'itemtype', 'branchcode']) or + die sprintf "Cannot get issuingrules: %s\n", $!; -Get the issuing rule for an itemtype, a borrower type and a branch -Returns a hashref from the issuingrules table. - -=cut - -sub GetIssuingRule { - my ( $borrowertype, $itemtype, $branchcode ) = @_; - my $dbh = C4::Context->dbh; - my $sth = $dbh->prepare( "select * from issuingrules where categorycode=? and itemtype=? and branchcode=? and issuelength is not null" ); - my $irule; + return $irule_cache; +} - $sth->execute( $borrowertype, $itemtype, $branchcode ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; +sub _clear_irule_cache { + return $irule_cache = undef; +} - $sth->execute( $borrowertype, "*", $branchcode ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; +sub GetIssuingRule($$$) { + my ($categorycode, $itemtype, $branchcode) = @_; + die unless $categorycode and $itemtype and $branchcode; + + $irule_cache //= _populate_irule_cache(); + my $irule = $irule_cache->{$categorycode}{$itemtype}{$branchcode} // + $irule_cache->{$categorycode}{'*'}{$branchcode} // + $irule_cache->{'*'}{$itemtype}{$branchcode} // + $irule_cache->{'*'}{'*'}{$branchcode} // + $irule_cache->{$categorycode}{$itemtype}{'*'} // + $irule_cache->{$categorycode}{'*'}{'*'} // + $irule_cache->{'*'}{$itemtype}{'*'} // + $irule_cache->{'*'}{'*'}{'*'} // + undef; + + return $irule; +} - $sth->execute( "*", $itemtype, $branchcode ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; +=head2 GetLoanLength - $sth->execute( "*", "*", $branchcode ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; +Get loan length for an itemtype, a borrower type and a branch - $sth->execute( $borrowertype, $itemtype, "*" ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; +my $loanlength = &GetLoanLength($categorycode, $itemtype, $branchcode) - $sth->execute( $borrowertype, "*", "*" ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; +=cut - $sth->execute( "*", $itemtype, "*" ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; +sub GetLoanLength($$$) { + my ($categorycode, $itemtype, $branchcode) = @_; + my $loanlength = 21; - $sth->execute( "*", "*", "*" ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; + my $irule = GetIssuingRule($categorycode, $itemtype, $branchcode); + $loanlength = $irule->{issuelength} if defined $irule; - # if no rule matches, - return undef; + return $loanlength; } =head2 GetBranchBorrowerCircRule -- 1.5.6.5 From chris.nighswonger at gmail.com Sat Nov 6 05:12:46 2010 From: chris.nighswonger at gmail.com (Chris Nighswonger) Date: Sat, 6 Nov 2010 00:12:46 -0400 Subject: [Koha-patches] [PATCH] Adding 3.2 Release Maintainer to Release Team List Message-ID: <1289016766-31367-1-git-send-email-chris.nighswonger@gmail.com> --- koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl index 64d5a67..bef9e20 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl @@ -106,6 +106,7 @@
    7. Rachel Hamilton-Williams (Kaitiaki from 2004 to present)
    8. Henri-Damien Laurent (Koha 3.0 Release Maintainer)
    9. Owen Leonard (Koha 3.x Interface Design)
    10. +
    11. Chris Nighswonger (Koha 3.2 Release Maintainer)
    12. Paul Poulain (Koha 2.0 Release Manager, Koha 2.2 Release Manager/Maintainer)
    13. MJ Ray (Koha 2.0 Release Maintainer)
    14. -- 1.7.0 From lrea at nekls.org Sat Nov 6 07:56:01 2010 From: lrea at nekls.org (Liz Rea) Date: Sat, 6 Nov 2010 01:56:01 -0500 Subject: [Koha-patches] [PATCH] [Signed Off] Adding 3.2 Release Maintainer to Release Team List Message-ID: <1289026561-10657-1-git-send-email-lrea@nekls.org> From: Chris Nighswonger Signed-off-by: Liz Rea --- koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl index 64d5a67..bef9e20 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl @@ -106,6 +106,7 @@
    15. Rachel Hamilton-Williams (Kaitiaki from 2004 to present)
    16. Henri-Damien Laurent (Koha 3.0 Release Maintainer)
    17. Owen Leonard (Koha 3.x Interface Design)
    18. +
    19. Chris Nighswonger (Koha 3.2 Release Maintainer)
    20. Paul Poulain (Koha 2.0 Release Manager, Koha 2.2 Release Manager/Maintainer)
    21. MJ Ray (Koha 2.0 Release Maintainer)
    22. -- 1.5.6.5 From Katrin.Fischer.83 at web.de Sun Nov 7 07:39:34 2010 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sun, 7 Nov 2010 07:39:34 +0100 (CET) Subject: [Koha-patches] Pull request for bug 5370 Message-ID: <171020753.7037828.1289111974641.JavaMail.fmail@mwmweb073> An HTML attachment was scrubbed... URL: From Katrin.Fischer.83 at web.de Sun Nov 7 08:42:49 2010 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sun, 7 Nov 2010 08:42:49 +0100 Subject: [Koha-patches] [PATCH 2/2] Bug 5370: Fix all references to koha.org Message-ID: <1289115769-28261-1-git-send-email-Katrin.Fischer.83@web.de> --- C4/XSLT.pm | 2 +- .../authorities/authority-koha-indexdefs.xml | 2 +- .../authorities/authority-zebra-indexdefs.xsl | 2 +- .../marc21/authorities/koha-indexdefs-to-zebra.xsl | 2 +- .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 2 +- .../prog/en/xslt/UNIMARCslim2intranetDetail.xsl | 2 +- .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 2 +- .../prog/en/xslt/MARC21slim2OPACResults.xsl | 2 +- .../prog/en/xslt/UNIMARCslim2OPACDetail.xsl | 2 +- .../prog/en/xslt/UNIMARCslim2OPACResults.xsl | 2 +- misc/cronjobs/rss/README | 6 +++--- misc/cronjobs/rss/lastAcquired-1.0.conf | 6 +++--- misc/cronjobs/rss/lastAcquired-2.0.conf | 6 +++--- misc/cronjobs/rss/lastAcquired.conf | 6 +++--- misc/cronjobs/rss/longestUnseen.conf | 6 +++--- misc/cronjobs/rss/mostReserved.conf | 6 +++--- 16 files changed, 28 insertions(+), 28 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index ddc9077..7844330 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -218,7 +218,7 @@ sub buildKohaItemsNamespace { . ""; } - $xml = "".$xml.""; + $xml = "".$xml.""; return $xml; } diff --git a/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml b/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml index 52bf15d..8b56ad0 100644 --- a/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml +++ b/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml @@ -1,5 +1,5 @@ - + v x diff --git a/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl index 4cecf9c..c05b711 100644 --- a/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl +++ b/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl @@ -1,5 +1,5 @@ - + diff --git a/etc/zebradb/marc_defs/marc21/authorities/koha-indexdefs-to-zebra.xsl b/etc/zebradb/marc_defs/marc21/authorities/koha-indexdefs-to-zebra.xsl index 198b0c3..57c6321 100644 --- a/etc/zebradb/marc_defs/marc21/authorities/koha-indexdefs-to-zebra.xsl +++ b/etc/zebradb/marc_defs/marc21/authorities/koha-indexdefs-to-zebra.xsl @@ -4,7 +4,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslo="http://www.w3.org/1999/XSL/TransformAlias" xmlns:z="http://indexdata.com/zebra-2.0" - xmlns:kohaidx="http://www.koha.org/schemas/index-defs"> + xmlns:kohaidx="http://www.koha-community.org/schemas/index-defs"> diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index f4bc51f..9de39cf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -2,7 +2,7 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl index 55cd370..38c6124 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl @@ -4,7 +4,7 @@ diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl index e31dbe7..0682ae0 100755 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -2,7 +2,7 @@ diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl index 372d31c..a8121c1 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl @@ -2,7 +2,7 @@ diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl index 69e5cf6..2ef828f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl @@ -4,7 +4,7 @@ diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl index 1290e94..66c41c0 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl @@ -4,7 +4,7 @@ diff --git a/misc/cronjobs/rss/README b/misc/cronjobs/rss/README index adeeda3..896a1d9 100644 --- a/misc/cronjobs/rss/README +++ b/misc/cronjobs/rss/README @@ -42,14 +42,14 @@ Here's the lastAquired.conf by way of example: channel title=Recent Koha Acquisitions -link=http://www.koha.org +link=http://www.koha-community.org desc=The 15 most recent acquisitions lang=en lastBuild=Fri, 09 May 2003 08:00:00 image title=Koha, the worlds best Open Source Library System -url=http://www.koha.org/images/foo.jpg -link=http://www.koha.org +url=http://www.koha-community.org/images/foo.jpg +link=http://www.koha-community.org config tmpl=lastAcquired.tmpl output=lastAcquired.xml diff --git a/misc/cronjobs/rss/lastAcquired-1.0.conf b/misc/cronjobs/rss/lastAcquired-1.0.conf index 44036d8..d70cf71 100644 --- a/misc/cronjobs/rss/lastAcquired-1.0.conf +++ b/misc/cronjobs/rss/lastAcquired-1.0.conf @@ -1,12 +1,12 @@ channel title=Recent Acquisitions -link=http://www.koha.org +link=http://www.koha-community.org desc=The library's 15 most recent acquisitions lang=en image title=Koha, the worlds best Open Source Library System -url=http://www.koha.org/images/foo.jpg -link=http://www.koha.org +url=http://www.koha-community.org/images/foo.jpg +link=http://www.koha-community.org description=Koha, the worlds best Open Source Library System config tmpl=lastAcquired-1.0.tmpl diff --git a/misc/cronjobs/rss/lastAcquired-2.0.conf b/misc/cronjobs/rss/lastAcquired-2.0.conf index 5e6a1b5..0a03937 100644 --- a/misc/cronjobs/rss/lastAcquired-2.0.conf +++ b/misc/cronjobs/rss/lastAcquired-2.0.conf @@ -1,12 +1,12 @@ channel title=Recent Acquisitions -link=http://www.koha.org +link=http://www.koha-community.org desc=The library's 15 most recent acquisitions lang=en image title=Koha, the worlds best Open Source Library System -url=http://www.koha.org/images/foo.jpg -link=http://www.koha.org +url=http://www.koha-community.org/images/foo.jpg +link=http://www.koha-community.org description=Koha, the worlds best Open Source Library System width=88 height=31 diff --git a/misc/cronjobs/rss/lastAcquired.conf b/misc/cronjobs/rss/lastAcquired.conf index 4ae696a..1147d94 100644 --- a/misc/cronjobs/rss/lastAcquired.conf +++ b/misc/cronjobs/rss/lastAcquired.conf @@ -1,13 +1,13 @@ channel title=Recent Koha Acquisitions -link=http://www.koha.org +link=http://www.koha-community.org desc=The 15 most recent acquisitions lang=en lastBuild=Fri, 09 May 2003 08:00:00 image title=Koha, the world's best Open Source Library System -url=http://www.koha.org/images/foo.jpg -link=http://www.koha.org +url=http://www.koha-community.org/images/foo.jpg +link=http://www.koha-community.org config tmpl=lastAcquired.tmpl output=lastAcquired.xml diff --git a/misc/cronjobs/rss/longestUnseen.conf b/misc/cronjobs/rss/longestUnseen.conf index 91d7186..7c0218c 100644 --- a/misc/cronjobs/rss/longestUnseen.conf +++ b/misc/cronjobs/rss/longestUnseen.conf @@ -1,12 +1,12 @@ channel title=Longest Unseen Koha Items -link=http://www.koha.org +link=http://www.koha-community.org desc=The 15 least recently seen items lang=en image title=Koha, the worlds best Open Source Library System -url=http://www.koha.org/images/foo.jpg -link=http://www.koha.org +url=http://www.koha-community.org/images/foo.jpg +link=http://www.koha-community.org config tmpl=longestUnseen.tmpl output=longestUnseen.xml diff --git a/misc/cronjobs/rss/mostReserved.conf b/misc/cronjobs/rss/mostReserved.conf index 437b660..f6c44ad 100644 --- a/misc/cronjobs/rss/mostReserved.conf +++ b/misc/cronjobs/rss/mostReserved.conf @@ -1,12 +1,12 @@ channel title=Most Reserved Items -link=http://www.koha.org +link=http://www.koha-community.org desc=The 15 most reserved items lang=en image title=Koha, the worlds best Open Source Library System -url=http://www.koha.org/images/foo.jpg -link=http://www.koha.org +url=http://www.koha-community.org/images/foo.jpg +link=http://www.koha-community.org config tmpl=mostReserved.tmpl output=mostReserved.xml -- 1.7.1 From Katrin.Fischer.83 at web.de Sun Nov 7 11:59:00 2010 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sun, 7 Nov 2010 11:59:00 +0100 Subject: [Koha-patches] [PATCH 3/3] Bug 5370: Fix all the references to koha.org Message-ID: <1289127540-1823-1-git-send-email-Katrin.Fischer.83@web.de> --- Makefile.PL | 1 - install-CPAN.pl | 1 - .../README.fr.install_koha_on_fresh_debian | 4 ++-- install_misc/install_koha_on_fresh_debian | 8 ++++---- installer/data/mysql/backfill_statistics.pl | 2 +- installer/data/mysql/update22to30.pl | 2 +- rewrite-config.PL | 1 - 7 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 6c96460..5021f6c 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -16,7 +16,6 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Current maintainer MJR http://mjr.towers.org.uk/ -# See http://www.koha.org/wiki/?page=KohaInstaller # use strict; diff --git a/install-CPAN.pl b/install-CPAN.pl index 4c79ecb..7b775fe 100644 --- a/install-CPAN.pl +++ b/install-CPAN.pl @@ -23,7 +23,6 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Current maintainer MJR http://mjr.towers.org.uk/ -# See http://www.koha.org/wiki/?page=KohaInstaller # Create a fake CPAN location for koha use CPAN; diff --git a/install_misc/README.fr.install_koha_on_fresh_debian b/install_misc/README.fr.install_koha_on_fresh_debian index 7815b68..3fb999b 100644 --- a/install_misc/README.fr.install_koha_on_fresh_debian +++ b/install_misc/README.fr.install_koha_on_fresh_debian @@ -52,7 +52,7 @@ Le script n?cessite les droits root. lancer l'installation: les modificateurs sont: -b: installer koha grace au tarball du site koha.org +b: installer koha grace au tarball du site koha-community.org c: ne pas configurer le systeme de paquet debian ils sont regroup?s (sans espace), ainsi @@ -70,7 +70,7 @@ conseillons de conserver ce param?tre et de selectionner [dev] comme type d'installation lorsque cela vous sera demand?. Ce choix vous permet de mettre koha ? jour par un simple git pull. -Si vous pr?f?rez utiliser le tarball disponible sur le site de koha.org, +Si vous pr?f?rez utiliser le tarball disponible sur le site de koha-community.org, utilisez le modificateur b: sh install_koha_on_fresh_debian b diff --git a/install_misc/install_koha_on_fresh_debian b/install_misc/install_koha_on_fresh_debian index f20127b..6ff1e14 100644 --- a/install_misc/install_koha_on_fresh_debian +++ b/install_misc/install_koha_on_fresh_debian @@ -2,7 +2,7 @@ # Licensed under the GPL # Copyright 2008 Biblibre.com -# Koha library project www.koha.org +# Koha library project www.koha-community.org # # this script follow all the installtion procedure described in INSTALL.Debian # with some additions to use lenny packages. @@ -270,11 +270,11 @@ get_koha_git_clone () { dpkg -l git-core || aptitude -y install git-core git-email - git clone git://git.koha.org/pub/scm/koha.git "$base" + git clone git://git.koha-community.org/koha.git "$base" } get_koha_release () { - wget -O- http://download.koha.org/koha-3.00.00.tar.gz | + wget -O- http://download.koha-community.org/koha-3.00.00.tar.gz | tar xzf - } @@ -292,7 +292,7 @@ get_koha_beta () { local i basename; i=2 while [ $i != 11 ]; do basename=koha-3.00.00-beta$i - wget -O- http://download.koha.org/$basename.tar.gz | + wget -O- http://download.koha-community.org/$basename.tar.gz | tar xzf - && mv $basename "$base" && return 0 diff --git a/installer/data/mysql/backfill_statistics.pl b/installer/data/mysql/backfill_statistics.pl index 2820dea..361f544 100755 --- a/installer/data/mysql/backfill_statistics.pl +++ b/installer/data/mysql/backfill_statistics.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -# Part of the Koha Library Software www.koha.org +# Part of the Koha Library Software www.koha-community.org # Licensed under the GPL. use strict; diff --git a/installer/data/mysql/update22to30.pl b/installer/data/mysql/update22to30.pl index c12c5bb..6d5b1cc 100755 --- a/installer/data/mysql/update22to30.pl +++ b/installer/data/mysql/update22to30.pl @@ -4,7 +4,7 @@ # Database Updater # This script checks for required updates to the database. -# Part of the Koha Library Software www.koha.org +# Part of the Koha Library Software www.koha-community.org # Licensed under the GPL. # Bugs/ToDo: diff --git a/rewrite-config.PL b/rewrite-config.PL index c1c84c0..7817f91 100644 --- a/rewrite-config.PL +++ b/rewrite-config.PL @@ -16,7 +16,6 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Current maintainer MJR http://mjr.towers.org.uk/ -# See http://www.koha.org/wiki/?page=KohaInstaller # # 2007/11/12 Added DB_PORT and changed other keywords to reflect multi-dbms support. -fbcit -- 1.7.1 From f.demians at tamil.fr Sun Nov 7 13:26:14 2010 From: f.demians at tamil.fr (=?utf-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Sun, 7 Nov 2010 13:26:14 +0100 Subject: [Koha-patches] [PATCH] Bug 5372 Existing value can be replace by default value Message-ID: <1289132774-22277-1-git-send-email-f.demians@tamil.fr> The way an existing value was tested was wrong. 0 is a valid value but a false value for Perl. [3.2] Should also apply. --- cataloguing/addbiblio.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 2cd6e73..de30aaa 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -299,7 +299,7 @@ sub create_input { } # if there is no value provided but a default value in parameters, get it - unless ($value) { + unless (defined $value) { $value = $tagslib->{$tag}->{$subfield}->{defaultvalue}; # get today date & replace YYYY, MM, DD if provided in the default value -- 1.5.6.5 From f.demians at tamil.fr Sun Nov 7 14:33:36 2010 From: f.demians at tamil.fr (=?utf-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Sun, 7 Nov 2010 14:33:36 +0100 Subject: [Koha-patches] [PATCH] Bug 5372 (v2) Existing value can be replace by default value Message-ID: <1289136816-25443-1-git-send-email-f.demians@tamil.fr> The way an existing value was tested was wrong. 0 is a valid value but a false value for Perl. => replace privious proposal. [3.2] Should also apply. --- cataloguing/addbiblio.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 2cd6e73..85c0566 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -299,7 +299,7 @@ sub create_input { } # if there is no value provided but a default value in parameters, get it - unless ($value) { + if ( $value eq '' ) { $value = $tagslib->{$tag}->{$subfield}->{defaultvalue}; # get today date & replace YYYY, MM, DD if provided in the default value -- 1.5.6.5 From f.demians at tamil.fr Mon Nov 8 09:38:49 2010 From: f.demians at tamil.fr (=?utf-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Mon, 8 Nov 2010 09:38:49 +0100 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 4440: Revised combined patch to print fee receipts and invoices Message-ID: <1289205529-15524-1-git-send-email-f.demians@tamil.fr> From: Koustubha Kale This patch adds a small enhancement to allow printing of Fees / Fines receipts from the Fines page. Patch adds print links to the Fines page next to Fines or Receipts transactions. Clicking on the link will pop a new window and will print that with total outstanding as on date. You can edit koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css to better control printing this type of material. 18-Oct-2010 -- Changed template and script names to match. Corrected invalid markup in the templates. 8-Nov-2010 -- Fr?d?ric Demians comments This patch apply and works as published. Styling may be improved: - The invoice recipient is labelled 'to: ' + recipient name. But the recipient name is on a new line after the 'to' line. - There are borders outside amounts table. Signed-off-by: Chris Cormack Signed-off-by: Fr?d?ric Demians --- .../prog/en/css/printreceiptinvoice.css | 353 ++++++++++++++++++++ .../prog/en/modules/members/boraccount.tmpl | 12 +- .../prog/en/modules/members/printfeercpt.tmpl | 59 ++++ .../prog/en/modules/members/printinvoice.tmpl | 59 ++++ members/printfeercpt.pl | 143 ++++++++ members/printinvoice.pl | 142 ++++++++ 6 files changed, 766 insertions(+), 2 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl create mode 100755 members/printfeercpt.pl create mode 100755 members/printinvoice.pl diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css b/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css new file mode 100644 index 0000000..d8a675f --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css @@ -0,0 +1,353 @@ +a:link { + color : #000066; + text-decoration: none; +} + +a:visited { + color : #000066; + text-decoration: none; +} + +a:hover { + color : #993300; + text-decoration: none; +} + +body { + background-color : #FFF; + color : #333333; + font-family : arial, geneva, sans-serif; + font-size : 14px; + margin : 0px 0px 0px 0px; +} + +caption { + color : #000066; + font-size : 18px; + font-weight : bold; + margin-top : 5px; + text-align : left; +} + +form { + margin : 0px; + padding : 0px; +} + +h1 + { + color : #000066; + font-size : 22px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h1#logo { + display: none; +} + +h2 { + color : #000066; + font-size : 20px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h3 { + color : #000066; + font-size : 18px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h4 { + color : #000066; + font-size : 16px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h5 { + color : #000066; + font-size : 15px; + font-weight : bold; + margin-bottom : 1px; + margin-top : 1px; +} + +h6 { + color : #000066; + font-size : 14px; + font-weight : bold; + margin-bottom : 1px; + margin-top : 1px; +} + +table { + background-color : #FFFFFF; + border-bottom : 1px solid #CCCCCC; + border-collapse : collapse; + border-left : 1px solid #CCCCCC; + margin : 3px 0px 5px 0px; + padding : 0px; + width : 99%; +} + +table.list { + background-color : #FFFFFF; + border : 0; + border-collapse : collapse; + margin : 3px 0px 5px 0px; + padding : 0px; + width : 99%; +} + +td { + background-color : #FFF; + border-bottom : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 12px; + padding : 5px 5px 5px 5px; +} + +td:last-child { + background-color : #FFF; + border-bottom : 1px solid #CCCCCC; + border-right : 0px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 12px; + padding : 5px 5px 5px 5px; +} + +table.list th { + background-color : #FFFFFF; + border-top : 0; + border-left : 0; + text-align: left; + font-size: 12px; + font-weight: bold; + padding: 5px; + width : 25%; +} + +th { + background-color : #E9E9E9; + border-bottom : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 14px; + font-weight : bold; + padding : 5px 5px 5px 5px; +} + +th:last-child { + background-color : #E9E9E9; + border-bottom : 1px solid #CCCCCC; + border-right : 0px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 14px; + font-weight : bold; + padding : 5px 5px 5px 5px; +} + +td.input, div.form td, div.details td { + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; + color : #000000; + line-height : 1.5em; + padding : 4px; + text-align : left; +} + +td.label, div.form th, div.details th { + background-color : #FFF; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 0px; + border-top : 0px; + color : #000088; + font-weight : bold; + line-height : 1.5em; + padding : 4px; + text-align : right; + vertical-align : top; +} + +tr.highlight { + background-color: #CCCCCC; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; +} + +.error { + font-weight: bold; +} + +.ex { + font-family : "Courier New", Courier, monospace; +} +.inline { + display : inline; +} + +tr.overdue { + font-weight : bold; +} + +tfoot { + font-weight : bold; +} + +tfoot td, tfoot td:last-child { + background-color : #EEEEEE; + border-right : 1px solid #666666; + border-bottom : 1px solid #666666; +} + +td.credit, td.debit, td.sum { + font-family : "Courier New", Courier, monospace; + text-align : right; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; +} + +td.debit { + color : #990000; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; +} + +#receipt { + background-color : #FFFFFF; + font-family : serif; + font-size : .9em; + margin : 0 0px 0px 0; + padding : 0px; + position : relative; +} + +#receipt a:link { + color : #000066; + text-decoration: none; +} + +#receipt a:visited { + color : #000066; + text-decoration: none; +} + +#receipt a:hover { + color : #993300; + text-decoration: none; +} + +#receipt caption { + color : #000000; + font-weight : bold; + margin-top : 5px; + text-align : left; +} + +#receipt div.table { + background-color : transparent; + font-weight: normal; +} + +#receipt h3, #receipt caption, #receipt h4 { + background-color : transparent; + color : #000000; + font-size : 1em; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +#receipt h2 { + background-color : transparent; + color : #000000; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +#receipt table { + background-color : transparent; + border : 0; + border-collapse : collapse; + width : auto; +} + +#receipt td, #receipt th { + background-color : transparent; + border : 0; + font-size : 1em; + font-weight : normal; + padding : 1px; + border-bottom : 1px solid #000000; + border-left : 1px solid #000000; + border-right : 1px solid #000000; + border-top : 1px solid #000000; + } + +#receipt th { + font-weight : bold; + text-align : left; + } + +#receipt th.centerednames { + font-weight : bold; + text-align: center; + color: red; + border-top : 0px; + border-bottom : 0px; +} + +div#breadcrumbs, +div#toplevelnav, +div#login, +div#header_search, +div#toolbar, +div#changelanguage, +div#menu, +div.yui-b, +.noprint, +form#sortbyform, +#cartDetails, +fieldset.action, +.list-actions, +.print { + display: none; +} + +div#yui-main div.yui-b { + display : block; +} + +.yui-t1 #yui-main div.yui-b, +.yui-t2 #yui-main div.yui-b, +.yui-t7 #yui-main div.yui-b { + margin-left : 0; +} +fieldset { + border : 0; +} +#cataloguing_additem_itemlist { + overflow : visible !important; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl index fce5a4d..ef59ad2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl @@ -35,6 +35,7 @@   + Print @@ -48,18 +49,25 @@ - &accountno=">Reverse + &accountno=">Reverse   + + + &accountno=">Print + + &accountno=">Print + + - Total due + Total due diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl new file mode 100644 index 0000000..a53278f --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl @@ -0,0 +1,59 @@ + +Print Receipt for <!-- TMPL_VAR NAME="cardnumber" --> + +/includes/favicon.ico" type="image/x-icon" /> +/css/printreceiptinvoice.css" /> + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +

      +
      +

      Fee Receipt

      +
      +

      +
      + Received with thanks from
      +
      DateDescription of chargesAmount
      Total outstanding dues as on date :
      +
      + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl new file mode 100644 index 0000000..3fc314e --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl @@ -0,0 +1,59 @@ + +Print Receipt for <!-- TMPL_VAR NAME="cardnumber" --> + +/includes/favicon.ico" type="image/x-icon" /> +/css/printreceiptinvoice.css" /> + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +

      +
      +

      INVOICE

      +
      +

      +
      + To,

      +
      DateDescription of chargesAmount
      Total outstanding dues as on date :
      +
      + diff --git a/members/printfeercpt.pl b/members/printfeercpt.pl new file mode 100755 index 0000000..59d5cb3 --- /dev/null +++ b/members/printfeercpt.pl @@ -0,0 +1,143 @@ +#!/usr/bin/perl + + +#writen 3rd May 2010 by kmkale at anantcorp.com adapted from boraccount.pl by chris at katipo.oc.nz +#script to print fee receipts + + +# Copyright Koustubha Kale +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use strict; +use warnings; + +use C4::Auth; +use C4::Output; +use C4::Dates qw/format_date/; +use CGI; +use C4::Members; +use C4::Branch; +use C4::Accounts; + +my $input=new CGI; + + +my ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "members/printfeercpt.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => {borrowers => 1, updatecharges => 1}, + debug => 1, + }); + +my $borrowernumber=$input->param('borrowernumber'); +my $action = $input->param('action') || ''; +my $accountno = $input->param('accountno'); + +#get borrower details +my $data=GetMember('borrowernumber' => $borrowernumber); + +if ( $action eq 'print' ) { +# ReversePayment( $borrowernumber, $input->param('accountno') ); +} + +if ( $data->{'category_type'} eq 'C') { + my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' ); + my $cnt = scalar(@$catcodes); + $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1; + $template->param( 'catcode' => $catcodes->[0]) if $cnt == 1; +} + +#get account details +my ($total,$accts,$numaccts)=GetMemberAccountRecords($borrowernumber); +my $totalcredit; +if($total <= 0){ + $totalcredit = 1; +} +my @accountrows; # this is for the tmpl-loop + +my $toggle; +for (my $i=0;$i<$numaccts;$i++){ + next if ($accts->[$i]{'accountno'} ne $accountno); + if($i%2){ + $toggle = 0; + } else { + $toggle = 1; + } + $accts->[$i]{'toggle'} = $toggle; + $accts->[$i]{'amount'}+=0.00; + if($accts->[$i]{'amount'} <= 0){ + $accts->[$i]{'amountcredit'} = 1; + $accts->[$i]{'amount'}*=-1.00; + } + $accts->[$i]{'amountoutstanding'}+=0.00; + if($accts->[$i]{'amountoutstanding'} <= 0){ + $accts->[$i]{'amountoutstandingcredit'} = 1; + } + my %row = ( 'date' => format_date($accts->[$i]{'date'}), + 'amountcredit' => $accts->[$i]{'amountcredit'}, + 'amountoutstandingcredit' => $accts->[$i]{'amountoutstandingcredit'}, + 'toggle' => $accts->[$i]{'toggle'}, + 'description' => $accts->[$i]{'description'}, + 'itemnumber' => $accts->[$i]{'itemnumber'}, + 'biblionumber' => $accts->[$i]{'biblionumber'}, + 'amount' => sprintf("%.2f",$accts->[$i]{'amount'}), + 'amountoutstanding' => sprintf("%.2f",$accts->[$i]{'amountoutstanding'}), + 'accountno' => $accts->[$i]{'accountno'}, + 'payment' => ( $accts->[$i]{'accounttype'} eq 'Pay' ), + + ); + + if ($accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU'){ + $row{'printtitle'}=1; + $row{'title'} = $accts->[$i]{'title'}; + } + + push(@accountrows, \%row); +} + +$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); + +my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); +$template->param( picture => 1 ) if $picture; + +$template->param( + finesview => 1, + firstname => $data->{'firstname'}, + surname => $data->{'surname'}, + borrowernumber => $borrowernumber, + cardnumber => $data->{'cardnumber'}, + categorycode => $data->{'categorycode'}, + category_type => $data->{'category_type'}, + # category_description => $data->{'description'}, + categoryname => $data->{'description'}, + address => $data->{'address'}, + address2 => $data->{'address2'}, + city => $data->{'city'}, + zipcode => $data->{'zipcode'}, + country => $data->{'country'}, + phone => $data->{'phone'}, + email => $data->{'email'}, + branchcode => $data->{'branchcode'}, + branchname => GetBranchName($data->{'branchcode'}), + total => sprintf("%.2f",$total), + totalcredit => $totalcredit, + is_child => ($data->{'category_type'} eq 'C'), + accounts => \@accountrows ); + +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/printinvoice.pl b/members/printinvoice.pl new file mode 100755 index 0000000..039132f --- /dev/null +++ b/members/printinvoice.pl @@ -0,0 +1,142 @@ +#!/usr/bin/perl + + +#writen 3rd May 2010 by kmkale at anantcorp.com adapted from boraccount.pl by chris at katipo.oc.nz +#script to print fee receipts + + +# Copyright Koustubha Kale +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use strict; +use warnings; + +use C4::Auth; +use C4::Output; +use C4::Dates qw/format_date/; +use CGI; +use C4::Members; +use C4::Branch; +use C4::Accounts; + +my $input=new CGI; + + +my ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "members/printinvoice.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => {borrowers => 1, updatecharges => 1}, + debug => 1, + }); + +my $borrowernumber=$input->param('borrowernumber'); +my $action = $input->param('action') || ''; +my $accountno = $input->param('accountno'); + +#get borrower details +my $data=GetMember('borrowernumber' => $borrowernumber); + +if ( $action eq 'print' ) { +# ReversePayment( $borrowernumber, $input->param('accountno') ); +} + +if ( $data->{'category_type'} eq 'C') { + my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' ); + my $cnt = scalar(@$catcodes); + $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1; + $template->param( 'catcode' => $catcodes->[0]) if $cnt == 1; +} + +#get account details +my ($total,$accts,$numaccts)=GetMemberAccountRecords($borrowernumber); +my $totalcredit; +if($total <= 0){ + $totalcredit = 1; +} +my @accountrows; # this is for the tmpl-loop + +my $toggle; +for (my $i=0;$i<$numaccts;$i++){ + next if ($accts->[$i]{'accountno'} ne $accountno); + if($i%2){ + $toggle = 0; + } else { + $toggle = 1; + } + $accts->[$i]{'toggle'} = $toggle; + $accts->[$i]{'amount'}+=0.00; + if($accts->[$i]{'amount'} <= 0){ + $accts->[$i]{'amountcredit'} = 1; + } + $accts->[$i]{'amountoutstanding'}+=0.00; + if($accts->[$i]{'amountoutstanding'} <= 0){ + $accts->[$i]{'amountoutstandingcredit'} = 1; + } + my %row = ( 'date' => format_date($accts->[$i]{'date'}), + 'amountcredit' => $accts->[$i]{'amountcredit'}, + 'amountoutstandingcredit' => $accts->[$i]{'amountoutstandingcredit'}, + 'toggle' => $accts->[$i]{'toggle'}, + 'description' => $accts->[$i]{'description'}, + 'itemnumber' => $accts->[$i]{'itemnumber'}, + 'biblionumber' => $accts->[$i]{'biblionumber'}, + 'amount' => sprintf("%.2f",$accts->[$i]{'amount'}), + 'amountoutstanding' => sprintf("%.2f",$accts->[$i]{'amountoutstanding'}), + 'accountno' => $accts->[$i]{'accountno'}, + 'payment' => ( $accts->[$i]{'accounttype'} eq 'Pay' ), + + ); + + if ($accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU'){ + $row{'printtitle'}=1; + $row{'title'} = $accts->[$i]{'title'}; + } + + push(@accountrows, \%row); +} + +$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); + +my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); +$template->param( picture => 1 ) if $picture; + +$template->param( + finesview => 1, + firstname => $data->{'firstname'}, + surname => $data->{'surname'}, + borrowernumber => $borrowernumber, + cardnumber => $data->{'cardnumber'}, + categorycode => $data->{'categorycode'}, + category_type => $data->{'category_type'}, + # category_description => $data->{'description'}, + categoryname => $data->{'description'}, + address => $data->{'address'}, + address2 => $data->{'address2'}, + city => $data->{'city'}, + zipcode => $data->{'zipcode'}, + country => $data->{'country'}, + phone => $data->{'phone'}, + email => $data->{'email'}, + branchcode => $data->{'branchcode'}, + branchname => GetBranchName($data->{'branchcode'}), + total => sprintf("%.2f",$total), + totalcredit => $totalcredit, + is_child => ($data->{'category_type'} eq 'C'), + accounts => \@accountrows ); + +output_html_with_http_headers $input, $cookie, $template->output; -- 1.5.6.5 From M.de.Rooy at rijksmuseum.nl Mon Nov 8 12:47:04 2010 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 8 Nov 2010 11:47:04 +0000 Subject: [Koha-patches] [PATCH] Bug 5374 (update transaction date when saving biblio) Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3119CD7E@S-MAIL-1B.rijksmuseum.intra> Currently, the plugin marc21_field_005 and its unimarc opponent fill field 005 when this field gets focus. This implies that updating a record without touching this field does not update 005. At the same time, a user could accidentally delete a character in the 005 when having focus. This mutilated field value will be saved however. I would suggest to add a few lines to ModBiblioMarc in Biblio.pm to ascertain that adding or updating a record always updates 005 in marc21 as well as unimarc. --- C4/Biblio.pm | 9 +++++++++ cataloguing/value_builder/marc21_field_005.pl | 25 ++++--------------------- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 81ccfbb..1b2098e 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -3217,6 +3217,15 @@ sub ModBiblioMarc { $record->insert_grouped_field( MARC::Field->new( 100, "", "", "a" => $string ) ); } } + + #enhancement 5374: update transaction date (005) for marc21/unimarc + if($encoding =~ /MARC21|UNIMARC/) { + my @a= (localtime) [5,4,3,2,1,0]; $a[0]+=1900; $a[1]++; + # YY MM DD HH MM SS (update year and month) + my $f005= $record->field('005'); + $f005->update(sprintf("%4d%02d%02d%02d%02d%04.1f", at a)); + } + my $oldRecord; if ( C4::Context->preference("NoZebra") ) { diff --git a/cataloguing/value_builder/marc21_field_005.pl b/cataloguing/value_builder/marc21_field_005.pl index 3c33145..23d5a4b 100755 --- a/cataloguing/value_builder/marc21_field_005.pl +++ b/cataloguing/value_builder/marc21_field_005.pl @@ -19,7 +19,7 @@ use strict; #use warnings; FIXME - Bug 2505 -use C4::Context; +#use C4::Context; =head1 @@ -51,26 +51,9 @@ sub plugin_javascript { my $function_name= $field_number; # find today's date - my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); - $year +=1900; - $mon +=1; - if (length($mon)==1) { - $mon = "0".$mon; - } - if (length($mday)==1) { - $mday = "0".$mday; - } - if (length($hour)==1) { - $hour = "0".$hour; - } - if (length($min)==1) { - $min = "0".$min; - } - if (length($sec)==1) { - $hour = "0".$sec; - } - - my $date = "$year$mon$mday$hour$min$sec".".0"; + my @a= (localtime) [5,4,3,2,1,0]; $a[0]+=1900; $a[1]++; + my $date = sprintf("%4d%02d%02d%02d%02d%04.1f", at a); + my $res = " +

      +

      + + + \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl index 0b4ac29..4e1dc1e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl @@ -176,7 +176,7 @@ function refocus(calendar) {
    23. - + Cancel - " /> + " /> " /> @@ -642,36 +642,7 @@ No patron matched Check in

      select all | none

      - - - Totals: - - - -

      - Renewal due date: " /> - /lib/calendar/cal.gif" id="newduedate_button" alt="Show Calendar" /> - -

      -

      - -

      - - - + @@ -734,6 +705,7 @@ No patron matched Previous checkouts Previous checkouts + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl index 5f3bbba..d34fc62 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl @@ -89,7 +89,14 @@ if (nodename =="barcodes[]"){ } } } - +function validate1(date) { + var today = new Date(); + if ( date < today ) { + return true; + } else { + return false; + } +}; //]]> @@ -404,32 +411,7 @@ if (nodename =="barcodes[]"){ Renew

      select all | none

      Check in

      select all | none

      - - - Totals: - - - -

      - Renewal due date: " /> - /lib/calendar/cal.gif" id="newduedate_button" alt="Show Calendar" /> - - -

      -

      - -

      - - - + -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 04:41:31 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 12 Nov 2010 22:41:31 -0500 Subject: [Koha-patches] [PATCH 2/4] bug 4359 follow-up: noItemTypeImages should just control image display In-Reply-To: <1289619693-12316-1-git-send-email-gmcharlt@gmail.com> References: <1289619693-12316-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1289619693-12316-2-git-send-email-gmcharlt@gmail.com> Tweaked so that the item type column is always displayed in the checkout history in the OPAC; noItemTypeImages now just controls whether the icon displays. Signed-off-by: Galen Charlton --- .../prog/en/modules/opac-readingrecord.tmpl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl index 5f55177..0b53ebd 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl @@ -54,7 +54,7 @@ You have never borrowed anything from this library.
      - + @@ -80,7 +80,7 @@ You have never borrowed anything from this library. - + -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 04:41:30 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 12 Nov 2010 22:41:30 -0500 Subject: [Koha-patches] [PATCH 1/4] [SIGNED-OFF] Fix for Bug 4359, noItemTypeImages not active in OPAC Message-ID: <1289619693-12316-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard - Auth.pm put the noItemTypeImages preference under "intranet only." Moved it to "OPAC or intranet." - Added check for the preference on the OPAC advanced search page. - Improved logic for displaying images on the reading history page. Signed-off-by: Galen Charlton --- C4/Auth.pm | 2 +- .../opac-tmpl/prog/en/modules/opac-advsearch.tmpl | 2 +- .../opac-tmpl/prog/en/modules/opac-detail.tmpl | 2 +- .../prog/en/modules/opac-readingrecord.tmpl | 4 ++-- opac/opac-readingrecord.pl | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 6ba852d..c7477b1 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -339,6 +339,7 @@ sub get_template_and_user { XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"), BranchesLoop => GetBranchesLoop(), using_https => $in->{'query'}->https() ? 1 : 0, + noItemTypeImages => C4::Context->preference("noItemTypeImages"), ); if ( $in->{'type'} eq "intranet" ) { @@ -363,7 +364,6 @@ sub get_template_and_user { intranetstylesheet => C4::Context->preference("intranetstylesheet"), intranetuserjs => C4::Context->preference("intranetuserjs"), intranetbookbag => C4::Context->preference("intranetbookbag"), - noItemTypeImages => C4::Context->preference("noItemTypeImages"), suggestion => C4::Context->preference("suggestion"), virtualshelves => C4::Context->preference("virtualshelves"), StaffSerialIssueDisplayCount => C4::Context->preference("StaffSerialIssueDisplayCount"), diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl index 1ee82d0..ec77493 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl @@ -135,7 +135,7 @@
      TitleItem TypeItem Type Call No. Date
      " alt="" /> " alt="" /> (Checked out)
      - diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl index 1e5e2b7..876ae81 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -395,7 +395,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { - + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl index 250a77a..5f55177 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl @@ -54,7 +54,7 @@ You have never borrowed anything from this library.
      -" name="limit" value="mc-:"/>-" name="limit" value="mc-:"/>
      Date Due
      " title="" alt="" />
      " title="" alt="" /> "> (&shelfbrowse_itemnumber=#shelfbrowser">Browse Shelf)
      - + @@ -80,7 +80,7 @@ You have never borrowed anything from this library. - + diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl index 7a77f59..c9d5819 100755 --- a/opac/opac-readingrecord.pl +++ b/opac/opac-readingrecord.pl @@ -95,6 +95,7 @@ foreach my $issue (@{$issues} ) { $line{date_due} = format_date( $issue->{'date_due'} ); $line{returndate} = format_date( $issue->{'returndate'} ); $line{volumeddesc} = $issue->{'volumeddesc'}; + $issue->{'itemtype'} = C4::Context->preference('item-level_itypes') ? $issue->{'itype'} : $issue->{'itemtype'}; if($issue->{'itemtype'}) { $line{'description'} = $itemtypes->{ $issue->{'itemtype'} }->{'description'}; $line{imageurl} = getitemtypeimagelocation( 'opac', $itemtypes->{ $issue->{'itemtype'} }->{'imageurl'} ); -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 04:41:33 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 12 Nov 2010 22:41:33 -0500 Subject: [Koha-patches] [PATCH 4/4] bug 5398: make additional pages in staff interface obey noItemTypeImages In-Reply-To: <1289619693-12316-3-git-send-email-gmcharlt@gmail.com> References: <1289619693-12316-1-git-send-email-gmcharlt@gmail.com> <1289619693-12316-2-git-send-email-gmcharlt@gmail.com> <1289619693-12316-3-git-send-email-gmcharlt@gmail.com> Message-ID: <1289619693-12316-4-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- .../prog/en/modules/catalogue/advsearch.tmpl | 2 ++ .../prog/en/modules/reserve/request.tmpl | 5 ++++- .../prog/en/modules/suggestion/suggestion.tmpl | 1 - .../prog/en/modules/virtualshelves/shelves.tmpl | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tmpl index aeed108..d2334e0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tmpl @@ -90,7 +90,9 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl index 53f9138..225c4b3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl @@ -405,7 +405,10 @@ function checkMultiHold() { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl index 7489cb6..634ebdc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl @@ -111,7 +111,6 @@ h4.collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { di diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl index 35c022b..d0bd49e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl @@ -193,7 +193,7 @@ function placeHold () { @@ -472,7 +474,9 @@ diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tmpl index 1d5e8f1..288392f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tmpl @@ -200,12 +200,13 @@ function highlightOn() { ">.01.TZZZZZZZ.jpg" alt="" class="thumbnail" /> - - " title="" /> - + + + " title="" /> + + - + + -
      TitleItem TypeItem Type Call No. Date
      " title="" alt="" /> " alt="" /> (Checked out)
      + " alt="" /> + -" name="limit" value="mc-:" /> 
      - " alt="" />
      + + " alt="" />
      + +
      - " alt="" title="" /> + " alt="" title="" /> -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 04:41:32 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 12 Nov 2010 22:41:32 -0500 Subject: [Koha-patches] [PATCH 3/4] bug 4359: make other pages in the OPAC respect noItemTypeImages In-Reply-To: <1289619693-12316-2-git-send-email-gmcharlt@gmail.com> References: <1289619693-12316-1-git-send-email-gmcharlt@gmail.com> <1289619693-12316-2-git-send-email-gmcharlt@gmail.com> Message-ID: <1289619693-12316-3-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- .../opac-tmpl/prog/en/modules/opac-reserve.tmpl | 4 ++++ .../prog/en/modules/opac-results-grouped.tmpl | 9 +++++---- .../opac-tmpl/prog/en/modules/opac-results.tmpl | 2 ++ .../opac-tmpl/prog/en/modules/opac-shelves.tmpl | 5 ++++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl index 812c91b..52ff4cd 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl @@ -296,7 +296,9 @@ + " alt="" /> + + " alt="" /> + . " title="View details for this title"> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl index 3d59dd1..aa39b9a 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl @@ -373,12 +373,14 @@ $(document).ready(function(){ . " title="" alt="" /> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl index b79ddab..8e84632 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl @@ -248,7 +248,10 @@ $(function() { value=" - " alt="" title="" /> + + " alt="" title="" /> + + "> -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 04:48:41 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 12 Nov 2010 22:48:41 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 4912 - After editing private list redirect to private lists Message-ID: <1289620121-13271-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Galen Charlton --- .../prog/en/modules/virtualshelves/shelves.tmpl | 6 +++++- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 5 ++++- .../opac-tmpl/prog/en/modules/opac-shelves.tmpl | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl index 35c022b..e6c8113 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl @@ -274,6 +274,7 @@ function placeHold () { + " /> Edit List
        @@ -306,7 +307,9 @@ function placeHold () { -
        Cancel
        +
        + CancelCancel +
        @@ -360,6 +363,7 @@ function placeHold () {
        " /> +
        diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 21d580f..8f9b246 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -572,7 +572,10 @@ input.deleteshelf { } -#toolbar input.editshelf:active,input.deleteshelf:active { +#toolbar input.editshelf:active, +input.editshelf:active, +#toolbar input.deleteshelf:active, +input.deleteshelf:active { border : 0; } diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl index b79ddab..66f88c7 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl @@ -306,6 +306,7 @@ $(function() {

        Lists /../images/caret.gif" width="16" height="16" alt=">" border="0" /> "> /../images/caret.gif" width="16" height="16" alt=">" border="0" /> Editing

        + " />
          @@ -327,7 +328,7 @@ $(function() {
        -
        ">Cancel
        +
        &display=privateshelves">Cancel">Cancel
        -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 04:53:23 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 12 Nov 2010 22:53:23 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 4913 - Budget pages should show currency name instead of symbol Message-ID: <1289620403-14073-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard This patch adds a new include file to handle the display of the active currency name and a warning if no currency is active. Signed-off-by: Galen Charlton --- admin/aqbudgetperiods.pl | 4 +++- admin/aqbudgets.pl | 4 +++- admin/aqplan.pl | 5 +++-- .../prog/en/includes/budgets-active-currency.inc | 1 + .../prog/en/modules/admin/aqbudgetperiods.tmpl | 4 +++- .../prog/en/modules/admin/aqbudgets.tmpl | 6 +++--- .../prog/en/modules/admin/aqplan.tmpl | 2 +- 7 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc diff --git a/admin/aqbudgetperiods.pl b/admin/aqbudgetperiods.pl index 62383f1..39f3cd0 100755 --- a/admin/aqbudgetperiods.pl +++ b/admin/aqbudgetperiods.pl @@ -82,7 +82,9 @@ my ($template, $borrowernumber, $cookie, $staff_flags ) = get_template_and_user( my $cur = GetCurrency(); -$template->param( cur => $cur->{symbol} ); +$template->param( symbol => $cur->{symbol}, + currency => $cur->{currency} + ); my $cur_format = C4::Context->preference("CurrencyFormat"); my $num; diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl index 34a4021..d266727 100755 --- a/admin/aqbudgets.pl +++ b/admin/aqbudgets.pl @@ -52,7 +52,9 @@ my ($template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user( ); my $cur = GetCurrency(); -$template->param( cur => $cur->{symbol} ); +$template->param( symbol => $cur->{symbol}, + currency => $cur->{currency} + ); my $op = $input->param('op'); diff --git a/admin/aqplan.pl b/admin/aqplan.pl index 8efa427..8b68d51 100755 --- a/admin/aqplan.pl +++ b/admin/aqplan.pl @@ -60,7 +60,9 @@ my $budget_period_id = $input->param('budget_period_id'); my $period = GetBudgetPeriod($budget_period_id); my $count = GetPeriodsCount(); my $cur = GetCurrency; - +$template->param( symbol => $cur->{symbol}, + currency => $cur->{currency} + ); $template->param( period_button_only => 1 ) if $count == 0; @@ -450,7 +452,6 @@ $template->param( show_actual => $show_actual, show_percent => $show_percent, show_mine => $show_mine, - cur => $cur->{symbol}, cur_format => $cur_format, CGIextChoice => $CGIextChoice, CGIsepChoice => $CGIsepChoice, diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc new file mode 100644 index 0000000..a4571f9 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc @@ -0,0 +1 @@ +

        Currency =

        No active currency is defined

        Please specify an active currency.

        \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl index 78c51b8..523fd13 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl @@ -254,7 +254,9 @@

        Budgets administration

        -

        Currency =

        No active currency is defined

        Please specify an active currency.

        + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl index 5e0db00..80d9156 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl @@ -157,9 +157,10 @@ -

        No active currency is defined

        Please specify an active currency.

        -

        Funds for ''

        + + +
        @@ -240,7 +241,6 @@
        -

        Currency =

        diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl index 170c7a0..2192178 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl @@ -139,7 +139,7 @@ YAHOO.util.Event.onAvailable("popmenu", function () { -

        Currency =

        No active currency is defined

        Please specify an active currency.

        + -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 05:07:30 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 12 Nov 2010 23:07:30 -0500 Subject: [Koha-patches] [PATCH 2/2] bug 3850 followup - tweaks In-Reply-To: <1289621250-15093-1-git-send-email-gmcharlt@gmail.com> References: <1289621250-15093-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1289621250-15093-2-git-send-email-gmcharlt@gmail.com> * fix type that would break translation * moved acq menu back to left side I wonder if the export box is better moved back under the planning grid. Signed-off-by: Galen Charlton --- .../prog/en/modules/admin/aqplan.tmpl | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl index b3dc6c1..c67e45e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl @@ -200,7 +200,7 @@ YAHOO.util.Event.onAvailable("popmenu", function () { @@ -307,9 +307,6 @@ YAHOO.util.Event.onAvailable("popmenu", function () { - -
        - -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 05:07:29 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 12 Nov 2010 23:07:29 -0500 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] More comprehensive fixes for Bug 3850 - Budget Planning Pages Need Design Work Message-ID: <1289621250-15093-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard - Filter moved to left-hand sidebar consistent with other pages - Export option moved to left-hand sidebar to improve visibility - Show/hide column controls moved to their own role with clear labels - "Locked" icon added to replace indicating locked status by row color Signed-off-by: Galen Charlton --- .../prog/en/modules/admin/aqplan.tmpl | 229 +++++++++++--------- koha-tmpl/intranet-tmpl/prog/img/locked.png | Bin 0 -> 822 bytes 2 files changed, 121 insertions(+), 108 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/img/locked.png diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl index 170c7a0..b3dc6c1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl @@ -1,8 +1,8 @@ -Koha › Administration › Budgets › Budget planning +Koha › Administration › Budgets › Funds › Planning for <!-- TMPL_VAR NAME="budget_period_description" --> by <!-- TMPL_VAR NAME="authcat" --> - + - + @@ -74,8 +73,7 @@ YAHOO.util.Event.onAvailable("popmenu", function () { HomeAdministrationBudgets › - ">Funds › - ">Planning › + ">Funds › Planning for by
        @@ -86,60 +84,28 @@ YAHOO.util.Event.onAvailable("popmenu", function () { -
        +
        +

        Planning for by

        - + -"/> -
        -Planning for by -
        "> - "> + ">  
        - - - - - - - - - - - -
        - - + + +

        Currency = . + + Each cell contain both actual and estimated values. - + Cells contain estimated values only. - -

        - - - -
        - - +

        No active currency is defined

        Please specify an active currency.

        + +

        Each cell contain both actual and estimated values.

        - - - -
        - - - - - - -
        - - -
        - - +

        Cells contain estimated values only.

        + + - -

        Currency =

        No active currency is defined

        Please specify an active currency.

        @@ -149,38 +115,43 @@ YAHOO.util.Event.onAvailable("popmenu", function () { - - + - - - + + + + + + + + + + - - - - - + - - + + @@ -191,15 +162,15 @@ YAHOO.util.Event.onAvailable("popmenu", function () {
        " style="text-align: center;" - class="" > + " class=""> - " style="text-align: center; - display:none;" - class="" > + " styl="display:none;" class=""> -  ', '')" > -   Fund remaining - + Fund remaining 
          "> + + [ show a column ] 
          + + class="locked" title="Fund locked">">  -
        - + - @@ -212,32 +183,32 @@ YAHOO.util.Event.onAvailable("popmenu", function () { - -
        +   - " /> + " value="" /> - " id='budget_' class='plan_entry_' onchange="calcTotalRow(this);" /> + " value="" id="budget_" class="plan_entry_" onchange="calcTotalRow(this);" />
        + - + - + - + + "> - + "> - - -   + "> + +  
      + ')" value="Auto-fill row"/> @@ -249,19 +220,14 @@ YAHOO.util.Event.onAvailable("popmenu", function () {
      - - Each cell contain both actual and estimated values.
      - - Cells contain estimated values only.
      - - + - +
      -
      +
      @@ -274,26 +240,73 @@ YAHOO.util.Event.onAvailable("popmenu", function () { + +
      No funds to display for this search criteria
      + + + +
      +
      +
      + +
      +
      +

      Filter

      + +
        +
      1. + + +
      2. +
      3. + + + + + + +
      4. + +
      5. + + + + + + +
      6. + + +
      7. + + + + + + +
      8. +
      +
      +
      +
      +
      +
      -
      +

      Export

      +
        -
      1. -
      2. +
      3. -     - +
      4. +
      +
      " /> - -
    + + - -No funds to display for this search criteria - - - -
    diff --git a/koha-tmpl/intranet-tmpl/prog/img/locked.png b/koha-tmpl/intranet-tmpl/prog/img/locked.png new file mode 100644 index 0000000000000000000000000000000000000000..65eadeddf227d762c500ce1c39328c2f34db2ca5 GIT binary patch literal 822 zcmeAS at N?(olHy`uVBq!ia0vp^AT~b-Gmw0xxXuPhv7|ftIx;YR|DNig)WpGT%PfAtr%uP&B4N6T+sVqF13e?1y9pDq<`t%C{rdOs-*Wuxka>T{n{4pW3MN>(ipA*P_mD(f#rB z$G&ZqSFT?E^6}w^$5ofETzma=!;5Qn`*t>+-K=(eqs^{8J6^qhb#}Mvxve^9wgtYw zZTR5f;}=(r9$$2O^!U-moys>4vtK)vdVHhjozs?QcJQ6wDs%0q<*}nX_b!(B^=bX_ z_2w^c#h%$9{_*9i6Q_d9l+rj|6ee`4_gly|R-i2jt9w at D)VJ5 From: Owen Leonard There is no visible Lists button to "attach" our warning to as there is in the OPAC, so warning message is displayed via a javascript alert. Signed-off-by: Galen Charlton --- koha-tmpl/intranet-tmpl/prog/en/js/basket.js | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js index 8a0bd20..0ab6711 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js @@ -210,9 +210,7 @@ function showCartUpdate(msg){ function showListsUpdate(msg){ // set body of popup window - $("#listsDetails").html(msg); - showLists(); - setTimeout("hideLists()",2000); + alert(msg); } function selRecord(num, status) { -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 05:22:24 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 12 Nov 2010 23:22:24 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Corrected patch for Bug 4520, facets "show more" doesn't work Message-ID: <1289622144-16062-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Re-doing Nahuel's fix so that it applies to master Signed-off-by: Galen Charlton --- catalogue/search.pl | 1 + .../intranet-tmpl/prog/en/includes/facets.inc | 2 +- .../opac-tmpl/prog/en/includes/opac-facets.inc | 2 +- opac/opac-search.pl | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/catalogue/search.pl b/catalogue/search.pl index 485af67..ac2209a 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -543,6 +543,7 @@ for (my $i=0;$i<@servers;$i++) { $template->param(query_cgi => $query_cgi); $template->param(query_desc => $query_desc); $template->param(limit_desc => $limit_desc); + $template->param(offset => $offset); $template->param(DisplayMultiPlaceHold => $DisplayMultiPlaceHold); $template->param (z3950_search_params => C4::Search::z3950_search_args($query_desc)); if ($query_desc || $limit_desc) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc index ff67047..c306c89 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc @@ -18,7 +18,7 @@ Libraries diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc index e272906..85719f3 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc @@ -19,7 +19,7 @@ diff --git a/opac/opac-search.pl b/opac/opac-search.pl index fda58b2..2bfcb6d 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -535,6 +535,7 @@ for (my $i=0;$i<@servers;$i++) { $template->param(query_cgi => $query_cgi); $template->param(query_desc => $query_desc); $template->param(limit_desc => $limit_desc); + $template->param(offset => $offset); $template->param(DisplayMultiPlaceHold => $DisplayMultiPlaceHold); if ($query_desc || $limit_desc) { $template->param(searchdesc => 1); -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 05:28:00 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 12 Nov 2010 23:28:00 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Partial fix for Bug 4924, Public/Internal notes missing in staff normal view Message-ID: <1289622480-16420-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard This fix adds only public notes. A div is added as a hook for styling Signed-off-by: Galen Charlton --- catalogue/detail.pl | 3 ++- .../prog/en/modules/catalogue/detail.tmpl | 2 ++ 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 4f6c23f..ebecd69 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -159,7 +159,7 @@ foreach my $item (@items) { $item->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) ); my $ccode = $item->{'ccode'}; $item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) ); - foreach (qw(ccode enumchron copynumber uri)) { + foreach (qw(ccode enumchron copynumber itemnotes uri)) { $itemfields{$_} = 1 if ( $item->{$_} ); } @@ -213,6 +213,7 @@ $template->param( itemdata_uri => $itemfields{uri}, itemdata_copynumber => $itemfields{copynumber}, volinfo => $itemfields{enumchron}, + itemdata_itemnotes => $itemfields{itemnotes}, z3950_search_params => C4::Search::z3950_search_args($dat), C4::Search::enabled_staff_search_views, ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl index 1861028..547a36d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl @@ -214,6 +214,7 @@ function verify_images() { Publication Details URL Copy No. + Public notes Spine Label @@ -333,6 +334,7 @@ function verify_images() { +
    &item=">Fix Itemtype -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 05:33:54 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 12 Nov 2010 23:33:54 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 4933, Link to subfield's edit tab from subfield structure admin Message-ID: <1289622834-17170-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard - Also corrects framework display in the case of the default Signed-off-by: Galen Charlton --- .../en/modules/admin/marc_subfields_structure.tmpl | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl index 2ea58de..7873296 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl @@ -165,7 +165,7 @@ -

    MARC subfield structure admin for (framework )

    +

    MARC subfield structure admin for (framework )(default framework)

    This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit.

    The column Koha field shows that the subfield is linked with a Koha field. Koha can manage a MARC interface, or a Koha interface. This link ensures that both DB are synchronized, thus you can change from a MARC to a Koha interface easily.

    @@ -174,6 +174,7 @@ Subfield Text Constraints + Edit Delete @@ -182,7 +183,7 @@ - + &frameworkcode=#subfield"> @@ -207,7 +208,8 @@ | Link:, - ">Delete + &frameworkcode=#subfield">Edit + ">Delete -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 06:10:18 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 00:10:18 -0500 Subject: [Koha-patches] [PATCH] bug 5399: remove useless eval 'use C4::Foo' Message-ID: <1289625018-17827-1-git-send-email-gmcharlt@gmail.com> Also add a couple FIXMEs Signed-off-by: Galen Charlton --- acqui/addorderiso2709.pl | 6 +----- acqui/basketgroup.pl | 7 ++++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl index 903d2db..25366b1 100755 --- a/acqui/addorderiso2709.pl +++ b/acqui/addorderiso2709.pl @@ -37,7 +37,7 @@ use C4::Biblio; use C4::Items; use C4::Koha qw/GetItemTypes/; use C4::Budgets qw/GetBudgets/; -use C4::Acquisition qw/NewOrderItem/; +use C4::Acquisition qw/NewOrderItem GetBasket/; use C4::Bookseller qw/GetBookSellerFromId/; my $input = new CGI; @@ -145,8 +145,6 @@ if ($op eq ""){ if ($orderinfo{'listprice'} =~ /^([\d\.,]*)/) { $orderinfo{'listprice'} = $1; $orderinfo{'listprice'} =~ s/,/\./; - eval "use C4::Acquisition qw/GetBasket/;"; - eval "use C4::Bookseller qw/GetBookSellerFromId/;"; my $basket = GetBasket($orderinfo{basketno}); my $bookseller = GetBookSellerFromId($basket->{booksellerid}); my $gst = $bookseller->{gstrate} || C4::Context->preference("gist") || 0; @@ -162,8 +160,6 @@ if ($op eq ""){ if ($orderinfo{'listprice'} =~ /^([\d\.,]*)/) { $orderinfo{'listprice'} = $1; $orderinfo{'listprice'} =~ s/,/\./; - eval "use C4::Acquisition qw/GetBasket/;"; - eval "use C4::Bookseller qw/GetBookSellerFromId/;"; my $basket = GetBasket($orderinfo{basketno}); my $bookseller = GetBookSellerFromId($basket->{booksellerid}); my $gst = $bookseller->{gstrate} || C4::Context->preference("gist") || 0; diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 69de099..613bbf6 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -183,8 +183,9 @@ sub printbasketgrouppdf{ my ($basketgroupid) = @_; my $pdfformat = C4::Context->preference("OrderPdfFormat"); - eval "use $pdfformat" ; - eval "use C4::Branch"; + eval "use $pdfformat" ; + # FIXME consider what would happen if $pdfformat does not + # contain the name of a valid Perl module. ??????????????, ???? ???????????????? my $basketgroup = GetBasketgroup($basketgroupid); my $bookseller = GetBookSellerFromId($basketgroup->{'booksellerid'}); @@ -244,7 +245,7 @@ sub printbasketgrouppdf{ ); my $pdf = printpdf($basketgroup, $bookseller, $baskets, \%orders, $bookseller->{gstrate} || C4::Context->preference("gist")) || die "pdf generation failed"; print $pdf; - exit; + exit; # FIXME bad form to exit out of a subroutine like this } my $op = $input->param('op'); -- 1.7.0 From f.demians at tamil.fr Sat Nov 13 14:48:15 2010 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Sat, 13 Nov 2010 14:48:15 +0100 Subject: [Koha-patches] [PATCH] Bug 4440 Layout tweaking Message-ID: <1289656095-793-1-git-send-email-f.demians@tamil.fr> --- .../prog/en/modules/members/printinvoice.tmpl | 32 +++++++------------- 1 files changed, 11 insertions(+), 21 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl index 3fc314e..1ff353d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl @@ -11,30 +11,20 @@
    +

    INVOICE

    +

    + +
    +

    +

    +Bill to:
    +Name: +

    + - - - - - - - - - - - - -- 1.7.3.2 From gmcharlt at gmail.com Sat Nov 13 15:01:00 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 09:01:00 -0500 Subject: [Koha-patches] [PATCH] remove leftover merge conflict marker to breaks updatedatabase.pl Message-ID: <1289656860-19667-1-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- installer/data/mysql/updatedatabase.pl | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 62e4cd0..bf7acb6 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3735,7 +3735,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } -<<<<<<< HEAD:installer/data/mysql/updatedatabase.pl $DBversion = '3.01.00.999'; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { print "Upgrade to $DBversion done (3.2.0 release candidate)\n"; -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 15:36:15 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 09:36:15 -0500 Subject: [Koha-patches] [PATCH] bug 5400: new test case to find files with merge conflict markers Message-ID: <1289658975-20565-1-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- t/00-merge-conflict-markers.t | 59 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 59 insertions(+), 0 deletions(-) create mode 100644 t/00-merge-conflict-markers.t diff --git a/t/00-merge-conflict-markers.t b/t/00-merge-conflict-markers.t new file mode 100644 index 0000000..24743ae --- /dev/null +++ b/t/00-merge-conflict-markers.t @@ -0,0 +1,59 @@ +# Copyright 2010 Galen Charlton +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use strict; +use warnings; + +use Test::More; +use File::Spec; +use File::Find; +use IO::File; + +find({ + bydepth => 1, + no_chdir => 1, + wanted => sub { + my $file = $_; + + return if $file =~ /\.(ico|jpg|gif|ogg|pdf|png|psd|swf|zip)$/; + return unless -f $file; + + my @name_parts = File::Spec->splitpath($file); + my %dirs = map { $_ => 1 } File::Spec->splitdir($name_parts[1]); + return if exists $dirs{'.git'}; + + my $fh = IO::File->new($file, 'r'); + my $marker_found = 0; + my $line = 0; + while (<$fh>) { + $line++; + if (/^<<<<<>>>>>/) { + # could check for ^=====, but that's often used in text files + $marker_found = 1; + last; + } + } + close $fh; + if ($marker_found) { + fail("$file has no merge conflict markers"); + diag("marker found in line $line"); + } else { + pass("$file has no merge conflict markers"); + } + }, +}, File::Spec->curdir()); +done_testing(); -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 15:39:47 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 09:39:47 -0500 Subject: [Koha-patches] [PATCH] remove leftover merge conflict marker which breaks updatedatabase.pl Message-ID: <1289659187-20934-1-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- installer/data/mysql/updatedatabase.pl | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 62e4cd0..bf7acb6 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3735,7 +3735,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } -<<<<<<< HEAD:installer/data/mysql/updatedatabase.pl $DBversion = '3.01.00.999'; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { print "Upgrade to $DBversion done (3.2.0 release candidate)\n"; -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 17:50:04 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 11:50:04 -0500 Subject: [Koha-patches] [PATCH] bug 5066: log timestamp consistently in _session_log Message-ID: <1289667004-21347-1-git-send-email-gmcharlt@gmail.com> Alternative to Marcel de Rooy's patch of 4 November. The rest of C4/Auth.pm uses strftime("%c", localtime) to format the timestamp, and in general, strftime('%c', localtime) ne scalar(localtime). Signed-off-by: Galen Charlton --- C4/Auth.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index c7477b1..0e284b7 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -717,7 +717,7 @@ sub checkauth { ( $return, $cardnumber ) = checkpw( $dbh, $userid, $password, $query ); } if ($return) { - _session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},localtime); + _session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime)); if ( $flags = haspermission( $userid, $flagsrequired ) ) { $loggedin = 1; } -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 17:50:53 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 11:50:53 -0500 Subject: [Koha-patches] [PATCH] Bug 5066 (Incorrect use of localtime function when calling _session_log) In-Reply-To: <809BE39CD64BFD4EB9036172EBCCFA3119B52D@S-MAIL-1B.rijksmuseum.intra> References: <809BE39CD64BFD4EB9036172EBCCFA3119B52D@S-MAIL-1B.rijksmuseum.intra> Message-ID: Hi, I've submitted a counter-patch which formats the timestamp the same way that the rest of the _session_log calls in C4::Auth do. Please take a look. Regards, Galen On Thu, Nov 4, 2010 at 5:26 AM, Marcel de Rooy wrote: > --- > ?C4/Auth.pm | ? ?2 +- > ?1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/C4/Auth.pm b/C4/Auth.pm > index 6ba852d..58ce63e 100644 > --- a/C4/Auth.pm > +++ b/C4/Auth.pm > @@ -717,7 +717,7 @@ sub checkauth { > ? ? ? ? ? ? ? ? ? ?( $return, $cardnumber ) = checkpw( $dbh, $userid, $password, $query ); > ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?if ($return) { > - ? ? ? ? ? ? ? _session_log(sprintf "%20s from %16s logged in ?at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},localtime); > + ? ? ? ? ? ? ? _session_log(sprintf "%20s from %16s logged in ?at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},scalar localtime); > ? ? ? ? ? ? ? ?if ( $flags = haspermission( ?$userid, $flagsrequired ) ) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?$loggedin = 1; > ? ? ? ? ? ? ? ?} > -- > 1.6.0.6 > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ > -- Galen Charlton gmcharlt at gmail.com From gmcharlt at gmail.com Sat Nov 13 18:05:47 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 12:05:47 -0500 Subject: [Koha-patches] [PATCH 2/2] bug 4866 follow-up - minor code formatting cleanup In-Reply-To: <1289667947-21842-1-git-send-email-gmcharlt@gmail.com> References: <1289667947-21842-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1289667947-21842-2-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- cataloguing/additem.pl | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index b052cbc..6dc190a 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -532,10 +532,12 @@ foreach my $tag (sort keys %{$tagslib}) { if (do $plugin) { my $extended_param = plugin_parameters( $dbh, $temp, $tagslib, $subfield_data{id}, \@loop_data ); my ( $function_name, $javascript ) = plugin_javascript( $dbh, $temp, $tagslib, $subfield_data{id}, \@loop_data ); - my $change= index($javascript, 'function Change')>-1?"return Change$function_name($subfield_data{random}, '$subfield_data{id}');": 'return 1;'; #enhancement 4866 + my $change = index($javascript, 'function Change') > -1 ? + "return Change$function_name($subfield_data{random}, '$subfield_data{id}');" : + 'return 1;'; $subfield_data{marc_value} = qq[ ... $javascript]; -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 18:05:46 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 12:05:46 -0500 Subject: [Koha-patches] [PATCH 1/2] Bug 4866 for master (Enable Change event for item plugins) Message-ID: <1289667947-21842-1-git-send-email-gmcharlt@gmail.com> From: Marcel de Rooy Signed-off-by: Galen Charlton --- cataloguing/additem.pl | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 9676fd6..b052cbc 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -532,8 +532,10 @@ foreach my $tag (sort keys %{$tagslib}) { if (do $plugin) { my $extended_param = plugin_parameters( $dbh, $temp, $tagslib, $subfield_data{id}, \@loop_data ); my ( $function_name, $javascript ) = plugin_javascript( $dbh, $temp, $tagslib, $subfield_data{id}, \@loop_data ); + my $change= index($javascript, 'function Change')>-1?"return Change$function_name($subfield_data{random}, '$subfield_data{id}');": 'return 1;'; #enhancement 4866 $subfield_data{marc_value} = qq[ ... $javascript]; -- 1.7.0 From ian.walls at bywatersolutions.com Sat Nov 13 18:31:34 2010 From: ian.walls at bywatersolutions.com (Ian Walls) Date: Sat, 13 Nov 2010 12:31:34 -0500 Subject: [Koha-patches] [PATCH] Bug 4222 - allow nonpublicnote to be a mapped DB column In-Reply-To: <1289532464-27953-1-git-send-email-robin@catalyst.net.nz> References: <1289532464-27953-1-git-send-email-robin@catalyst.net.nz> Message-ID: I believe that UNIMARC uses 995 as the items field, rather than 952. This patch does not cleanly apply to master anymore; this seems to be because of the recently-committed work on Bug 4924. A duplicate entry for Public Notes is found in the staff client. I'm working on a revised version of this patch to address the above issues, as well as to automatically update items.nonpublicnote with any pre-existing non-public notes existing only in the MARC. Depending on the number of biblios, this could cause the updatedatabase.plscript to take a VERY long time to complete. It would also require the use of C4::Biblio (or else rewriting the GetMarcBiblio subroutine within the updatedatabase.pl script). Is it worth making this part of updatedatabase.pl, or should a separate cleanup script be written? -Ian On Thu, Nov 11, 2010 at 10:27 PM, Robin Sheat wrote: > This means that it's possible (and easy) to put non-public notes > (usually 952$x) on a template, same as public notes. It creates a > mapping between the 952$x field and the new database column. > > Note that when this is applied, it will only work on newly saved records. > > It is possible this will need to be altered to allow for UNIMARC etc. if > they use 952 differently. > --- > catalogue/detail.pl | 9 +++++++++ > catalogue/moredetail.pl | 1 + > installer/data/mysql/updatedatabase.pl | 6 ++++++ > .../prog/en/modules/catalogue/detail.tmpl | 4 ++++ > .../prog/en/modules/catalogue/moredetail.tmpl | 2 ++ > 5 files changed, 22 insertions(+), 0 deletions(-) > > diff --git a/catalogue/detail.pl b/catalogue/detail.pl > index 4f6c23f..624a141 100755 > --- a/catalogue/detail.pl > +++ b/catalogue/detail.pl > @@ -197,6 +197,13 @@ foreach my $item (@items) { > $item->{waitingdate} = format_date($wait_hashref->{waitingdate}); > } > > + foreach my $f (qw( itemnotes nonpublicnote )) { > + if ($item->{$f}) { > + $item->{$f} =~ s|\n|
    |g; > + $itemfields{$f} = 1; > + } > + } > + > push @itemloop, $item; > } > > @@ -213,6 +220,8 @@ $template->param( > itemdata_uri => $itemfields{uri}, > itemdata_copynumber => $itemfields{copynumber}, > volinfo => $itemfields{enumchron}, > + itemdata_itemnotes => $itemfields{itemnotes}, > + itemdata_nonpublicnote => $itemfields{nonpublicnote}, > z3950_search_params => C4::Search::z3950_search_args($dat), > C4::Search::enabled_staff_search_views, > ); > diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl > index d790c41..95598f7 100755 > --- a/catalogue/moredetail.pl > +++ b/catalogue/moredetail.pl > @@ -119,6 +119,7 @@ foreach my $item (@items){ > } else { > $item->{'issue'}= 0; > } > + $item->{nonpublicnote} =~ s|\n|
    |g if $item->{nonpublicnote}; > } > $template->param(count => $data->{'count'}, > subscriptionsnumber => $subscriptionsnumber, > diff --git a/installer/data/mysql/updatedatabase.plb/installer/data/mysql/ > updatedatabase.pl > index 27daa38..84d5428 100755 > --- a/installer/data/mysql/updatedatabase.pl > +++ b/installer/data/mysql/updatedatabase.pl > @@ -3835,6 +3835,12 @@ if (C4::Context->preference("Version") < > TransformToNum($DBversion)) { > SetVersion ($DBversion); > } > > +$DBversion = '3.03.00.XXX'; > +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > + $dbh->do("ALTER TABLE items ADD COLUMN nonpublicnote MEDIUMTEXT"); > + $dbh->do("UPDATE marc_subfield_structure SET > kohafield='items.nonpublicnote' WHERE (kohafield IS NULL OR kohafield = '') > AND tagfield='952' AND tagsubfield='x'"); > + print "Upgrade to $DBversion done (Make nonpublicnote easier to > use)\n"; > +} > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl > b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl > index 1861028..a391744 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl > @@ -211,6 +211,8 @@ function verify_images() { >
    > > > + > + > > > > @@ -319,6 +321,8 @@ function verify_images() { > > > > + > + > + @@ -48,18 +49,25 @@ + - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl new file mode 100644 index 0000000..a53278f --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl @@ -0,0 +1,59 @@ + +Print Receipt for <!-- TMPL_VAR NAME="cardnumber" --> + +/includes/favicon.ico" type="image/x-icon" /> +/css/printreceiptinvoice.css" /> + + + + +
    + +
    -

    -
    -

    INVOICE

    -
    -

    -
    - To,

    -
    Date Description of charges AmountStatusLast seenBarcodePublic > NoteNon-public NotePublication > DetailsURLCopy > No.&itemnumber=&biblionumber=&bi=#item class="itemnotes"> class="nonpublicnote"> class="enumchron"> > > > diff --git > a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl > b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl > index 55ca81f..f2a939b 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl > @@ -166,6 +166,8 @@ >
  • class="label">Previous Borrower: "> 
  • >
  • class="label">Previous Borrower: "> 
  • >
  • Paid for?:  
  • > +
  • Non-public Note: > +  
  • >
  • Public Note: > >
    method="post">" /> > -- > 1.7.1 > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ > -- Ian Walls Lead Development Specialist ByWater Solutions Phone # (888) 900-8944 http://bywatersolutions.com ian.walls at bywatersolutions.com Twitter: @sekjal -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmcharlt at gmail.com Sat Nov 13 18:39:50 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 12:39:50 -0500 Subject: [Koha-patches] [PATCH] Bug 4222 - allow nonpublicnote to be a mapped DB column In-Reply-To: References: <1289532464-27953-1-git-send-email-robin@catalyst.net.nz> Message-ID: Hi, On Sat, Nov 13, 2010 at 12:31 PM, Ian Walls wrote: > Depending on the number of biblios, this could cause the updatedatabase.pl > script to take a VERY long time to complete.? It would also require the use > of C4::Biblio (or else rewriting the GetMarcBiblio subroutine within the > updatedatabase.pl script).? Is it worth making this part of > updatedatabase.pl, or should a separate cleanup script be written? Actually, it wouldn't require use of C4::Biblio. If non-public notes exist but are not mapped to a field in the items table, they will end up in items.more_subfields_xml. An upgrade script can simply munge items.more_subfields_xml and items.nonpublicnote, but would not need to touch the bib MARC. For example, if the note is embedded in the 952$x, as far as the bib record is concerned it will remain there; only two columns in items would change. For a database with a large number of item records, it could still take a while to complete, so a separate script may still be justified, but it wouldn't need to touch the bib records. Regards, Galen -- Galen Charlton gmcharlt at gmail.com From gmcharlt at gmail.com Sat Nov 13 18:55:02 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 12:55:02 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 4981, Tweak style of item listing on MARC display Message-ID: <1289670902-23588-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Galen Charlton --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 63 ++++++++++++++++++------------ 1 files changed, 38 insertions(+), 25 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 21d580f..24f6503 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -25,8 +25,9 @@ body { caption { font-size : 140%; - text-align : left; font-weight : bold; + line-height : 144%; + text-align : left; } fieldset { @@ -53,7 +54,7 @@ fieldset.rows legend { font-size : 110%; } -fieldset.rows label, fieldset.rows span.label { +fieldset.rows label, fieldset.rows span.label { float: left; font-weight : bold; width: 9em; @@ -863,14 +864,47 @@ em { font-style : italic; } -#catalogue_detail_biblio p span.label { + +table#marc, +table#marc td, +table#marc th { + background-color : transparent; + border : 0; +} + +table#marc p span.label { font-weight : bold; } -#catalogue_detail_biblio p, #catalogue_detail_biblio ul { +table#marc p, +table#marc ul { padding-bottom: .6em; } +table#items, +table#items td +table#items th { + border-width : 1px solid #EEE; + font-size : 90%; +} + + +table#marc div.results_summary { + clear : left; +} +table#marc div.results_summary ul { + display : inline; + float : none; + clear : none; + margin: 0; + padding: 0; + list-style : none; +} + +table#marc div.results_summary ul li { + display : inline; +} + #basketcount { display : inline; } @@ -1179,11 +1213,6 @@ div.tab-container { width : 90%; } -#catalogue_detail_biblio table, #catalogue_detail_biblio td, #catalogue_detail_biblio th { - background-color : transparent; - border : 0; -} - tr.overdue td { background-color : #ffcccc; border-bottom : 1px solid #ffaeae; @@ -1291,22 +1320,6 @@ padding-left : .4em; padding-left : 13px; } -#catalogue_detail_biblio div.results_summary { - clear : left; -} -#catalogue_detail_biblio div.results_summary ul { - display : inline; - float : none; - clear : none; - margin: 0; - padding: 0; - list-style : none; -} - -#catalogue_detail_biblio div.results_summary ul li { - display : inline; -} - .dialog { border: 1px solid #bcbcbc; padding : .5em; -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 18:58:54 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 12:58:54 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF 1/2] Fix for Bug 4451 Batch item tool can't process file with Windows line endings Message-ID: <1289671135-23771-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Galen Charlton --- tools/batchMod.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 7c03812..84d1ae1 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -169,7 +169,7 @@ if ($op eq "show"){ my @contentlist; if ($filefh){ while (my $content=<$filefh>){ - chomp $content; + $content =~ s/[\r\n]*$//g; push @contentlist, $content if $content; } -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 18:58:55 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 12:58:55 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF 2/2] bug 4451 followup - don't need /g for this replace In-Reply-To: <1289671135-23771-1-git-send-email-gmcharlt@gmail.com> References: <1289671135-23771-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1289671135-23771-2-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- tools/batchMod.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 84d1ae1..9982e2d 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -169,7 +169,7 @@ if ($op eq "show"){ my @contentlist; if ($filefh){ while (my $content=<$filefh>){ - $content =~ s/[\r\n]*$//g; + $content =~ s/[\r\n]*$//; push @contentlist, $content if $content; } -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 19:06:50 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 13:06:50 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 4983 - Add edit record / edit item links to search results Message-ID: <1289671610-24599-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Galen Charlton --- .../intranet-tmpl/prog/en/css/staff-global.css | 5 +++-- .../prog/en/modules/catalogue/results.tmpl | 18 ++++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index 7803604..d4b2b4f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -1339,9 +1339,10 @@ li.email { font-size : 105%; } -.reserve { +.hold { float : right; - font-weight : bold; + font-size: 90%; + margin: 0; } .thumbnail { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl index 916ee31..f833f33 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl @@ -439,7 +439,7 @@ function GetZ3950Terms(){ (modified on ) [">]

    -

    +

    @@ -450,11 +450,17 @@ function GetZ3950Terms(){ - - No holds allowed - - " href="/cgi-bin/koha/reserve/request.pl?biblionumber=">Holds - +

    + No holds allowed + + " href="/cgi-bin/koha/reserve/request.pl?biblionumber=">Holds + + + | ">Edit record + + + | ">Edit items +

  • -- 1.7.0 From kmkale at anantcorp.com Sat Nov 13 19:08:35 2010 From: kmkale at anantcorp.com (Koustubha Kale) Date: Sat, 13 Nov 2010 23:38:35 +0530 Subject: [Koha-patches] Bug 5401: WYSWYG for Koha News Message-ID: This patch adds WYSWYG editor functionality to Koha news in staff client using elRTE editor from elrte.org which is BSD style licensed. Had to tweak its default css file a little for it to play with Koha. Regards, Koustubha Kale Anant Corporation Contact Details : Address? : 103, Armaan Residency, R. W Sawant Road, Nr. Golden Dyes Naka, Thane (w), ? ? ? ? ??? ? ? Maharashtra, India, Pin : 400601. TeleFax? : +91-22-21720108, +91-22-21720109 Mobile? ?? : +919820715876 Website? : http://www.anantcorp.com Blog : http://www.anantcorp.com/blog/?author=2 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Bug-5401-WYSWYG-for-Koha-News.patch Type: text/x-patch Size: 1435694 bytes Desc: not available URL: From gmcharlt at gmail.com Sat Nov 13 19:29:52 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 13:29:52 -0500 Subject: [Koha-patches] Bug 5401: WYSWYG for Koha News In-Reply-To: References: Message-ID: Hi, On Sat, Nov 13, 2010 at 1:08 PM, Koustubha Kale wrote: > This patch adds WYSWYG editor functionality to Koha news in staff > client using elRTE editor from elrte.org which is BSD style licensed. > Had to tweak its default css file a little for it to play with Koha. I have a question - there is already one such editor used by Koha, TinyMCE. Which one should we prefer? I don't have much of an opinion either way (beyond a strong opinion that we shouldn't be using *both*), but here's what some Googling turned up: elRTE -------------- - built on and uses jQuery and jQuery/UI; since we're considering jQuery/UI to replace YUI, there's some possible synchronicity here - not yet packaged for Debian - fairly young project TinyMCE -------------- - packaged for Debian - there's a supported jQuery variant - been around for years Since TinyMCE is used by only one page, if we decide to switch to elRTE (or to something else entirely), it won't be a big deal. Has anybody done a direct comparison? Regards, Galen -- Galen Charlton gmcharlt at gmail.com From gmcharlt at gmail.com Sat Nov 13 19:42:35 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 13:42:35 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 4851 - Batch delete shouldn't show delete button if no items were found Message-ID: <1289673755-26090-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard - Adding template flag to indicate valid results (hidden or not) - Clarifying warning messages based on various outcomes Signed-off-by: Galen Charlton --- .../prog/en/modules/tools/batchMod-del.tmpl | 22 ++++++++++++------- tools/batchMod.pl | 3 ++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tmpl index c6f82b9..441f4c5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tmpl @@ -52,7 +52,9 @@ -

    Warning, the following barcodes were not found :

    +
    +

    Warning, the following barcodes were not found:

    Warning: no barcodes were found

    +
    @@ -66,7 +68,7 @@
    -

    The following barcodes were found:

    +

    The following barcodes were found:

    @@ -77,7 +79,7 @@ - +
    @@ -111,17 +113,16 @@ - - + -

    Too many items (): not displaying each one individually.

    +

    Too many items () to display individually.

    " /> - +
    " />

    This will delete all thethe selected items.

    @@ -131,10 +132,15 @@
    Job progress:
    0%
    - + + + Cancel + +

    Return to batch item deletion

    + diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 7c03812..912bd0d 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -203,6 +203,9 @@ if ($op eq "show"){ } } + + # Flag to tell the template there are valid results, hidden or not + if(scalar(@itemnumbers) > 0){ $template->param("itemresults" => 1); } # Only display the items if there are no more than 1000 if (scalar(@itemnumbers) <= 1000) { $items_display_hashref=BuildItemsData(@itemnumbers); -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 20:08:58 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 14:08:58 -0500 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] Fix for Bug 4908 - OPAC patron details page doesn't show patron's home library Message-ID: <1289675339-28494-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Galen Charlton --- .../opac-tmpl/prog/en/modules/opac-userupdate.tmpl | 1 + opac/opac-userupdate.pl | 3 ++- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl index 64c81f2..db9c416 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl @@ -73,6 +73,7 @@ Library Use:
    1. " />
    2. +
    3. " />
    4. " />
    5. ()" />
    6. " />
    7. diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl index b38a477..a9d0101 100755 --- a/opac/opac-userupdate.pl +++ b/opac/opac-userupdate.pl @@ -147,9 +147,10 @@ EOF } $borr->{'dateenrolled'} = format_date( $borr->{'dateenrolled'} ); -$borr->{'dateexpiry'} = format_date( $borr->{'dateexpiry'} ); +$borr->{'dateexpiry'} = format_date( $borr->{'dateexpiry'} ); $borr->{'dateofbirth'} = format_date( $borr->{'dateofbirth'} ); $borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} ); +$borr->{'branchcode'} = GetBranchName($borr->{'branchcode'}); if (C4::Context->preference('ExtendedPatronAttributes')) { my $attributes = C4::Members::Attributes::GetBorrowerAttributes($borrowernumber, 'opac'); -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 20:08:59 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 14:08:59 -0500 Subject: [Koha-patches] [PATCH 2/2] bug 4908: rename temlate variable to branchname In-Reply-To: <1289675339-28494-1-git-send-email-gmcharlt@gmail.com> References: <1289675339-28494-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1289675339-28494-2-git-send-email-gmcharlt@gmail.com> Using branchname is more accurate and could avoid a bug if/when the patron update function is made more sophisticated. Signed-off-by: Galen Charlton --- .../opac-tmpl/prog/en/modules/opac-userupdate.tmpl | 2 +- opac/opac-userupdate.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl index db9c416..73f5c21 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl @@ -73,7 +73,7 @@ Library Use:
      1. " />
      2. -
      3. " />
      4. +
      5. " />
      6. " />
      7. ()" />
      8. " />
      9. diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl index a9d0101..ab2e15d 100755 --- a/opac/opac-userupdate.pl +++ b/opac/opac-userupdate.pl @@ -150,7 +150,7 @@ $borr->{'dateenrolled'} = format_date( $borr->{'dateenrolled'} ); $borr->{'dateexpiry'} = format_date( $borr->{'dateexpiry'} ); $borr->{'dateofbirth'} = format_date( $borr->{'dateofbirth'} ); $borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} ); -$borr->{'branchcode'} = GetBranchName($borr->{'branchcode'}); +$borr->{'branchname'} = GetBranchName($borr->{'branchcode'}); if (C4::Context->preference('ExtendedPatronAttributes')) { my $attributes = C4::Members::Attributes::GetBorrowerAttributes($borrowernumber, 'opac'); -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 20:14:39 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 14:14:39 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5048, Error in menu/submenu for select language in intranet Message-ID: <1289675679-28745-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Patch for HEAD. This issue was apparently solved quite a while ago in the OPAC. This patch copies that solution over to the staff client. Signed-off-by: Galen Charlton --- .../prog/en/includes/intranet-bottom.inc | 2 +- koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 55 ++++++++++---------- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc index 78334b2..839c176 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc @@ -7,7 +7,7 @@ -
      10. ()
        +
      11. " href="#"> ()
        ">
          diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js index c2e6fba..047bfa0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js @@ -43,35 +43,34 @@ function _(s) { return s } // dummy function for gettext YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMoremenu); }); +// build Change Language menus YAHOO.util.Event.onContentReady("changelanguage", function () { - var oMenu = new YAHOO.widget.Menu("sublangs", { zindex: 2 }); - - function positionoMenu() { - oMenu.align("bl", "tl"); - } - - oMenu.subscribe("beforeShow", function () { - if (this.getRoot() == this) { - positionoMenu(); - } - }); - - oMenu.render(); - - oMenu.cfg.setProperty("context", ["showlang", "bl", "tl"]); - - function onYahooClick(p_oEvent) { - // Position and display the menu - positionoMenu(); - oMenu.show(); - // Stop propagation and prevent the default "click" behavior - YAHOO.util.Event.stopEvent(p_oEvent); - } - - YAHOO.util.Event.addListener("showlang", "click", onYahooClick); - - YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMenu); - }); + $(".sublangs").each(function(){ + var menuid = $(this).attr("id"); + var menuid = menuid.replace("show",""); + + var oMenu = new YAHOO.widget.Menu("sub"+menuid, { zindex: 2 }); + function positionoMenu() { + oMenu.align("bl", "tl"); + } + oMenu.subscribe("beforeShow", function () { + if (this.getRoot() == this) { + positionoMenu(); + } + }); + oMenu.render(); + oMenu.cfg.setProperty("context", ["show"+menuid, "bl", "tl"]); + function onYahooClick(p_oEvent) { + // Position and display the menu + positionoMenu(); + oMenu.show(); + // Stop propagation and prevent the default "click" behavior + YAHOO.util.Event.stopEvent(p_oEvent); + } + YAHOO.util.Event.addListener("show"+menuid, "click", onYahooClick); + YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMenu); + }); +}); // http://jennifermadden.com/javascript/stringEnterKeyDetector.html function checkEnter(e){ //e is event object passed from function invocation -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 20:34:42 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 14:34:42 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5030 - Improve handling of duplicate patrons Message-ID: <1289676882-30159-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard - Making duplicate patron warning dialog simpler but more explicit - Pointing duplicate patron preview window to new brief version of moremember.pl to display more patron details than the previous version. Signed-off-by: Galen Charlton --- .../intranet-tmpl/prog/en/css/staff-global.css | 17 +++- .../prog/en/modules/members/borrowers_details.tmpl | 63 ------------- .../prog/en/modules/members/memberentrygen.tmpl | 25 ++--- .../prog/en/modules/members/moremember-brief.tmpl | 97 ++++++++++++++++++++ koha-tmpl/intranet-tmpl/prog/img/pop-up-link.png | Bin 0 -> 205 bytes members/borrowers_details.pl | 75 --------------- members/moremember.pl | 3 + 7 files changed, 125 insertions(+), 155 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/borrowers_details.tmpl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tmpl create mode 100644 koha-tmpl/intranet-tmpl/prog/img/pop-up-link.png delete mode 100755 members/borrowers_details.pl diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index 7803604..a0d87ef 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -21,6 +21,11 @@ a.overdue,.overdue { color : #cc0000; } +a.popup { + background : transparent url("../../img/pop-up-link.png") center right no-repeat; + padding-right : 15px; +} + body { text-align : left; padding:0 0 2.5em 0; @@ -1130,11 +1135,21 @@ td input.approve { color:black; padding: .4em .4em .4em 34px; } - + .dialog input.edit { background: #fff url(../../img/toolbar-edit.gif) no-repeat 4px center; color:black; + max-width : 13em; + padding: .4em .4em .4em 34px; + white-space: normal; +} + +.dialog input.new { + background: #fff url(../../img/toolbar-new.gif) no-repeat 4px center; + color:black; + max-width : 13em; padding: .4em .4em .4em 34px; + white-space: normal; } .dialog input.print { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/borrowers_details.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/borrowers_details.tmpl deleted file mode 100644 index 763cf66..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/borrowers_details.tmpl +++ /dev/null @@ -1,63 +0,0 @@ - -Patron Details - - - - -
          -
          - -

          Patron Details

          - - - - -

          - - - " /> -

          -

          - - - " /> -

          - - - -

          - - " /> -

          -

          - - " /> - -

          -

          - - " /> -

          - -

          - - - " /> -

          -

          - - " /> -

          - - - - - -

          - Close Window -

          - - - -
          - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl index 5fa4f82..0af5f69 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl @@ -93,22 +93,15 @@ -

          -

          -

          Duplicate suspected

          - ');" >Detail - Duplicate ? - &category_type=">Yes -     No, it is not - - - - - +

          Duplicate patron record?

          +

          ');" >View existing record

          + " />" /> + +
          + +
          - -

          @@ -154,7 +147,8 @@ -
          + +" /> " /> " /> @@ -163,7 +157,6 @@ " /> " /> " /> -" /> " /> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tmpl new file mode 100644 index 0000000..9dd5ed3 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tmpl @@ -0,0 +1,97 @@ + +Koha › Check duplicate patron + + + + +
          +
          +

          + ()

          +
          +
          +
          + + + +

          + + , + +
          +
          + +
          +

          + +
          +
            + +
          1. Organization phone:
          2. +
          3. Organization email:
          4. + +
          5. Home:
          6. +
          7. Mobile:
          8. +
          9. Work:
          10. + + + +
          11. Professional phone:
          12. +
          13. Professional mobile:
          14. + +
          15. Fax:
          16. + +
          17. Email (home):">
          18. +
          19. Email (work): ">
          20. + +
          21. Initials:
          22. +
          23. Date of birth:
          24. +
          25. Sex:
          26. + +
          27. Ethnicity:
          28. +
          29. Ethnicity notes:
          30. + + + +
          31. Guarantees:
          32. + + + +
          33. Guarantor:">,
          34. + + +
          +
          +
          +
          +
          +
          +

          Library use

          +
          +
            +
          1. Card number:
          2. +
          3. Borrowernumber:
          4. +
          5. Category: ()
          6. +
          7. Registration date:
          8. +
          9. Expiration date: + + + + + +
          10. +
          11. Library:
          12. + +
          13. Sort field 1:
          14. +
          15. Sort field 2:
          16. +
          +
          +
          +
          +
          +
          +
          +
          + diff --git a/koha-tmpl/intranet-tmpl/prog/img/pop-up-link.png b/koha-tmpl/intranet-tmpl/prog/img/pop-up-link.png new file mode 100644 index 0000000000000000000000000000000000000000..77ffc75e040d8c27f8ba21b010c19a47a1b15792 GIT binary patch literal 205 zcmeAS at N?(olHy`uVBq!ia0vp^+(699!3-oX?^2ToQY`6?zK#qG>ra at ocD)4hB}-f* zN`mv#O3D+9QW+dm@{>{(JaZG%Q-e|yQz{EjrrH1%u?6^qxH2%D`Tzg_Os8|nKoO>r zAiv=M3{STkcma9#o-U3d6}OTSQc_YHm>L+87&b~CY+zJqm~fMUk!3RTMn)!%BMl(( tOdC+TNt+?5fx#(_nMGiei9-V;1J4x(>!kFQJwT%vJYD@<);T3K0Ra1$I)nfK literal 0 HcmV?d00001 diff --git a/members/borrowers_details.pl b/members/borrowers_details.pl deleted file mode 100755 index c861ad4..0000000 --- a/members/borrowers_details.pl +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/perl -# NOTE: This file uses standard 8-space tabs -# DO NOT SET TAB SIZE TO 4 - - -#script to set up screen for modification of borrower details -#written 20/12/99 by chris at katipo.co.nz - - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with Koha; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -use strict; -#use warnings; FIXME - Bug 2505 -use CGI; -use C4::Auth; -use C4::Context; -use C4::Output; -use C4::Members; -use C4::Koha; -use C4::Dates qw(format_date); -use C4::Input; -use C4::Log; -my $input = new CGI; -my $dbh = C4::Context->dbh; -my %data; - -my ($template, $loggedinuser, $cookie) - = get_template_and_user({template_name => "members/borrowers_details.tmpl", - query => $input, - type => "intranet", - authnotrequired => 0, - flagsrequired => {borrowers => 1}, - debug => 1, - }); - -my $data; -my $categorycode=$input->param('categorycode'); -my $borrowernumber=$input->param('borrowernumber'); -my $description=$input->param('description'); -my $category_type=$input->param('category_type'); - -$data=GetMember('borrowernumber' => $borrowernumber); - -$template->param( borrowernumber => $borrowernumber,#register number - #transform value in capital or capital for first letter of the word - firstname => ucfirst($data->{'firstname'}), - surname => uc($data->{'surname'}), - categorycode => $data->{'categorycode'}, - title => $data->{'title'}, - category_type => $data->{'category_type'}, - "title_".$data->{'title'} => " SELECTED ", - dateofbirth => format_date($data->{'dateofbirth'}), - description => $data->{'description'} - ); -$template->param(Institution => 1) if ($category_type eq "I"); -output_html_with_http_headers $input, $cookie, $template->output; - -# Local Variables: -# tab-width: 8 -# End: diff --git a/members/moremember.pl b/members/moremember.pl index 3fffb54..beec293 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -89,6 +89,9 @@ if ($print eq "page") { $template_name = "members/moremember-receipt.tmpl"; $quickslip = 1; $flagsrequired = { circulate => "circulate_remaining_permissions" }; +} elsif ($print eq "brief") { + $template_name = "members/moremember-brief.tmpl"; + $flagsrequired = { borrowers => 1 }; } else { $template_name = "members/moremember.tmpl"; $flagsrequired = { borrowers => 1 }; -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 20:42:05 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 14:42:05 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5029 - Update patron deletion error page Message-ID: <1289677325-31146-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard - Styling error message with "dialog alert" class - Adding sidebar patron details to match other patron pages Signed-off-by: Galen Charlton --- .../prog/en/modules/members/deletemem.tmpl | 10 +++++--- members/deletemem.pl | 24 +++++++++++++++++++- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tmpl index b69fe6c..f0b1d46 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tmpl @@ -12,7 +12,9 @@
          -

          Cannot Delete Patron

          + +
          +

          Cannot Delete Patron

          • Patron has item(s) checked out.
          • @@ -22,12 +24,12 @@
          • Patron's record has guaranteed accounts attached.
          - +
          - +
          - + \ No newline at end of file diff --git a/members/deletemem.pl b/members/deletemem.pl index 53297a3..b1ba709 100755 --- a/members/deletemem.pl +++ b/members/deletemem.pl @@ -29,6 +29,7 @@ use C4::Context; use C4::Output; use C4::Auth; use C4::Members; +use C4::Branch; # GetBranches my $input = new CGI; @@ -80,7 +81,28 @@ $sth->execute($member); my $data=$sth->fetchrow_hashref; if ($countissues > 0 or $flags->{'CHARGES'} or $data->{'borrowernumber'}){ # print $input->header; - $template->param(borrowernumber => $member); + + my ($picture, $dberror) = GetPatronImage($bor->{'cardnumber'}); + $template->param( picture => 1 ) if $picture; + + $template->param(borrowernumber => $member, + surname => $bor->{'surname'}, + title => $bor->{'title'}, + cardnumber => $bor->{'cardnumber'}, + firstname => $bor->{'firstname'}, + categorycode => $bor->{'categorycode'}, + category_type => $bor->{'category_type'}, + categoryname => $bor->{'description'}, + address => $bor->{'address'}, + address2 => $bor->{'address2'}, + city => $bor->{'city'}, + zipcode => $bor->{'zipcode'}, + country => $bor->{'country'}, + phone => $bor->{'phone'}, + email => $bor->{'email'}, + branchcode => $bor->{'branchcode'}, + branchname => GetBranchName($bor->{'branchcode'}), + ); if ($countissues >0) { $template->param(ItemsOnIssues => $countissues); } -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 21:00:22 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 15:00:22 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Additional fix for Bug 4423 - Staff Client XSLT is just a copy of the OPAC one Message-ID: <1289678422-32278-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard - Adding "Lists that include this title" links - Also correcting minor XHTML error in the same section of opac-detail.tmpl Signed-off-by: Galen Charlton --- .../prog/en/modules/catalogue/detail.tmpl | 12 +++++++++++- .../opac-tmpl/prog/en/modules/opac-detail.tmpl | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl index 547a36d..e3391ac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl @@ -71,8 +71,18 @@ function verify_images() { - + + + + Lists that include this title: + + "> + | + + + +
          /gp/reader//ref=sib_dp_pt/002-7879865-0184864#reader-link">.01.MZZZZZZZ.jpg" alt="" /> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl index 876ae81..084c484 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -228,7 +228,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { List(s) this item appears in: - &sortfield=title"> + "> | -- 1.7.0 From gmcharlt at gmail.com Sat Nov 13 22:54:54 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 16:54:54 -0500 Subject: [Koha-patches] Pull requst - git://git.librarypolice.com/git/koha-galen.git suggestion-notification-fixes Message-ID: <1289685294-2848-1-git-send-email-gmcharlt@gmail.com> Consolidated patches for getting purchase suggestion status change notifications working. Candidate for both master and 3.2.x. The following changes since commit 1edf825fa1e439b2ced523e22174ad1e6d8971bc: Chris Cormack (1): Merge remote branch 'kc/new/bug_4498' into kcmaster are available in the git repository at: git://git.librarypolice.com/git/koha-galen.git suggestion-notification-fixes Chris Cormack (1): Bug 4211: This patch should provide a working way to send out mail from suggestions Galen Charlton (4): bug 4211: more fixes to suggestion letter template handling bug 4211: ensure that suggestion emails have full details bug 5127: sample notice templates for suggestions bug 5127: database update to add the suggestion notification templates C4/Letters.pm | 3 +- C4/Suggestions.pm | 28 ++++++---- .../data/mysql/de-DE/mandatory/sample_notices.sql | 6 ++- .../data/mysql/en/mandatory/sample_notices.sql | 6 ++- .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 6 ++- installer/data/mysql/it-IT/necessari/notices.sql | 6 ++- .../data/mysql/pl-PL/mandatory/sample_notices.sql | 6 ++- .../data/mysql/ru-RU/mandatory/sample_notices.sql | 6 ++- .../data/mysql/uk-UA/mandatory/sample_notices.sql | 6 ++- installer/data/mysql/updatedatabase.pl | 34 +++++++++++ .../suggestion/mail_suggestion_ACCEPTED.tmpl | 11 ---- .../suggestion/mail_suggestion_AVAILABLE.tmpl | 11 ---- .../suggestion/mail_suggestion_ORDERED.tmpl | 13 ---- .../suggestion/mail_suggestion_REJECTED.tmpl | 13 ---- .../prog/en/modules/tools/letter.tmpl | 23 +++++--- tools/letter.pl | 59 +------------------ 16 files changed, 105 insertions(+), 132 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/mail_suggestion_ACCEPTED.tmpl delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/mail_suggestion_AVAILABLE.tmpl delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/mail_suggestion_ORDERED.tmpl delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/mail_suggestion_REJECTED.tmpl From ian.walls at bywatersolutions.com Sat Nov 13 23:40:03 2010 From: ian.walls at bywatersolutions.com (Ian Walls) Date: Sat, 13 Nov 2010 17:40:03 -0500 Subject: [Koha-patches] [PATCH] Bug 4222 - allow nonpublicnote to be a mapped DB column In-Reply-To: References: <1289532464-27953-1-git-send-email-robin@catalyst.net.nz> Message-ID: Galen, Excellent, yes, removing the dependence on C4::Biblio greatly increases the speed; not only does it process faster, but it makes it easier to only select items that something in more_subfields_xml in the first place. I'm going to make it part of the script, since my initial tests show that the wait time for a medium/large catalog is only a few seconds. -Ian On Sat, Nov 13, 2010 at 12:39 PM, Galen Charlton wrote: > Hi, > > On Sat, Nov 13, 2010 at 12:31 PM, Ian Walls > wrote: > > Depending on the number of biblios, this could cause the > updatedatabase.pl > > script to take a VERY long time to complete. It would also require the > use > > of C4::Biblio (or else rewriting the GetMarcBiblio subroutine within the > > updatedatabase.pl script). Is it worth making this part of > > updatedatabase.pl, or should a separate cleanup script be written? > > Actually, it wouldn't require use of C4::Biblio. If non-public notes > exist but are not mapped to a field in the items table, they will end > up in items.more_subfields_xml. An upgrade script can simply munge > items.more_subfields_xml and items.nonpublicnote, but would not need > to touch the bib MARC. For example, if the note is embedded in the > 952$x, as far as the bib record is concerned it will remain there; > only two columns in items would change. > > For a database with a large number of item records, it could still > take a while to complete, so a separate script may still be justified, > but it wouldn't need to touch the bib records. > > Regards, > > Galen > -- > Galen Charlton > gmcharlt at gmail.com > -- Ian Walls Lead Development Specialist ByWater Solutions Phone # (888) 900-8944 http://bywatersolutions.com ian.walls at bywatersolutions.com Twitter: @sekjal -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmcharlt at gmail.com Sun Nov 14 04:37:10 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 13 Nov 2010 22:37:10 -0500 Subject: [Koha-patches] [PATCH] bug 5405: remove disused script catalogue/suggest.pl Message-ID: <1289705830-5792-1-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- catalogue/suggest.pl | 59 -------------------- .../prog/en/modules/catalogue/suggest.tmpl | 51 ----------------- 2 files changed, 0 insertions(+), 110 deletions(-) delete mode 100755 catalogue/suggest.pl delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/suggest.tmpl diff --git a/catalogue/suggest.pl b/catalogue/suggest.pl deleted file mode 100755 index c348c76..0000000 --- a/catalogue/suggest.pl +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/perl -# WARNING: 4-character tab stops here - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with Koha; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -use strict; -#use warnings; FIXME - Bug 2505 - -use CGI; -use C4::Auth; - -use C4::Context; -use C4::Auth; -use C4::Output; -use C4::Biblio; -use C4::Acquisition; -use C4::Koha; # XXX subfield_is_koha_internal_p - -# Creates the list of active tags using the active MARC configuration -my $query=new CGI; -my $Q=$query->param('Q'); -my @words = split / /,$Q; -my $dbh = C4::Context->dbh; - -my $suggestions = findsuggestion($dbh,\@words); -my @loop_suggests; -foreach my $line (@$suggestions) { - my ($word,$suggestion,$count) = split /\|/,$line; - push @loop_suggests, { word => $word, suggestion =>$suggestion, count => $count }; -} - -my ($template, $loggedinuser, $cookie) - = get_template_and_user({template_name => "catalogue/suggest.tmpl", - query => $query, - type => "intranet", - authnotrequired => 0, - flagsrequired => {editcatalogue => 'edit_catalogue'}, - debug => 1, - }); -$template->param("loop" => \@loop_suggests, - ); - -output_html_with_http_headers $query, $cookie, $template->output; - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/suggest.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/suggest.tmpl deleted file mode 100644 index ac1ae2b..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/suggest.tmpl +++ /dev/null @@ -1,51 +0,0 @@ - -Koha › Suggestions - - - - - -
          - -
          -
          -
          - -
    - - - - - - - - - - - - - -
    Catalog Search
    Initial wordSuggestedUsed X times
    ','')"> - -
    - - - -
    -
    -
    - - - \ No newline at end of file -- 1.7.0 From f.demians at tamil.fr Sun Nov 14 10:51:31 2010 From: f.demians at tamil.fr (=?ISO-8859-1?Q?Fr=E9d=E9ric_DEMIANS?=) Date: Sun, 14 Nov 2010 10:51:31 +0100 Subject: [Koha-patches] [PATCH] bug 5400: new test case to find files with merge conflict markers In-Reply-To: <1289658975-20565-1-git-send-email-gmcharlt@gmail.com> References: <1289658975-20565-1-git-send-email-gmcharlt@gmail.com> Message-ID: <4CDFB123.3090304@tamil.fr> > Signed-off-by: Galen Charlton > --- > t/00-merge-conflict-markers.t | 59 > +++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 59 insertions(+), 0 deletions(-) > create mode 100644 t/00-merge-conflict-markers.t This patch will add 3733 new tests for a total of 4445, ie 84% of all tests. Shouldn't it be better if merge conflict markers tests count as one unique test? From gmcharlt at gmail.com Sun Nov 14 16:43:25 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sun, 14 Nov 2010 10:43:25 -0500 Subject: [Koha-patches] [PATCH] bug 5400: new test case to find files with merge conflict markers In-Reply-To: <4CDFB123.3090304@tamil.fr> References: <1289658975-20565-1-git-send-email-gmcharlt@gmail.com> <4CDFB123.3090304@tamil.fr> Message-ID: Hi, 2010/11/14 Fr?d?ric DEMIANS : > This patch will add 3733 new tests for a total of 4445, ie 84% of all tests. > Shouldn't it be better if merge conflict markers tests count as one unique > test? I don't see that it makes a difference either way -- ultimately each file is tested anyway, and the test case would have to do more work to artificially run as a single test. Here is what really matters -- increasing the test case coverage of the code: http://bugs.koha-community.org:8080/job/Koha_Master/HTML_Report/? Regards, Galen -- Galen Charlton gmcharlt at gmail.com From savitra.sirohi at osslabs.biz Sun Nov 14 17:49:44 2010 From: savitra.sirohi at osslabs.biz (savitra sirohi) Date: Sun, 14 Nov 2010 22:19:44 +0530 Subject: [Koha-patches] [PATCH] Analytical records support In-Reply-To: References: <1288525758-1085-1-git-send-email-amit.gupta@osslabs.biz> Message-ID: Hi Jared, we have known that our use of 'w' and 'o' are far from ideal. I think what you suggest is great and we would like to implement this. Couple of questions: 1. Can you please expand on how we could "extend analytical support to ISBN and other standard identifiers". For instance, what would $w contain if one were using ISBN as a host record identifier. And which field in the host record would we look in to find the ISBN - 001 or in 020? 2. What about the item identifier? We were planning on recording barcode (952$p) in $o, and not referring to the itemnumber in the MARC record at all. Thanks, Savitra On Thu, Nov 11, 2010 at 10:55 PM, Jared Camins-Esakov wrote: > Amit, > [ ... snipped a long patch ...] > > I am concerned about the impact of the way you are using subfield 'w' and > subfield 'o'... those subfields may be used by other libraries, which could > lead to incorrect linkages when sharing records. The standard usage for > subfield 'w' is to include the library's MARC Organizational Code in > parentheses to indicate the source. For example "$w(NNAN)12345" indicates > that the record control number is from the American Numismatic Society. To > use subfield 'w' for LCCN, one would use "$w(DLC)##2010000034#". Could I > suggest that rather than assuming every subfield 'w' and subfield 'o' > contains correct and relevant analytic coding that the linking take into > account both biblionumber/001 and 003? So rather than just looking for a > record with biblionumber/001 of '12345' (in my example), we'd need to look > for a record with that in the biblionumber/001 and 'NNAN' in the 003. > One of the nice side effects of this is that one could then easily extend > the analytic support to handle LCCNs, ISBNs, and other standard numbers > stored in 0XX fields in MARC21. > I suspect this probably also applies to UNIMARC... perhaps the subfield '5' > should be taken into account here? I'm a little confused by hdl's follow-up > patch because it seems to equate the contents of the 001 field with the > biblionumber, and I'm pretty sure that there isn't any guaranteed > relationship. Actually, on second thought, this is a problem with the entire > concept. Biblionumber is not a robust identifier, and using it will break, > for example, union catalog situations (this seems to be the case with > BSZ-BW). > Following on the discussion about this currently taking place, perhaps it > would make sense to store the biblionumber in $0 or $9, reserving $w for 001 > identifiers, and adjusting import/cataloging to automatically convert robust > $w links to local $0 or $9 links. > Regards, > Jared Camins-Esakov > -- > Jared Camins-Esakov > Freelance bibliographer, C & P Bibliography Services, LLC > (phone) +1 (917) 727-3445 > (e-mail) jcamins at cpbibliography.com > (web) http://www.cpbibliography.com/ > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ > From savitra.sirohi at osslabs.biz Sun Nov 14 17:56:21 2010 From: savitra.sirohi at osslabs.biz (savitra sirohi) Date: Sun, 14 Nov 2010 22:26:21 +0530 Subject: [Koha-patches] [PATCH] Ability to link to items belong to host records from a analytical record In-Reply-To: References: <1289413324-3877-1-git-send-email-savitra.sirohi@osslabs.biz> <20101110221914.GC4325@rorohiko> Message-ID: Hi Chris, can you please go ahead and apply this one, I will update the copyright per Galen's suggestion in a subsequent patch this week. Hi Galen, on moving the code to C4, will do. Thanks for the suggestions. - Savitra On Thu, Nov 11, 2010 at 7:07 PM, Galen Charlton wrote: > Hi, > > On Wed, Nov 10, 2010 at 5:19 PM, Chris Cormack wrote: >> * savitra.sirohi at osslabs.biz (savitra.sirohi at osslabs.biz) wrote: >>> From: Amit Gupta >>> >>> --- >>> ?cataloguing/linkitem.pl ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? 98 ++++++++++++++++++++ >>> ?.../intranet-tmpl/prog/en/includes/cat-toolbar.inc | ? ?1 + >>> ?.../prog/en/modules/cataloguing/linkitem.tmpl ? ? ?| ? 57 +++++++++++ >>> ?3 files changed, 156 insertions(+), 0 deletions(-) >>> ?create mode 100755 cataloguing/linkitem.pl >>> ?create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/linkitem.tmpl >>> >>> diff --git a/cataloguing/linkitem.pl b/cataloguing/linkitem.pl >>> new file mode 100755 >>> index 0000000..bff001e >>> --- /dev/null >>> +++ b/cataloguing/linkitem.pl >>> @@ -0,0 +1,98 @@ >>> +#!/usr/bin/perl >>> + >>> +# Move an item from a biblio to another >>> +# >>> +# Copyright 2009 BibLibre >> >> Can you please fix the copyright statement here, and resend >> >> (You might want to check the other patches too, if we want to get into >> debian we need correct copyright (or at least a lot more correct than we >> have now) statements > > linkitem.pl is clearly a copy-and-paste of moveitem.pl with a few changes, so > > "Copyright 2009 BibLibre > Copyright 2010 OSSLabs" > > (or something like that) is probably the correct copyright statement. > > Also, a note on the patch itself - it's not ideal to have the MARC21 > 773 field be referenced directly in the script - that really should be > wrapped in a C4 routine so that it is easier to maintain (and for Zeno > to add the UNIMARC support). > > Regards, > > Galen > -- > Galen Charlton > gmcharlt at gmail.com > From mjr at phonecoop.coop Sun Nov 14 19:18:05 2010 From: mjr at phonecoop.coop (MJ Ray) Date: Sun, 14 Nov 2010 18:18:05 +0000 (GMT) Subject: [Koha-patches] Bug 5401: WYSWYG for Koha News In-Reply-To: Message-ID: <20101114181805.9B88FF7474@nail.towers.org.uk> Galen Charlton wrote: > Since TinyMCE is used by only one page, if we decide to switch to > elRTE (or to something else entirely), it won't be a big deal. Has > anybody done a direct comparison? I've used TinyMCE and haven't used elRTE, but wouldn't this question get better answers if asked on koha-devel? Thanks -- MJ Ray (slef), member of www.software.coop, a for-more-than-profit co-op. Past Koha Release Manager (2.0), LMS programmer, statistician, webmaster. In My Opinion Only: see http://mjr.towers.org.uk/email.html Available for hire for Koha work http://www.software.coop/products/koha From jcamins at cpbibliography.com Sun Nov 14 19:25:54 2010 From: jcamins at cpbibliography.com (Jared Camins-Esakov) Date: Sun, 14 Nov 2010 13:25:54 -0500 Subject: [Koha-patches] [PATCH] Analytical records support In-Reply-To: References: <1288525758-1085-1-git-send-email-amit.gupta@osslabs.biz> Message-ID: Savitra, 1. Can you please expand on how we could "extend analytical support to > ISBN and other standard identifiers". For instance, what would $w > contain if one were using ISBN as a host record identifier. And which > field in the host record would we look in to find the ISBN - 001 or in > 020? > Analytic links could be specified in a number of different ways if we eliminate the built-in assumptions about biblionumber: 773$w->001/003 773$z->020 773$x->022 773$u->027 773$y->030 773$w(DLC)->010 In the case of linking by ISBN (or anything other than 001 or LCCN), probably we wouldn't put anything in 773$w. Every type of link could be established at cataloging/import and a biblionumber stored in $9 in order to save on computation time at display. 2. What about the item identifier? We were planning on recording > barcode (952$p) in $o, and not referring to the itemnumber in the MARC > record at all. > I am still troubled about this one. The problem with using barcodes is that not all libraries will have barcodes, particularly for recent issues of journals (which might be indexed on receipt). Of course, using item number (or barcode) still leaves the problem that if you've analyzed all the articles in a particular book and have two copies of the book, you really want both items to show up, preferably without needing multiple 773 fields. I don't have a solution for this. There is also a problem if you modify the host item's record- the child item might get out-of-date. The only way I can see to deal with this is to add a cron job to run nightly that checks whether each host record has changed and, if it has, updates any dependent analytics. I'll think about these issues a bit more this afternoon and overnight, and try to send a follow-up message tomorrow when I'm at work. Regards, Jared -- Jared Camins-Esakov Freelance bibliographer, C & P Bibliography Services, LLC (phone) +1 (917) 727-3445 (e-mail) jcamins at cpbibliography.com (web) http://www.cpbibliography.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmcharlt at gmail.com Sun Nov 14 20:12:18 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sun, 14 Nov 2010 14:12:18 -0500 Subject: [Koha-patches] Bug 5401: WYSWYG for Koha News In-Reply-To: <20101114181805.9B88FF7474@nail.towers.org.uk> References: <20101114181805.9B88FF7474@nail.towers.org.uk> Message-ID: Hi, On Sun, Nov 14, 2010 at 1:18 PM, MJ Ray wrote: > Galen Charlton wrote: >> Since TinyMCE is used by only one page, if we decide to switch to >> elRTE (or to something else entirely), it won't be a big deal. ?Has >> anybody done a direct comparison? > > I've used TinyMCE and haven't used elRTE, but wouldn't this question > get better answers if asked on koha-devel? As the question was stated, yes, although if it turned out that Koustubha was just unaware that Koha was already using TinyMCE, a replacement patch using it instead of elRTE may have sufficed. There is a long standing practice of discussion of individual patches on koha-commits, however, so while koha-devel is certainly a valid choice for discussing this issue, I do want to point out and remind people that some relevant discussion does take place on the koha-commits list. Regards, Galen -- Galen Charlton gmcharlt at gmail.com From chris at bigballofwax.co.nz Sun Nov 14 20:24:51 2010 From: chris at bigballofwax.co.nz (Chris Cormack) Date: Mon, 15 Nov 2010 08:24:51 +1300 Subject: [Koha-patches] [Koha-devel] Bug 5401: WYSWYG for Koha News In-Reply-To: References: <20101114181805.9B88FF7474@nail.towers.org.uk> Message-ID: On 15 November 2010 08:12, Galen Charlton wrote: > Hi, > > On Sun, Nov 14, 2010 at 1:18 PM, MJ Ray wrote: >> Galen Charlton wrote: >>> Since TinyMCE is used by only one page, if we decide to switch to >>> elRTE (or to something else entirely), it won't be a big deal. ?Has >>> anybody done a direct comparison? >> >> I've used TinyMCE and haven't used elRTE, but wouldn't this question >> get better answers if asked on koha-devel? > > As the question was stated, yes, although if it turned out that > Koustubha was just unaware that Koha was already using TinyMCE, a > replacement patch using it instead of elRTE may have sufficed. > > There is a long standing practice of discussion of individual patches > on koha-commits, however, so while koha-devel is certainly a valid > choice for discussing this issue, I do want to point out and remind > people that some relevant discussion does take place on the > koha-commits list. > And on the koha-patches list too :) Chris From gmcharlt at gmail.com Sun Nov 14 20:31:36 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sun, 14 Nov 2010 14:31:36 -0500 Subject: [Koha-patches] [Koha-devel] Bug 5401: WYSWYG for Koha News In-Reply-To: References: <20101114181805.9B88FF7474@nail.towers.org.uk> Message-ID: Hi, On Sun, Nov 14, 2010 at 2:24 PM, Chris Cormack wrote: > And on the koha-patches list too :) Indeed. To understand my previous email correctly, please replace every use of "koha-commits" with "koha-patches". :) Regards, Galen -- Galen Charlton gmcharlt at gmail.com From chrisc at catalyst.net.nz Sun Nov 14 23:06:27 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Mon, 15 Nov 2010 11:06:27 +1300 Subject: [Koha-patches] [PATCH] Ability to link to items belong to host records from a analytical record In-Reply-To: References: <1289413324-3877-1-git-send-email-savitra.sirohi@osslabs.biz> <20101110221914.GC4325@rorohiko> Message-ID: <20101114220627.GP4325@rorohiko> * savitra sirohi (savitra.sirohi at osslabs.biz) wrote: > Hi Chris, can you please go ahead and apply this one, I will update > the copyright per Galen's suggestion in a subsequent patch this week. Done, its at new/awaiting_qa/analytical_records on git.koha-community.org/koha.git Chris > > Hi Galen, on moving the code to C4, will do. Thanks for the suggestions. > > - Savitra > > On Thu, Nov 11, 2010 at 7:07 PM, Galen Charlton wrote: > > Hi, > > > > On Wed, Nov 10, 2010 at 5:19 PM, Chris Cormack wrote: > >> * savitra.sirohi at osslabs.biz (savitra.sirohi at osslabs.biz) wrote: > >>> From: Amit Gupta > >>> > >>> --- > >>> ?cataloguing/linkitem.pl ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? 98 ++++++++++++++++++++ > >>> ?.../intranet-tmpl/prog/en/includes/cat-toolbar.inc | ? ?1 + > >>> ?.../prog/en/modules/cataloguing/linkitem.tmpl ? ? ?| ? 57 +++++++++++ > >>> ?3 files changed, 156 insertions(+), 0 deletions(-) > >>> ?create mode 100755 cataloguing/linkitem.pl > >>> ?create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/linkitem.tmpl > >>> > >>> diff --git a/cataloguing/linkitem.pl b/cataloguing/linkitem.pl > >>> new file mode 100755 > >>> index 0000000..bff001e > >>> --- /dev/null > >>> +++ b/cataloguing/linkitem.pl > >>> @@ -0,0 +1,98 @@ > >>> +#!/usr/bin/perl > >>> + > >>> +# Move an item from a biblio to another > >>> +# > >>> +# Copyright 2009 BibLibre > >> > >> Can you please fix the copyright statement here, and resend > >> > >> (You might want to check the other patches too, if we want to get into > >> debian we need correct copyright (or at least a lot more correct than we > >> have now) statements > > > > linkitem.pl is clearly a copy-and-paste of moveitem.pl with a few changes, so > > > > "Copyright 2009 BibLibre > > Copyright 2010 OSSLabs" > > > > (or something like that) is probably the correct copyright statement. > > > > Also, a note on the patch itself - it's not ideal to have the MARC21 > > 773 field be referenced directly in the script - that really should be > > wrapped in a C4 routine so that it is easier to maintain (and for Zeno > > to add the UNIMARC support). > > > > Regards, > > > > Galen > > -- > > Galen Charlton > > gmcharlt at gmail.com > > -- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From robin at catalyst.net.nz Sun Nov 14 23:15:31 2010 From: robin at catalyst.net.nz (Robin Sheat) Date: Mon, 15 Nov 2010 11:15:31 +1300 Subject: [Koha-patches] [PATCH] Bug 4222 - allow nonpublicnote to be a mapped DB column In-Reply-To: References: <1289532464-27953-1-git-send-email-robin@catalyst.net.nz> Message-ID: <1289772931.11078.81.camel@zarathud> Ian Walls schreef op za 13-11-2010 om 17:40 [-0500]: > Excellent, yes, removing the dependence on C4::Biblio greatly > increases the speed; not only does it process faster, but it makes it > easier to only select items that something in more_subfields_xml in > the first place. I'm going to make it part of the script, since my > initial tests show that the wait time for a medium/large catalog is > only a few seconds. Hi Ian, feel free to send me any updated versions of this patch to test, I'm hoping to set it up for a client some time in the next few days, and would much rather it was the version that goes into master that I gave them :) -- Robin Sheat Catalyst IT Ltd. ? +64 4 803 2204 GPG: 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part URL: From chrisc at catalyst.net.nz Mon Nov 15 03:38:11 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Mon, 15 Nov 2010 15:38:11 +1300 Subject: [Koha-patches] [PATCH] Brooke caught my april fools trick, its not 20004 yet! Message-ID: <1289788691-18769-1-git-send-email-chrisc@catalyst.net.nz> Ok it wasn't an april fools trick, but just a typo, april fools trick sounds better though right? --- docs/history.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/docs/history.txt b/docs/history.txt index 2dd63e0..dfc4b4c 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -172,7 +172,7 @@ Feb 11 2004 Paul Poulain announces release of 2.0.0rc4 Feb 19 2004 Stephen Hedges provides his migrating to Koha documentation to the community Mar 7 2004 Installation guide improved and released in pdf format Mar 30 2004 Baiju M provides a neat migrating from CDS/ISIS to Koha document -April 1 20004 Koha 2.0.0 released +April 1 2004 Koha 2.0.0 released April 17 2004 Nicholas S. Rosasco resurrects and updates the FAQ April 17 2004 Seminar on Koha at Cairo University, Egypt May 13-16 2004 Zeki Celikbas presents Koha at a linux festival in Ankara, Turkey -- 1.7.0.4 From kmkale at anantcorp.com Mon Nov 15 04:56:02 2010 From: kmkale at anantcorp.com (Koustubha Kale) Date: Mon, 15 Nov 2010 09:26:02 +0530 Subject: [Koha-patches] Bug 5401: WYSWYG for Koha News In-Reply-To: References: <20101114181805.9B88FF7474@nail.towers.org.uk> Message-ID: On Mon, Nov 15, 2010 at 12:42 AM, Galen Charlton wrote: > Hi, > > On Sun, Nov 14, 2010 at 1:18 PM, MJ Ray wrote: >> Galen Charlton wrote: >>> Since TinyMCE is used by only one page, if we decide to switch to >>> elRTE (or to something else entirely), it won't be a big deal. ?Has >>> anybody done a direct comparison? >> >> I've used TinyMCE and haven't used elRTE, but wouldn't this question >> get better answers if asked on koha-devel? > > As the question was stated, yes, although if it turned out that > Koustubha was just unaware that Koha was already using TinyMCE, a > replacement patch using it instead of elRTE may have sufficed. As it happens I am aware of TinyMCE being already in Koha. But try as I might I could not get it to play nice ( read - at all ) with the News page. I tried the jquery varient of TinyMCE too and no go. Also I dont like the fact that the imagemanager etc of TinyMCE are only for paid customers. elRTE worked pretty well. Had to do some tweaks to its css etc. I have cleaned up the patch. Divided it into two separate patches. One for the elRTE library and one for the Koha changes I did. Now both apply squeaky clean. Got all features like image, media insert etc working now. Attaching both the patches here. Will also upload in bugzilla. Regards, Koustubha Kale Anant Corporation Contact Details : Address : 103, Armaan Residency, R. W Sawant Road, Nr. Golden Dyes Naka, Thane (w), Maharashtra, India, Pin : 400601. TeleFax : +91-22-21720108, +91-22-21720109 Mobile : +919820715876 Website : http://www.anantcorp.com Blog : http://www.anantcorp.com/blog/?author=2 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Bug-5401-WYSWYG-for-Koha-News-Patch-1-eltre-1.1-libr.patch Type: application/octet-stream Size: 874527 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-Bug-5401-WYSWYG-for-Koha-News-Patch-2-Koha-files.patch Type: application/octet-stream Size: 4999 bytes Desc: not available URL: From cfouts at liblime.com Mon Nov 15 09:17:20 2010 From: cfouts at liblime.com (Clay Fouts) Date: Mon, 15 Nov 2010 08:17:20 +0000 Subject: [Koha-patches] [PATCH] Bug 5408 - Refactor GetIssuingRule and GetLoanLength Message-ID: <1289809040-1427-1-git-send-email-cfouts@liblime.com> This collapses the series of queries within GetIssuingRule into a single query, the result of which is cached for future uses. Also refactors GetLoanLength to call GetIssuingRule instead of submitting its own queries. The purpose of this is to simplify and optimize the code. The API and behavior remain unchanged. --- C4/Circulation.pm | 139 ++++++-------------- t/Circulation.t | 385 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 425 insertions(+), 99 deletions(-) create mode 100755 t/Circulation.t diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 10c3c11..9081c8e 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1071,121 +1071,62 @@ sub AddIssue { return ($datedue); # not necessarily the same as when it came in! } -=head2 GetLoanLength - - my $loanlength = &GetLoanLength($borrowertype,$itemtype,branchcode) - -Get loan length for an itemtype, a borrower type and a branch - -=cut - -sub GetLoanLength { - my ( $borrowertype, $itemtype, $branchcode ) = @_; - my $dbh = C4::Context->dbh; - my $sth = - $dbh->prepare( -"select issuelength from issuingrules where categorycode=? and itemtype=? and branchcode=? and issuelength is not null" - ); -# warn "in get loan lenght $borrowertype $itemtype $branchcode "; -# try to find issuelength & return the 1st available. -# check with borrowertype, itemtype and branchcode, then without one of those parameters - $sth->execute( $borrowertype, $itemtype, $branchcode ); - my $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( $borrowertype, "*", $branchcode ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( "*", $itemtype, $branchcode ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( "*", "*", $branchcode ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( $borrowertype, $itemtype, "*" ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( $borrowertype, "*", "*" ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( "*", $itemtype, "*" ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( "*", "*", "*" ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - # if no rule is set => 21 days (hardcoded) - return 21; -} - =head2 GetIssuingRule - my $irule = &GetIssuingRule($borrowertype,$itemtype,branchcode) - -FIXME - This is a copy-paste of GetLoanLength -as a stop-gap. Do not wish to change API for GetLoanLength -this close to release, however, Overdues::GetIssuingRules is broken. - Get the issuing rule for an itemtype, a borrower type and a branch Returns a hashref from the issuingrules table. +my $irule = &GetIssuingRule($categorycode, $itemtype, $branchcode) + =cut -sub GetIssuingRule { - my ( $borrowertype, $itemtype, $branchcode ) = @_; - my $dbh = C4::Context->dbh; - my $sth = $dbh->prepare( "select * from issuingrules where categorycode=? and itemtype=? and branchcode=? and issuelength is not null" ); - my $irule; +our $irule_cache = undef; + +sub _populate_irule_cache() { + $irule_cache = C4::Context->dbh->selectall_hashref( + 'SELECT * FROM issuingrules WHERE issuelength IS NOT NULL', + ['categorycode', 'itemtype', 'branchcode']) or + die sprintf "Cannot get issuingrules: %s\n", $!; + + return $irule_cache; +} - $sth->execute( $borrowertype, $itemtype, $branchcode ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; +sub _clear_irule_cache { + return $irule_cache = undef; +} - $sth->execute( $borrowertype, "*", $branchcode ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; +sub GetIssuingRule($$$) { + my ($categorycode, $itemtype, $branchcode) = @_; + + $irule_cache //= _populate_irule_cache(); + my $irule = $irule_cache->{$categorycode}{$itemtype}{$branchcode} // + $irule_cache->{$categorycode}{'*'}{$branchcode} // + $irule_cache->{'*'}{$itemtype}{$branchcode} // + $irule_cache->{'*'}{'*'}{$branchcode} // + $irule_cache->{$categorycode}{$itemtype}{'*'} // + $irule_cache->{$categorycode}{'*'}{'*'} // + $irule_cache->{'*'}{$itemtype}{'*'} // + $irule_cache->{'*'}{'*'}{'*'} // + undef; + + return $irule; +} - $sth->execute( "*", $itemtype, $branchcode ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; +=head2 GetLoanLength - $sth->execute( "*", "*", $branchcode ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; +Get loan length for an itemtype, a borrower type and a branch - $sth->execute( $borrowertype, $itemtype, "*" ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; +my $loanlength = &GetLoanLength($categorycode, $itemtype, $branchcode) - $sth->execute( $borrowertype, "*", "*" ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; +=cut - $sth->execute( "*", $itemtype, "*" ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; +sub GetLoanLength($$$) { + my ($categorycode, $itemtype, $branchcode) = @_; - $sth->execute( "*", "*", "*" ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; + my $irule = GetIssuingRule($categorycode, $itemtype, $branchcode); + my $loanlength = ($irule) ? $irule->{issuelength} : 21; - # if no rule matches, - return undef; + return $loanlength; } =head2 GetBranchBorrowerCircRule diff --git a/t/Circulation.t b/t/Circulation.t new file mode 100755 index 0000000..cd431d0 --- /dev/null +++ b/t/Circulation.t @@ -0,0 +1,385 @@ +#!/usr/bin/perl + +use vars qw($C4::Circulation::irule_cache); + +use strict; +use warnings; + +use Test::More tests => 9; +use YAML; + +use_ok('C4::Circulation'); + +my $irules_yaml = q{ +--- +'': + '': {} + '*': {} +'*': + '': {} + '*': + '*': + accountsent: ~ + branchcode: '*' + categorycode: '*' + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.000000 + firstremind: 1 + holdallowed: 2 + issuelength: 21 + itemtype: '*' + max_fine: 0.000000 + max_holds: ~ + maxissueqty: 25 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + APL: + accountsent: ~ + branchcode: APL + categorycode: '*' + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.100000 + firstremind: 0 + holdallowed: 2 + issuelength: 21 + itemtype: '*' + max_fine: 5.000000 + max_holds: ~ + maxissueqty: 999 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + LML: + accountsent: ~ + branchcode: LML + categorycode: '*' + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.000000 + firstremind: 1 + holdallowed: 2 + issuelength: 14 + itemtype: '*' + max_fine: 500.000000 + max_holds: ~ + maxissueqty: 500 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + MSPL: + accountsent: ~ + branchcode: MSPL + categorycode: '*' + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.100000 + firstremind: 2 + holdallowed: 2 + issuelength: 21 + itemtype: '*' + max_fine: 5.000000 + max_holds: ~ + maxissueqty: 20 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + MVS: + accountsent: ~ + branchcode: MVS + categorycode: '*' + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.000000 + firstremind: 1 + holdallowed: 2 + issuelength: 14 + itemtype: '*' + max_fine: 20.000000 + max_holds: ~ + maxissueqty: 5 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + DVD: + APL: + accountsent: ~ + branchcode: APL + categorycode: '*' + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.250000 + firstremind: 0 + holdallowed: 2 + issuelength: 7 + itemtype: DVD + max_fine: 5.000000 + max_holds: ~ + maxissueqty: 999 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + VHS: + APL: + accountsent: ~ + branchcode: APL + categorycode: '*' + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.250000 + firstremind: 0 + holdallowed: 2 + issuelength: 7 + itemtype: VHS + max_fine: 5.000000 + max_holds: ~ + maxissueqty: 999 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + BPL: + accountsent: ~ + branchcode: BPL + categorycode: '*' + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.500000 + firstremind: 0 + holdallowed: 2 + issuelength: 3 + itemtype: VHS + max_fine: 500.000000 + max_holds: ~ + maxissueqty: 2 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + MSPL: + accountsent: ~ + branchcode: MSPL + categorycode: '*' + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.500000 + firstremind: 2 + holdallowed: 2 + issuelength: 5 + itemtype: VHS + max_fine: 5.000000 + max_holds: ~ + maxissueqty: 5 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ +STUD: + '*': + LML: + accountsent: ~ + branchcode: LML + categorycode: STUD + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.000000 + firstremind: 1 + holdallowed: 2 + issuelength: 28 + itemtype: '*' + max_fine: 500.000000 + max_holds: ~ + maxissueqty: 500 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + MVS: + accountsent: ~ + branchcode: MVS + categorycode: STUD + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.000000 + firstremind: 1 + holdallowed: 2 + issuelength: 7 + itemtype: '*' + max_fine: 20.000000 + max_holds: ~ + maxissueqty: 2 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + WELD: + accountsent: ~ + branchcode: WELD + categorycode: STUD + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.000000 + firstremind: 3 + holdallowed: 2 + issuelength: 7 + itemtype: '*' + max_fine: 50.000000 + max_holds: ~ + maxissueqty: 2 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + YPL: + accountsent: ~ + branchcode: YPL + categorycode: STUD + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.150000 + firstremind: 0 + holdallowed: 2 + issuelength: 21 + itemtype: '*' + max_fine: 500.000000 + max_holds: ~ + maxissueqty: 6 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + DVD: + YPL: + accountsent: ~ + branchcode: YPL + categorycode: STUD + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 1.000000 + firstremind: 0 + holdallowed: 2 + issuelength: 7 + itemtype: DVD + max_fine: 500.000000 + max_holds: ~ + maxissueqty: 2 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + PERIODICAL: + YPL: + accountsent: ~ + branchcode: YPL + categorycode: STUD + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.150000 + firstremind: 0 + holdallowed: 2 + issuelength: 7 + itemtype: PERIODICAL + max_fine: 500.000000 + max_holds: ~ + maxissueqty: 5 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + VHS: + YPL: + accountsent: ~ + branchcode: YPL + categorycode: STUD + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 1.000000 + firstremind: 0 + holdallowed: 2 + issuelength: 7 + itemtype: VHS + max_fine: 500.000000 + max_holds: ~ + maxissueqty: 2 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ +VISITOR: + '*': + MSPL: + accountsent: ~ + branchcode: MSPL + categorycode: VISITOR + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.100000 + firstremind: 2 + holdallowed: 2 + issuelength: 21 + itemtype: '*' + max_fine: 5.000000 + max_holds: ~ + maxissueqty: 3 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + DVD: + MSPL: + accountsent: ~ + branchcode: MSPL + categorycode: VISITOR + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.500000 + firstremind: 0 + holdallowed: 2 + issuelength: 5 + itemtype: DVD + max_fine: 5.000000 + max_holds: ~ + maxissueqty: 1 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ + VHS: + MSPL: + accountsent: ~ + branchcode: MSPL + categorycode: VISITOR + chargename: ~ + chargeperiod: 1 + circ_termsets_id: ~ + fine: 0.500000 + firstremind: 0 + holdallowed: 2 + issuelength: 5 + itemtype: VHS + max_fine: 5.000000 + max_holds: ~ + maxissueqty: 1 + rentaldiscount: ~ + reservecharge: ~ + restrictedtype: ~ +}; + +$C4::Circulation::irule_cache = Load($irules_yaml); + +is(C4::Circulation::GetLoanLength('VISITOR', 'DVD', 'MSPL'), 5, 'GetLoanLength 1'); +is(C4::Circulation::GetLoanLength('VISITOR', 'VHS', undef), 21, 'GetLoanLength 2'); +is(C4::Circulation::GetLoanLength('STUD', 'invalid', 'MVS'), 7, 'GetLoanLength 3'); +is(C4::Circulation::GetLoanLength('STUD', undef, 'MVS'), 7, 'GetLoanLength 4'); +is(C4::Circulation::GetLoanLength(undef, undef, 'APL'), 21, 'GetLoanLength 5'); +is(C4::Circulation::GetLoanLength(undef, 'DVD', 'APL'), 7, 'GetLoanLength 6'); +is(C4::Circulation::GetLoanLength(undef, undef, 'LML'), 14, 'GetLoanLength 7'); +is(C4::Circulation::GetLoanLength(undef, undef, undef), 21, 'GetLoanLength 8'); -- 1.5.6.5 From chrisc at catalyst.net.nz Mon Nov 15 10:23:55 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Mon, 15 Nov 2010 22:23:55 +1300 Subject: [Koha-patches] [PATCH] Bug 5408 - Refactor GetIssuingRule and GetLoanLength In-Reply-To: <1289809040-1427-1-git-send-email-cfouts@liblime.com> References: <1289809040-1427-1-git-send-email-cfouts@liblime.com> Message-ID: <20101115092355.GV4325@rorohiko> * Clay Fouts (cfouts at liblime.com) wrote: > This collapses the series of queries within GetIssuingRule into a single query, > the result of which is cached for future uses. Also refactors GetLoanLength to > call GetIssuingRule instead of submitting its own queries. The purpose of this > is to simplify and optimize the code. The API and behavior remain unchanged. Hi Clay I like the idea, is the plan to send a follow up patch so that when an issuing rule is changed, we clear the cached data? Chris -- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From mjr at phonecoop.coop Mon Nov 15 11:10:29 2010 From: mjr at phonecoop.coop (MJ Ray) Date: Mon, 15 Nov 2010 10:10:29 +0000 (GMT) Subject: [Koha-patches] Discussion of development topics, was: Bug 5401: WYSWYG for Koha News In-Reply-To: Message-ID: <20101115101029.EBBE4F7477@nail.towers.org.uk> Galen Charlton wrote: > There is a long standing practice of discussion of individual patches > on koha-commits, however, so while koha-devel is certainly a valid > choice for discussing this issue, I do want to point out and remind > people that some relevant discussion does take place on the > koha-commits list. I don't like that practice because:- 1. the list description "Patches submitted to Koha" gives no indication it occurs and it's different from other projects' -commit mailing lists; 2. developers have to subscribe to receive all patches even if they're only interested in their fields of activity and the occasional discussions, contributing to information overload; 3. I think the patches are carried in only one of the web forum versions of our discussions http://koha-community.org/support/forums/ 4. usually the patches relate to a bug and email discussion isn't automatically attached to the bug report - I have started work to address this, but it's still going to have some delay between the discussion and posting to the bug report, which may mean the discussion is irrelevant by the time the bug is told; 5. most importantly, many topics are wider than a single patch, such as this one about what rich editor to adopt. Can we overcome these problems, or state clearly that wider-than-one-patch discussions should be on -devel? Thanks, -- MJ Ray (slef), member of www.software.coop, a for-more-than-profit co-op. Past Koha Release Manager (2.0), LMS programmer, statistician, webmaster. In My Opinion Only: see http://mjr.towers.org.uk/email.html Available for hire for Koha work http://www.software.coop/products/koha From amit.gupta at osslabs.biz Mon Nov 15 06:28:46 2010 From: amit.gupta at osslabs.biz (Amit Gupta) Date: Mon, 15 Nov 2010 10:58:46 +0530 Subject: [Koha-patches] [PATCH] Bug 5409 - Fix call number not shown on opac search result page In-Reply-To: References: Message-ID: <1289798926-9971-1-git-send-email-amit.gupta@osslabs.biz> --- opac/opac-search.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 2bfcb6d..6ac8090 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -543,7 +543,7 @@ for (my $i=0;$i<@servers;$i++) { $template->param(stopwords_removed => "@$stopwords_removed") if $stopwords_removed; $template->param(results_per_page => $results_per_page); $template->param(SEARCH_RESULTS => \@newresults, - OPACItemsResultsDisplay => (C4::Context->preference("OPACItemsResultsDisplay") eq "itemdetails"?1:0), + OPACItemsResultsDisplay => (C4::Context->preference("OPACItemsResultsDisplay")), ); ## Build the page numbers on the bottom of the page my @page_numbers; -- 1.5.4.5 From gmcharlt at gmail.com Mon Nov 15 13:55:43 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 15 Nov 2010 07:55:43 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Brooke caught my april fools trick, its not 20004 yet! Message-ID: <1289825743-24934-1-git-send-email-gmcharlt@gmail.com> From: Chris Cormack Ok it wasn't an april fools trick, but just a typo, april fools trick sounds better though right? Signed-off-by: Galen Charlton --- docs/history.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/docs/history.txt b/docs/history.txt index 2dd63e0..dfc4b4c 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -172,7 +172,7 @@ Feb 11 2004 Paul Poulain announces release of 2.0.0rc4 Feb 19 2004 Stephen Hedges provides his migrating to Koha documentation to the community Mar 7 2004 Installation guide improved and released in pdf format Mar 30 2004 Baiju M provides a neat migrating from CDS/ISIS to Koha document -April 1 20004 Koha 2.0.0 released +April 1 2004 Koha 2.0.0 released April 17 2004 Nicholas S. Rosasco resurrects and updates the FAQ April 17 2004 Seminar on Koha at Cairo University, Egypt May 13-16 2004 Zeki Celikbas presents Koha at a linux festival in Ankara, Turkey -- 1.7.0 From M.de.Rooy at rijksmuseum.nl Mon Nov 15 14:02:19 2010 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 15 Nov 2010 13:02:19 +0000 Subject: [Koha-patches] [PATCH] Bug 3735 (Wrong search results for a few fields in ccl.properties) Message-ID: <809BE39CD64BFD4EB9036172EBCCFA311A21E6@S-MAIL-1B.rijksmuseum.intra> Eliminating syntax errors from ccl.properties. Adding four indexes to Search.pm, commenting out the remaining bath atts. --- C4/Search.pm | 4 ++++ etc/zebradb/ccl.properties | 27 ++++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index d36459a..3247d31 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -855,7 +855,9 @@ sub getIndexes{ 'id-other', 'Illustration-code', 'ISBN', + 'isbn', 'ISSN', + 'issn', 'itemtype', 'kw', 'Koha-Auth-Number', @@ -874,12 +876,14 @@ sub getIndexes{ 'mc-itemtype', 'mc-rtype', 'mus', + 'name', 'Name-geographic', 'Name-geographic-heading', 'Name-geographic-see', 'Name-geographic-seealso', 'nb', 'Note', + 'notes', 'ns', 'nt', 'pb', diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties index 4bca55e..18c3b69 100644 --- a/etc/zebradb/ccl.properties +++ b/etc/zebradb/ccl.properties @@ -1115,19 +1115,20 @@ sort3 7=3 ################################################### # Rules for a few bath atts -keyTitle = 1=33 -possessingInstitution = 1=1044 -name = 1=1002 -personalName = 1=1 -corporateName = 1=2 -conferenceName = 1=3 -uniformTitle = 1=6 -isbn = 1=7 -issn = 1=8 -geographicName = 1=58 -notes = 1=63 -topicalSubject = 1=1079 -genreForm = 1=1075 +# For recent changes in this section, see Bugzilla #3735 +#keyTitle 1=33 +#possessingInstitution 1=1044 +name 1=1002 +#personalName 1=1 +#corporateName 1=2 +#conferenceName 1=3 +#uniformTitle 1=6 +isbn 1=7 +issn 1=8 +#geographicName 1=58 +notes 1=63 +#topicalSubject 1=1079 +#genreForm 1=1075 ################################################### # Rules for a few GILS fields -- 1.6.0.6 From gmcharlt at gmail.com Mon Nov 15 14:02:48 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 15 Nov 2010 08:02:48 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 2122, Grayed out Fields not always visible Message-ID: <1289826168-25215-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard - Adding "readonly" class to readonly fields to guarantee that readonly state is indicated visually - Adding "locked" icon to the background of readonly fields for additional visual feedback Signed-off-by: Galen Charlton --- cataloguing/addbiblio.pl | 6 +++--- koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css | 3 ++- koha-tmpl/intranet-tmpl/prog/img/locked.png | Bin 0 -> 230 bytes 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/img/locked.png diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 86c049e..2c0c63d 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -366,7 +366,7 @@ sub create_input { id=\"".$subfield_data{id}."\" name=\"".$subfield_data{id}."\" value=\"$value\" - class=\"input_marceditor\" + class=\"input_marceditor readonly\" tabindex=\"1\" size=\"5\" maxlength=\"$max_length\" @@ -382,7 +382,7 @@ sub create_input { id=\"".$subfield_data{id}."\" name=\"".$subfield_data{id}."\" value=\"$value\" - class=\"input_marceditor\" + class=\"input_marceditor readonly\" tabindex=\"1\" size=\"67\" maxlength=\"$max_length\" @@ -396,7 +396,7 @@ sub create_input { id=\"".$subfield_data{id}."\" name=\"".$subfield_data{id}."\" value=\"$value\" - class=\"input_marceditor\" + class=\"input_marceditor readonly\" tabindex=\"1\" size=\"67\" maxlength=\"$max_length\" diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css b/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css index f763ad2..26a8066 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css @@ -132,4 +132,5 @@ a.tagnum { .linktools a {margin:0 2px;padding:2px;background-color:#FFF;text-align:center; } .linktools a:first-child { border-bottom: 1px solid #DDD; } .linktools a:hover { background-color: #FFC; } -.subfield_controls { margin : 0 .5em; } \ No newline at end of file +.subfield_controls { margin : 0 .5em; } +.readonly { border-width : 1px; border-style: inset; padding-left : 15px; background: #EEE url(../../img/locked.png) center left no-repeat; width:29em; } \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/img/locked.png b/koha-tmpl/intranet-tmpl/prog/img/locked.png new file mode 100644 index 0000000000000000000000000000000000000000..fd1b95cdf0cafa8c59e372ef9753d2c5026ca56e GIT binary patch literal 230 zcmeAS at N?(olHy`uVBq!ia0vp^JRr=$3?vg*uel1OSkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-&P4DbnYojG%6T3Xuw|NkqWC4L7A zGM5DT1^@rgaQzf7&_IR|PZ!6Kid#tuPD~7pM;gvBawu at LPZacFWD%Hgn8VG-hk>!> z5Kxe9gOUJ)5d#y)nM4LA0d|E3i5UyL99SF}7M@^W5$KX at U~t+fqR$ps7ohnJp00i_>zopr0PN*KegFUf literal 0 HcmV?d00001 -- 1.7.0 From gmcharlt at gmail.com Mon Nov 15 14:09:11 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 15 Nov 2010 08:09:11 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5004, Don't block deletion of cities when instances exist in borrowers table Message-ID: <1289826551-26037-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Galen Charlton --- admin/cities.pl | 9 ++------- .../prog/en/modules/admin/cities.tmpl | 10 ---------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/admin/cities.pl b/admin/cities.pl index 3e33a71..58e33ae 100755 --- a/admin/cities.pl +++ b/admin/cities.pl @@ -86,15 +86,10 @@ if ($op eq 'add_form') { # called by default form, used to confirm deletion of data in DB } elsif ($op eq 'delete_confirm') { $template->param(delete_confirm => 1); - my $sth=$dbh->prepare("select count(*) as total from borrowers,cities where borrowers.city=cities.city_name and cityid=?"); - # FIXME: this check used to pretend there was a FK "select_city" in borrowers. + my $sth=$dbh->prepare("select cityid,city_name,city_zipcode from cities where cityid=?"); $sth->execute($cityid); - my $total = $sth->fetchrow_hashref; - my $sth2=$dbh->prepare("select cityid,city_name,city_zipcode from cities where cityid=?"); - $sth2->execute($cityid); - my $data=$sth2->fetchrow_hashref; + my $data=$sth->fetchrow_hashref; $template->param( - total => $total->{'total'}, city_name => $data->{'city_name'}, city_zipcode => $data->{'city_zipcode'}, ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tmpl index 62055da..203d19b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tmpl @@ -69,14 +69,8 @@ - -
    -

    Cannot Delete City ""

    -

    This record is used times. Impossible to delete it

    -

    Delete City "?"

    - @@ -89,16 +83,12 @@
    City id
    " method="post"> - - - " />
    " method="get"> -
    -- 1.7.0 From oleonard at myacpl.org Mon Nov 15 15:55:48 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 15 Nov 2010 09:55:48 -0500 Subject: [Koha-patches] [PATCH 2/2] Bug 2122 follow-up for authorities editor Message-ID: <1289832948-15805-1-git-send-email-oleonard@myacpl.org> --- authorities/authorities.pl | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 491aed6..9429a58 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -191,13 +191,13 @@ sub create_input { elsif ( $tagslib->{$tag}->{$subfield}->{authtypecode} ) { $subfield_data{marc_value} = " - + {$tag}->{$subfield}->{authtypecode}."'); return false;\" tabindex=\"1\" title=\"Tag Editor\">... "; # it's a plugin field -- 1.7.1 From tajoli at cilea.it Mon Nov 15 16:13:41 2010 From: tajoli at cilea.it (tajoli at cilea.it) Date: 15 Nov 2010 16:13:41 +0100 Subject: [Koha-patches] [bug 5204] Unimarc XSLT, from French to English. 2nd version. This is the second version of the patch. Discard the first. This patch will be signed-off by Frederic DEMIANS. Message-ID: <20101115151120.1803A46EAD@eliot.biblibre.com> A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 27950 bytes Desc: not available URL: From oleonard at myacpl.org Mon Nov 15 16:14:11 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 15 Nov 2010 10:14:11 -0500 Subject: [Koha-patches] [PATCH] Another bug 5004 fix, this time for road types Message-ID: <1289834051-15943-1-git-send-email-oleonard@myacpl.org> The road types interface didn't block deletion of road types in use, but the script included the same queries that cities.pl did, as if it intended to. --- admin/roadtype.pl | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/admin/roadtype.pl b/admin/roadtype.pl index 544d488..a756594 100755 --- a/admin/roadtype.pl +++ b/admin/roadtype.pl @@ -98,18 +98,10 @@ if ($op eq 'add_form') { } elsif ($op eq 'delete_confirm') { $template->param(delete_confirm => 1); my $dbh = C4::Context->dbh; - my $sth=$dbh->prepare("select count(*) as total from borrowers,roadtype where borrowers.streettype=roadtype.road_type and roadtypeid=?"); - $sth->execute($roadtypeid); - my $total = $sth->fetchrow_hashref; - $sth->finish; - $template->param(total => $total->{'total'}); my $sth2=$dbh->prepare("select roadtypeid,road_type from roadtype where roadtypeid=?"); $sth2->execute($roadtypeid); my $data=$sth2->fetchrow_hashref; $sth2->finish; - if ($total->{'total'} >0) { - $template->param(totalgtzero => 1); - } $template->param( road_type => ( $data->{'road_type'}), -- 1.7.1 From gmcharlt at gmail.com Mon Nov 15 17:04:00 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 15 Nov 2010 11:04:00 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Unimarc XSLT, from French to English. Message-ID: <1289837040-27428-1-git-send-email-gmcharlt@gmail.com> From: Zeno0 Tajoli Signed-off-by: Galen Charlton --- .../prog/en/xslt/UNIMARCslim2OAIDC.xsl | 59 ++++++++--------- .../prog/en/xslt/UNIMARCslim2intranetDetail.xsl | 70 ++++++++++---------- .../prog/en/xslt/UNIMARCslimUtils.xsl | 4 +- .../prog/en/xslt/UNIMARCslim2OPACDetail.xsl | 68 ++++++++++---------- .../prog/en/xslt/UNIMARCslim2OPACResults.xsl | 6 +- .../opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl | 4 +- 6 files changed, 104 insertions(+), 107 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl index 27c78ed..0e5a80d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl @@ -49,37 +49,34 @@ - , adaptateur - , annotatateur - , postfacier - , pr??facier - , auteur ??uvre adapt?? - , collaborateur - , commentaire - , compilateur - , compositeur - , concepteur - , donneur de grades - , ??diteur scientifique - , r??alisateur - , fondateur - , illustrateur - , parolier - , organisateur congr??s - , autre - , diffuseur - , pr??sentateur - , responsable - , photographe - , pr??sentateur - , ??diteur - , directeur de la publication - , directeur - , critique - , r??dacteur - , commenditaire - , directeur de th??se - , traducteur + , adapter + , annotator + , author of afterword + , prefacer + , bibliographic antecedent + , collaborator + , commentator + , compiler + , composer + , conceptor + , degree-grantor + , editor + , film editor + , founder + , illustrator + , lyricist + , organiser of meeting + , other + , photographer + , presenter + , publisher + , publishing director + , research team head + , reviewer + , redactor + , sponsor + , thesis advisor + , translator diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl index 38c6124..130e1c3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl @@ -55,49 +55,49 @@ 700 - Auteur principal + Main Author 710 - Collectivit?? principale + Corporate Author (Main) 701 - Co-auteur + Coauthor 702 - Auteur + Secondary Author 711 - Collectivit?? co-auteur + Corporate Author (Coauthor) 712 - Collectivit?? secondaire + Corporate Author (Secondary)
  • - Langue: + Language: - de la trad. interm??diaire, - de l'??uvre originale, - du r??sum??, - de la table des mati??res, - de la page de titre, - du titre propre, - d'un livret, - des textes d'accompagnement, - des sous-titres, + of intermediate text, + of original work, + of summary, + of contents page, + of title page, + of title proper, + of libretto, + of accompanying material, + of subtitles, n> @@ -115,7 +115,7 @@
  • - Pays: + Country: @@ -136,7 +136,7 @@ -
  • PPN: +
  • Tag 009:
  • @@ -177,7 +177,7 @@ 225 - Collection + Series @@ -220,7 +220,7 @@
  • - Note de contenu: + Contents note: @@ -237,7 +237,7 @@
  • - R??sum??: + Abstract: @@ -254,7 +254,7 @@
  • - Note sur la provenance: + Provenance note: @@ -263,7 +263,7 @@
  • - Bibliographie: + Bibliography: .; @@ -273,7 +273,7 @@
  • - Th??se: + Thesis: .; @@ -283,7 +283,7 @@
  • - Public: + Audience: .; @@ -315,52 +315,52 @@ 600 - Sujet - Nom de personne + Subject - Personal Name 601 - Sujet - Collectivit?? + Subject - Corporate Author 602 - Sujet - Famille + Subject - Family 604 - Sujet - Auteur/titre + Subject - Author/Title 606 - Sujet - Nom commun + SSubject - Topical Name 607 - Sujet - Nom g??ographique + Subject - Geographical Name 608 - Sujet - Forme + Subject - Form 610 - Sujet + Subject 615 - Cat??gorie sujet + Subject Category 616 - Marque d??pos??e + Trademark diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl index 85d1faf..c04a8e4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl @@ -25,7 +25,7 @@
  • - ??dition: + Publication: @@ -85,7 +85,7 @@
  • - Extrait de: + Linked with: diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl index 2ef828f..887bab6 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl @@ -71,49 +71,49 @@ 700 - Auteur principal + Main Author 710 - Collectivit?? principale + Corporate Author (Main) 701 - Co-auteur + Coauthor 702 - Auteur + Secondary Author 711 - Collectivit?? co-auteur + Corporate Author (Coauthor) 712 - Collectivit?? secondaire + Corporate Author (Secondary) - Langue: + Language: - de la trad. interm??diaire, - de l'??uvre originale, - du r??sum??, - de la table des mati??res, - de la page de titre, - du titre propre, - d'un livret, - des textes d'accompagnement, - des sous-titres, + of intermediate text, + of original work, + of summary, + of contents page, + of title page, + of title proper, + of libretto, + of accompanying material, + of subtitles, @@ -131,7 +131,7 @@ - Pays: + Country: @@ -187,7 +187,7 @@ 225 - Collection + Series @@ -230,7 +230,7 @@ - Note de contenu: + Contents note: @@ -247,7 +247,7 @@ - R??sum??: + Abstract: @@ -264,7 +264,7 @@ - Note sur la provenance: + Provenance note: @@ -273,7 +273,7 @@ - Bibliographie: + Bibliography: .; @@ -283,7 +283,7 @@ - Th??se: + Thesis: .; @@ -293,7 +293,7 @@ - Public: + Audience: .; @@ -325,52 +325,52 @@ 600 - Sujet - Nom de personne + Subject - Personal Name 601 - Sujet - Collectivit?? + Subject - Corporate Author 602 - Sujet - Famille + Subject - Family 604 - Sujet - Auteur/titre + Subject - Author/Title 606 - Sujet - Nom commun + SSubject - Topical Name 607 - Sujet - Nom g??ographique + Subject - Geographical Name 608 - Sujet - Forme + Subject - Form 610 - Sujet + Subject 615 - Cat??gorie sujet + Subject Category 616 - Marque d??pos??e + Trademark diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl index 66c41c0..19b6745 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl @@ -70,7 +70,7 @@ - Disponibilit??: + Availability: @@ -100,11 +100,11 @@ - Pas de copie disponible + No copies available - pour le pr??t: + Copies available for loan: diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl index f5cf99f..8eec0fd 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl @@ -25,7 +25,7 @@ - ??dition: + Publication: @@ -85,7 +85,7 @@ - Extrait de: + Linked with: -- 1.7.0 From gmcharlt at gmail.com Mon Nov 15 17:05:05 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 15 Nov 2010 11:05:05 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] bug 5204: Unimarc XSLT, from French to English. Message-ID: <1289837105-27493-1-git-send-email-gmcharlt@gmail.com> From: Zeno0 Tajoli Signed-off-by: Galen Charlton --- .../prog/en/xslt/UNIMARCslim2OAIDC.xsl | 59 ++++++++--------- .../prog/en/xslt/UNIMARCslim2intranetDetail.xsl | 70 ++++++++++---------- .../prog/en/xslt/UNIMARCslimUtils.xsl | 4 +- .../prog/en/xslt/UNIMARCslim2OPACDetail.xsl | 68 ++++++++++---------- .../prog/en/xslt/UNIMARCslim2OPACResults.xsl | 6 +- .../opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl | 4 +- 6 files changed, 104 insertions(+), 107 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl index 27c78ed..0e5a80d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl @@ -49,37 +49,34 @@ - , adaptateur - , annotatateur - , postfacier - , pr??facier - , auteur ??uvre adapt?? - , collaborateur - , commentaire - , compilateur - , compositeur - , concepteur - , donneur de grades - , ??diteur scientifique - , r??alisateur - , fondateur - , illustrateur - , parolier - , organisateur congr??s - , autre - , diffuseur - , pr??sentateur - , responsable - , photographe - , pr??sentateur - , ??diteur - , directeur de la publication - , directeur - , critique - , r??dacteur - , commenditaire - , directeur de th??se - , traducteur + , adapter + , annotator + , author of afterword + , prefacer + , bibliographic antecedent + , collaborator + , commentator + , compiler + , composer + , conceptor + , degree-grantor + , editor + , film editor + , founder + , illustrator + , lyricist + , organiser of meeting + , other + , photographer + , presenter + , publisher + , publishing director + , research team head + , reviewer + , redactor + , sponsor + , thesis advisor + , translator diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl index 38c6124..130e1c3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl @@ -55,49 +55,49 @@ 700 - Auteur principal + Main Author 710 - Collectivit?? principale + Corporate Author (Main) 701 - Co-auteur + Coauthor 702 - Auteur + Secondary Author 711 - Collectivit?? co-auteur + Corporate Author (Coauthor) 712 - Collectivit?? secondaire + Corporate Author (Secondary)
  • - Langue: + Language: - de la trad. interm??diaire, - de l'??uvre originale, - du r??sum??, - de la table des mati??res, - de la page de titre, - du titre propre, - d'un livret, - des textes d'accompagnement, - des sous-titres, + of intermediate text, + of original work, + of summary, + of contents page, + of title page, + of title proper, + of libretto, + of accompanying material, + of subtitles, n> @@ -115,7 +115,7 @@
  • - Pays: + Country: @@ -136,7 +136,7 @@ -
  • PPN: +
  • Tag 009:
  • @@ -177,7 +177,7 @@ 225 - Collection + Series @@ -220,7 +220,7 @@
  • - Note de contenu: + Contents note: @@ -237,7 +237,7 @@
  • - R??sum??: + Abstract: @@ -254,7 +254,7 @@
  • - Note sur la provenance: + Provenance note: @@ -263,7 +263,7 @@
  • - Bibliographie: + Bibliography: .; @@ -273,7 +273,7 @@
  • - Th??se: + Thesis: .; @@ -283,7 +283,7 @@
  • - Public: + Audience: .; @@ -315,52 +315,52 @@ 600 - Sujet - Nom de personne + Subject - Personal Name 601 - Sujet - Collectivit?? + Subject - Corporate Author 602 - Sujet - Famille + Subject - Family 604 - Sujet - Auteur/titre + Subject - Author/Title 606 - Sujet - Nom commun + SSubject - Topical Name 607 - Sujet - Nom g??ographique + Subject - Geographical Name 608 - Sujet - Forme + Subject - Form 610 - Sujet + Subject 615 - Cat??gorie sujet + Subject Category 616 - Marque d??pos??e + Trademark diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl index 85d1faf..c04a8e4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl @@ -25,7 +25,7 @@
  • - ??dition: + Publication: @@ -85,7 +85,7 @@
  • - Extrait de: + Linked with: diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl index 2ef828f..887bab6 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl @@ -71,49 +71,49 @@ 700 - Auteur principal + Main Author 710 - Collectivit?? principale + Corporate Author (Main) 701 - Co-auteur + Coauthor 702 - Auteur + Secondary Author 711 - Collectivit?? co-auteur + Corporate Author (Coauthor) 712 - Collectivit?? secondaire + Corporate Author (Secondary) - Langue: + Language: - de la trad. interm??diaire, - de l'??uvre originale, - du r??sum??, - de la table des mati??res, - de la page de titre, - du titre propre, - d'un livret, - des textes d'accompagnement, - des sous-titres, + of intermediate text, + of original work, + of summary, + of contents page, + of title page, + of title proper, + of libretto, + of accompanying material, + of subtitles, @@ -131,7 +131,7 @@ - Pays: + Country: @@ -187,7 +187,7 @@ 225 - Collection + Series @@ -230,7 +230,7 @@ - Note de contenu: + Contents note: @@ -247,7 +247,7 @@ - R??sum??: + Abstract: @@ -264,7 +264,7 @@ - Note sur la provenance: + Provenance note: @@ -273,7 +273,7 @@ - Bibliographie: + Bibliography: .; @@ -283,7 +283,7 @@ - Th??se: + Thesis: .; @@ -293,7 +293,7 @@ - Public: + Audience: .; @@ -325,52 +325,52 @@ 600 - Sujet - Nom de personne + Subject - Personal Name 601 - Sujet - Collectivit?? + Subject - Corporate Author 602 - Sujet - Famille + Subject - Family 604 - Sujet - Auteur/titre + Subject - Author/Title 606 - Sujet - Nom commun + SSubject - Topical Name 607 - Sujet - Nom g??ographique + Subject - Geographical Name 608 - Sujet - Forme + Subject - Form 610 - Sujet + Subject 615 - Cat??gorie sujet + Subject Category 616 - Marque d??pos??e + Trademark diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl index 66c41c0..19b6745 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl @@ -70,7 +70,7 @@ - Disponibilit??: + Availability: @@ -100,11 +100,11 @@ - Pas de copie disponible + No copies available - pour le pr??t: + Copies available for loan: diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl index f5cf99f..8eec0fd 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl @@ -25,7 +25,7 @@ - ??dition: + Publication: @@ -85,7 +85,7 @@ - Extrait de: + Linked with: -- 1.7.0 From gmcharlt at gmail.com Mon Nov 15 17:10:38 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 15 Nov 2010 11:10:38 -0500 Subject: [Koha-patches] [bug 5204] Unimarc XSLT, from French to English. 2nd version. This is the second version of the patch. Discard the first. This patch will be signed-off by Frederic DEMIANS. In-Reply-To: <20101115151120.1803A46EAD@eliot.biblibre.com> References: <20101115151120.1803A46EAD@eliot.biblibre.com> Message-ID: Hi, On Mon, Nov 15, 2010 at 10:13 AM, wrote: [a patch] I've signed off on the patch -- it addresses the XML parsing problem I was concerned about with the previous version and seems to do what it claims. However, for a substantive sign-off, I suggest that the RM indeed wait for Fr?d?ric or another UNIMARC user to test first as suggested by Zeno. Please note that I've tweaked the wording of the commit message: * The bug number will no longer be stripped by git-am. git-am strips off all leading text in the subject line that is surrounded by square brackets, so when you are commiting, you should not cite the bug number like this: [Bug 1234] Fix the foo module Instead, do something like this: Bug 1234: Fix the foo module or bug 1234 fix the foo module or so on. * I've removed the bit about this being the second revision of the patch -- that isn't going to be relevant once this is pushed to master. Regards, Galen -- Galen Charlton gmcharlt at gmail.com From cfouts at liblime.com Mon Nov 15 17:45:08 2010 From: cfouts at liblime.com (Clay Fouts) Date: Mon, 15 Nov 2010 08:45:08 -0800 Subject: [Koha-patches] [PATCH] Bug 5408 - Refactor GetIssuingRule and GetLoanLength In-Reply-To: <20101115092355.GV4325@rorohiko> References: <1289809040-1427-1-git-send-email-cfouts@liblime.com> <20101115092355.GV4325@rorohiko> Message-ID: Well, that's a much larger project since AFAICT all the issuingrules table mutations come from directly within smart-rules.pl. So all that code needs to me moved into C4::Circ. As is, there's no actual freshness issue since the cache-enabled functions are not used from within any script that also mutates the data. That cache-reset function is there as a reminder to use it when there's further normalization to the data layer. Clay On Mon, Nov 15, 2010 at 1:23 AM, Chris Cormack wrote: > * Clay Fouts (cfouts at liblime.com) wrote: > > This collapses the series of queries within GetIssuingRule into a single > query, > > the result of which is cached for future uses. Also refactors > GetLoanLength to > > call GetIssuingRule instead of submitting its own queries. The purpose of > this > > is to simplify and optimize the code. The API and behavior remain > unchanged. > Hi Clay > > I like the idea, is the plan to send a follow up patch so that when an > issuing rule is changed, we clear the cached data? > > > Chris > > -- > Chris Cormack > Catalyst IT Ltd. > +64 4 803 2238 > PO Box 11-053, Manners St, Wellington 6142, New Zealand > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAkzg/CsACgkQZgbcHEvgMLNJfwCgngNUhONZdWqksqDGmTPZWwXx > SCsAmwWEsfutnmbQoRTP6E5+UeTFpygm > =UmAX > -----END PGP SIGNATURE----- > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.poulain at biblibre.com Mon Nov 15 17:51:39 2010 From: paul.poulain at biblibre.com (Paul Poulain) Date: Mon, 15 Nov 2010 17:51:39 +0100 Subject: [Koha-patches] [PATCH] Bug 5408 - Refactor GetIssuingRule and GetLoanLength In-Reply-To: <1289809040-1427-1-git-send-email-cfouts@liblime.com> References: <1289809040-1427-1-git-send-email-cfouts@liblime.com> Message-ID: <4CE1651B.2050601@biblibre.com> Le 15/11/2010 09:17, Clay Fouts a ?crit : > This collapses the series of queries within GetIssuingRule into a single query, > the result of which is cached for future uses. Also refactors GetLoanLength to > call GetIssuingRule instead of submitting its own queries. The purpose of this > is to simplify and optimize the code. The API and behavior remain unchanged. > Note: If I read this patch correctly, it is also addressed by some changes in our branch where we have new circulation matrix (where holds are at branch/itype/category level) -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc Tel : (33) 4 91 81 35 08 From oleonard at myacpl.org Mon Nov 15 17:58:12 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 15 Nov 2010 11:58:12 -0500 Subject: [Koha-patches] Bug 5401: WYSWYG for Koha News In-Reply-To: References: Message-ID: > elRTE > -------------- > - built on and uses jQuery and jQuery/UI; since we're considering > jQuery/UI to replace YUI, there's some possible synchronicity here I think this is a plus. > - not yet packaged for Debian How much of a minus is this? > - fairly young project I think this is definitely a concern. Koustubha Kale wrote: > Also I dont like the fact that the imagemanager etc of TinyMCE are > only for paid customers. I agree. That's a big minus for TinyMCE as far as I'm concerned. My quick first impression of elRTE is that it seems really nice. I'm definitely going to do some testing. -- Owen -- Web Developer Athens County Public Libraries http://www.myacpl.org From f.demians at tamil.fr Mon Nov 15 18:47:27 2010 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Mon, 15 Nov 2010 18:47:27 +0100 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] bug 5204: Unimarc XSLT, from French to English. Message-ID: <1289843248-30303-1-git-send-email-f.demians@tamil.fr> From: Zeno0 Tajoli Signed-off-by: Galen Charlton Signed-off-by: Fr?d?ric Demians --- .../prog/en/xslt/UNIMARCslim2OAIDC.xsl | 59 ++++++++--------- .../prog/en/xslt/UNIMARCslim2intranetDetail.xsl | 70 ++++++++++---------- .../prog/en/xslt/UNIMARCslimUtils.xsl | 4 +- .../prog/en/xslt/UNIMARCslim2OPACDetail.xsl | 68 ++++++++++---------- .../prog/en/xslt/UNIMARCslim2OPACResults.xsl | 6 +- .../opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl | 4 +- 6 files changed, 104 insertions(+), 107 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl index 27c78ed..0e5a80d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl @@ -49,37 +49,34 @@ - , adaptateur - , annotatateur - , postfacier - , pr?facier - , auteur ?uvre adapt? - , collaborateur - , commentaire - , compilateur - , compositeur - , concepteur - , donneur de grades - , ?diteur scientifique - , r?alisateur - , fondateur - , illustrateur - , parolier - , organisateur congr?s - , autre - , diffuseur - , pr?sentateur - , responsable - , photographe - , pr?sentateur - , ?diteur - , directeur de la publication - , directeur - , critique - , r?dacteur - , commenditaire - , directeur de th?se - , traducteur + , adapter + , annotator + , author of afterword + , prefacer + , bibliographic antecedent + , collaborator + , commentator + , compiler + , composer + , conceptor + , degree-grantor + , editor + , film editor + , founder + , illustrator + , lyricist + , organiser of meeting + , other + , photographer + , presenter + , publisher + , publishing director + , research team head + , reviewer + , redactor + , sponsor + , thesis advisor + , translator diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl index 38c6124..130e1c3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl @@ -55,49 +55,49 @@ 700 - Auteur principal + Main Author 710 - Collectivit? principale + Corporate Author (Main) 701 - Co-auteur + Coauthor 702 - Auteur + Secondary Author 711 - Collectivit? co-auteur + Corporate Author (Coauthor) 712 - Collectivit? secondaire + Corporate Author (Secondary)
  • - Langue: + Language: - de la trad. interm?diaire, - de l'?uvre originale, - du r?sum?, - de la table des mati?res, - de la page de titre, - du titre propre, - d'un livret, - des textes d'accompagnement, - des sous-titres, + of intermediate text, + of original work, + of summary, + of contents page, + of title page, + of title proper, + of libretto, + of accompanying material, + of subtitles, n> @@ -115,7 +115,7 @@
  • - Pays: + Country: @@ -136,7 +136,7 @@ -
  • PPN: +
  • Tag 009:
  • @@ -177,7 +177,7 @@ 225 - Collection + Series @@ -220,7 +220,7 @@
  • - Note de contenu: + Contents note: @@ -237,7 +237,7 @@
  • - R?sum?: + Abstract: @@ -254,7 +254,7 @@
  • - Note sur la provenance: + Provenance note: @@ -263,7 +263,7 @@
  • - Bibliographie: + Bibliography: .; @@ -273,7 +273,7 @@
  • - Th?se: + Thesis: .; @@ -283,7 +283,7 @@
  • - Public: + Audience: .; @@ -315,52 +315,52 @@ 600 - Sujet - Nom de personne + Subject - Personal Name 601 - Sujet - Collectivit? + Subject - Corporate Author 602 - Sujet - Famille + Subject - Family 604 - Sujet - Auteur/titre + Subject - Author/Title 606 - Sujet - Nom commun + SSubject - Topical Name 607 - Sujet - Nom g?ographique + Subject - Geographical Name 608 - Sujet - Forme + Subject - Form 610 - Sujet + Subject 615 - Cat?gorie sujet + Subject Category 616 - Marque d?pos?e + Trademark diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl index 85d1faf..c04a8e4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl @@ -25,7 +25,7 @@
  • - ?dition: + Publication: @@ -85,7 +85,7 @@
  • - Extrait de: + Linked with: diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl index 2ef828f..887bab6 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl @@ -71,49 +71,49 @@ 700 - Auteur principal + Main Author 710 - Collectivit? principale + Corporate Author (Main) 701 - Co-auteur + Coauthor 702 - Auteur + Secondary Author 711 - Collectivit? co-auteur + Corporate Author (Coauthor) 712 - Collectivit? secondaire + Corporate Author (Secondary) - Langue: + Language: - de la trad. interm?diaire, - de l'?uvre originale, - du r?sum?, - de la table des mati?res, - de la page de titre, - du titre propre, - d'un livret, - des textes d'accompagnement, - des sous-titres, + of intermediate text, + of original work, + of summary, + of contents page, + of title page, + of title proper, + of libretto, + of accompanying material, + of subtitles, @@ -131,7 +131,7 @@ - Pays: + Country: @@ -187,7 +187,7 @@ 225 - Collection + Series @@ -230,7 +230,7 @@ - Note de contenu: + Contents note: @@ -247,7 +247,7 @@ - R?sum?: + Abstract: @@ -264,7 +264,7 @@ - Note sur la provenance: + Provenance note: @@ -273,7 +273,7 @@ - Bibliographie: + Bibliography: .; @@ -283,7 +283,7 @@ - Th?se: + Thesis: .; @@ -293,7 +293,7 @@ - Public: + Audience: .; @@ -325,52 +325,52 @@ 600 - Sujet - Nom de personne + Subject - Personal Name 601 - Sujet - Collectivit? + Subject - Corporate Author 602 - Sujet - Famille + Subject - Family 604 - Sujet - Auteur/titre + Subject - Author/Title 606 - Sujet - Nom commun + SSubject - Topical Name 607 - Sujet - Nom g?ographique + Subject - Geographical Name 608 - Sujet - Forme + Subject - Form 610 - Sujet + Subject 615 - Cat?gorie sujet + Subject Category 616 - Marque d?pos?e + Trademark diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl index 66c41c0..19b6745 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl @@ -70,7 +70,7 @@ - Disponibilit?: + Availability: @@ -100,11 +100,11 @@ - Pas de copie disponible + No copies available - pour le pr?t: + Copies available for loan: diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl index f5cf99f..8eec0fd 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl @@ -25,7 +25,7 @@ - ?dition: + Publication: @@ -85,7 +85,7 @@ - Extrait de: + Linked with: -- 1.7.3.2 From f.demians at tamil.fr Mon Nov 15 18:47:28 2010 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Mon, 15 Nov 2010 18:47:28 +0100 Subject: [Koha-patches] [PATCH 2/2] Bug 5404 Followup In-Reply-To: <1289843248-30303-1-git-send-email-f.demians@tamil.fr> References: <1289843248-30303-1-git-send-email-f.demians@tamil.fr> Message-ID: <1289843248-30303-2-git-send-email-f.demians@tamil.fr> - Typo - Duplicate 955 tag Signed-off-by: Fr?d?ric Demians --- .../prog/en/xslt/UNIMARCslim2intranetDetail.xsl | 13 +------------ .../prog/en/xslt/UNIMARCslim2OPACDetail.xsl | 13 +------------ 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl index 130e1c3..bb542bc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl @@ -302,17 +302,6 @@
  • - -
  • - SUDOC serial history: - - : - - .; - -
  • -
    - 600 Subject - Personal Name @@ -335,7 +324,7 @@ 606 - SSubject - Topical Name + Subject - Topical Name diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl index 887bab6..725c559 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl @@ -312,17 +312,6 @@
    - - - SUDOC serial history: - - : - - .; - - - - 600 Subject - Personal Name @@ -345,7 +334,7 @@ 606 - SSubject - Topical Name + Subject - Topical Name -- 1.7.3.2 From henridamien.laurent at biblibre.com Mon Nov 15 19:16:45 2010 From: henridamien.laurent at biblibre.com (LAURENT Henri-Damien) Date: Mon, 15 Nov 2010 19:16:45 +0100 Subject: [Koha-patches] [PATCH] Bug 5408 - Refactor GetIssuingRule and GetLoanLength In-Reply-To: References: <1289809040-1427-1-git-send-email-cfouts@liblime.com> <20101115092355.GV4325@rorohiko> Message-ID: <4CE1790D.2090007@biblibre.com> Le 15/11/2010 17:45, Clay Fouts a ?crit : > Well, that's a much larger project since AFAICT all the issuingrules > table mutations come from directly within smart-rules.pl > . So all that code needs to me moved into C4::Circ. > > As is, there's no actual freshness issue since the cache-enabled > functions are not used from within any script that also mutates the > data. That cache-reset function is there as a reminder to use it when > there's further normalization to the data layer. In order to adress that concern, we created a Perl Module C4::IssuingRules.pm Due to the time we did it (at least 6 month ago)... It is not using DBIx::Class but C4::SQLHelper. But it does what you wanted to do. And quite help improving the user interface... See the smart-rules page on BibLibre-memb-circ-update in wip/koha-biblibre.git in order to see the results of the development. Feel free to test and comment on that. If you donot want to create a test we can set one up as we did for other branches, just ask. -- Henri-Damien LAURENT From gmcharlt at gmail.com Mon Nov 15 20:08:07 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 15 Nov 2010 14:08:07 -0500 Subject: [Koha-patches] Bug 5401: WYSWYG for Koha News In-Reply-To: References: Message-ID: Hi, On Mon, Nov 15, 2010 at 11:58 AM, Owen Leonard wrote: >> elRTE >> -------------- >> - not yet packaged for Debian > > How much of a minus is this? Not a huge deal. It would be nice in order to avoid sticking it in the Koha Git tree or adding a manual tarball download step to the installation instructions, but after all, we've been plugging away with a copy of TinyMCE in the source tree for years. > My quick first impression of elRTE is that it seems really nice. I'm > definitely going to do some testing. Thanks! Regards, Galen -- Galen Charlton gmcharlt at gmail.com From gmcharlt at gmail.com Tue Nov 16 00:11:09 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 15 Nov 2010 18:11:09 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5204 Followup Message-ID: <1289862669-29306-1-git-send-email-gmcharlt@gmail.com> From: Fr?d?ric Demians - Typo - Duplicate 955 tag Signed-off-by: Fr?d?ric Demians Signed-off-by: Galen Charlton --- .../prog/en/xslt/UNIMARCslim2intranetDetail.xsl | 13 +------------ .../prog/en/xslt/UNIMARCslim2OPACDetail.xsl | 13 +------------ 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl index 130e1c3..bb542bc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl @@ -302,17 +302,6 @@
    - -
  • - SUDOC serial history: - - : - - .; - -
  • -
    - 600 Subject - Personal Name @@ -335,7 +324,7 @@ 606 - SSubject - Topical Name + Subject - Topical Name diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl index 887bab6..725c559 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl @@ -312,17 +312,6 @@
    - - - SUDOC serial history: - - : - - .; - - - - 600 Subject - Personal Name @@ -345,7 +334,7 @@ 606 - SSubject - Topical Name + Subject - Topical Name -- 1.7.0 From gmcharlt at gmail.com Tue Nov 16 00:13:32 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 15 Nov 2010 18:13:32 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Another bug 5004 fix, this time for road types Message-ID: <1289862812-29503-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard The road types interface didn't block deletion of road types in use, but the script included the same queries that cities.pl did, as if it intended to. Signed-off-by: Galen Charlton --- admin/roadtype.pl | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/admin/roadtype.pl b/admin/roadtype.pl index 544d488..a756594 100755 --- a/admin/roadtype.pl +++ b/admin/roadtype.pl @@ -98,18 +98,10 @@ if ($op eq 'add_form') { } elsif ($op eq 'delete_confirm') { $template->param(delete_confirm => 1); my $dbh = C4::Context->dbh; - my $sth=$dbh->prepare("select count(*) as total from borrowers,roadtype where borrowers.streettype=roadtype.road_type and roadtypeid=?"); - $sth->execute($roadtypeid); - my $total = $sth->fetchrow_hashref; - $sth->finish; - $template->param(total => $total->{'total'}); my $sth2=$dbh->prepare("select roadtypeid,road_type from roadtype where roadtypeid=?"); $sth2->execute($roadtypeid); my $data=$sth2->fetchrow_hashref; $sth2->finish; - if ($total->{'total'} >0) { - $template->param(totalgtzero => 1); - } $template->param( road_type => ( $data->{'road_type'}), -- 1.7.0 From gmcharlt at gmail.com Tue Nov 16 00:19:26 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 15 Nov 2010 18:19:26 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 2122 follow-up for authorities editor Message-ID: <1289863166-29856-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Galen Charlton --- authorities/authorities.pl | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 491aed6..9429a58 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -191,13 +191,13 @@ sub create_input { elsif ( $tagslib->{$tag}->{$subfield}->{authtypecode} ) { $subfield_data{marc_value} = " - + {$tag}->{$subfield}->{authtypecode}."'); return false;\" tabindex=\"1\" title=\"Tag Editor\">... "; # it's a plugin field -- 1.7.0 From kmkale at anantcorp.com Tue Nov 16 05:33:10 2010 From: kmkale at anantcorp.com (Koustubha Kale) Date: Tue, 16 Nov 2010 10:03:10 +0530 Subject: [Koha-patches] Bug 5401: WYSWYG for Koha News In-Reply-To: References: Message-ID: On Mon, Nov 15, 2010 at 10:28 PM, Owen Leonard wrote: > > My quick first impression of elRTE is that it seems really nice. I'm > definitely going to do some testing. Thanks Owen. Regards, Koustubha Kale Anant Corporation Contact Details : Address : 103, Armaan Residency, R. W Sawant Road, Nr. Golden Dyes Naka, Thane (w), Maharashtra, India, Pin : 400601. TeleFax : +91-22-21720108, +91-22-21720109 Mobile : +919820715876 Website : http://www.anantcorp.com Blog : http://www.anantcorp.com/blog/?author=2 From kmkale at anantcorp.com Tue Nov 16 06:13:06 2010 From: kmkale at anantcorp.com (Koustubha Kale) Date: Tue, 16 Nov 2010 10:43:06 +0530 Subject: [Koha-patches] [PATCH 1/2] Bug 4440: Revised combined patch to print fee receipts and invoices Message-ID: <1289884386-6553-1-git-send-email-kmkale@anantcorp.com> This patch adds a small enhancement to allow printing of Fees / Fines receipts from the Fines page. Patch adds print links to the Fines page next to Fines or Receipts transactions. Clicking on the link will pop a new window and will print that with total outstanding as on date. You can edit koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css to better control printing this type of material. 18-Oct-2010 Changed template and script names to match. Corrected invalid markup in the templates. Signed-off-by: Chris Cormack --- .../prog/en/css/printreceiptinvoice.css | 353 ++++++++++++++++++++ .../prog/en/modules/members/boraccount.tmpl | 12 +- .../prog/en/modules/members/printfeercpt.tmpl | 59 ++++ .../prog/en/modules/members/printinvoice.tmpl | 59 ++++ members/printfeercpt.pl | 143 ++++++++ members/printinvoice.pl | 142 ++++++++ 6 files changed, 766 insertions(+), 2 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl create mode 100755 members/printfeercpt.pl create mode 100755 members/printinvoice.pl diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css b/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css new file mode 100644 index 0000000..d8a675f --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css @@ -0,0 +1,353 @@ +a:link { + color : #000066; + text-decoration: none; +} + +a:visited { + color : #000066; + text-decoration: none; +} + +a:hover { + color : #993300; + text-decoration: none; +} + +body { + background-color : #FFF; + color : #333333; + font-family : arial, geneva, sans-serif; + font-size : 14px; + margin : 0px 0px 0px 0px; +} + +caption { + color : #000066; + font-size : 18px; + font-weight : bold; + margin-top : 5px; + text-align : left; +} + +form { + margin : 0px; + padding : 0px; +} + +h1 + { + color : #000066; + font-size : 22px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h1#logo { + display: none; +} + +h2 { + color : #000066; + font-size : 20px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h3 { + color : #000066; + font-size : 18px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h4 { + color : #000066; + font-size : 16px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h5 { + color : #000066; + font-size : 15px; + font-weight : bold; + margin-bottom : 1px; + margin-top : 1px; +} + +h6 { + color : #000066; + font-size : 14px; + font-weight : bold; + margin-bottom : 1px; + margin-top : 1px; +} + +table { + background-color : #FFFFFF; + border-bottom : 1px solid #CCCCCC; + border-collapse : collapse; + border-left : 1px solid #CCCCCC; + margin : 3px 0px 5px 0px; + padding : 0px; + width : 99%; +} + +table.list { + background-color : #FFFFFF; + border : 0; + border-collapse : collapse; + margin : 3px 0px 5px 0px; + padding : 0px; + width : 99%; +} + +td { + background-color : #FFF; + border-bottom : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 12px; + padding : 5px 5px 5px 5px; +} + +td:last-child { + background-color : #FFF; + border-bottom : 1px solid #CCCCCC; + border-right : 0px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 12px; + padding : 5px 5px 5px 5px; +} + +table.list th { + background-color : #FFFFFF; + border-top : 0; + border-left : 0; + text-align: left; + font-size: 12px; + font-weight: bold; + padding: 5px; + width : 25%; +} + +th { + background-color : #E9E9E9; + border-bottom : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 14px; + font-weight : bold; + padding : 5px 5px 5px 5px; +} + +th:last-child { + background-color : #E9E9E9; + border-bottom : 1px solid #CCCCCC; + border-right : 0px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 14px; + font-weight : bold; + padding : 5px 5px 5px 5px; +} + +td.input, div.form td, div.details td { + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; + color : #000000; + line-height : 1.5em; + padding : 4px; + text-align : left; +} + +td.label, div.form th, div.details th { + background-color : #FFF; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 0px; + border-top : 0px; + color : #000088; + font-weight : bold; + line-height : 1.5em; + padding : 4px; + text-align : right; + vertical-align : top; +} + +tr.highlight { + background-color: #CCCCCC; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; +} + +.error { + font-weight: bold; +} + +.ex { + font-family : "Courier New", Courier, monospace; +} +.inline { + display : inline; +} + +tr.overdue { + font-weight : bold; +} + +tfoot { + font-weight : bold; +} + +tfoot td, tfoot td:last-child { + background-color : #EEEEEE; + border-right : 1px solid #666666; + border-bottom : 1px solid #666666; +} + +td.credit, td.debit, td.sum { + font-family : "Courier New", Courier, monospace; + text-align : right; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; +} + +td.debit { + color : #990000; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; +} + +#receipt { + background-color : #FFFFFF; + font-family : serif; + font-size : .9em; + margin : 0 0px 0px 0; + padding : 0px; + position : relative; +} + +#receipt a:link { + color : #000066; + text-decoration: none; +} + +#receipt a:visited { + color : #000066; + text-decoration: none; +} + +#receipt a:hover { + color : #993300; + text-decoration: none; +} + +#receipt caption { + color : #000000; + font-weight : bold; + margin-top : 5px; + text-align : left; +} + +#receipt div.table { + background-color : transparent; + font-weight: normal; +} + +#receipt h3, #receipt caption, #receipt h4 { + background-color : transparent; + color : #000000; + font-size : 1em; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +#receipt h2 { + background-color : transparent; + color : #000000; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +#receipt table { + background-color : transparent; + border : 0; + border-collapse : collapse; + width : auto; +} + +#receipt td, #receipt th { + background-color : transparent; + border : 0; + font-size : 1em; + font-weight : normal; + padding : 1px; + border-bottom : 1px solid #000000; + border-left : 1px solid #000000; + border-right : 1px solid #000000; + border-top : 1px solid #000000; + } + +#receipt th { + font-weight : bold; + text-align : left; + } + +#receipt th.centerednames { + font-weight : bold; + text-align: center; + color: red; + border-top : 0px; + border-bottom : 0px; +} + +div#breadcrumbs, +div#toplevelnav, +div#login, +div#header_search, +div#toolbar, +div#changelanguage, +div#menu, +div.yui-b, +.noprint, +form#sortbyform, +#cartDetails, +fieldset.action, +.list-actions, +.print { + display: none; +} + +div#yui-main div.yui-b { + display : block; +} + +.yui-t1 #yui-main div.yui-b, +.yui-t2 #yui-main div.yui-b, +.yui-t7 #yui-main div.yui-b { + margin-left : 0; +} +fieldset { + border : 0; +} +#cataloguing_additem_itemlist { + overflow : visible !important; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl index fce5a4d..ef59ad2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl @@ -35,6 +35,7 @@
      Print
    - &accountno=">Reverse + &accountno=">Reverse   + + &accountno=">Print + + &accountno=">Print + +
    Total dueTotal due
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    +
    +

    Fee Receipt

    +
    +

    +
    + Received with thanks from
    +
    DateDescription of chargesAmount
    Total outstanding dues as on date :
    +
    + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl new file mode 100644 index 0000000..3fc314e --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl @@ -0,0 +1,59 @@ + +Print Receipt for <!-- TMPL_VAR NAME="cardnumber" --> + +/includes/favicon.ico" type="image/x-icon" /> +/css/printreceiptinvoice.css" /> + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    +
    +

    INVOICE

    +
    +

    +
    + To,

    +
    DateDescription of chargesAmount
    Total outstanding dues as on date :
    +
    + diff --git a/members/printfeercpt.pl b/members/printfeercpt.pl new file mode 100755 index 0000000..59d5cb3 --- /dev/null +++ b/members/printfeercpt.pl @@ -0,0 +1,143 @@ +#!/usr/bin/perl + + +#writen 3rd May 2010 by kmkale at anantcorp.com adapted from boraccount.pl by chris at katipo.oc.nz +#script to print fee receipts + + +# Copyright Koustubha Kale +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use strict; +use warnings; + +use C4::Auth; +use C4::Output; +use C4::Dates qw/format_date/; +use CGI; +use C4::Members; +use C4::Branch; +use C4::Accounts; + +my $input=new CGI; + + +my ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "members/printfeercpt.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => {borrowers => 1, updatecharges => 1}, + debug => 1, + }); + +my $borrowernumber=$input->param('borrowernumber'); +my $action = $input->param('action') || ''; +my $accountno = $input->param('accountno'); + +#get borrower details +my $data=GetMember('borrowernumber' => $borrowernumber); + +if ( $action eq 'print' ) { +# ReversePayment( $borrowernumber, $input->param('accountno') ); +} + +if ( $data->{'category_type'} eq 'C') { + my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' ); + my $cnt = scalar(@$catcodes); + $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1; + $template->param( 'catcode' => $catcodes->[0]) if $cnt == 1; +} + +#get account details +my ($total,$accts,$numaccts)=GetMemberAccountRecords($borrowernumber); +my $totalcredit; +if($total <= 0){ + $totalcredit = 1; +} +my @accountrows; # this is for the tmpl-loop + +my $toggle; +for (my $i=0;$i<$numaccts;$i++){ + next if ($accts->[$i]{'accountno'} ne $accountno); + if($i%2){ + $toggle = 0; + } else { + $toggle = 1; + } + $accts->[$i]{'toggle'} = $toggle; + $accts->[$i]{'amount'}+=0.00; + if($accts->[$i]{'amount'} <= 0){ + $accts->[$i]{'amountcredit'} = 1; + $accts->[$i]{'amount'}*=-1.00; + } + $accts->[$i]{'amountoutstanding'}+=0.00; + if($accts->[$i]{'amountoutstanding'} <= 0){ + $accts->[$i]{'amountoutstandingcredit'} = 1; + } + my %row = ( 'date' => format_date($accts->[$i]{'date'}), + 'amountcredit' => $accts->[$i]{'amountcredit'}, + 'amountoutstandingcredit' => $accts->[$i]{'amountoutstandingcredit'}, + 'toggle' => $accts->[$i]{'toggle'}, + 'description' => $accts->[$i]{'description'}, + 'itemnumber' => $accts->[$i]{'itemnumber'}, + 'biblionumber' => $accts->[$i]{'biblionumber'}, + 'amount' => sprintf("%.2f",$accts->[$i]{'amount'}), + 'amountoutstanding' => sprintf("%.2f",$accts->[$i]{'amountoutstanding'}), + 'accountno' => $accts->[$i]{'accountno'}, + 'payment' => ( $accts->[$i]{'accounttype'} eq 'Pay' ), + + ); + + if ($accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU'){ + $row{'printtitle'}=1; + $row{'title'} = $accts->[$i]{'title'}; + } + + push(@accountrows, \%row); +} + +$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); + +my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); +$template->param( picture => 1 ) if $picture; + +$template->param( + finesview => 1, + firstname => $data->{'firstname'}, + surname => $data->{'surname'}, + borrowernumber => $borrowernumber, + cardnumber => $data->{'cardnumber'}, + categorycode => $data->{'categorycode'}, + category_type => $data->{'category_type'}, + # category_description => $data->{'description'}, + categoryname => $data->{'description'}, + address => $data->{'address'}, + address2 => $data->{'address2'}, + city => $data->{'city'}, + zipcode => $data->{'zipcode'}, + country => $data->{'country'}, + phone => $data->{'phone'}, + email => $data->{'email'}, + branchcode => $data->{'branchcode'}, + branchname => GetBranchName($data->{'branchcode'}), + total => sprintf("%.2f",$total), + totalcredit => $totalcredit, + is_child => ($data->{'category_type'} eq 'C'), + accounts => \@accountrows ); + +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/printinvoice.pl b/members/printinvoice.pl new file mode 100755 index 0000000..039132f --- /dev/null +++ b/members/printinvoice.pl @@ -0,0 +1,142 @@ +#!/usr/bin/perl + + +#writen 3rd May 2010 by kmkale at anantcorp.com adapted from boraccount.pl by chris at katipo.oc.nz +#script to print fee receipts + + +# Copyright Koustubha Kale +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use strict; +use warnings; + +use C4::Auth; +use C4::Output; +use C4::Dates qw/format_date/; +use CGI; +use C4::Members; +use C4::Branch; +use C4::Accounts; + +my $input=new CGI; + + +my ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "members/printinvoice.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => {borrowers => 1, updatecharges => 1}, + debug => 1, + }); + +my $borrowernumber=$input->param('borrowernumber'); +my $action = $input->param('action') || ''; +my $accountno = $input->param('accountno'); + +#get borrower details +my $data=GetMember('borrowernumber' => $borrowernumber); + +if ( $action eq 'print' ) { +# ReversePayment( $borrowernumber, $input->param('accountno') ); +} + +if ( $data->{'category_type'} eq 'C') { + my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' ); + my $cnt = scalar(@$catcodes); + $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1; + $template->param( 'catcode' => $catcodes->[0]) if $cnt == 1; +} + +#get account details +my ($total,$accts,$numaccts)=GetMemberAccountRecords($borrowernumber); +my $totalcredit; +if($total <= 0){ + $totalcredit = 1; +} +my @accountrows; # this is for the tmpl-loop + +my $toggle; +for (my $i=0;$i<$numaccts;$i++){ + next if ($accts->[$i]{'accountno'} ne $accountno); + if($i%2){ + $toggle = 0; + } else { + $toggle = 1; + } + $accts->[$i]{'toggle'} = $toggle; + $accts->[$i]{'amount'}+=0.00; + if($accts->[$i]{'amount'} <= 0){ + $accts->[$i]{'amountcredit'} = 1; + } + $accts->[$i]{'amountoutstanding'}+=0.00; + if($accts->[$i]{'amountoutstanding'} <= 0){ + $accts->[$i]{'amountoutstandingcredit'} = 1; + } + my %row = ( 'date' => format_date($accts->[$i]{'date'}), + 'amountcredit' => $accts->[$i]{'amountcredit'}, + 'amountoutstandingcredit' => $accts->[$i]{'amountoutstandingcredit'}, + 'toggle' => $accts->[$i]{'toggle'}, + 'description' => $accts->[$i]{'description'}, + 'itemnumber' => $accts->[$i]{'itemnumber'}, + 'biblionumber' => $accts->[$i]{'biblionumber'}, + 'amount' => sprintf("%.2f",$accts->[$i]{'amount'}), + 'amountoutstanding' => sprintf("%.2f",$accts->[$i]{'amountoutstanding'}), + 'accountno' => $accts->[$i]{'accountno'}, + 'payment' => ( $accts->[$i]{'accounttype'} eq 'Pay' ), + + ); + + if ($accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU'){ + $row{'printtitle'}=1; + $row{'title'} = $accts->[$i]{'title'}; + } + + push(@accountrows, \%row); +} + +$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); + +my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); +$template->param( picture => 1 ) if $picture; + +$template->param( + finesview => 1, + firstname => $data->{'firstname'}, + surname => $data->{'surname'}, + borrowernumber => $borrowernumber, + cardnumber => $data->{'cardnumber'}, + categorycode => $data->{'categorycode'}, + category_type => $data->{'category_type'}, + # category_description => $data->{'description'}, + categoryname => $data->{'description'}, + address => $data->{'address'}, + address2 => $data->{'address2'}, + city => $data->{'city'}, + zipcode => $data->{'zipcode'}, + country => $data->{'country'}, + phone => $data->{'phone'}, + email => $data->{'email'}, + branchcode => $data->{'branchcode'}, + branchname => GetBranchName($data->{'branchcode'}), + total => sprintf("%.2f",$total), + totalcredit => $totalcredit, + is_child => ($data->{'category_type'} eq 'C'), + accounts => \@accountrows ); + +output_html_with_http_headers $input, $cookie, $template->output; -- 1.7.0.4 From kmkale at anantcorp.com Tue Nov 16 06:13:48 2010 From: kmkale at anantcorp.com (Koustubha Kale) Date: Tue, 16 Nov 2010 10:43:48 +0530 Subject: [Koha-patches] [PATCH 2/2] Bug 4440 Layout tweaking follow-up patch Message-ID: <1289884428-6588-1-git-send-email-kmkale@anantcorp.com> Couple of tweaks to borders and Name. --- .../prog/en/css/printreceiptinvoice.css | 2 +- .../prog/en/modules/members/printfeercpt.tmpl | 2 ++ .../prog/en/modules/members/printinvoice.tmpl | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css b/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css index d8a675f..28754f2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css @@ -315,7 +315,7 @@ td.debit { font-weight : bold; text-align: center; color: red; - border-top : 0px; + border-top : 1px solid #000000; border-bottom : 0px; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl index a53278f..6ab1933 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl @@ -13,11 +13,13 @@
    + + @@ -413,7 +440,11 @@ value="Specific" /> - + + + + +

    Fee Receipt

    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl index 3fc314e..e3b5057 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl @@ -13,11 +13,13 @@
    + + -- 1.7.0.4 From savitra.sirohi at osslabs.biz Tue Nov 16 02:10:31 2010 From: savitra.sirohi at osslabs.biz (savitra.sirohi at osslabs.biz) Date: Tue, 16 Nov 2010 06:40:31 +0530 Subject: [Koha-patches] [PATCH] Analytical records: display items belonging to host records in the moredetail page Message-ID: <1289869831-31701-1-git-send-email-savitra.sirohi@osslabs.biz> From: Amit Gupta --- catalogue/moredetail.pl | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index d790c41..05a5a60 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -74,6 +74,23 @@ my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber); my @results; my $fw = GetFrameworkCode($biblionumber); my @items= GetItemsInfo($biblionumber); +my $record=GetMarcBiblio($biblionumber); + +my $hostrecords; +# adding items linked via host biblios + foreach my $hostfield ( $record->field('773')) { + my $hostbiblionumber = $hostfield->subfield("w"); + my $linkeditemnumber = $hostfield->subfield("o"); + my @hostitemInfos = GetItemsInfo($hostbiblionumber); + foreach my $hostitemInfo (@hostitemInfos){ + if ($hostitemInfo->{itemnumber} eq $linkeditemnumber){ + $hostrecords =1; + push(@items, $hostitemInfo); + } + } + } + + my $count=@items; $data->{'count'}=$count; -- 1.5.4.5 From savitra.sirohi at osslabs.biz Tue Nov 16 02:10:59 2010 From: savitra.sirohi at osslabs.biz (savitra.sirohi at osslabs.biz) Date: Tue, 16 Nov 2010 06:40:59 +0530 Subject: [Koha-patches] [PATCH] Analytical records: ability to edit items belonging to host records, also ability ito delink from them Message-ID: <1289869859-31792-1-git-send-email-savitra.sirohi@osslabs.biz> From: Amit Gupta --- cataloguing/additem.pl | 32 ++++++++++++++++++++ .../prog/en/modules/cataloguing/additem.tmpl | 2 +- 2 files changed, 33 insertions(+), 1 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 9676fd6..db82d54 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -96,6 +96,7 @@ my $error = $input->param('error'); my $biblionumber = $input->param('biblionumber'); my $itemnumber = $input->param('itemnumber'); my $op = $input->param('op'); +my $hostitemnumber = $input->param('hostitemnumber'); my $frameworkcode = &GetFrameworkCode($biblionumber); @@ -300,6 +301,14 @@ if ($op eq "additem") { $itemnumber=""; } $nextop="additem"; +} elsif ($op eq "delinkitem"){ + foreach my $field ($record->field('773')){ + if ($field->subfield('o') eq $hostitemnumber){ + $record->delete_field($field); + last; + } + } + my $modbibresult = ModBiblio($record, $biblionumber,''); } # @@ -311,6 +320,20 @@ if ($op eq "additem") { my $temp = GetMarcBiblio( $biblionumber ); my @fields = $temp->fields(); #my @fields = $record->fields(); + +my @hostitemnumbers; +foreach my $hostfield ($temp->field('773')){ + if ($hostfield->subfield('w')){ + my $hostrecord = GetMarcBiblio($hostfield->subfield('w')); + foreach my $hostitem ($hostrecord->field('952')){ + if ($hostitem->subfield('9') eq $hostfield->subfield('o')){ + push (@fields, $hostitem); + push (@hostitemnumbers, $hostfield->subfield('o')); + } + } + } +} + my %witness; #---- stores the list of subfields used at least once, with the "meaning" of the code my @big_array; #---- finds where items.itemnumber is stored @@ -342,6 +365,13 @@ foreach my $field (@fields) { } } $this_row{itemnumber} = $subf[$i][1] if ($field->tag() eq $itemtagfield && $subf[$i][0] eq $itemtagsubfield); + foreach my $hostitemnumber (@hostitemnumbers){ + if ($this_row{itemnumber} eq $hostitemnumber){ + $this_row{hostitemflag} = 1; + $this_row{hostbiblionumber}= GetBiblionumberFromItemnumber($hostitemnumber); + last; + } + } } if (%this_row) { push(@big_array, \%this_row); @@ -362,6 +392,8 @@ for my $row ( @big_array ) { $row_data{itemnumber} = $row->{itemnumber}; #reporting this_row values $row_data{'nomod'} = $row->{'nomod'}; + $row_data{'hostitemflag'} = $row->{'hostitemflag'}; + $row_data{'hostbiblionumber'} = $row->{'hostbiblionumber'}; push(@item_value_loop,\%row_data); } foreach my $subfield_code (sort keys(%witness)) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tmpl index d0be875..2145ddb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tmpl @@ -206,7 +206,7 @@ function set_to_today(id, force) { "> - + -- 1.5.4.5 From f.demians at tamil.fr Tue Nov 16 08:33:08 2010 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Tue, 16 Nov 2010 08:33:08 +0100 Subject: [Koha-patches] [PATCH 1/3] [SIGNED-OFF] Bug 4440: Revised combined patch to print fee receipts and invoices Message-ID: <1289892790-5341-1-git-send-email-f.demians@tamil.fr> From: Koustubha Kale This patch adds a small enhancement to allow printing of Fees / Fines receipts from the Fines page. Patch adds print links to the Fines page next to Fines or Receipts transactions. Clicking on the link will pop a new window and will print that with total outstanding as on date. You can edit koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css to better control printing this type of material. 18-Oct-2010 Changed template and script names to match. Corrected invalid markup in the templates. Signed-off-by: Chris Cormack Signed-off-by: Fr?d?ric Demians --- .../prog/en/css/printreceiptinvoice.css | 353 ++++++++++++++++++++ .../prog/en/modules/members/boraccount.tmpl | 12 +- .../prog/en/modules/members/printfeercpt.tmpl | 59 ++++ .../prog/en/modules/members/printinvoice.tmpl | 59 ++++ members/printfeercpt.pl | 143 ++++++++ members/printinvoice.pl | 142 ++++++++ 6 files changed, 766 insertions(+), 2 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl create mode 100755 members/printfeercpt.pl create mode 100755 members/printinvoice.pl diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css b/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css new file mode 100644 index 0000000..d8a675f --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css @@ -0,0 +1,353 @@ +a:link { + color : #000066; + text-decoration: none; +} + +a:visited { + color : #000066; + text-decoration: none; +} + +a:hover { + color : #993300; + text-decoration: none; +} + +body { + background-color : #FFF; + color : #333333; + font-family : arial, geneva, sans-serif; + font-size : 14px; + margin : 0px 0px 0px 0px; +} + +caption { + color : #000066; + font-size : 18px; + font-weight : bold; + margin-top : 5px; + text-align : left; +} + +form { + margin : 0px; + padding : 0px; +} + +h1 + { + color : #000066; + font-size : 22px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h1#logo { + display: none; +} + +h2 { + color : #000066; + font-size : 20px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h3 { + color : #000066; + font-size : 18px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h4 { + color : #000066; + font-size : 16px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h5 { + color : #000066; + font-size : 15px; + font-weight : bold; + margin-bottom : 1px; + margin-top : 1px; +} + +h6 { + color : #000066; + font-size : 14px; + font-weight : bold; + margin-bottom : 1px; + margin-top : 1px; +} + +table { + background-color : #FFFFFF; + border-bottom : 1px solid #CCCCCC; + border-collapse : collapse; + border-left : 1px solid #CCCCCC; + margin : 3px 0px 5px 0px; + padding : 0px; + width : 99%; +} + +table.list { + background-color : #FFFFFF; + border : 0; + border-collapse : collapse; + margin : 3px 0px 5px 0px; + padding : 0px; + width : 99%; +} + +td { + background-color : #FFF; + border-bottom : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 12px; + padding : 5px 5px 5px 5px; +} + +td:last-child { + background-color : #FFF; + border-bottom : 1px solid #CCCCCC; + border-right : 0px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 12px; + padding : 5px 5px 5px 5px; +} + +table.list th { + background-color : #FFFFFF; + border-top : 0; + border-left : 0; + text-align: left; + font-size: 12px; + font-weight: bold; + padding: 5px; + width : 25%; +} + +th { + background-color : #E9E9E9; + border-bottom : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 14px; + font-weight : bold; + padding : 5px 5px 5px 5px; +} + +th:last-child { + background-color : #E9E9E9; + border-bottom : 1px solid #CCCCCC; + border-right : 0px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 14px; + font-weight : bold; + padding : 5px 5px 5px 5px; +} + +td.input, div.form td, div.details td { + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; + color : #000000; + line-height : 1.5em; + padding : 4px; + text-align : left; +} + +td.label, div.form th, div.details th { + background-color : #FFF; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 0px; + border-top : 0px; + color : #000088; + font-weight : bold; + line-height : 1.5em; + padding : 4px; + text-align : right; + vertical-align : top; +} + +tr.highlight { + background-color: #CCCCCC; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; +} + +.error { + font-weight: bold; +} + +.ex { + font-family : "Courier New", Courier, monospace; +} +.inline { + display : inline; +} + +tr.overdue { + font-weight : bold; +} + +tfoot { + font-weight : bold; +} + +tfoot td, tfoot td:last-child { + background-color : #EEEEEE; + border-right : 1px solid #666666; + border-bottom : 1px solid #666666; +} + +td.credit, td.debit, td.sum { + font-family : "Courier New", Courier, monospace; + text-align : right; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; +} + +td.debit { + color : #990000; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; +} + +#receipt { + background-color : #FFFFFF; + font-family : serif; + font-size : .9em; + margin : 0 0px 0px 0; + padding : 0px; + position : relative; +} + +#receipt a:link { + color : #000066; + text-decoration: none; +} + +#receipt a:visited { + color : #000066; + text-decoration: none; +} + +#receipt a:hover { + color : #993300; + text-decoration: none; +} + +#receipt caption { + color : #000000; + font-weight : bold; + margin-top : 5px; + text-align : left; +} + +#receipt div.table { + background-color : transparent; + font-weight: normal; +} + +#receipt h3, #receipt caption, #receipt h4 { + background-color : transparent; + color : #000000; + font-size : 1em; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +#receipt h2 { + background-color : transparent; + color : #000000; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +#receipt table { + background-color : transparent; + border : 0; + border-collapse : collapse; + width : auto; +} + +#receipt td, #receipt th { + background-color : transparent; + border : 0; + font-size : 1em; + font-weight : normal; + padding : 1px; + border-bottom : 1px solid #000000; + border-left : 1px solid #000000; + border-right : 1px solid #000000; + border-top : 1px solid #000000; + } + +#receipt th { + font-weight : bold; + text-align : left; + } + +#receipt th.centerednames { + font-weight : bold; + text-align: center; + color: red; + border-top : 0px; + border-bottom : 0px; +} + +div#breadcrumbs, +div#toplevelnav, +div#login, +div#header_search, +div#toolbar, +div#changelanguage, +div#menu, +div.yui-b, +.noprint, +form#sortbyform, +#cartDetails, +fieldset.action, +.list-actions, +.print { + display: none; +} + +div#yui-main div.yui-b { + display : block; +} + +.yui-t1 #yui-main div.yui-b, +.yui-t2 #yui-main div.yui-b, +.yui-t7 #yui-main div.yui-b { + margin-left : 0; +} +fieldset { + border : 0; +} +#cataloguing_additem_itemlist { + overflow : visible !important; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl index fce5a4d..ef59ad2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl @@ -35,6 +35,7 @@ + @@ -48,18 +49,25 @@ + - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl new file mode 100644 index 0000000..a53278f --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl @@ -0,0 +1,59 @@ + +Print Receipt for <!-- TMPL_VAR NAME="cardnumber" --> + +/includes/favicon.ico" type="image/x-icon" /> +/css/printreceiptinvoice.css" /> + + + + +
    + +

    INVOICE

    @@ -30,7 +32,7 @@
    - To,

     &itemnumber=#edititem">Edit  &itemnumber=#edititem">Edit in Host&hostitemnumber=">Delink&itemnumber=#edititem">Edit &itemnumber=" onclick="confirm_deletion(,); return false;">Delete   Print
    - &accountno=">Reverse + &accountno=">Reverse   + + &accountno=">Print + + &accountno=">Print + +
    Total dueTotal due
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    +
    +

    Fee Receipt

    +
    +

    +
    + Received with thanks from
    +
    DateDescription of chargesAmount
    Total outstanding dues as on date :
    +
    + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl new file mode 100644 index 0000000..3fc314e --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl @@ -0,0 +1,59 @@ + +Print Receipt for <!-- TMPL_VAR NAME="cardnumber" --> + +/includes/favicon.ico" type="image/x-icon" /> +/css/printreceiptinvoice.css" /> + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    +
    +

    INVOICE

    +
    +

    +
    + To,

    +
    DateDescription of chargesAmount
    Total outstanding dues as on date :
    +
    + diff --git a/members/printfeercpt.pl b/members/printfeercpt.pl new file mode 100755 index 0000000..59d5cb3 --- /dev/null +++ b/members/printfeercpt.pl @@ -0,0 +1,143 @@ +#!/usr/bin/perl + + +#writen 3rd May 2010 by kmkale at anantcorp.com adapted from boraccount.pl by chris at katipo.oc.nz +#script to print fee receipts + + +# Copyright Koustubha Kale +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use strict; +use warnings; + +use C4::Auth; +use C4::Output; +use C4::Dates qw/format_date/; +use CGI; +use C4::Members; +use C4::Branch; +use C4::Accounts; + +my $input=new CGI; + + +my ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "members/printfeercpt.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => {borrowers => 1, updatecharges => 1}, + debug => 1, + }); + +my $borrowernumber=$input->param('borrowernumber'); +my $action = $input->param('action') || ''; +my $accountno = $input->param('accountno'); + +#get borrower details +my $data=GetMember('borrowernumber' => $borrowernumber); + +if ( $action eq 'print' ) { +# ReversePayment( $borrowernumber, $input->param('accountno') ); +} + +if ( $data->{'category_type'} eq 'C') { + my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' ); + my $cnt = scalar(@$catcodes); + $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1; + $template->param( 'catcode' => $catcodes->[0]) if $cnt == 1; +} + +#get account details +my ($total,$accts,$numaccts)=GetMemberAccountRecords($borrowernumber); +my $totalcredit; +if($total <= 0){ + $totalcredit = 1; +} +my @accountrows; # this is for the tmpl-loop + +my $toggle; +for (my $i=0;$i<$numaccts;$i++){ + next if ($accts->[$i]{'accountno'} ne $accountno); + if($i%2){ + $toggle = 0; + } else { + $toggle = 1; + } + $accts->[$i]{'toggle'} = $toggle; + $accts->[$i]{'amount'}+=0.00; + if($accts->[$i]{'amount'} <= 0){ + $accts->[$i]{'amountcredit'} = 1; + $accts->[$i]{'amount'}*=-1.00; + } + $accts->[$i]{'amountoutstanding'}+=0.00; + if($accts->[$i]{'amountoutstanding'} <= 0){ + $accts->[$i]{'amountoutstandingcredit'} = 1; + } + my %row = ( 'date' => format_date($accts->[$i]{'date'}), + 'amountcredit' => $accts->[$i]{'amountcredit'}, + 'amountoutstandingcredit' => $accts->[$i]{'amountoutstandingcredit'}, + 'toggle' => $accts->[$i]{'toggle'}, + 'description' => $accts->[$i]{'description'}, + 'itemnumber' => $accts->[$i]{'itemnumber'}, + 'biblionumber' => $accts->[$i]{'biblionumber'}, + 'amount' => sprintf("%.2f",$accts->[$i]{'amount'}), + 'amountoutstanding' => sprintf("%.2f",$accts->[$i]{'amountoutstanding'}), + 'accountno' => $accts->[$i]{'accountno'}, + 'payment' => ( $accts->[$i]{'accounttype'} eq 'Pay' ), + + ); + + if ($accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU'){ + $row{'printtitle'}=1; + $row{'title'} = $accts->[$i]{'title'}; + } + + push(@accountrows, \%row); +} + +$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); + +my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); +$template->param( picture => 1 ) if $picture; + +$template->param( + finesview => 1, + firstname => $data->{'firstname'}, + surname => $data->{'surname'}, + borrowernumber => $borrowernumber, + cardnumber => $data->{'cardnumber'}, + categorycode => $data->{'categorycode'}, + category_type => $data->{'category_type'}, + # category_description => $data->{'description'}, + categoryname => $data->{'description'}, + address => $data->{'address'}, + address2 => $data->{'address2'}, + city => $data->{'city'}, + zipcode => $data->{'zipcode'}, + country => $data->{'country'}, + phone => $data->{'phone'}, + email => $data->{'email'}, + branchcode => $data->{'branchcode'}, + branchname => GetBranchName($data->{'branchcode'}), + total => sprintf("%.2f",$total), + totalcredit => $totalcredit, + is_child => ($data->{'category_type'} eq 'C'), + accounts => \@accountrows ); + +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/printinvoice.pl b/members/printinvoice.pl new file mode 100755 index 0000000..039132f --- /dev/null +++ b/members/printinvoice.pl @@ -0,0 +1,142 @@ +#!/usr/bin/perl + + +#writen 3rd May 2010 by kmkale at anantcorp.com adapted from boraccount.pl by chris at katipo.oc.nz +#script to print fee receipts + + +# Copyright Koustubha Kale +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use strict; +use warnings; + +use C4::Auth; +use C4::Output; +use C4::Dates qw/format_date/; +use CGI; +use C4::Members; +use C4::Branch; +use C4::Accounts; + +my $input=new CGI; + + +my ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "members/printinvoice.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => {borrowers => 1, updatecharges => 1}, + debug => 1, + }); + +my $borrowernumber=$input->param('borrowernumber'); +my $action = $input->param('action') || ''; +my $accountno = $input->param('accountno'); + +#get borrower details +my $data=GetMember('borrowernumber' => $borrowernumber); + +if ( $action eq 'print' ) { +# ReversePayment( $borrowernumber, $input->param('accountno') ); +} + +if ( $data->{'category_type'} eq 'C') { + my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' ); + my $cnt = scalar(@$catcodes); + $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1; + $template->param( 'catcode' => $catcodes->[0]) if $cnt == 1; +} + +#get account details +my ($total,$accts,$numaccts)=GetMemberAccountRecords($borrowernumber); +my $totalcredit; +if($total <= 0){ + $totalcredit = 1; +} +my @accountrows; # this is for the tmpl-loop + +my $toggle; +for (my $i=0;$i<$numaccts;$i++){ + next if ($accts->[$i]{'accountno'} ne $accountno); + if($i%2){ + $toggle = 0; + } else { + $toggle = 1; + } + $accts->[$i]{'toggle'} = $toggle; + $accts->[$i]{'amount'}+=0.00; + if($accts->[$i]{'amount'} <= 0){ + $accts->[$i]{'amountcredit'} = 1; + } + $accts->[$i]{'amountoutstanding'}+=0.00; + if($accts->[$i]{'amountoutstanding'} <= 0){ + $accts->[$i]{'amountoutstandingcredit'} = 1; + } + my %row = ( 'date' => format_date($accts->[$i]{'date'}), + 'amountcredit' => $accts->[$i]{'amountcredit'}, + 'amountoutstandingcredit' => $accts->[$i]{'amountoutstandingcredit'}, + 'toggle' => $accts->[$i]{'toggle'}, + 'description' => $accts->[$i]{'description'}, + 'itemnumber' => $accts->[$i]{'itemnumber'}, + 'biblionumber' => $accts->[$i]{'biblionumber'}, + 'amount' => sprintf("%.2f",$accts->[$i]{'amount'}), + 'amountoutstanding' => sprintf("%.2f",$accts->[$i]{'amountoutstanding'}), + 'accountno' => $accts->[$i]{'accountno'}, + 'payment' => ( $accts->[$i]{'accounttype'} eq 'Pay' ), + + ); + + if ($accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU'){ + $row{'printtitle'}=1; + $row{'title'} = $accts->[$i]{'title'}; + } + + push(@accountrows, \%row); +} + +$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); + +my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); +$template->param( picture => 1 ) if $picture; + +$template->param( + finesview => 1, + firstname => $data->{'firstname'}, + surname => $data->{'surname'}, + borrowernumber => $borrowernumber, + cardnumber => $data->{'cardnumber'}, + categorycode => $data->{'categorycode'}, + category_type => $data->{'category_type'}, + # category_description => $data->{'description'}, + categoryname => $data->{'description'}, + address => $data->{'address'}, + address2 => $data->{'address2'}, + city => $data->{'city'}, + zipcode => $data->{'zipcode'}, + country => $data->{'country'}, + phone => $data->{'phone'}, + email => $data->{'email'}, + branchcode => $data->{'branchcode'}, + branchname => GetBranchName($data->{'branchcode'}), + total => sprintf("%.2f",$total), + totalcredit => $totalcredit, + is_child => ($data->{'category_type'} eq 'C'), + accounts => \@accountrows ); + +output_html_with_http_headers $input, $cookie, $template->output; -- 1.7.3.2 From f.demians at tamil.fr Tue Nov 16 08:33:09 2010 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Tue, 16 Nov 2010 08:33:09 +0100 Subject: [Koha-patches] [PATCH 2/3] [SIGNED-OFF] Bug 4440 Layout tweaking follow-up patch In-Reply-To: <1289892790-5341-1-git-send-email-f.demians@tamil.fr> References: <1289892790-5341-1-git-send-email-f.demians@tamil.fr> Message-ID: <1289892790-5341-2-git-send-email-f.demians@tamil.fr> From: Koustubha Kale Couple of tweaks to borders and Name. Signed-off-by: Fr?d?ric Demians --- .../prog/en/css/printreceiptinvoice.css | 2 +- .../prog/en/modules/members/printfeercpt.tmpl | 2 ++ .../prog/en/modules/members/printinvoice.tmpl | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css b/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css index d8a675f..28754f2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css @@ -315,7 +315,7 @@ td.debit { font-weight : bold; text-align: center; color: red; - border-top : 0px; + border-top : 1px solid #000000; border-bottom : 0px; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl index a53278f..6ab1933 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl @@ -13,11 +13,13 @@
    + +

    Fee Receipt

    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl index 3fc314e..e3b5057 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl @@ -13,11 +13,13 @@
    + + -- 1.7.3.2 From f.demians at tamil.fr Tue Nov 16 08:33:10 2010 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Tue, 16 Nov 2010 08:33:10 +0100 Subject: [Koha-patches] [PATCH 3/3] Bug 4440 Follow-up for English typography and alignment In-Reply-To: <1289892790-5341-1-git-send-email-f.demians@tamil.fr> References: <1289892790-5341-1-git-send-email-f.demians@tamil.fr> Message-ID: <1289892790-5341-3-git-send-email-f.demians@tamil.fr> Signed-off-by: Fr?d?ric Demians --- .../prog/en/modules/members/printinvoice.tmpl | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl index e3b5057..e3f2174 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl @@ -33,13 +33,13 @@ - + @@ -52,7 +52,7 @@ - + -- 1.7.3.2 From savitra.sirohi at osslabs.biz Tue Nov 16 07:02:07 2010 From: savitra.sirohi at osslabs.biz (savitra.sirohi at osslabs.biz) Date: Tue, 16 Nov 2010 11:32:07 +0530 Subject: [Koha-patches] [PATCH] Analytical records - move host field population to a C4 routine, all changes in pl files to call new routine Message-ID: <1289887327-15842-1-git-send-email-savitra.sirohi@osslabs.biz> From: Amit Gupta --- C4/Biblio.pm | 25 +++++++++++++++++++++++++ cataloguing/addbiblio.pl | 11 ++--------- cataloguing/linkitem.pl | 9 +-------- 3 files changed, 28 insertions(+), 17 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index eb0b248..eb6ea42 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -84,6 +84,7 @@ BEGIN { &GetFrameworkCode &GetPublisherNameFromIsbn &TransformKohaToMarc + &PrepHostMarcField &CountItemsIssued ); @@ -1663,6 +1664,30 @@ sub TransformKohaToMarc { return $record; } +=head2 PrepHostMarcField + + $hostfield = PrepHostMarcField ( $hostbiblionumber ) + +This function returns a host field populated with data from the host record, the field can then be added to an analytical record + +=cut + +sub PrepHostMarcField { + my ($hostbiblionumber,$hostitemnumber) = @_; + my $hostrecord = GetMarcBiblio($hostbiblionumber); + + my $hostmarcfield = MARC::Field->new( + 773, '', '', + 'w' => $hostbiblionumber, + 'o' => $hostitemnumber, + 'a' => $hostrecord->subfield('245','a'), + 'x' => $hostrecord->subfield('245','x') + ); + + return $hostmarcfield; +} + + =head2 TransformKohaToMarcOneField $record = TransformKohaToMarcOneField( $sth, $record, $kohafieldname, $value, $frameworkcode ); diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 28aad1f..f0c94e0 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -890,18 +890,11 @@ if (($biblionumber) && !($breedingid)){ if ($breedingid) { ( $record, $encoding ) = MARCfindbreeding( $breedingid ) ; } -#populate 773 if hostbiblionumber is available +#populate hostfield if hostbiblionumber is available if ($hostbiblionumber){ - my $hostrecord = &GetMarcBiblio($hostbiblionumber); $record=MARC::Record->new(); $record->leader(''); - my $field = MARC::Field->new( - 773, '', '', - 'w' => $hostbiblionumber, - 'o' => $hostitemnumber, - 'a' => $hostrecord->subfield('245','a'), - 'x' => $hostrecord->subfield('245','x') - ); + my $field = PrepHostMarcField($hostbiblionumber, $hostitemnumber); $record->append_fields($field); } diff --git a/cataloguing/linkitem.pl b/cataloguing/linkitem.pl index bff001e..1504875 100755 --- a/cataloguing/linkitem.pl +++ b/cataloguing/linkitem.pl @@ -55,16 +55,9 @@ if ($barcode && $biblionumber) { if ($hostitemnumber) { my $hostbiblionumber = GetBiblionumberFromItemnumber($hostitemnumber); - my $hostrecord = GetMarcBiblio($hostbiblionumber); if ($hostbiblionumber) { - my $field = MARC::Field->new( - 773, '', '', - 'w' => $hostbiblionumber, - 'o' => $hostitemnumber, - 'a' => $hostrecord->subfield('245','a'), - 'x' => $hostrecord->subfield('245','x') - ); + my $field = PrepHostMarcField($hostbiblionumber, $hostitemnumber); $biblio->append_fields($field); my $modresult = ModBiblio($biblio, $biblionumber, ''); -- 1.5.4.5 From savitra.sirohi at osslabs.biz Tue Nov 16 07:02:44 2010 From: savitra.sirohi at osslabs.biz (savitra.sirohi at osslabs.biz) Date: Tue, 16 Nov 2010 11:32:44 +0530 Subject: [Koha-patches] [PATCH] Analytical records: Moving get host items code into a C4 routine, also calling the new routine in related perl scripts Message-ID: <1289887364-16107-1-git-send-email-savitra.sirohi@osslabs.biz> From: Amit Gupta --- C4/Items.pm | 30 ++++++++++++++++++++++++++++++ catalogue/detail.pl | 17 +++++------------ catalogue/moredetail.pl | 17 +++++------------ 3 files changed, 40 insertions(+), 24 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 264fa5b..c0c223a 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -64,6 +64,7 @@ BEGIN { GetItemInfosOf GetItemsByBiblioitemnumber GetItemsInfo + GetHostItemsInfo get_itemnumbers_of GetItemnumberFromBarcode GetBarcodeFromItemnumber @@ -1317,6 +1318,35 @@ sub GetItemsInfo { } } + +=head2 GetHostItemsInfo + + $hostiteminfo = GetHostItemsInfo($hostfield); + + Returns the iteminfo for items linked to records via a host field + +=cut + +sub GetHostItemsInfo { + my ($record) = @_; + my @returnitemsInfo; + + #MARC21 mapping, UNIMARC to be added + foreach my $hostfield ( $record->field('773') ) { + my $hostbiblionumber = $hostfield->subfield("w"); + my $linkeditemnumber = $hostfield->subfield("o"); + my @hostitemInfos = GetItemsInfo($hostbiblionumber); + foreach my $hostitemInfo (@hostitemInfos){ + if ($hostitemInfo->{itemnumber} eq $linkeditemnumber){ + push (@returnitemsInfo,$hostitemInfo); + last; + } + } + } + return @returnitemsInfo; +} + + =head2 GetLastAcquisitions my $lastacq = GetLastAcquisitions({'branches' => ('branch1','branch2'), diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 4dd5ddf..72324de 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -105,18 +105,11 @@ my @items = &GetItemsInfo( $biblionumber, 'intra' ); # flag indicating existence of at least one item linked via a host record my $hostrecords; # adding items linked via host biblios - foreach my $hostfield ( $record->field('773')) { - my $hostbiblionumber = $hostfield->subfield("w"); - my $linkeditemnumber = $hostfield->subfield("o"); - my @hostitemInfos = GetItemsInfo($hostbiblionumber); - foreach my $hostitemInfo (@hostitemInfos){ - if ($hostitemInfo->{itemnumber} eq $linkeditemnumber){ - $hostrecords =1; - push(@items, $hostitemInfo); - } - } - } - +my @hostitems = GetHostItemsInfo($record); +if (@hostitems){ + $hostrecords =1; + push (@items, at hostitems); +} my $dat = &GetBiblioData($biblionumber); diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 05a5a60..097d1ff 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -78,18 +78,11 @@ my $record=GetMarcBiblio($biblionumber); my $hostrecords; # adding items linked via host biblios - foreach my $hostfield ( $record->field('773')) { - my $hostbiblionumber = $hostfield->subfield("w"); - my $linkeditemnumber = $hostfield->subfield("o"); - my @hostitemInfos = GetItemsInfo($hostbiblionumber); - foreach my $hostitemInfo (@hostitemInfos){ - if ($hostitemInfo->{itemnumber} eq $linkeditemnumber){ - $hostrecords =1; - push(@items, $hostitemInfo); - } - } - } - +my @hostitems = GetHostItemsInfo($record); +if (@hostitems){ + $hostrecords =1; + push (@items, at hostitems); +} my $count=@items; $data->{'count'}=$count; -- 1.5.4.5 From savitra.sirohi at osslabs.biz Tue Nov 16 07:03:14 2010 From: savitra.sirohi at osslabs.biz (savitra.sirohi at osslabs.biz) Date: Tue, 16 Nov 2010 11:33:14 +0530 Subject: [Koha-patches] [PATCH] Analytical records: fix copyright line in linkitem.pl Message-ID: <1289887394-16835-1-git-send-email-savitra.sirohi@osslabs.biz> From: Amit Gupta --- cataloguing/linkitem.pl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cataloguing/linkitem.pl b/cataloguing/linkitem.pl index 1504875..d4959ad 100755 --- a/cataloguing/linkitem.pl +++ b/cataloguing/linkitem.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -# Move an item from a biblio to another +# Link an item belonging to an analytical record, the item barcode needs to be provided # -# Copyright 2009 BibLibre +# Copyright 2009 BibLibre, 2010 Nucsoft OSS Labs # # This file is part of Koha. # -- 1.5.4.5 From M.de.Rooy at rijksmuseum.nl Tue Nov 16 14:19:43 2010 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Tue, 16 Nov 2010 13:19:43 +0000 Subject: [Koha-patches] [PATCH] bug 5066: log timestamp consistently in _session_log In-Reply-To: <1289913435-13341-1-git-send-email-m.de.rooy@rijksmuseum.nl> References: <1289913435-13341-1-git-send-email-m.de.rooy@rijksmuseum.nl> Message-ID: <809BE39CD64BFD4EB9036172EBCCFA311A24B9@S-MAIL-1B.rijksmuseum.intra> From: Galen Charlton Alternative to Marcel de Rooy's patch of 4 November. The rest of C4/Auth.pm uses strftime("%c", localtime) to format the timestamp, and in general, strftime('%c', localtime) ne scalar(localtime). Signed-off-by: Galen Charlton Signed-off-by: Marcel de Rooy --- C4/Auth.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index c7477b1..7404f96 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -717,7 +717,7 @@ sub checkauth { ( $return, $cardnumber ) = checkpw( $dbh, $userid, $password, $query ); } if ($return) { - _session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},localtime); + _session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime)); if ( $flags = haspermission( $userid, $flagsrequired ) ) { $loggedin = 1; } -- 1.6.0.6 From colin.campbell at ptfs-europe.com Tue Nov 16 18:34:27 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Tue, 16 Nov 2010 17:34:27 +0000 Subject: [Koha-patches] [PATCH] Bug 4074 Fix fail to parse simple qualified search Message-ID: <1289928867-23621-1-git-send-email-colin.campbell@ptfs-europe.com> Searches such as au,phr and kw,wrdl were passing through the regexes that should replace colon with equals add wrdl and phr use trn so not just rtrn is spotted Where we were checking for multiple spaces specify that in the regex not just two spaces --- C4/Search.pm | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index d36459a..93999bb 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1308,10 +1308,11 @@ sub buildQuery { # if user wants to do ccl or cql, start the query with that # $query =~ s/:/=/g; $query =~ s/(?<=(ti|au|pb|su|an|kw|mc)):/=/g; - $query =~ s/(?<=rtrn):/=/g; + $query =~ s/(?<=(wrdl)):/=/g; + $query =~ s/(?<=(trn|phr)):/=/g; $limit =~ s/:/=/g; for ( $query, $query_desc, $limit, $limit_desc ) { - s/ / /g; # remove extra spaces + s/ +/ /g; # remove extra spaces s/^ //g; # remove any beginning spaces s/ $//g; # remove any ending spaces s/==/=/g; # remove double == from query -- 1.7.3.2 From cfouts at liblime.com Tue Nov 16 19:20:18 2010 From: cfouts at liblime.com (Clay Fouts) Date: Tue, 16 Nov 2010 10:20:18 -0800 Subject: [Koha-patches] [PATCH] Bug 5408 - Refactor GetIssuingRule and GetLoanLength In-Reply-To: <4CE1790D.2090007@biblibre.com> References: <1289809040-1427-1-git-send-email-cfouts@liblime.com> <20101115092355.GV4325@rorohiko> <4CE1790D.2090007@biblibre.com> Message-ID: What's the status of merging this development? Is anyone working on it? My implementation of that particular function is more readable (and less DB intensive in many cases), but your branch has the advantage in terms of being more complete and fully separating out the issuing rules concerns into their own module. What remains to be done? Clay On Mon, Nov 15, 2010 at 10:16 AM, LAURENT Henri-Damien < henridamien.laurent at biblibre.com> wrote: > Le 15/11/2010 17:45, Clay Fouts a ?crit : > > Well, that's a much larger project since AFAICT all the issuingrules > > table mutations come from directly within smart-rules.pl > > . So all that code needs to me moved into > C4::Circ. > > > > As is, there's no actual freshness issue since the cache-enabled > > functions are not used from within any script that also mutates the > > data. That cache-reset function is there as a reminder to use it when > > there's further normalization to the data layer. > In order to adress that concern, we created a Perl Module > C4::IssuingRules.pm > Due to the time we did it (at least 6 month ago)... It is not using > DBIx::Class but C4::SQLHelper. > But it does what you wanted to do. > And quite help improving the user interface... > See the smart-rules page on BibLibre-memb-circ-update > in wip/koha-biblibre.git in order to see the results of the development. > > Feel free to test and comment on that. > If you donot want to create a test we can set one up as we did for other > branches, just ask. > > -- > Henri-Damien LAURENT > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisc at catalyst.net.nz Tue Nov 16 20:07:33 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Wed, 17 Nov 2010 08:07:33 +1300 Subject: [Koha-patches] [PATCH] Bug 5408 - Refactor GetIssuingRule and GetLoanLength In-Reply-To: References: <1289809040-1427-1-git-send-email-cfouts@liblime.com> <20101115092355.GV4325@rorohiko> <4CE1790D.2090007@biblibre.com> Message-ID: <20101116190733.GW4325@rorohiko> * Clay Fouts (cfouts at liblime.com) wrote: > What's the status of merging this development? Is anyone working on it? My > implementation of that particular function is more readable (and less DB > intensive in many cases), but your branch has the advantage in terms of > being more complete and fully separating out the issuing rules concerns > into their own module. What remains to be done? > Clay Biblibres branches are all published, and they have spent considerable time rebasing them all so they apply on master. They are currently working their way through qa, the reports branch is very close to merging. But anyone can take any of the branches and work on signoff on patches, or provide feedback, or in your case, merge your patch with that branch and submit a pull request for that new branch. Thats the great thing we distributed version control. Chris > > On Mon, Nov 15, 2010 at 10:16 AM, LAURENT Henri-Damien > wrote: > > Le 15/11/2010 17:45, Clay Fouts a ecrit : > > Well, that's a much larger project since AFAICT all the issuingrules > > table mutations come from directly within smart-rules.pl > > . So all that code needs to me moved into > C4::Circ. > > > > As is, there's no actual freshness issue since the cache-enabled > > functions are not used from within any script that also mutates the > > data. That cache-reset function is there as a reminder to use it when > > there's further normalization to the data layer. > In order to adress that concern, we created a Perl Module > C4::IssuingRules.pm > Due to the time we did it (at least 6 month ago)... It is not using > DBIx::Class but C4::SQLHelper. > But it does what you wanted to do. > And quite help improving the user interface... > See the smart-rules page on BibLibre-memb-circ-update > in wip/koha-biblibre.git in order to see the results of the development. > > Feel free to test and comment on that. > If you donot want to create a test we can set one up as we did for other > branches, just ask. > > -- > Henri-Damien LAURENT > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ -- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From gmcharlt at gmail.com Wed Nov 17 00:33:49 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Tue, 16 Nov 2010 18:33:49 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5152 - confirm buttons different styles on lists Message-ID: <1289950429-2091-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Galen Charlton --- .../prog/en/modules/virtualshelves/shelves.tmpl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl index e6c8113..ddd895c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl @@ -419,7 +419,7 @@ function placeHold () { " value="1" /> " value="1" /> - + -- 1.7.0 From gmcharlt at gmail.com Wed Nov 17 00:43:43 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Tue, 16 Nov 2010 18:43:43 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5037 - If patron category is empty it shouldn't show Message-ID: <1289951023-2901-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Galen Charlton --- .../prog/en/modules/members/memberentrygen.tmpl | 26 +++++++++++-------- members/memberentry.pl | 2 + 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl index 5fa4f82..806b43c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl @@ -742,22 +742,26 @@ + + + + + + There is no category type to add an Adulta Childan Institutiona Professionala Staff Member. Please create one diff --git a/members/memberentry.pl b/members/memberentry.pl index c25f7c9..fbd8538 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -429,8 +429,10 @@ foreach (qw(C A S P I X)) { } my %typehash; $typehash{'typename'}=$_; + my $typedescription = "typename_".$typehash{'typename'}; $typehash{'categoryloop'}=\@categoryloop; push @typeloop,{'typename' => $_, + $typedescription => 1, 'categoryloop' => \@categoryloop}; } $template->param('typeloop' => \@typeloop); -- 1.7.0 From gmcharlt at gmail.com Wed Nov 17 00:52:36 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Tue, 16 Nov 2010 18:52:36 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 3013, Value builder for 006 and 008 need choices for all format types Message-ID: <1289951556-3141-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard This partial fix adds a complete list of values for 006/00, "Form of material," following the list found here: http://www.loc.gov/marc/bibliographic/bd006.html Signed-off-by: Galen Charlton --- .../value_builder/marc21_field_006.tmpl | 86 +++++++++++++++++++- 1 files changed, 82 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.tmpl index 96110d8..ab2a079 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.tmpl @@ -17,12 +17,90 @@ - - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 1.7.0 From gmcharlt at gmail.com Wed Nov 17 01:33:38 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Tue, 16 Nov 2010 19:33:38 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 4074 Fix fail to parse simple qualified search Message-ID: <1289954018-3448-1-git-send-email-gmcharlt@gmail.com> From: Colin Campbell Searches such as au,phr and kw,wrdl were passing through the regexes that should replace colon with equals add wrdl and phr use trn so not just rtrn is spotted Where we were checking for multiple spaces specify that in the regex not just two spaces Signed-off-by: Galen Charlton --- C4/Search.pm | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index d36459a..93999bb 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1308,10 +1308,11 @@ sub buildQuery { # if user wants to do ccl or cql, start the query with that # $query =~ s/:/=/g; $query =~ s/(?<=(ti|au|pb|su|an|kw|mc)):/=/g; - $query =~ s/(?<=rtrn):/=/g; + $query =~ s/(?<=(wrdl)):/=/g; + $query =~ s/(?<=(trn|phr)):/=/g; $limit =~ s/:/=/g; for ( $query, $query_desc, $limit, $limit_desc ) { - s/ / /g; # remove extra spaces + s/ +/ /g; # remove extra spaces s/^ //g; # remove any beginning spaces s/ $//g; # remove any ending spaces s/==/=/g; # remove double == from query -- 1.7.0 From tomascohen at gmail.com Wed Nov 17 02:02:39 2010 From: tomascohen at gmail.com (=?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?=) Date: Tue, 16 Nov 2010 22:02:39 -0300 Subject: [Koha-patches] [PATCH] Bug 5412 double quotes break coins and thus search results in some scenarios Message-ID: <1289955759-22993-1-git-send-email-tomascohen@gmail.com> --- C4/Biblio.pm | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 81ccfbb..6a422be 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1198,6 +1198,7 @@ sub GetCOinSBiblio { my $coins_value = "ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3A$mtx$genre$title&rft.isbn=$isbn&rft.issn=$issn&rft.aulast=$aulast&rft.aufirst=$aufirst$oauthors&rft.pub=$publisher&rft.date=$pubyear"; $coins_value =~ s/(\ |&[^a])/\+/g; + $coins_value =~ s/\"/\"\;/g; #&rft.au=&rft.btitle=&rft.date=&rft.pages=&rft.isbn=&rft.aucorp=&rft.place=&rft.pub=&rft.edition=&rft.series=&rft.genre=" -- 1.7.1 From chrisc at catalyst.net.nz Wed Nov 17 04:38:14 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Wed, 17 Nov 2010 16:38:14 +1300 Subject: [Koha-patches] [PATCH] Analytical records - move host field population to a C4 routine, all changes in pl files to call new routine In-Reply-To: <1289887327-15842-1-git-send-email-savitra.sirohi@osslabs.biz> References: <1289887327-15842-1-git-send-email-savitra.sirohi@osslabs.biz> Message-ID: <20101117033814.GD4325@rorohiko> Hi, This patch wouldnt apply, the following 2 analytical records one applied ok. Cannot fall back to three-way merge. Patch failed at 0001 Analytical records - move host field population to a C4 routine, all changes in pl files to call new routine Chris * savitra.sirohi at osslabs.biz (savitra.sirohi at osslabs.biz) wrote: > From: Amit Gupta > > --- > C4/Biblio.pm | 25 +++++++++++++++++++++++++ > cataloguing/addbiblio.pl | 11 ++--------- > cataloguing/linkitem.pl | 9 +-------- > 3 files changed, 28 insertions(+), 17 deletions(-) > > diff --git a/C4/Biblio.pm b/C4/Biblio.pm > index eb0b248..eb6ea42 100644 > --- a/C4/Biblio.pm > +++ b/C4/Biblio.pm > @@ -84,6 +84,7 @@ BEGIN { > &GetFrameworkCode > &GetPublisherNameFromIsbn > &TransformKohaToMarc > + &PrepHostMarcField > > &CountItemsIssued > ); > @@ -1663,6 +1664,30 @@ sub TransformKohaToMarc { > return $record; > } > > +=head2 PrepHostMarcField > + > + $hostfield = PrepHostMarcField ( $hostbiblionumber ) > + > +This function returns a host field populated with data from the host record, the field can then be added to an analytical record > + > +=cut > + > +sub PrepHostMarcField { > + my ($hostbiblionumber,$hostitemnumber) = @_; > + my $hostrecord = GetMarcBiblio($hostbiblionumber); > + > + my $hostmarcfield = MARC::Field->new( > + 773, '', '', > + 'w' => $hostbiblionumber, > + 'o' => $hostitemnumber, > + 'a' => $hostrecord->subfield('245','a'), > + 'x' => $hostrecord->subfield('245','x') > + ); > + > + return $hostmarcfield; > +} > + > + > =head2 TransformKohaToMarcOneField > > $record = TransformKohaToMarcOneField( $sth, $record, $kohafieldname, $value, $frameworkcode ); > diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl > index 28aad1f..f0c94e0 100755 > --- a/cataloguing/addbiblio.pl > +++ b/cataloguing/addbiblio.pl > @@ -890,18 +890,11 @@ if (($biblionumber) && !($breedingid)){ > if ($breedingid) { > ( $record, $encoding ) = MARCfindbreeding( $breedingid ) ; > } > -#populate 773 if hostbiblionumber is available > +#populate hostfield if hostbiblionumber is available > if ($hostbiblionumber){ > - my $hostrecord = &GetMarcBiblio($hostbiblionumber); > $record=MARC::Record->new(); > $record->leader(''); > - my $field = MARC::Field->new( > - 773, '', '', > - 'w' => $hostbiblionumber, > - 'o' => $hostitemnumber, > - 'a' => $hostrecord->subfield('245','a'), > - 'x' => $hostrecord->subfield('245','x') > - ); > + my $field = PrepHostMarcField($hostbiblionumber, $hostitemnumber); > $record->append_fields($field); > } > > diff --git a/cataloguing/linkitem.pl b/cataloguing/linkitem.pl > index bff001e..1504875 100755 > --- a/cataloguing/linkitem.pl > +++ b/cataloguing/linkitem.pl > @@ -55,16 +55,9 @@ if ($barcode && $biblionumber) { > > if ($hostitemnumber) { > my $hostbiblionumber = GetBiblionumberFromItemnumber($hostitemnumber); > - my $hostrecord = GetMarcBiblio($hostbiblionumber); > > if ($hostbiblionumber) { > - my $field = MARC::Field->new( > - 773, '', '', > - 'w' => $hostbiblionumber, > - 'o' => $hostitemnumber, > - 'a' => $hostrecord->subfield('245','a'), > - 'x' => $hostrecord->subfield('245','x') > - ); > + my $field = PrepHostMarcField($hostbiblionumber, $hostitemnumber); > $biblio->append_fields($field); > > my $modresult = ModBiblio($biblio, $biblionumber, ''); > -- > 1.5.4.5 > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ -- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From chrisc at catalyst.net.nz Wed Nov 17 05:00:39 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Wed, 17 Nov 2010 17:00:39 +1300 Subject: [Koha-patches] [PATCH] bug 5066: log timestamp consistently in _session_log In-Reply-To: <809BE39CD64BFD4EB9036172EBCCFA311A24B9@S-MAIL-1B.rijksmuseum.intra> References: <1289913435-13341-1-git-send-email-m.de.rooy@rijksmuseum.nl> <809BE39CD64BFD4EB9036172EBCCFA311A24B9@S-MAIL-1B.rijksmuseum.intra> Message-ID: <20101117040039.GE4325@rorohiko> Can you please rebase this against master, and resend. It currently doesnt apply Chris * Marcel de Rooy (M.de.Rooy at rijksmuseum.nl) wrote: > From: Galen Charlton > > Alternative to Marcel de Rooy's patch of 4 November. The > rest of C4/Auth.pm uses strftime("%c", localtime) to format > the timestamp, and in general, > strftime('%c', localtime) ne scalar(localtime). > > Signed-off-by: Galen Charlton > Signed-off-by: Marcel de Rooy > --- > C4/Auth.pm | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/C4/Auth.pm b/C4/Auth.pm > index c7477b1..7404f96 100644 > --- a/C4/Auth.pm > +++ b/C4/Auth.pm > @@ -717,7 +717,7 @@ sub checkauth { > ( $return, $cardnumber ) = checkpw( $dbh, $userid, $password, $query ); > } > if ($return) { > - _session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},localtime); > + _session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime)); > if ( $flags = haspermission( $userid, $flagsrequired ) ) { > $loggedin = 1; > } > -- > 1.6.0.6 > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ -- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From M.de.Rooy at rijksmuseum.nl Wed Nov 17 13:18:00 2010 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Wed, 17 Nov 2010 12:18:00 +0000 Subject: [Koha-patches] [PATCH] Bug 5066 (Log timestamp consistently in _session_log) Message-ID: <809BE39CD64BFD4EB9036172EBCCFA311A2754@S-MAIL-1B.rijksmuseum.intra> Small fix with thanks to Galen. --- C4/Auth.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index c7477b1..7404f96 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -717,7 +717,7 @@ sub checkauth { ( $return, $cardnumber ) = checkpw( $dbh, $userid, $password, $query ); } if ($return) { - _session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},localtime); + _session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime)); if ( $flags = haspermission( $userid, $flagsrequired ) ) { $loggedin = 1; } -- 1.6.0.6 From colin.campbell at ptfs-europe.com Wed Nov 17 15:24:28 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Wed, 17 Nov 2010 14:24:28 +0000 Subject: [Koha-patches] [PATCH 1/2] Bug 5415 More consistent returns from SimpleSearch Message-ID: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> SimpleSearch returns a 3 element array the first pf which is an error indication. If an error is returned the other elements are undefined. If error is undef the other elements are defined This restores the consistency of the interface as it was before the addition of zebra --- C4/Search.pm | 77 +++++++++++++++++++++++++++++++--------------------------- 1 files changed, 41 insertions(+), 36 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 93999bb..4946d0a 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -120,18 +120,19 @@ sub FindDuplicate { } } - # FIXME: add error handling - my ( $error, $searchresults ) = SimpleSearch($query); # FIXME :: hardcoded ! + my ( $error, $searchresults, undef ) = SimpleSearch($query); # FIXME :: hardcoded ! my @results; - foreach my $possible_duplicate_record (@$searchresults) { - my $marcrecord = - MARC::Record->new_from_usmarc($possible_duplicate_record); - my $result = TransformMarcToKoha( $dbh, $marcrecord, '' ); - - # FIXME :: why 2 $biblionumber ? - if ($result) { - push @results, $result->{'biblionumber'}; - push @results, $result->{'title'}; + if (!defined $error) { + foreach my $possible_duplicate_record (@{$searchresults}) { + my $marcrecord = + MARC::Record->new_from_usmarc($possible_duplicate_record); + my $result = TransformMarcToKoha( $dbh, $marcrecord, '' ); + + # FIXME :: why 2 $biblionumber ? + if ($result) { + push @results, $result->{'biblionumber'}; + push @results, $result->{'title'}; + } } } return @results; @@ -153,12 +154,16 @@ This function provides a simple search API on the bibliographic catalog * $max_results - if present, determines the maximum number of records to fetch. undef is All. defaults to undef. -=item C +=item C - * $error is a empty unless an error is detected - * \@results is an array of records. + Returns an array consisting of three elements + * $error is undefined unless an error is detected + * $results is a reference to an array of records. * $total_hits is the number of hits that would have been returned with no limit + If an error is returned the two other return elements are undefined. If error itself is undefined + the other two elements are always defined + =item C =back @@ -172,23 +177,23 @@ if (defined $error) { exit; } -my $hits = scalar @$marcresults; +my $hits = @{$marcresults}; my @results; -for my $i (0..$hits) { - my %resultsloop; - my $marcrecord = MARC::File::USMARC::decode($marcresults->[$i]); - my $biblio = TransformMarcToKoha(C4::Context->dbh,$marcrecord,''); - - #build the hash for the template. - $resultsloop{title} = $biblio->{'title'}; - $resultsloop{subtitle} = $biblio->{'subtitle'}; - $resultsloop{biblionumber} = $biblio->{'biblionumber'}; - $resultsloop{author} = $biblio->{'author'}; - $resultsloop{publishercode} = $biblio->{'publishercode'}; - $resultsloop{publicationyear} = $biblio->{'publicationyear'}; +for my $r ( @{$marcresults} ) { + my $marcrecord = MARC::File::USMARC::decode($r); + my $biblio = TransformMarcToKoha(C4::Context->dbh,$marcrecord,q{}); + + #build the iarray of hashs for the template. + push @results, { + title => $biblio->{'title'}, + subtitle => $biblio->{'subtitle'}, + biblionumber => $biblio->{'biblionumber'}, + author => $biblio->{'author'}, + publishercode => $biblio->{'publishercode'}, + publicationyear => $biblio->{'publicationyear'}, + }; - push @results, \%resultsloop; } $template->param(result=>\@results); @@ -206,14 +211,14 @@ sub SimpleSearch { return ( undef, $search_result, scalar($result->{hits}) ); } else { + return ( 'No query entered', undef, undef ) unless $query; # FIXME hardcoded value. See catalog/search.pl & opac-search.pl too. - my @servers = defined ( $servers ) ? @$servers : ( "biblioserver" ); - my @results; + my @servers = defined ( $servers ) ? @$servers : ( 'biblioserver' ); my @zoom_queries; my @tmpresults; my @zconns; - my $total_hits; - return ( "No query entered", undef, undef ) unless $query; + my $results = []; + my $total_hits = 0; # Initialize & Search Zebra for ( my $i = 0 ; $i < @servers ; $i++ ) { @@ -257,7 +262,7 @@ sub SimpleSearch { for my $j ( $first_record..$last_record ) { my $record = $tmpresults[ $i - 1 ]->record( $j-1 )->raw(); # 0 indexed - push @results, $record; + push @{$results}, $record; } } } @@ -269,7 +274,7 @@ sub SimpleSearch { $zoom_query->destroy(); } - return ( undef, \@results, $total_hits ); + return ( undef, $results, $total_hits ); } } @@ -2559,11 +2564,11 @@ AND (authtypecode IS NOT NULL AND authtypecode<>\"\")|); warn "BIBLIOADDSAUTHORITIES: $error"; return (0,0) ; } - if ($results && scalar(@$results)==1) { + if ( @{$results} == 1 ) { my $marcrecord = MARC::File::USMARC::decode($results->[0]); $field->add_subfields('9'=>$marcrecord->field('001')->data); $countlinked++; - } elsif (scalar(@$results)>1) { + } elsif ( @{$results} > 1 ) { #More than One result #This can comes out of a lack of a subfield. # my $marcrecord = MARC::File::USMARC::decode($results->[0]); -- 1.7.3.2 From colin.campbell at ptfs-europe.com Wed Nov 17 15:24:29 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Wed, 17 Nov 2010 14:24:29 +0000 Subject: [Koha-patches] [PATCH 2/2] Bug 5415 Let calls of SimpleSearch utilize considtent interface In-Reply-To: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> References: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> Message-ID: <1290003869-21023-2-git-send-email-colin.campbell@ptfs-europe.com> Remove some unnecessary checks when check of error is sufficient. Make the order in some cases more logical Should remove some possibilities of runtime warning noise. Although some calls belong to the 'Nothing could ever go wrong' school have added some warnings --- C4/AuthoritiesMarc.pm | 9 +++++++-- C4/Heading.pm | 7 +++++++ C4/Matcher.pm | 9 ++++++--- acqui/neworderbiblio.pl | 13 ++++++------- authorities/authorities-list.pl | 3 +++ cataloguing/addbiblio.pl | 6 +++--- cataloguing/addbooks.pl | 4 ++-- cataloguing/value_builder/unimarc_field_4XX.pl | 5 ++++- labels/label-item-search.pl | 4 ++-- misc/migration_tools/bulkmarcimport.pl | 8 ++++---- misc/migration_tools/remove_unused_authorities.pl | 4 ++++ serials/subscription-bib-search.pl | 2 +- t/lib/KohaTest.pm | 4 ++-- 13 files changed, 51 insertions(+), 27 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index d07cca4..606c1c8 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -362,7 +362,12 @@ sub CountUsage { my $query; $query= "an=".$authid; my ($err,$res,$result) = C4::Search::SimpleSearch($query,0,10); - return ($result); + if ($err) { + warn "Error: $err from search $query"; + $result = 0; + } + + return $result; } } @@ -903,7 +908,7 @@ sub FindDuplicateAuthority { } my ($error, $results, $total_hits) = C4::Search::SimpleSearch( $query, 0, 1, [ "authorityserver" ] ); # there is at least 1 result => return the 1st one - if (@$results>0) { + if (!defined $error && @{$results} ) { my $marcrecord = MARC::File::USMARC::decode($results->[0]); return $marcrecord->field('001')->data,BuildSummary($marcrecord,$marcrecord->field('001')->data,$authtypecode); } diff --git a/C4/Heading.pm b/C4/Heading.pm index 9d7d98a..1ea5a74 100644 --- a/C4/Heading.pm +++ b/C4/Heading.pm @@ -24,6 +24,7 @@ use MARC::Field; use C4::Context; use C4::Heading::MARC21; use C4::Search; +use Carp; our $VERSION = 3.00; @@ -109,6 +110,9 @@ sub authorities { my $query = qq(Match-heading,ext="$self->{'search_form'}"); $query .= $self->_query_limiters(); my ($error, $results, $total_hits) = SimpleSearch( $query, undef, undef, [ "authorityserver" ] ); + if (defined $error) { + carp "Error:$error from search $query"; + } return $results; } @@ -126,6 +130,9 @@ sub preferred_authorities { my $query = "Match-heading-see-from,ext='$self->{'search_form'}'"; $query .= $self->_query_limiters(); my ($error, $results, $total_hits) = SimpleSearch( $query, undef, undef, [ "authorityserver" ] ); + if (defined $error) { + carp "Error:$error from search $query"; + } return $results; } diff --git a/C4/Matcher.pm b/C4/Matcher.pm index 5915c12..9d1df67 100644 --- a/C4/Matcher.pm +++ b/C4/Matcher.pm @@ -606,9 +606,12 @@ sub get_matches { # FIXME only searching biblio index at the moment my ($error, $searchresults, $total_hits) = SimpleSearch($query, 0, $max_matches); - warn "search failed ($query) $error" if $error; - foreach my $matched (@$searchresults) { - $matches{$matched} += $matchpoint->{'score'}; + if (defined $error ) { + warn "search failed ($query) $error"; + } else { + foreach my $matched (@{$searchresults}) { + $matches{$matched} += $matchpoint->{'score'}; + } } } diff --git a/acqui/neworderbiblio.pl b/acqui/neworderbiblio.pl index 2333f89..9dd29d8 100755 --- a/acqui/neworderbiblio.pl +++ b/acqui/neworderbiblio.pl @@ -112,16 +112,15 @@ if (defined $error) { my @results; -if ($marcresults) { - foreach my $result ( @{$marcresults} ) { - my $marcrecord = MARC::File::USMARC::decode( $result ); - my $biblio = TransformMarcToKoha( C4::Context->dbh, $marcrecord, '' ); +foreach my $result ( @{$marcresults} ) { + my $marcrecord = MARC::File::USMARC::decode( $result ); + my $biblio = TransformMarcToKoha( C4::Context->dbh, $marcrecord, '' ); - $biblio->{booksellerid} = $booksellerid; - push @results, $biblio; + $biblio->{booksellerid} = $booksellerid; + push @results, $biblio; - } } + $template->param( basketno => $basketno, booksellerid => $bookseller->{'id'}, diff --git a/authorities/authorities-list.pl b/authorities/authorities-list.pl index 9c472f1..eec3233 100755 --- a/authorities/authorities-list.pl +++ b/authorities/authorities-list.pl @@ -25,6 +25,9 @@ foreach my $authority (@$dataauthorities){ $query= "an=".$authority->{'authid'}; # search for biblios mapped my ($err,$res,$used) = C4::Search::SimpleSearch($query,0,10); + if (defined $err) { + $used = 0; + } if ($marcauthority && $marcauthority->field($authtypes{$authority->{'authtypecode'}}->{'tag'})){ print qq("),$marcauthority->field($authtypes{$authority->{'authtypecode'}}->{"tag"})->as_string(),qq(";),qq($authority->{'authid'};"),$authtypes{$authority->{'authtypecode'}}->{'lib'},qq(";$used\n); } diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 2c0c63d..e64f4e2 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -768,16 +768,16 @@ AND (authtypecode IS NOT NULL AND authtypecode<>\"\")|); warn "BIBLIOADDSAUTHORITIES: $error"; return (0,0) ; } - if ($results && scalar(@$results)==1) { + if ( @{$results} == 1) { my $marcrecord = MARC::File::USMARC::decode($results->[0]); $field->add_subfields('9'=>$marcrecord->field('001')->data); $countlinked++; - } elsif (scalar(@$results)>1) { + } elsif (@{$results} > 1) { #More than One result #This can comes out of a lack of a subfield. # my $marcrecord = MARC::File::USMARC::decode($results->[0]); # $record->field($data->{tagfield})->add_subfields('9'=>$marcrecord->field('001')->data); - $countlinked++; + $countlinked++; } else { #There are no results, build authority record, add it to Authorities, get authid and add it to 9 ###NOTICE : This is only valid if a subfield is linked to one and only one authtypecode diff --git a/cataloguing/addbooks.pl b/cataloguing/addbooks.pl index 4c8a989..5e89ef8 100755 --- a/cataloguing/addbooks.pl +++ b/cataloguing/addbooks.pl @@ -85,8 +85,8 @@ if ($query) { # format output # SimpleSearch() give the results per page we want, so 0 offet here - my $total = scalar @$marcresults; - my @newresults = searchResults( 'intranet', $query, $total, $results_per_page, 0, 0, @$marcresults ); + my $total = @{$marcresults}; + my @newresults = searchResults( 'intranet', $query, $total, $results_per_page, 0, 0, @{$marcresults} ); $template->param( total => $total_hits, query => $query, diff --git a/cataloguing/value_builder/unimarc_field_4XX.pl b/cataloguing/value_builder/unimarc_field_4XX.pl index 84a6208..ddb6547 100755 --- a/cataloguing/value_builder/unimarc_field_4XX.pl +++ b/cataloguing/value_builder/unimarc_field_4XX.pl @@ -335,7 +335,10 @@ sub plugin { my $orderby; $search = 'kw,wrdl='.$search.' and mc-itemtype='.$itype if $itype; my ( $errors, $results, $total_hits ) = SimpleSearch($search, $startfrom * $resultsperpage, $resultsperpage ); - my $total = scalar(@$results); + if (defined $errors ) { + $results = []; + } + my $total = @{$results}; # warn " biblio count : ".$total; diff --git a/labels/label-item-search.pl b/labels/label-item-search.pl index bdc2109..9b92009 100755 --- a/labels/label-item-search.pl +++ b/labels/label-item-search.pl @@ -92,8 +92,8 @@ if ( $op eq "do_search" ) { ( $error, $marcresults, $total_hits ) = SimpleSearch( $ccl_query, $offset, $resultsperpage ); - if (scalar($marcresults) > 0) { - $show_results = scalar @$marcresults; + if (!defined $error && @{$marcresults} ) { + $show_results = @{$marcresults}; } else { $debug and warn "ERROR label-item-search: no results from SimpleSearch"; diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index 3bb9ed8..1d31382 100755 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -222,15 +222,15 @@ RECORD: while ( ) { my ($error, $results,$totalhits)=C4::Search::SimpleSearch( $query, 0, 3, [$server] ); die "unable to search the database for duplicates : $error" if (defined $error); #warn "$query $server : $totalhits"; - if ($results && scalar(@$results)==1){ + if ( @{$results} == 1 ){ my $marcrecord = MARC::File::USMARC::decode($results->[0]); $id=GetRecordId($marcrecord,$tagid,$subfieldid); } - elsif ($results && scalar(@$results)>1){ - $debug && warn "more than one match for $query"; + elsif ( @{$results} > 1){ + $debug && warn "more than one match for $query"; } else { - $debug && warn "nomatch for $query"; + $debug && warn "nomatch for $query"; } } my $originalid; diff --git a/misc/migration_tools/remove_unused_authorities.pl b/misc/migration_tools/remove_unused_authorities.pl index 070a109..fbeee78 100755 --- a/misc/migration_tools/remove_unused_authorities.pl +++ b/misc/migration_tools/remove_unused_authorities.pl @@ -62,6 +62,10 @@ while (my $data=$rqselect->fetchrow_hashref){ $query= "an=".$data->{'authid'}; # search for biblios mapped my ($err,$res,$used) = C4::Search::SimpleSearch($query,0,10); + if (defined $err) { + warn "error: $err on search $query\n"; + next; + } print "."; print "$counter\n" unless $counter++ % 100; # if found, delete, otherwise, just count diff --git a/serials/subscription-bib-search.pl b/serials/subscription-bib-search.pl index d1b0f63..b33737a 100755 --- a/serials/subscription-bib-search.pl +++ b/serials/subscription-bib-search.pl @@ -90,7 +90,6 @@ if ($op eq "do_search" && $query) { $resultsperpage = 20 if(!defined $resultsperpage); my ($error, $marcrecords, $total_hits) = SimpleSearch($query, $startfrom*$resultsperpage, $resultsperpage); - my $total = scalar @$marcrecords; if (defined $error) { $template->param(query_error => $error); @@ -98,6 +97,7 @@ if ($op eq "do_search" && $query) { output_html_with_http_headers $input, $cookie, $template->output; exit; } + my $total = @{$marcrecords}; my @results; for(my $i=0;$i<$total;$i++) { diff --git a/t/lib/KohaTest.pm b/t/lib/KohaTest.pm index 323b55a..6fcedcf 100644 --- a/t/lib/KohaTest.pm +++ b/t/lib/KohaTest.pm @@ -590,8 +590,8 @@ sub add_biblios { $self->reindex_marc(); my $query = 'Finn Test'; - my ( $error, $results ) = SimpleSearch( $query ); - if ( $param{'count'} <= scalar( @$results ) ) { + my ( $error, $results, undef ) = SimpleSearch( $query ); + if ( !defined $error && $param{'count'} <= @{$results} ) { pass( "found all $param{'count'} titles" ); } else { fail( "we never found all $param{'count'} titles" ); -- 1.7.3.2 From oleonard at myacpl.org Wed Nov 17 15:43:10 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 17 Nov 2010 09:43:10 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5412 double quotes break coins and thus search results in some scenarios Message-ID: <1290004990-20529-1-git-send-email-oleonard@myacpl.org> From: Tom?s Cohen Arazi Signed-off-by: Owen Leonard --- C4/Biblio.pm | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 81ccfbb..6a422be 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1198,6 +1198,7 @@ sub GetCOinSBiblio { my $coins_value = "ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3A$mtx$genre$title&rft.isbn=$isbn&rft.issn=$issn&rft.aulast=$aulast&rft.aufirst=$aufirst$oauthors&rft.pub=$publisher&rft.date=$pubyear"; $coins_value =~ s/(\ |&[^a])/\+/g; + $coins_value =~ s/\"/\"\;/g; #&rft.au=&rft.btitle=&rft.date=&rft.pages=&rft.isbn=&rft.aucorp=&rft.place=&rft.pub=&rft.edition=&rft.series=&rft.genre=" -- 1.7.1 From kmkale at anantcorp.com Wed Nov 17 17:16:24 2010 From: kmkale at anantcorp.com (Koustubha Kale) Date: Wed, 17 Nov 2010 21:46:24 +0530 Subject: [Koha-patches] [PATCH] Bug 5417: itemBarcodeInputFilter text change Message-ID: <1290010584-1603-1-git-send-email-kmkale@anantcorp.com> The text describing the itemBarcodeInputFilter system preference changed from "scanned patron barcodes." to "scanned item barcodes." --- .../en/modules/admin/preferences/circulation.pref | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index c4d4305..e441f54 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -14,7 +14,7 @@ Circulation: whitespace: Remove spaces from cuecat: Convert from CueCat form T-prefix: Remove the first number from T-prefix style - - scanned patron barcodes. + - scanned item barcodes. - - Sort previous checkouts on the circulation page from - pref: previousIssuesDefaultSortOrder -- 1.7.0.4 From henridamien.laurent at biblibre.com Wed Nov 17 18:33:09 2010 From: henridamien.laurent at biblibre.com (LAURENT Henri-Damien) Date: Wed, 17 Nov 2010 18:33:09 +0100 Subject: [Koha-patches] [PATCH] Bug 5408 - Refactor GetIssuingRule and GetLoanLength In-Reply-To: References: <1289809040-1427-1-git-send-email-cfouts@liblime.com> <20101115092355.GV4325@rorohiko> <4CE1790D.2090007@biblibre.com> Message-ID: <4CE411D5.5000700@biblibre.com> Le 16/11/2010 19:20, Clay Fouts a ?crit : > What's the status of merging this development? Is anyone working on it? Already answered by chris > My implementation of that particular function is more readable (and less > DB intensive in many cases), Maybe the first time... But since Memoize is used, it may not be as DB intensive as you think. One thing to improve that we havenot done would be to flush the memoized GetIssuingRules whenever an issuing rule is edited so that it can be refreshed. Another thing would be to use Memoize::Memcached rather that Memoize... Would be quite easy to do though. (other Koha.pm Memoize usage we did is done that way). > but your branch has the advantage in terms > of being more complete and fully separating out the issuing rules > concerns into their own module. What remains to be done? Apart from the thing I previously said, it is in production and works quite well and efficiently. Yes SQLHelper is quite Mysql demanding, but it was meant to be a first step to DBIx::Class and I thought that we could also store the DB structure in a yaml file so that we could get rid of columns.def and have translations of field description in an authoritative file. I have had no time to investigate in DBIx::Class::Schema to see if it would be able to read and process from a YAML file. If anyone is willing to tell his mind about that idea. The fact is that columns.def was good in order to map columns and their description. But it is not coped in the translation process. And we already have some way to process some YAML file.... And a YAML file is quick to parse. So naturally, I think it could be a good idea to store those information in such a structure. -- Henri-Damien LAURENT From ian.walls at bywatersolutions.com Wed Nov 17 22:29:25 2010 From: ian.walls at bywatersolutions.com (Ian Walls) Date: Wed, 17 Nov 2010 16:29:25 -0500 Subject: [Koha-patches] [PATCH] Fixes bug 3393: Overdue_notices.pl not respecting default notice rules Message-ID: <1290029365-20515-1-git-send-email-ian.walls@bywatersolutions.com> --- C4/Overdues.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Overdues.pm b/C4/Overdues.pm index 032ca93..468c252 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -956,7 +956,7 @@ returns a list of branch codes for branches with overdue rules defined. sub GetBranchcodesWithOverdueRules { my $dbh = C4::Context->dbh; - my $rqoverduebranches = $dbh->prepare("SELECT DISTINCT branchcode FROM overduerules WHERE delay1 IS NOT NULL AND branchcode <> ''"); + my $rqoverduebranches = $dbh->prepare("SELECT DISTINCT branchcode FROM overduerules WHERE delay1 IS NOT NULL"); $rqoverduebranches->execute; my @branches = map { shift @$_ } @{ $rqoverduebranches->fetchall_arrayref }; return @branches; -- 1.5.6.5 From root at bigballofwax.co.nz Wed Nov 17 23:41:56 2010 From: root at bigballofwax.co.nz (root) Date: Thu, 18 Nov 2010 11:41:56 +1300 Subject: [Koha-patches] Request to pull for 3.2.x Message-ID: The following changes since commit aeba77bca64e1440b953edb1d112eec57ecde1f7: Chris Nighswonger (1): Beginning of Release Notes for 3.02.01.000 are available in the git repository at: git://git.workbuffer.org/git/koha.git translation_3_2 Chris Cormack (1): German and italian language updates .../po/de-DE-i-staff-t-prog-v-3002000.po | 6 +- .../translator/po/it-IT-i-opac-t-prog-v-3002000.po |16893 +++++++++----------- 2 files changed, 7685 insertions(+), 9214 deletions(-) From kmkale at anantcorp.com Thu Nov 18 07:31:41 2010 From: kmkale at anantcorp.com (Koustubha Kale) Date: Thu, 18 Nov 2010 12:01:41 +0530 Subject: [Koha-patches] [PATCH] Bug 5418: Add a new itemBarcodeInputFilter for libsuite8 style barcodes Message-ID: <1290061901-7833-1-git-send-email-kmkale@anantcorp.com> In India a ILS product called Libsuite8 prints barcodes like b0007432. The barcode is not stored anywhere in libsuite8's database. Neither is barcode available in any of the reports generated by the software. The barcode 'b0007432' when scanned into the libsuite8 software is de-constructed like 'b' which is the itemtype i.e. Book in this instance, and '7432' which is the 'Accession Number'. The software then takes the logged in staff's branchcode and does a join on three tables 'Location', 'Media_Type', and 'Books' to retrieve the particular record from the database. There is no possibility of recreating the barcodes for insertion in Koha while doing a retrospective conversion, because of arbitrary length of the barcode string AND arbitrary number of zeros in the numeric part of the printed barcode AND the fact that there are no reports available from the software which contain barcodes AND the fact that the barcode is not stored in the database. But most importantly due to the simple fact that printed barcodes are duplicated among branches. Therefore this patch emulates the functionality of Libsuite8 software of converting the scanned barcode into one stored in Koha using the itemBarcodeInputFilter system preference. To use this new itemBarcodeInputFilter systempreference choice called 'libsuite8', the barcodes stored in Koha must match the pattern of --. This is easy to achieve while doing retrospective conversion from Libsuite8 to Koha. As expected the itemBarcodeInputFilter will return unmodified barcode is presented with a barcode of pattern -- The perl code in C4/Circulation.pm is ugly and NEEDS major code cleanup. All help is much appreciated.. --- C4/Circulation.pm | 27 +++++++++++++++++++- circ/circulation.pl | 4 +- installer/data/mysql/en/mandatory/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 2 +- .../en/modules/admin/preferences/circulation.pref | 1 + .../prog/en/modules/circ/circulation.tmpl | 2 +- 6 files changed, 32 insertions(+), 6 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 10c3c11..08778ca 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -136,7 +136,7 @@ System Pref options. # FIXME -- these plugins should be moved out of Circulation.pm # sub barcodedecode { - my ($barcode, $filter) = @_; + my ($barcode, $filter, $branch) = @_; $filter = C4::Context->preference('itemBarcodeInputFilter') unless $filter; $filter or return $barcode; # ensure filter is defined, else return untouched barcode if ($filter eq 'whitespace') { @@ -155,6 +155,31 @@ sub barcodedecode { # FIXME: $barcode could be "T1", causing warning: substr outside of string # Why drop the nonzero digit after the T? # Why pass non-digits (or empty string) to "T%07d"? + } elsif ($filter eq 'libsuite8') { + # FIXME: This NEEDS major code cleanup. All help is much appreciated + use Scalar::Util qw(looks_like_number); + my $barcode1=$barcode; + my $branchcode=$branch."-"; + if($barcode1 =~ m/^$branchcode/){ + } + else { + my @chars; + my @nums; + my @m1=split(/ */, $barcode); + foreach (@m1){ + looks_like_number ($_) ? push(@nums,$_) : push(@chars,$_); + } + my @n1; + foreach(@nums){ + if($_ > 0){ + push(@n1,$_); + } + } + my ($chars) = join('', at chars); + my ($n1) = join('', at n1); + $barcode = "$branchcode" . $chars . "-" . $n1; + } + } return $barcode; # return barcode, modified or not } diff --git a/circ/circulation.pl b/circ/circulation.pl index 7c4a0dc..b358a84 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -115,8 +115,8 @@ if (C4::Context->preference("UseTablesortForCirc")) { my $barcode = $query->param('barcode') || ''; $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace - -$barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter')); +my $filter = C4::Context->preference('itemBarcodeInputFilter') || ''; +$barcode = barcodedecode($barcode,$filter,$branch) if( $barcode && C4::Context->preference('itemBarcodeInputFilter')); my $stickyduedate = $query->param('stickyduedate') || $session->param('stickyduedate'); my $duedatespec = $query->param('duedatespec') || $session->param('stickyduedate'); my $issueconfirmed = $query->param('issueconfirmed'); diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index 214d198..1904172 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -145,7 +145,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES 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'); -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'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat|libsuite8','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACViewOthersSuggestions',0,'If ON, allows all suggestions to be displayed in the OPAC',NULL,'YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index bf7acb6..66297db 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -731,7 +731,7 @@ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,ty $dbh->do("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')"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, test or production','test|production','Choice')"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts',NULL,'free')"); -$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','cuecat','Choice')"); +$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','libsuite8','Choice')"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo')"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free')"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACSubscriptionDisplay','economical','Specify how to display subscription information in the OPAC','economical|off|full','Choice')"); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index c4d4305..46570ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -14,6 +14,7 @@ Circulation: whitespace: Remove spaces from cuecat: Convert from CueCat form T-prefix: Remove the first number from T-prefix style + libsuite8: Convert from Libsuite8 form - scanned patron barcodes. - - Sort previous checkouts on the circulation page from diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl index 822de15..89874ab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl @@ -301,7 +301,7 @@ function refocus(calendar) { -
  • The barcode was not found
  • +
  • The barcode was not found
  • -- 1.7.0.4 From henridamien.laurent at biblibre.com Thu Nov 18 10:56:38 2010 From: henridamien.laurent at biblibre.com (LAURENT Henri-Damien) Date: Thu, 18 Nov 2010 10:56:38 +0100 Subject: [Koha-patches] [PATCH 2/2] Bug 5415 Let calls of SimpleSearch utilize considtent interface In-Reply-To: <1290003869-21023-2-git-send-email-colin.campbell@ptfs-europe.com> References: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> <1290003869-21023-2-git-send-email-colin.campbell@ptfs-europe.com> Message-ID: <4CE4F856.8060208@biblibre.com> Hi Colin. I have seen that you are using die.... There has already been a discussion on that on list. No concensus achieved. But I find it really clunky to have that kind of warning for users : Koha Software error.... I acknowledge that a warning has to be raised. Maybe dying is really good practise. But Having more failproof features would be far more comfortable for users (and developers)... When seeing Software error, they will undoubtedly open a new bug... on bugzilla, which is already a bit crowded. Your aim here is surely to HAVE problems reported rather than "hidden" in logs file. But I would have rather, when it is not really a blocking problem, just try and raise a warning. If dying is really a requirement in Modern::Perl then it HAS to be handled in the pl script. And I donot think it is done. Gentlemen ? Can we reach a good practise ? -- Henri-Damien LAURENT Le 17/11/2010 15:24, Colin Campbell a ?crit : > Remove some unnecessary checks when check of error is > sufficient. Make the order in some cases more logical > Should remove some possibilities of runtime warning noise. > Although some calls belong to the 'Nothing could > ever go wrong' school have added some warnings > --- > C4/AuthoritiesMarc.pm | 9 +++++++-- > C4/Heading.pm | 7 +++++++ > C4/Matcher.pm | 9 ++++++--- > acqui/neworderbiblio.pl | 13 ++++++------- > authorities/authorities-list.pl | 3 +++ > cataloguing/addbiblio.pl | 6 +++--- > cataloguing/addbooks.pl | 4 ++-- > cataloguing/value_builder/unimarc_field_4XX.pl | 5 ++++- > labels/label-item-search.pl | 4 ++-- > misc/migration_tools/bulkmarcimport.pl | 8 ++++---- > misc/migration_tools/remove_unused_authorities.pl | 4 ++++ > serials/subscription-bib-search.pl | 2 +- > t/lib/KohaTest.pm | 4 ++-- > 13 files changed, 51 insertions(+), 27 deletions(-) > > diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm > index d07cca4..606c1c8 100644 > --- a/C4/AuthoritiesMarc.pm > +++ b/C4/AuthoritiesMarc.pm > @@ -362,7 +362,12 @@ sub CountUsage { > my $query; > $query= "an=".$authid; > my ($err,$res,$result) = C4::Search::SimpleSearch($query,0,10); > - return ($result); > + if ($err) { > + warn "Error: $err from search $query"; > + $result = 0; > + } > + > + return $result; > } > } > > @@ -903,7 +908,7 @@ sub FindDuplicateAuthority { > } > my ($error, $results, $total_hits) = C4::Search::SimpleSearch( $query, 0, 1, [ "authorityserver" ] ); > # there is at least 1 result => return the 1st one > - if (@$results>0) { > + if (!defined $error && @{$results} ) { > my $marcrecord = MARC::File::USMARC::decode($results->[0]); > return $marcrecord->field('001')->data,BuildSummary($marcrecord,$marcrecord->field('001')->data,$authtypecode); > } > diff --git a/C4/Heading.pm b/C4/Heading.pm > index 9d7d98a..1ea5a74 100644 > --- a/C4/Heading.pm > +++ b/C4/Heading.pm > @@ -24,6 +24,7 @@ use MARC::Field; > use C4::Context; > use C4::Heading::MARC21; > use C4::Search; > +use Carp; > > our $VERSION = 3.00; > > @@ -109,6 +110,9 @@ sub authorities { > my $query = qq(Match-heading,ext="$self->{'search_form'}"); > $query .= $self->_query_limiters(); > my ($error, $results, $total_hits) = SimpleSearch( $query, undef, undef, [ "authorityserver" ] ); > + if (defined $error) { > + carp "Error:$error from search $query"; > + } > return $results; > } > > @@ -126,6 +130,9 @@ sub preferred_authorities { > my $query = "Match-heading-see-from,ext='$self->{'search_form'}'"; > $query .= $self->_query_limiters(); > my ($error, $results, $total_hits) = SimpleSearch( $query, undef, undef, [ "authorityserver" ] ); > + if (defined $error) { > + carp "Error:$error from search $query"; > + } > return $results; > } > > diff --git a/C4/Matcher.pm b/C4/Matcher.pm > index 5915c12..9d1df67 100644 > --- a/C4/Matcher.pm > +++ b/C4/Matcher.pm > @@ -606,9 +606,12 @@ sub get_matches { > # FIXME only searching biblio index at the moment > my ($error, $searchresults, $total_hits) = SimpleSearch($query, 0, $max_matches); > > - warn "search failed ($query) $error" if $error; > - foreach my $matched (@$searchresults) { > - $matches{$matched} += $matchpoint->{'score'}; > + if (defined $error ) { > + warn "search failed ($query) $error"; > + } else { > + foreach my $matched (@{$searchresults}) { > + $matches{$matched} += $matchpoint->{'score'}; > + } > } > } > > diff --git a/acqui/neworderbiblio.pl b/acqui/neworderbiblio.pl > index 2333f89..9dd29d8 100755 > --- a/acqui/neworderbiblio.pl > +++ b/acqui/neworderbiblio.pl > @@ -112,16 +112,15 @@ if (defined $error) { > > my @results; > > -if ($marcresults) { > - foreach my $result ( @{$marcresults} ) { > - my $marcrecord = MARC::File::USMARC::decode( $result ); > - my $biblio = TransformMarcToKoha( C4::Context->dbh, $marcrecord, '' ); > +foreach my $result ( @{$marcresults} ) { > + my $marcrecord = MARC::File::USMARC::decode( $result ); > + my $biblio = TransformMarcToKoha( C4::Context->dbh, $marcrecord, '' ); > > - $biblio->{booksellerid} = $booksellerid; > - push @results, $biblio; > + $biblio->{booksellerid} = $booksellerid; > + push @results, $biblio; > > - } > } > + > $template->param( > basketno => $basketno, > booksellerid => $bookseller->{'id'}, > diff --git a/authorities/authorities-list.pl b/authorities/authorities-list.pl > index 9c472f1..eec3233 100755 > --- a/authorities/authorities-list.pl > +++ b/authorities/authorities-list.pl > @@ -25,6 +25,9 @@ foreach my $authority (@$dataauthorities){ > $query= "an=".$authority->{'authid'}; > # search for biblios mapped > my ($err,$res,$used) = C4::Search::SimpleSearch($query,0,10); > + if (defined $err) { > + $used = 0; > + } > if ($marcauthority && $marcauthority->field($authtypes{$authority->{'authtypecode'}}->{'tag'})){ > print qq("),$marcauthority->field($authtypes{$authority->{'authtypecode'}}->{"tag"})->as_string(),qq(";),qq($authority->{'authid'};"),$authtypes{$authority->{'authtypecode'}}->{'lib'},qq(";$used\n); > } > diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl > index 2c0c63d..e64f4e2 100755 > --- a/cataloguing/addbiblio.pl > +++ b/cataloguing/addbiblio.pl > @@ -768,16 +768,16 @@ AND (authtypecode IS NOT NULL AND authtypecode<>\"\")|); > warn "BIBLIOADDSAUTHORITIES: $error"; > return (0,0) ; > } > - if ($results && scalar(@$results)==1) { > + if ( @{$results} == 1) { > my $marcrecord = MARC::File::USMARC::decode($results->[0]); > $field->add_subfields('9'=>$marcrecord->field('001')->data); > $countlinked++; > - } elsif (scalar(@$results)>1) { > + } elsif (@{$results} > 1) { > #More than One result > #This can comes out of a lack of a subfield. > # my $marcrecord = MARC::File::USMARC::decode($results->[0]); > # $record->field($data->{tagfield})->add_subfields('9'=>$marcrecord->field('001')->data); > - $countlinked++; > + $countlinked++; > } else { > #There are no results, build authority record, add it to Authorities, get authid and add it to 9 > ###NOTICE : This is only valid if a subfield is linked to one and only one authtypecode > diff --git a/cataloguing/addbooks.pl b/cataloguing/addbooks.pl > index 4c8a989..5e89ef8 100755 > --- a/cataloguing/addbooks.pl > +++ b/cataloguing/addbooks.pl > @@ -85,8 +85,8 @@ if ($query) { > > # format output > # SimpleSearch() give the results per page we want, so 0 offet here > - my $total = scalar @$marcresults; > - my @newresults = searchResults( 'intranet', $query, $total, $results_per_page, 0, 0, @$marcresults ); > + my $total = @{$marcresults}; > + my @newresults = searchResults( 'intranet', $query, $total, $results_per_page, 0, 0, @{$marcresults} ); > $template->param( > total => $total_hits, > query => $query, > diff --git a/cataloguing/value_builder/unimarc_field_4XX.pl b/cataloguing/value_builder/unimarc_field_4XX.pl > index 84a6208..ddb6547 100755 > --- a/cataloguing/value_builder/unimarc_field_4XX.pl > +++ b/cataloguing/value_builder/unimarc_field_4XX.pl > @@ -335,7 +335,10 @@ sub plugin { > my $orderby; > $search = 'kw,wrdl='.$search.' and mc-itemtype='.$itype if $itype; > my ( $errors, $results, $total_hits ) = SimpleSearch($search, $startfrom * $resultsperpage, $resultsperpage ); > - my $total = scalar(@$results); > + if (defined $errors ) { > + $results = []; > + } > + my $total = @{$results}; > > # warn " biblio count : ".$total; > > diff --git a/labels/label-item-search.pl b/labels/label-item-search.pl > index bdc2109..9b92009 100755 > --- a/labels/label-item-search.pl > +++ b/labels/label-item-search.pl > @@ -92,8 +92,8 @@ if ( $op eq "do_search" ) { > ( $error, $marcresults, $total_hits ) = > SimpleSearch( $ccl_query, $offset, $resultsperpage ); > > - if (scalar($marcresults) > 0) { > - $show_results = scalar @$marcresults; > + if (!defined $error && @{$marcresults} ) { > + $show_results = @{$marcresults}; > } > else { > $debug and warn "ERROR label-item-search: no results from SimpleSearch"; > diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl > index 3bb9ed8..1d31382 100755 > --- a/misc/migration_tools/bulkmarcimport.pl > +++ b/misc/migration_tools/bulkmarcimport.pl > @@ -222,15 +222,15 @@ RECORD: while ( ) { > my ($error, $results,$totalhits)=C4::Search::SimpleSearch( $query, 0, 3, [$server] ); > die "unable to search the database for duplicates : $error" if (defined $error); > #warn "$query $server : $totalhits"; > - if ($results && scalar(@$results)==1){ > + if ( @{$results} == 1 ){ > my $marcrecord = MARC::File::USMARC::decode($results->[0]); > $id=GetRecordId($marcrecord,$tagid,$subfieldid); > } > - elsif ($results && scalar(@$results)>1){ > - $debug && warn "more than one match for $query"; > + elsif ( @{$results} > 1){ > + $debug && warn "more than one match for $query"; > } > else { > - $debug && warn "nomatch for $query"; > + $debug && warn "nomatch for $query"; > } > } > my $originalid; > diff --git a/misc/migration_tools/remove_unused_authorities.pl b/misc/migration_tools/remove_unused_authorities.pl > index 070a109..fbeee78 100755 > --- a/misc/migration_tools/remove_unused_authorities.pl > +++ b/misc/migration_tools/remove_unused_authorities.pl > @@ -62,6 +62,10 @@ while (my $data=$rqselect->fetchrow_hashref){ > $query= "an=".$data->{'authid'}; > # search for biblios mapped > my ($err,$res,$used) = C4::Search::SimpleSearch($query,0,10); > + if (defined $err) { > + warn "error: $err on search $query\n"; > + next; > + } > print "."; > print "$counter\n" unless $counter++ % 100; > # if found, delete, otherwise, just count > diff --git a/serials/subscription-bib-search.pl b/serials/subscription-bib-search.pl > index d1b0f63..b33737a 100755 > --- a/serials/subscription-bib-search.pl > +++ b/serials/subscription-bib-search.pl > @@ -90,7 +90,6 @@ if ($op eq "do_search" && $query) { > $resultsperpage = 20 if(!defined $resultsperpage); > > my ($error, $marcrecords, $total_hits) = SimpleSearch($query, $startfrom*$resultsperpage, $resultsperpage); > - my $total = scalar @$marcrecords; > > if (defined $error) { > $template->param(query_error => $error); > @@ -98,6 +97,7 @@ if ($op eq "do_search" && $query) { > output_html_with_http_headers $input, $cookie, $template->output; > exit; > } > + my $total = @{$marcrecords}; > my @results; > > for(my $i=0;$i<$total;$i++) { > diff --git a/t/lib/KohaTest.pm b/t/lib/KohaTest.pm > index 323b55a..6fcedcf 100644 > --- a/t/lib/KohaTest.pm > +++ b/t/lib/KohaTest.pm > @@ -590,8 +590,8 @@ sub add_biblios { > > $self->reindex_marc(); > my $query = 'Finn Test'; > - my ( $error, $results ) = SimpleSearch( $query ); > - if ( $param{'count'} <= scalar( @$results ) ) { > + my ( $error, $results, undef ) = SimpleSearch( $query ); > + if ( !defined $error && $param{'count'} <= @{$results} ) { > pass( "found all $param{'count'} titles" ); > } else { > fail( "we never found all $param{'count'} titles" ); From cnighswonger at foundations.edu Thu Nov 18 13:42:16 2010 From: cnighswonger at foundations.edu (Chris Nighswonger) Date: Thu, 18 Nov 2010 07:42:16 -0500 Subject: [Koha-patches] [PATCH 2/2] Bug 5415 Let calls of SimpleSearch utilize considtent interface In-Reply-To: <4CE4F856.8060208@biblibre.com> References: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> <1290003869-21023-2-git-send-email-colin.campbell@ptfs-europe.com> <4CE4F856.8060208@biblibre.com> Message-ID: On Thu, Nov 18, 2010 at 4:56 AM, LAURENT Henri-Damien wrote: > Hi Colin. > I have seen that you are using die.... > There has already been a discussion on that on list. > No concensus achieved. > But I find it really clunky to have that kind of warning for users : > Koha Software error.... > > I acknowledge that a warning has to be raised. > Maybe dying is really good practise. But Having more failproof features > would be far more comfortable for users (and developers)... When seeing > Software error, they will undoubtedly open a new bug... on bugzilla, > which is already a bit crowded. > Your aim here is surely to HAVE problems reported rather than "hidden" > in logs file. > But I would have rather, when it is not really a blocking problem, just > try and raise a warning. > > If dying is really a requirement in Modern::Perl then it HAS to be > handled in the pl script. And I donot think it is done. Gentlemen ? > Can we reach a good practise ? I am in 100% agreement that we should not die, but rather throw a warn to the log and then trap the error, passing useful information back to the user and allowing graceful recovery. I can conceive of no problem which should not be able to be properly trapped and an error message passed back to the user. Even if it is a "blocking problem," graceful recovery and or exit is a necessity. With bugzilla accepting emails it may even be within the realm of possibility to have something like C4::ErrorHandling do automatic bug reporting or the like. I object to adding new code which just dies rather than handling the error. Kind Regards, Chris From cnighswonger at foundations.edu Thu Nov 18 14:14:58 2010 From: cnighswonger at foundations.edu (Chris Nighswonger) Date: Thu, 18 Nov 2010 08:14:58 -0500 Subject: [Koha-patches] [PATCH 2/2] Bug 5415 Let calls of SimpleSearch utilize considtent interface In-Reply-To: References: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> <1290003869-21023-2-git-send-email-colin.campbell@ptfs-europe.com> <4CE4F856.8060208@biblibre.com> Message-ID: On Thu, Nov 18, 2010 at 7:42 AM, Chris Nighswonger wrote: > On Thu, Nov 18, 2010 at 4:56 AM, LAURENT Henri-Damien > wrote: >> Hi Colin. >> I have seen that you are using die.... >> There has already been a discussion on that on list. >> No concensus achieved. >> But I find it really clunky to have that kind of warning for users : >> Koha Software error.... >> >> I acknowledge that a warning has to be raised. >> Maybe dying is really good practise. But Having more failproof features >> would be far more comfortable for users (and developers)... When seeing >> Software error, they will undoubtedly open a new bug... on bugzilla, >> which is already a bit crowded. >> Your aim here is surely to HAVE problems reported rather than "hidden" >> in logs file. >> But I would have rather, when it is not really a blocking problem, just >> try and raise a warning. >> >> If dying is really a requirement in Modern::Perl then it HAS to be >> handled in the pl script. And I donot think it is done. Gentlemen ? >> Can we reach a good practise ? > > I am in 100% agreement that we should not die, but rather throw a warn > to the log and then trap the error, passing useful information back to > the user and allowing graceful recovery. I can conceive of no problem > which should not be able to be properly trapped and an error message > passed back to the user. Even if it is a "blocking problem," graceful > recovery and or exit is a necessity. With bugzilla accepting emails it > may even be within the realm of possibility to have something like > C4::ErrorHandling do automatic bug reporting or the like. > > I object to adding new code which just dies rather than handling the error. > Correction: Colin's patch does not add a die. It just shows one up which already exists about line 223 in builkmarcimport.pl. However, I still hold my position on the use of die. Kind Regards, Chris From gmcharlt at gmail.com Thu Nov 18 14:16:10 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 18 Nov 2010 08:16:10 -0500 Subject: [Koha-patches] [PATCH 2/2] Bug 5415 Let calls of SimpleSearch utilize considtent interface In-Reply-To: <4CE4F856.8060208@biblibre.com> References: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> <1290003869-21023-2-git-send-email-colin.campbell@ptfs-europe.com> <4CE4F856.8060208@biblibre.com> Message-ID: Hi, On Thu, Nov 18, 2010 at 4:56 AM, LAURENT Henri-Damien wrote: > I have seen that you are using die.... Where? I don't see anything in the patch that adds a die() or croak(). As far as general question is concerned, I agree that module code should not be calling die() unless the code that calls the module routine is set up to catch the exception [although adding exception handling to Koha's bag of tricks would be a good idea] or if something is so badly wrong that terminating is the only way to prevent data loss. Regards, Galen -- Galen Charlton gmcharlt at gmail.com From oleonard at myacpl.org Thu Nov 18 15:00:34 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 18 Nov 2010 09:00:34 -0500 Subject: [Koha-patches] [PATCH] Further fixes for Bug 5142 - Untranslatable strings in tag review template Message-ID: <1290088834-22170-1-git-send-email-oleonard@myacpl.org> --- .../intranet-tmpl/prog/en/modules/tags/review.tmpl | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tmpl index a1d6dc2..ad2f360 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tmpl @@ -48,25 +48,25 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; } } } var success_approve = function(tag){ - // window.alert('AJAX approved tag: ' + tag); + // window.alert(_('AJAX approved tag: ') + tag); }; var failure_approve = function(tag){ - window.alert('AJAX failed to approve tag: ' + tag); + window.alert(_('AJAX failed to approve tag: ') + tag); }; var success_reject = function(tag){ - // window.alert('AJAX rejected tag: ' + tag); + // window.alert(_('AJAX rejected tag: ') + tag); }; var failure_reject = function(tag){ - window.alert('AJAX failed to reject tag: ' + tag); + window.alert(_('AJAX failed to reject tag: ') + tag); }; var success_test = function(tag){ - $('#verdict').html(tag + ' is permitted!'); + $('#verdict').html(tag + _(' is permitted!')); }; var failure_test = function(tag){ - $('#verdict').html(tag + ' is prohibited!'); + $('#verdict').html(tag + _(' is prohibited!')); }; var indeterminate_test = function(tag){ - $('#verdict').html(tag + ' is neither permitted nor prohibited!'); + $('#verdict').html(tag + _(' is neither permitted nor prohibited!')); }; var success_test_call = function() { @@ -100,7 +100,7 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; } }); $('body').click(function(event) { pull_counts(); - // window.alert("Click detected on " + event.target + ": " + $(event.target).html); + // window.alert(_("Click detected on ") + event.target + ": " + $(event.target).html); if ($(event.target).is('.ok')) { $.ajax({ "data": {ok: $(event.target).attr("title"), CGISESSID: readCookie('CGISESSID')}, -- 1.7.1 From kmkale at anantcorp.com Thu Nov 18 15:12:49 2010 From: kmkale at anantcorp.com (Koustubha Kale) Date: Thu, 18 Nov 2010 19:42:49 +0530 Subject: [Koha-patches] [PATCH] Bug 5418: Revised patch new itemBarcodeInputFilter for libsuite8 style barcodes Message-ID: <1290089569-8918-1-git-send-email-kmkale@anantcorp.com> In India a ILS product called Libsuite8 prints barcodes like b0007432. The barcode is not stored anywhere in libsuite8's database. Neither is barcode available in any of the reports generated by the software. The barcode 'b0007432' when scanned into the libsuite8 software is de-constructed like 'b' which is the itemtype i.e. Book in this instance, and '7432' which is the 'Accession Number'. The software then takes the logged in staff's branchcode and does a join on three tables 'Location', 'Media_Type', and 'Books' to retrieve the particular record from the database. There is no possibility of recreating the barcodes for insertion in Koha while doing a retrospective conversion, because of arbitrary length of the barcode string AND arbitrary number of zeros in the numeric part of the printed barcode AND the fact that there are no reports available from the software which contain barcodes AND the fact that the barcode is not stored in the database. But most importantly due to the simple fact that printed barcodes are duplicated among branches. Therefore this patch emulates the functionality of Libsuite8 software of converting the scanned barcode into one stored in Koha using the itemBarcodeInputFilter system preference. To use this new itemBarcodeInputFilter systempreference choice called 'libsuite8', the barcodes stored in Koha must match the pattern of --. This is easy to achieve while doing retrospective conversion from Libsuite8 to Koha. As expected the itemBarcodeInputFilter will return unmodified barcode if presented with a barcode of pattern -- All help and comments about this are much appreciated.. --- C4/Circulation.pm | 6 +++++- circ/circulation.pl | 4 ++-- installer/data/mysql/en/mandatory/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 2 +- .../en/modules/admin/preferences/circulation.pref | 1 + .../prog/en/modules/circ/circulation.tmpl | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 10c3c11..219991e 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -136,7 +136,7 @@ System Pref options. # FIXME -- these plugins should be moved out of Circulation.pm # sub barcodedecode { - my ($barcode, $filter) = @_; + my ($barcode, $filter, $branch) = @_; $filter = C4::Context->preference('itemBarcodeInputFilter') unless $filter; $filter or return $barcode; # ensure filter is defined, else return untouched barcode if ($filter eq 'whitespace') { @@ -155,6 +155,10 @@ sub barcodedecode { # FIXME: $barcode could be "T1", causing warning: substr outside of string # Why drop the nonzero digit after the T? # Why pass non-digits (or empty string) to "T%07d"? + } elsif ($filter eq 'libsuite8') { + unless($barcode =~ m/^($branch)-/i){ + $barcode =~ s/^(\D+)[0]*(\d+)$/$branch-$1-$2/i + } } return $barcode; # return barcode, modified or not } diff --git a/circ/circulation.pl b/circ/circulation.pl index 7c4a0dc..b358a84 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -115,8 +115,8 @@ if (C4::Context->preference("UseTablesortForCirc")) { my $barcode = $query->param('barcode') || ''; $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace - -$barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter')); +my $filter = C4::Context->preference('itemBarcodeInputFilter') || ''; +$barcode = barcodedecode($barcode,$filter,$branch) if( $barcode && C4::Context->preference('itemBarcodeInputFilter')); my $stickyduedate = $query->param('stickyduedate') || $session->param('stickyduedate'); my $duedatespec = $query->param('duedatespec') || $session->param('stickyduedate'); my $issueconfirmed = $query->param('issueconfirmed'); diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index 214d198..1904172 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -145,7 +145,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES 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'); -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'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat|libsuite8','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACViewOthersSuggestions',0,'If ON, allows all suggestions to be displayed in the OPAC',NULL,'YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index bf7acb6..66297db 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -731,7 +731,7 @@ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,ty $dbh->do("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')"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, test or production','test|production','Choice')"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts',NULL,'free')"); -$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','cuecat','Choice')"); +$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','libsuite8','Choice')"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo')"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free')"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACSubscriptionDisplay','economical','Specify how to display subscription information in the OPAC','economical|off|full','Choice')"); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index c4d4305..46570ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -14,6 +14,7 @@ Circulation: whitespace: Remove spaces from cuecat: Convert from CueCat form T-prefix: Remove the first number from T-prefix style + libsuite8: Convert from Libsuite8 form - scanned patron barcodes. - - Sort previous checkouts on the circulation page from diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl index 822de15..89874ab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl @@ -301,7 +301,7 @@ function refocus(calendar) { -
  • The barcode was not found
  • +
  • The barcode was not found
  • -- 1.7.0.4 From henridamien.laurent at biblibre.com Thu Nov 18 15:16:58 2010 From: henridamien.laurent at biblibre.com (LAURENT Henri-Damien) Date: Thu, 18 Nov 2010 15:16:58 +0100 Subject: [Koha-patches] [PATCH 2/2] Bug 5415 Let calls of SimpleSearch utilize considtent interface In-Reply-To: References: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> <1290003869-21023-2-git-send-email-colin.campbell@ptfs-europe.com> <4CE4F856.8060208@biblibre.com> Message-ID: <4CE5355A.5040402@biblibre.com> Le 18/11/2010 14:16, Galen Charlton a ?crit : > Hi, > > On Thu, Nov 18, 2010 at 4:56 AM, LAURENT Henri-Damien > wrote: >> I have seen that you are using die.... > > Where? I don't see anything in the patch that adds a die() or croak(). > > As far as general question is concerned, I agree that module code > should not be calling die() unless the code that calls the module > routine is set up to catch the exception [although adding exception > handling to Koha's bag of tricks would be a good idea] or if something > is so badly wrong that terminating is the only way to prevent data > loss. > > Regards, > > Galen in misc/migration_tools/bulkmarcimport.pl From cnighswonger at foundations.edu Thu Nov 18 15:58:51 2010 From: cnighswonger at foundations.edu (Chris Nighswonger) Date: Thu, 18 Nov 2010 09:58:51 -0500 Subject: [Koha-patches] [PATCH 2/2] Bug 5415 Let calls of SimpleSearch utilize considtent interface In-Reply-To: <4CE5355A.5040402@biblibre.com> References: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> <1290003869-21023-2-git-send-email-colin.campbell@ptfs-europe.com> <4CE4F856.8060208@biblibre.com> <4CE5355A.5040402@biblibre.com> Message-ID: On Thu, Nov 18, 2010 at 9:16 AM, LAURENT Henri-Damien wrote: > Le 18/11/2010 14:16, Galen Charlton a ?crit : >> Hi, >> >> On Thu, Nov 18, 2010 at 4:56 AM, LAURENT Henri-Damien >> wrote: >>> I have seen that you are using die.... >> >> Where? ?I don't see anything in the patch that adds a die() or croak(). > in misc/migration_tools/bulkmarcimport.pl That die is not added by this patch, but is already in existing code. From henridamien.laurent at biblibre.com Thu Nov 18 16:09:28 2010 From: henridamien.laurent at biblibre.com (LAURENT Henri-Damien) Date: Thu, 18 Nov 2010 16:09:28 +0100 Subject: [Koha-patches] [PATCH 2/2] Bug 5415 Let calls of SimpleSearch utilize considtent interface In-Reply-To: References: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> <1290003869-21023-2-git-send-email-colin.campbell@ptfs-europe.com> <4CE4F856.8060208@biblibre.com> <4CE5355A.5040402@biblibre.com> Message-ID: <4CE541A8.2070304@biblibre.com> Le 18/11/2010 15:58, Chris Nighswonger a ?crit : > On Thu, Nov 18, 2010 at 9:16 AM, LAURENT Henri-Damien > wrote: >> Le 18/11/2010 14:16, Galen Charlton a ?crit : >>> Hi, >>> >>> On Thu, Nov 18, 2010 at 4:56 AM, LAURENT Henri-Damien >>> wrote: >>>> I have seen that you are using die.... >>> >>> Where? I don't see anything in the patch that adds a die() or croak(). >> in misc/migration_tools/bulkmarcimport.pl > > That die is not added by this patch, but is already in existing code. > Does it ? Blame it on the Colored Diff plugin in thunderbird. lines were with + From cnighswonger at foundations.edu Thu Nov 18 17:19:46 2010 From: cnighswonger at foundations.edu (Chris Nighswonger) Date: Thu, 18 Nov 2010 11:19:46 -0500 Subject: [Koha-patches] [PATCH 2/2] Bug 5415 Let calls of SimpleSearch utilize considtent interface In-Reply-To: <4CE541A8.2070304@biblibre.com> References: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> <1290003869-21023-2-git-send-email-colin.campbell@ptfs-europe.com> <4CE4F856.8060208@biblibre.com> <4CE5355A.5040402@biblibre.com> <4CE541A8.2070304@biblibre.com> Message-ID: On Thu, Nov 18, 2010 at 10:09 AM, LAURENT Henri-Damien wrote: > Le 18/11/2010 15:58, Chris Nighswonger a ?crit : >> On Thu, Nov 18, 2010 at 9:16 AM, LAURENT Henri-Damien >> wrote: >>> Le 18/11/2010 14:16, Galen Charlton a ?crit : >>>> Hi, >>>> >>>> On Thu, Nov 18, 2010 at 4:56 AM, LAURENT Henri-Damien >>>> wrote: >>>>> I have seen that you are using die.... >>>> >>>> Where? ?I don't see anything in the patch that adds a die() or croak(). >>> in misc/migration_tools/bulkmarcimport.pl >> >> That die is not added by this patch, but is already in existing code. >> > Does it ? Blame it on the Colored Diff plugin in thunderbird. > lines were with + http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=misc/migration_tools/bulkmarcimport.pl;h=3bb9ed85d92298c7a4e4bc956b9f6c001245159b;hb=HEAD#l223 From cfouts at liblime.com Thu Nov 18 17:37:15 2010 From: cfouts at liblime.com (Clay Fouts) Date: Thu, 18 Nov 2010 08:37:15 -0800 Subject: [Koha-patches] [PATCH 2/2] Bug 5415 Let calls of SimpleSearch utilize considtent interface In-Reply-To: References: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> <1290003869-21023-2-git-send-email-colin.campbell@ptfs-europe.com> <4CE4F856.8060208@biblibre.com> Message-ID: The die() in the above code is perfectly legitimate because the routine does not know how to handle the error gracefully. I cannot count the number of hours I've had to spend tracking a bug back to its source through all sorts of twists and turns because Koha did not die() when it couldn't figure out how to handle the original error and simply warn()ed about it or, more frequently, opted not to check for errors at all. The good thing about exceptions is that you cannot ignore the error and get away with it. Warn()s can and do get ignored, much to the detriment of developers, users, and everyone in between. Every best practices guide will tell you to die() as soon as you figure out that you can't accommodate the nature of the error, precisely because it is ugly and cannot be ignored, forcing the developer to handle it somehow at a higher level. Programmers are lazy. Unless we compel ourselves to address errors, it's far too easy to ignore them, so we will (and do, if Koha's code is to serve as an example). Exceptions demand better coding practicing. Koha already has a CGI-friendly die() handler with CGI::Carp. If how it is presented to the user is a concern, the template for that can be prettified. Nevertheless, it's a favor to everyone not to let errors propagate throughout the system. It corrupts data and gives the false perception that everything is behaving correctly. Cheers, Clay On Thu, Nov 18, 2010 at 4:42 AM, Chris Nighswonger < cnighswonger at foundations.edu> wrote: > On Thu, Nov 18, 2010 at 4:56 AM, LAURENT Henri-Damien > wrote: > > Hi Colin. > > I have seen that you are using die.... > > There has already been a discussion on that on list. > > No concensus achieved. > > But I find it really clunky to have that kind of warning for users : > > Koha Software error.... > > > > I acknowledge that a warning has to be raised. > > Maybe dying is really good practise. But Having more failproof features > > would be far more comfortable for users (and developers)... When seeing > > Software error, they will undoubtedly open a new bug... on bugzilla, > > which is already a bit crowded. > > Your aim here is surely to HAVE problems reported rather than "hidden" > > in logs file. > > But I would have rather, when it is not really a blocking problem, just > > try and raise a warning. > > > > If dying is really a requirement in Modern::Perl then it HAS to be > > handled in the pl script. And I donot think it is done. Gentlemen ? > > Can we reach a good practise ? > > I am in 100% agreement that we should not die, but rather throw a warn > to the log and then trap the error, passing useful information back to > the user and allowing graceful recovery. I can conceive of no problem > which should not be able to be properly trapped and an error message > passed back to the user. Even if it is a "blocking problem," graceful > recovery and or exit is a necessity. With bugzilla accepting emails it > may even be within the realm of possibility to have something like > C4::ErrorHandling do automatic bug reporting or the like. > > I object to adding new code which just dies rather than handling the error. > > Kind Regards, > Chris > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cnighswonger at foundations.edu Thu Nov 18 18:05:42 2010 From: cnighswonger at foundations.edu (Chris Nighswonger) Date: Thu, 18 Nov 2010 12:05:42 -0500 Subject: [Koha-patches] [PATCH 2/2] Bug 5415 Let calls of SimpleSearch utilize considtent interface In-Reply-To: References: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> <1290003869-21023-2-git-send-email-colin.campbell@ptfs-europe.com> <4CE4F856.8060208@biblibre.com> Message-ID: On Thu, Nov 18, 2010 at 11:37 AM, Clay Fouts wrote: > The die() in the above code is perfectly legitimate because the routine does > not know how to handle the error gracefully. I disagree. Rather than using a die(), take the time to code the graceful error trapping. die() in most cases is the lazy way out, imho. >?I cannot count the number of > hours I've had to spend tracking a bug back to its source through all sorts > of twists and turns because Koha did not die() when it couldn't figure out > how to handle the original error and simply warn()ed about it or, more > frequently, opted not to check for errors at all. This is due more so to poor coding than anything else. Always handle errors. If the coder can anticipate places in the code where errors are likely to occur with enough accuracy to warrant a die() then there is no reason not to go ahead and code graceful error trapping. > The good thing about exceptions is that you cannot ignore the error and get > away with it. Warn()s can and do get ignored, much to the detriment of > developers, users, and everyone in between. Every best practices guide will > tell you to die() as soon as you figure out that you can't accommodate the > nature of the error, precisely because it is ugly and cannot be ignored, > forcing the developer to handle it somehow at a higher level. Programmers > are lazy. Bingo! So we must fix our laziness and code proper error trapping. If that means working back up the stake, so be it. Fix it right: fix it once. Again, if the coder knows enough to put a die() they know enough to write proper error trapping. > Unless we compel ourselves to address errors, it's far too easy to > ignore them, so we will (and do, if Koha's code is to serve as an example). > Exceptions demand better coding practicing. I agree with this in theory. However, what we must compel ourselves to do is handle errors, not die(). > Koha already has a CGI-friendly die() handler with CGI::Carp. If how it is > presented to the user is a concern, the template for that can be prettified. Then this should be used and made to integrate in a more user-friendly way with the rest of the Koha experience. > Nevertheless, it's a favor to everyone not to let errors propagate > throughout the system. It corrupts data and gives the false perception that > everything is behaving correctly. I don't see anything in this thread which would suggest that we "let errors propagate throughout the system." On the contrary, the entire thread seems to revolve around the best way to prevent that while giving useful information to the user and maintaining maximum availability of the rest of the system. I tend to shy away from software that presents solid color screens with cryptic information when it crashes... ;-) Kind Regards, Chris From henridamien.laurent at biblibre.com Thu Nov 18 18:11:41 2010 From: henridamien.laurent at biblibre.com (LAURENT Henri-Damien) Date: Thu, 18 Nov 2010 18:11:41 +0100 Subject: [Koha-patches] [PATCH 2/2] Bug 5415 Let calls of SimpleSearch utilize considtent interface In-Reply-To: References: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> <1290003869-21023-2-git-send-email-colin.campbell@ptfs-europe.com> <4CE4F856.8060208@biblibre.com> Message-ID: <4CE55E4D.8080607@biblibre.com> Le 18/11/2010 17:37, Clay Fouts a ?crit : > The die() in the above code is perfectly legitimate because the routine > does not know how to handle the error gracefully. I cannot count the > number of hours I've had to spend tracking a bug back to its source > through all sorts of twists and turns because Koha did not die() when it > couldn't figure out how to handle the original error and simply warn()ed > about it or, more frequently, opted not to check for errors at all. > > The good thing about exceptions is that you cannot ignore the error and > get away with it. Warn()s can and do get ignored, much to the detriment > of developers, users, and everyone in between. Every best practices > guide will tell you to die() as soon as you figure out that you can't > accommodate the nature of the error, precisely because it is ugly and > cannot be ignored, forcing the developer to handle it somehow at a > higher level. Programmers are lazy. Unless we compel ourselves to > address errors, it's far too easy to ignore them, so we will (and do, if > Koha's code is to serve as an example). Exceptions demand better coding > practicing. ok. But > > Koha already has a CGI-friendly die() handler with CGI::Carp. If how it > is presented to the user is a concern, the template for that can be > prettified. Nevertheless, it's a favor to everyone not to let errors > propagate throughout the system. It corrupts data and gives the false > perception that everything is behaving correctly. > > Cheers, > Clay Hi Clay. So If in a result list or in a bulkedition, there is one biblio which can't be decoded (because XML::Parser fails), you are in favor of returning Error 500 to the user ? I am not. You may think it hides problems. But if for one record which has a problem, you throw away all the results by breaking at the first error, then you end up with having to make kind of a hell of a work only to find where the error might be and even worse, make the user feel very uncomfortable with your tool... (Just look at the way zebra is dying when you have an error with the indexing process. I just think it is not a sane way to do things.) Yes raise an error, Yes warn that error AND provide information about the context (biblionumber if it is about biblios). But No, donot simply die... because when running a bulkmarcimport on a 100000 records, having to do things over and over again for 10 records with an error is just insane. Or Please, please, die in functions, AND add tests to whatever script or function which is using this other function and try to provide correct information. > Exceptions demand better coding > practicing. I fully agree though. Should we begin some kind of New module for that ? Croak could be good, but we would have to make things more failsafe and not fail first error of an array of task. Friendly. -- Henri-Damien LAURENT From cfouts at liblime.com Thu Nov 18 18:22:30 2010 From: cfouts at liblime.com (Clay Fouts) Date: Thu, 18 Nov 2010 09:22:30 -0800 Subject: [Koha-patches] [PATCH 2/2] Bug 5415 Let calls of SimpleSearch utilize considtent interface In-Reply-To: References: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> <1290003869-21023-2-git-send-email-colin.campbell@ptfs-europe.com> <4CE4F856.8060208@biblibre.com> Message-ID: On Thu, Nov 18, 2010 at 9:05 AM, Chris Nighswonger < cnighswonger at foundations.edu> wrote: > On Thu, Nov 18, 2010 at 11:37 AM, Clay Fouts wrote: > > The die() in the above code is perfectly legitimate because the routine > does > > not know how to handle the error gracefully. > > I disagree. Rather than using a die(), take the time to code the > graceful error trapping. die() in most cases is the lazy way out, > imho. > A properly handled die() is just as if not more graceful than checking return values. Using tools like Try::Tiny or even a plain old eval{} give the developer lots of options as to how to deal with a value. Also, die() makes sure that intermediary layers that *don't* check for and percolate error values don't get in the way of upper layers being able to check for it. In Koha's current state of error checking, this latter point is crucial. > > I cannot count the number of > > hours I've had to spend tracking a bug back to its source through all > sorts > > of twists and turns because Koha did not die() when it couldn't figure > out > > how to handle the original error and simply warn()ed about it or, more > > frequently, opted not to check for errors at all. > > This is due more so to poor coding than anything else. Always handle > errors. If the coder can anticipate places in the code where errors > are likely to occur with enough accuracy to warrant a die() then there > is no reason not to go ahead and code graceful error trapping. > Are you going to reject code that doesn't check every last possible error status? > I agree with this in theory. However, what we must compel ourselves to > do is handle errors, not die(). > That's the whole purpose of eval{}. > I don't see anything in this thread which would suggest that we "let > errors propagate throughout the system." On the contrary, the entire > thread seems to revolve around the best way to prevent that while > giving useful information to the user and maintaining maximum > availability of the rest of the system. > > I tend to shy away from software that presents solid color screens > with cryptic information when it crashes... ;-) > I tend to shy away from software that allows defective state to lazily propagate throughout the system. Clay -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfouts at liblime.com Thu Nov 18 18:34:07 2010 From: cfouts at liblime.com (Clay Fouts) Date: Thu, 18 Nov 2010 09:34:07 -0800 Subject: [Koha-patches] [PATCH 2/2] Bug 5415 Let calls of SimpleSearch utilize considtent interface In-Reply-To: <4CE55E4D.8080607@biblibre.com> References: <1290003869-21023-1-git-send-email-colin.campbell@ptfs-europe.com> <1290003869-21023-2-git-send-email-colin.campbell@ptfs-europe.com> <4CE4F856.8060208@biblibre.com> <4CE55E4D.8080607@biblibre.com> Message-ID: Hello, Henri. No, presenting an HTTP 500 error is not appropriate way to handle this situation. Catching the exception with eval{} is more proper. With this CLI bulkmarcimport script, yes, it should die if it can't perform the match. What if the bogus record is the one that matches? Then depending on the circumstance you could have two identical records floating around (unexpected and not good) or it could cause an exception somewhere else down the line when it tries to insert a duplicate key (causing the developer to have to trace back through who knows what in order to find the source of the error later). Skimming over the broken record is not a solution! Clay On Thu, Nov 18, 2010 at 9:11 AM, LAURENT Henri-Damien < henridamien.laurent at biblibre.com> wrote: > Le 18/11/2010 17:37, Clay Fouts a ?crit : > > The die() in the above code is perfectly legitimate because the routine > > does not know how to handle the error gracefully. I cannot count the > > number of hours I've had to spend tracking a bug back to its source > > through all sorts of twists and turns because Koha did not die() when it > > couldn't figure out how to handle the original error and simply warn()ed > > about it or, more frequently, opted not to check for errors at all. > > > > The good thing about exceptions is that you cannot ignore the error and > > get away with it. Warn()s can and do get ignored, much to the detriment > > of developers, users, and everyone in between. Every best practices > > guide will tell you to die() as soon as you figure out that you can't > > accommodate the nature of the error, precisely because it is ugly and > > cannot be ignored, forcing the developer to handle it somehow at a > > higher level. Programmers are lazy. Unless we compel ourselves to > > address errors, it's far too easy to ignore them, so we will (and do, if > > Koha's code is to serve as an example). Exceptions demand better coding > > practicing. > ok. But > > > > Koha already has a CGI-friendly die() handler with CGI::Carp. If how it > > is presented to the user is a concern, the template for that can be > > prettified. Nevertheless, it's a favor to everyone not to let errors > > propagate throughout the system. It corrupts data and gives the false > > perception that everything is behaving correctly. > > > > Cheers, > > Clay > Hi Clay. > So If in a result list or in a bulkedition, there is one biblio which > can't be decoded (because XML::Parser fails), you are in favor of > returning Error 500 to the user ? > I am not. You may think it hides problems. But if for one record which > has a problem, you throw away all the results by breaking at the first > error, then you end up with having to make kind of a hell of a work only > to find where the error might be and even worse, make the user feel very > uncomfortable with your tool... (Just look at the way zebra is dying > when you have an error with the indexing process. I just think it is not > a sane way to do things.) Yes raise an error, Yes warn that error AND > provide information about the context (biblionumber if it is about > biblios). But No, donot simply die... because when running a > bulkmarcimport on a 100000 records, having to do things over and over > again for 10 records with an error is just insane. Or Please, please, > die in functions, AND add tests to whatever script or function which is > using this other function and try to provide correct information. > > > Exceptions demand better coding > > practicing. > I fully agree though. Should we begin some kind of New module for that ? > Croak could be good, but we would have to make things more failsafe and > not fail first error of an array of task. > > > Friendly. > -- > Henri-Damien LAURENT > -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleonard at myacpl.org Thu Nov 18 19:03:13 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 18 Nov 2010 13:03:13 -0500 Subject: [Koha-patches] [PATCH] Follow-up fix for Bug 4912, redirect user to correct lists Message-ID: <1290103393-23976-1-git-send-email-oleonard@myacpl.org> --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 2 +- .../opac-tmpl/prog/en/modules/opac-shelves.tmpl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 8f9b246..85bf24d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -9,7 +9,7 @@ a, a:visited { color : #006699; } -a:hover,input.editshelf:hover,a.editshelf:hover,input.deleteshelf:hover { +a:hover,#toolbar input.editshelf:hover,input.editshelf:hover,a.editshelf:hover,input.deleteshelf:hover { color : #990033; } diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl index 7804bae..998eeeb 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl @@ -209,7 +209,7 @@ $(function() { Print List - | &op=modif">Edit List + |
    " />
    @@ -412,7 +412,7 @@ $(function() {

    INVOICE

    @@ -30,7 +32,7 @@
    - To,

    Bill To:
    + Card Number:
    Date Description of chargesAmountAmount
    Total outstanding dues as on date : Total outstanding dues as on date:
    - No Private Lists. +

    No private lists.

    @@ -479,7 +479,7 @@ $(function() {
    - No Public Lists. +

    No public lists.

    -- 1.7.1 From mdhafen at tech.washk12.org Thu Nov 18 19:24:25 2010 From: mdhafen at tech.washk12.org (Mike Hafen) Date: Thu, 18 Nov 2010 11:24:25 -0700 Subject: [Koha-patches] [PATCH] Bug 5418: Add a new itemBarcodeInputFilter for libsuite8 style barcodes In-Reply-To: <1290061901-7833-1-git-send-email-kmkale@anantcorp.com> References: <1290061901-7833-1-git-send-email-kmkale@anantcorp.com> Message-ID: Two suggestions. First, perhaps the users branch could be used, like from C4::Branch::mybranch() Then you wouldn't need to add the branch parameter to the sub Second, perhaps instead of splitting the barcode string you should do something like s/(.*)0+(.*)/$1$2/ That should strip out all the zeros. On Wed, Nov 17, 2010 at 11:31 PM, Koustubha Kale wrote: ... > diff --git a/C4/Circulation.pm b/C4/Circulation.pm > index 10c3c11..08778ca 100644 > --- a/C4/Circulation.pm > +++ b/C4/Circulation.pm > @@ -136,7 +136,7 @@ System Pref options. > # FIXME -- these plugins should be moved out of Circulation.pm > # > sub barcodedecode { > - my ($barcode, $filter) = @_; > + my ($barcode, $filter, $branch) = @_; > $filter = C4::Context->preference('itemBarcodeInputFilter') unless > $filter; > $filter or return $barcode; # ensure filter is defined, else return > untouched barcode > if ($filter eq 'whitespace') { > @@ -155,6 +155,31 @@ sub barcodedecode { > # FIXME: $barcode could be "T1", causing warning: substr outside of > string > # Why drop the nonzero digit after the T? > # Why pass non-digits (or empty string) to "T%07d"? > + } elsif ($filter eq 'libsuite8') { > + # FIXME: This NEEDS major code cleanup. All help is much > appreciated > + use Scalar::Util qw(looks_like_number); > + my $barcode1=$barcode; > + my $branchcode=$branch."-"; > + if($barcode1 =~ m/^$branchcode/){ > + } > + else { > + my @chars; > + my @nums; > + my @m1=split(/ */, $barcode); > + foreach (@m1){ > + looks_like_number ($_) ? push(@nums,$_) : > push(@chars,$_); > + } > + my @n1; > + foreach(@nums){ > + if($_ > 0){ > + push(@n1,$_); > + } > + } > + my ($chars) = join('', at chars); > + my ($n1) = join('', at n1); > + $barcode = "$branchcode" . $chars . "-" . $n1; > + } > + > } > return $barcode; # return barcode, modified or not > } > diff --git a/circ/circulation.pl b/circ/circulation.pl > index 7c4a0dc..b358a84 100755 > --- a/circ/circulation.pl > +++ b/circ/circulation.pl > @@ -115,8 +115,8 @@ if (C4::Context->preference("UseTablesortForCirc")) { > > my $barcode = $query->param('barcode') || ''; > $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace > - > -$barcode = barcodedecode($barcode) if( $barcode && > C4::Context->preference('itemBarcodeInputFilter')); > +my $filter = C4::Context->preference('itemBarcodeInputFilter') || ''; > +$barcode = barcodedecode($barcode,$filter,$branch) if( $barcode && > C4::Context->preference('itemBarcodeInputFilter')); > my $stickyduedate = $query->param('stickyduedate') || > $session->param('stickyduedate'); > my $duedatespec = $query->param('duedatespec') || > $session->param('stickyduedate'); > my $issueconfirmed = $query->param('issueconfirmed'); > ... -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdhafen at tech.washk12.org Thu Nov 18 19:27:38 2010 From: mdhafen at tech.washk12.org (Mike Hafen) Date: Thu, 18 Nov 2010 11:27:38 -0700 Subject: [Koha-patches] [PATCH] Bug 5418: Revised patch new itemBarcodeInputFilter for libsuite8 style barcodes In-Reply-To: <1290089569-8918-1-git-send-email-kmkale@anantcorp.com> References: <1290089569-8918-1-git-send-email-kmkale@anantcorp.com> Message-ID: Ah, I see you already got the second suggestion. One comment about that though, my libraries all have branch codes that are numbers. So this filter would be broken in that case. On Thu, Nov 18, 2010 at 7:12 AM, Koustubha Kale wrote: ... > diff --git a/C4/Circulation.pm b/C4/Circulation.pm > index 10c3c11..219991e 100644 > --- a/C4/Circulation.pm > +++ b/C4/Circulation.pm > @@ -136,7 +136,7 @@ System Pref options. > # FIXME -- these plugins should be moved out of Circulation.pm > # > sub barcodedecode { > - my ($barcode, $filter) = @_; > + my ($barcode, $filter, $branch) = @_; > $filter = C4::Context->preference('itemBarcodeInputFilter') unless > $filter; > $filter or return $barcode; # ensure filter is defined, else return > untouched barcode > if ($filter eq 'whitespace') { > @@ -155,6 +155,10 @@ sub barcodedecode { > # FIXME: $barcode could be "T1", causing warning: substr outside of > string > # Why drop the nonzero digit after the T? > # Why pass non-digits (or empty string) to "T%07d"? > + } elsif ($filter eq 'libsuite8') { > + unless($barcode =~ m/^($branch)-/i){ > + $barcode =~ s/^(\D+)[0]*(\d+)$/$branch-$1-$2/i > + } > } > return $barcode; # return barcode, modified or not > } > ... -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmcharlt at gmail.com Fri Nov 19 01:37:16 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 18 Nov 2010 19:37:16 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Further fixes for Bug 5142 - Untranslatable strings in tag review template Message-ID: <1290127036-19978-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Galen Charlton --- .../intranet-tmpl/prog/en/modules/tags/review.tmpl | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tmpl index a1d6dc2..ad2f360 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tmpl @@ -48,25 +48,25 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; } } } var success_approve = function(tag){ - // window.alert('AJAX approved tag: ' + tag); + // window.alert(_('AJAX approved tag: ') + tag); }; var failure_approve = function(tag){ - window.alert('AJAX failed to approve tag: ' + tag); + window.alert(_('AJAX failed to approve tag: ') + tag); }; var success_reject = function(tag){ - // window.alert('AJAX rejected tag: ' + tag); + // window.alert(_('AJAX rejected tag: ') + tag); }; var failure_reject = function(tag){ - window.alert('AJAX failed to reject tag: ' + tag); + window.alert(_('AJAX failed to reject tag: ') + tag); }; var success_test = function(tag){ - $('#verdict').html(tag + ' is permitted!'); + $('#verdict').html(tag + _(' is permitted!')); }; var failure_test = function(tag){ - $('#verdict').html(tag + ' is prohibited!'); + $('#verdict').html(tag + _(' is prohibited!')); }; var indeterminate_test = function(tag){ - $('#verdict').html(tag + ' is neither permitted nor prohibited!'); + $('#verdict').html(tag + _(' is neither permitted nor prohibited!')); }; var success_test_call = function() { @@ -100,7 +100,7 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; } }); $('body').click(function(event) { pull_counts(); - // window.alert("Click detected on " + event.target + ": " + $(event.target).html); + // window.alert(_("Click detected on ") + event.target + ": " + $(event.target).html); if ($(event.target).is('.ok')) { $.ajax({ "data": {ok: $(event.target).attr("title"), CGISESSID: readCookie('CGISESSID')}, -- 1.7.0 From kmkale at anantcorp.com Fri Nov 19 06:03:29 2010 From: kmkale at anantcorp.com (Koustubha Kale) Date: Fri, 19 Nov 2010 10:33:29 +0530 Subject: [Koha-patches] [PATCH] Bug 5418: Revised patch new itemBarcodeInputFilter for libsuite8 style barcodes In-Reply-To: References: <1290089569-8918-1-git-send-email-kmkale@anantcorp.com> Message-ID: On Thu, Nov 18, 2010 at 11:57 PM, Mike Hafen wrote: > Ah, I see you already got the second suggestion.? One comment about that > though, my libraries all have branch codes that are numbers.? So this filter > would be broken in that case. > Hi Mike, Thanks for the suggestions. Will try the first one. Got the second one covered with some help on irc from druthb and chris_n. Also this itemBarcodeInputFilter is specifically meant for libraries doing retrospective conversion from a ILS product called Libsuit8 AND if they are stuck with barcodes already printed and attached to items.. Regards, Koustubha Kale Anant Corporation Contact Details : Address : 103, Armaan Residency, R. W Sawant Road, Nr. Golden Dyes Naka, Thane (w), Maharashtra, India, Pin : 400601. TeleFax : +91-22-21720108, +91-22-21720109 Mobile : +919820715876 Website : http://www.anantcorp.com Blog : http://www.anantcorp.com/blog/?author=2 From kmkale at anantcorp.com Fri Nov 19 08:10:24 2010 From: kmkale at anantcorp.com (Koustubha Kale) Date: Fri, 19 Nov 2010 12:40:24 +0530 Subject: [Koha-patches] [PATCH] Bug 5418: Revised patch new itemBarcodeInputFilter for libsuite8 style barcodes In-Reply-To: References: <1290089569-8918-1-git-send-email-kmkale@anantcorp.com> Message-ID: >First, perhaps the users branch could be used, like from C4::Branch::mybranch() >Then you wouldn't need to add the branch parameter to the sub 1) Ok. C4::Branch::mybranch() worked so that eliminates the need to touch circ/circulation.pl 2) Do you think displaying the barcode like
  • The barcode was not found
  • in koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl is a good idea? If not, even that file can be left untouched. Regards, Koustubha Kale Anant Corporation Contact Details : Address : 103, Armaan Residency, R. W Sawant Road, Nr. Golden Dyes Naka, Thane (w), Maharashtra, India, Pin : 400601. TeleFax : +91-22-21720108, +91-22-21720109 Mobile : +919820715876 Website : http://www.anantcorp.com Blog : http://www.anantcorp.com/blog/?author=2 From mdhafen at tech.washk12.org Fri Nov 19 17:45:55 2010 From: mdhafen at tech.washk12.org (Mike Hafen) Date: Fri, 19 Nov 2010 09:45:55 -0700 Subject: [Koha-patches] [PATCH] Bug 5418: Revised patch new itemBarcodeInputFilter for libsuite8 style barcodes In-Reply-To: References: <1290089569-8918-1-git-send-email-kmkale@anantcorp.com> Message-ID: On Thu, Nov 18, 2010 at 10:03 PM, Koustubha Kale wrote: >Also this itemBarcodeInputFilter is specifically meant for libraries >doing retrospective conversion from a ILS product called Libsuit8 AND >if they are stuck with barcodes already printed and attached to >items.. Yes, I am aware of that. Just wanted to make the point in case others later on wanting to use this filter. On Fri, Nov 19, 2010 at 12:10 AM, Koustubha Kale wrote: > >First, perhaps the users branch could be used, like from > C4::Branch::mybranch() > >Then you wouldn't need to add the branch parameter to the sub > > 1) Ok. C4::Branch::mybranch() worked so that eliminates the need to > touch circ/circulation.pl > 2) Do you think displaying the barcode like
  • The barcode was not > found
  • in > koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl is a > good idea? If not, even that file can be left untouched. > > I like having the barcode in the error message. This is a good idea I think. The only place I might hesitate displaying the barcode is the OPAC, where it wouldn't be useful. For the staff interface though I think more information is almost always useful. > Regards, > Koustubha Kale > Anant Corporation > > Contact Details : > Address : 103, Armaan Residency, R. W Sawant Road, Nr. Golden Dyes > Naka, Thane (w), > Maharashtra, India, Pin : 400601. > TeleFax : +91-22-21720108, +91-22-21720109 > Mobile : +919820715876 > Website : http://www.anantcorp.com > Blog : http://www.anantcorp.com/blog/?author=2 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Katrin.Fischer.83 at web.de Sat Nov 20 14:00:01 2010 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sat, 20 Nov 2010 14:00:01 +0100 Subject: [Koha-patches] [PATCH] Bug 5175: Publisher link breaks display, if no publisher exists Message-ID: <1290258001-26920-1-git-send-email-Katrin.Fischer.83@web.de> If there is no publisher the empty publisher link will break the record display in staff and intranet. This patch adds a check for existence of subfield b. --- .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 2 ++ .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index 075472e..a49e04d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -222,11 +222,13 @@ Publisher: + b + diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl index e76b8df..8334a02 100755 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -243,11 +243,13 @@ Publisher: + b + -- 1.7.1 From Katrin.Fischer.83 at web.de Sun Nov 21 03:03:16 2010 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sun, 21 Nov 2010 03:03:16 +0100 Subject: [Koha-patches] [PATCH] [HEAD] Bug 5423: Deleted Patrons are no longer saved in table deletedborrowers Message-ID: <1290304996-29368-1-git-send-email-Katrin.Fischer.83@web.de> --- installer/data/mysql/kohastructure.sql | 3 ++- installer/data/mysql/updatedatabase.pl | 9 +++++++++ kohaversion.pl | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 9148970..695129b 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -642,7 +642,7 @@ CREATE TABLE `deletedbiblioitems` ( DROP TABLE IF EXISTS `deletedborrowers`; CREATE TABLE `deletedborrowers` ( `borrowernumber` int(11) NOT NULL default 0, - `cardnumber` varchar(9) NOT NULL default '', + `cardnumber` varchar(16) NOT NULL default '', `surname` mediumtext NOT NULL, `firstname` text, `title` mediumtext, @@ -703,6 +703,7 @@ CREATE TABLE `deletedborrowers` ( `altcontactcountry` text default NULL, `altcontactphone` varchar(50) default NULL, `smsalertnumber` varchar(50) default NULL, + `privacy` integer(11) DEFAULT '1' NOT NULL, KEY `borrowernumber` (`borrowernumber`), KEY `cardnumber` (`cardnumber`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index bf7acb6..59aa3c2 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3842,6 +3842,15 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.03.00.XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE deletedborrowers ADD `privacy` int(11) AFTER smsalertnumber;"); + $dbh->do("ALTER TABLE deletedborrowers CHANGE `cardnumber` `cardnumber` varchar(16);"); + print "Upgrade to $DBversion done (Fix differences between borrowers and deletedborrowers)\n"; + SetVersion ($DBversion); +} + + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/kohaversion.pl b/kohaversion.pl index 86d63f9..8330459 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.03.00.003'; + our $VERSION = '3.03.00.XXX'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 1.7.1 From Katrin.Fischer.83 at web.de Sun Nov 21 03:33:13 2010 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sun, 21 Nov 2010 03:33:13 +0100 Subject: [Koha-patches] [PATCH] [3.2] Bug 5423: Deleted Patrons are no longer saved in table deletedborrowers Message-ID: <1290306793-21848-1-git-send-email-Katrin.Fischer.83@web.de> Signed-off-by: Katrin Fischer --- installer/data/mysql/kohastructure.sql | 3 ++- installer/data/mysql/updatedatabase.pl | 9 +++++++++ kohaversion.pl | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 9148970..695129b 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -642,7 +642,7 @@ CREATE TABLE `deletedbiblioitems` ( DROP TABLE IF EXISTS `deletedborrowers`; CREATE TABLE `deletedborrowers` ( `borrowernumber` int(11) NOT NULL default 0, - `cardnumber` varchar(9) NOT NULL default '', + `cardnumber` varchar(16) NOT NULL default '', `surname` mediumtext NOT NULL, `firstname` text, `title` mediumtext, @@ -703,6 +703,7 @@ CREATE TABLE `deletedborrowers` ( `altcontactcountry` text default NULL, `altcontactphone` varchar(50) default NULL, `smsalertnumber` varchar(50) default NULL, + `privacy` integer(11) DEFAULT '1' NOT NULL, KEY `borrowernumber` (`borrowernumber`), KEY `cardnumber` (`cardnumber`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 62e7991..31a86ba 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3842,6 +3842,15 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.02.00.XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE deletedborrowers ADD `privacy` int(11) AFTER smsalertnumber;"); + $dbh->do("ALTER TABLE deletedborrowers CHANGE `cardnumber` `cardnumber` varchar(16);"); + print "Upgrade to $DBversion done (Fix differences between borrowers and deletedborrowers)\n"; + SetVersion ($DBversion); +} + + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/kohaversion.pl b/kohaversion.pl index a506d9b..8129b69 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.02.00.007'; + our $VERSION = '3.02.00.XXX'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 1.7.1 From kmkale at anantcorp.com Mon Nov 22 08:16:55 2010 From: kmkale at anantcorp.com (Koustubha Kale) Date: Mon, 22 Nov 2010 12:46:55 +0530 Subject: [Koha-patches] [PATCH] Bug 5418: Re-revised patch new itemBarcodeInputFilter for libsuite8 style barcodes Message-ID: This revision eliminates the need to change circ/circulation.pl as was the case in the earlier patch. All help and comments about this are much appreciated.. Regards, Koustubha Kale Anant Corporation Contact Details : Address? : 103, Armaan Residency, R. W Sawant Road, Nr. Golden Dyes Naka, Thane (w), ? ? ? ? ??? ? ? Maharashtra, India, Pin : 400601. TeleFax? : +91-22-21720108, +91-22-21720109 Mobile? ?? : +919820715876 Website? : http://www.anantcorp.com Blog : http://www.anantcorp.com/blog/?author=2 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Bug-5418-Re-revised-patch-new-itemBarcodeInputFilter.patch Type: application/octet-stream Size: 8696 bytes Desc: not available URL: From kmkale at anantcorp.com Mon Nov 22 13:08:04 2010 From: kmkale at anantcorp.com (Koustubha Kale) Date: Mon, 22 Nov 2010 17:38:04 +0530 Subject: [Koha-patches] [PATCH] Bug 5418: Rev-3 patch new itemBarcodeInputFilter for libsuite8 style barcodes Message-ID: This revision adds a test to t/Circulation_barcodedecode.t Regards, Koustubha Kale Anant Corporation Contact Details : Address? : 103, Armaan Residency, R. W Sawant Road, Nr. Golden Dyes Naka, Thane (w), ? ? ? ? ??? ? ? Maharashtra, India, Pin : 400601. TeleFax? : +91-22-21720108, +91-22-21720109 Mobile? ?? : +919820715876 Website? : http://www.anantcorp.com Blog : http://www.anantcorp.com/blog/?author=2 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Bug-5418-Rev-3-patch-new-itemBarcodeInputFilter-for-.patch Type: application/octet-stream Size: 10016 bytes Desc: not available URL: From Katrin.Fischer.83 at web.de Wed Nov 24 07:40:39 2010 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Wed, 24 Nov 2010 07:40:39 +0100 Subject: [Koha-patches] [PATCH] Bug 5430: Add Control number as option to OPACSearchForTitleIn Message-ID: <1290580839-21442-1-git-send-email-Katrin.Fischer.83@web.de> Makes {CONTROLNUMBER} available as new placeholder in system preference OPACSearchForTitleIn. {CONTROLNUMBER} will be replaced by the number in tag 001. --- C4/Biblio.pm | 19 +++++++++++++++++++ .../prog/en/modules/admin/preferences/opac.pref | 2 +- opac/opac-detail.pl | 3 +++ 3 files changed, 23 insertions(+), 1 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 6a422be..4102e23 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -67,6 +67,7 @@ BEGIN { &GetISBDView + &GetMarcControlnumber &GetMarcNotes &GetMarcSubjects &GetMarcBiblio @@ -1254,6 +1255,24 @@ sub GetAuthorisedValueDesc { } } +=head2 GetMarcControlnumber + + $marccontrolnumber = GetMarcControlnumber($record,$marcflavour); + +Get the control number / record Identifier from the MARC record and return it. + +=cut + +sub GetMarcControlnumber { + my ( $record, $marcflavour ) = @_; + my $controlnumber = ""; + # Control number or Record identifier are the same field in MARC21 and UNIMARC + # Keep $marcflavour for possible later use + if ($marcflavour eq "MARC21" || $marcflavour eq "UNIMARC") { + $controlnumber = $record->field('001')->data(); + } +} + =head2 GetMarcNotes $marcnotesarray = GetMarcNotes( $record, $marcflavour ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index 2619d8c..55560d3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -137,7 +137,7 @@ OPAC: class: code - - 'Include a "More Searches" box on the detail pages of items on the OPAC, with the following HTML (leave blank to disable):' - - '
    Note: The placeholders {TITLE}, {ISBN} and {AUTHOR} will be replaced with information from the displayed record.' + - '
    Note: The placeholders {CONTROLNUMBER}, {TITLE}, {ISBN} and {AUTHOR} will be replaced with information from the displayed record.' - pref: OPACSearchForTitleIn type: textarea class: code diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 0cd05f7..2de8ec8 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -584,12 +584,15 @@ if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->pref } #Search for title in links +my $marccontrolnumber = GetMarcControlnumber ($record, $marcflavour); + if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ $dat->{author} ? $search_for_title =~ s/{AUTHOR}/$dat->{author}/g : $search_for_title =~ s/{AUTHOR}//g; $dat->{title} =~ s/\/+$//; # remove trailing slash $dat->{title} =~ s/\s+$//; # remove trailing space $dat->{title} ? $search_for_title =~ s/{TITLE}/$dat->{title}/g : $search_for_title =~ s/{TITLE}//g; $isbn ? $search_for_title =~ s/{ISBN}/$isbn/g : $search_for_title =~ s/{ISBN}//g; + $marccontrolnumber ? $search_for_title =~ s/{CONTROLNUMBER}/$marccontrolnumber/g : $search_for_title =~ s/{CONTROLNUMBER}//g; $template->param('OPACSearchForTitleIn' => $search_for_title); } -- 1.7.1 From savitra.sirohi at osslabs.biz Wed Nov 24 05:46:43 2010 From: savitra.sirohi at osslabs.biz (savitra.sirohi at osslabs.biz) Date: Wed, 24 Nov 2010 10:16:43 +0530 Subject: [Koha-patches] [PATCH] Analytical records - move host field population to a C4 routine, all changes in pl files to call new routine Message-ID: <1290574003-23006-1-git-send-email-savitra.sirohi@osslabs.biz> From: Amit Gupta Signed-off-by: Amit Gupta --- C4/Biblio.pm | 25 +++++++++++++++++++++++++ cataloguing/addbiblio.pl | 7 +++++++ cataloguing/linkitem.pl | 9 +-------- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index eb0b248..eb6ea42 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -84,6 +84,7 @@ BEGIN { &GetFrameworkCode &GetPublisherNameFromIsbn &TransformKohaToMarc + &PrepHostMarcField &CountItemsIssued ); @@ -1663,6 +1664,30 @@ sub TransformKohaToMarc { return $record; } +=head2 PrepHostMarcField + + $hostfield = PrepHostMarcField ( $hostbiblionumber ) + +This function returns a host field populated with data from the host record, the field can then be added to an analytical record + +=cut + +sub PrepHostMarcField { + my ($hostbiblionumber,$hostitemnumber) = @_; + my $hostrecord = GetMarcBiblio($hostbiblionumber); + + my $hostmarcfield = MARC::Field->new( + 773, '', '', + 'w' => $hostbiblionumber, + 'o' => $hostitemnumber, + 'a' => $hostrecord->subfield('245','a'), + 'x' => $hostrecord->subfield('245','x') + ); + + return $hostmarcfield; +} + + =head2 TransformKohaToMarcOneField $record = TransformKohaToMarcOneField( $sth, $record, $kohafieldname, $value, $frameworkcode ); diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 5111365..e3f69e5 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -929,6 +929,13 @@ if (($biblionumber) && !($breedingid)){ if ($breedingid) { ( $record, $encoding ) = MARCfindbreeding( $breedingid ) ; } +#populate hostfield if hostbiblionumber is available +if ($hostbiblionumber){ + $record=MARC::Record->new(); + $record->leader(''); + my $field = PrepHostMarcField($hostbiblionumber, $hostitemnumber); + $record->append_fields($field); +} $is_a_modif = 0; diff --git a/cataloguing/linkitem.pl b/cataloguing/linkitem.pl index c299a5a..d4959ad 100755 --- a/cataloguing/linkitem.pl +++ b/cataloguing/linkitem.pl @@ -55,16 +55,9 @@ if ($barcode && $biblionumber) { if ($hostitemnumber) { my $hostbiblionumber = GetBiblionumberFromItemnumber($hostitemnumber); - my $hostrecord = GetMarcBiblio($hostbiblionumber); if ($hostbiblionumber) { - my $field = MARC::Field->new( - 773, '', '', - 'w' => $hostbiblionumber, - 'o' => $hostitemnumber, - 'a' => $hostrecord->subfield('245','a'), - 'x' => $hostrecord->subfield('245','x') - ); + my $field = PrepHostMarcField($hostbiblionumber, $hostitemnumber); $biblio->append_fields($field); my $modresult = ModBiblio($biblio, $biblionumber, ''); -- 1.5.4.5 From savitra.sirohi at osslabs.biz Wed Nov 24 05:48:08 2010 From: savitra.sirohi at osslabs.biz (savitra.sirohi at osslabs.biz) Date: Wed, 24 Nov 2010 10:18:08 +0530 Subject: [Koha-patches] [PATCH] Analytical records: allow only specific copy holds for analytical records plus changes to use new C4 routines Message-ID: <1290574088-23067-1-git-send-email-savitra.sirohi@osslabs.biz> From: Amit Gupta Signed-off-by: Amit Gupta --- .../opac-tmpl/prog/en/modules/opac-reserve.tmpl | 47 ++++++++++++++++--- opac/opac-reserve.pl | 28 ++++++------ 2 files changed, 53 insertions(+), 22 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl index 4d06e85..ee99c0d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl @@ -99,6 +99,21 @@ $(".copiesrow").hide(); }); + // When 'hide copies' radion button is clicked + $(".hidecopies").click(function() { + // Make sure all other specific copy table rows are hidden + biblioNum = suffixOf($(this).attr("id"), "_"); + newCopiesRowId = "#copiesrow_" + biblioNum; + + if (!changeSelection(newCopiesRowId, false)) { + return false; + } + + // Hide the copies table row + $(".copiesrow").hide(); + }); + + // When 'Place Hold' button is clicked $(".placehold").click(function(){ var biblionumbers = ""; @@ -387,14 +402,26 @@ disabled="disabled" /> - " - id="reqany_" - class="selectany" - value="Any" - checked="checked" - /> + + " + id="reqany_" + class="hidecopies" + checked="checked" + /> + + " + id="reqany_" + class="selectany" + value="Any" + checked="checked" + /> + - + + + + +
    diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index 01cd576..62f4848 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -117,17 +117,15 @@ foreach my $biblioNumber (@biblionumbers) { my $marcrecord= GetMarcBiblio($biblioNumber); -# adding items linked via host biblios - foreach my $hostfield ( $marcrecord->field('773')) { - my $hostbiblionumber = $hostfield->subfield("w"); - my $linkeditemnumber = $hostfield->subfield("o"); - my @hostitemInfos = GetItemsInfo($hostbiblionumber); - foreach my $hostitemInfo (@hostitemInfos){ - if ($hostitemInfo->{itemnumber} eq $linkeditemnumber){ - push(@itemInfos, $hostitemInfo); - } - } - } + # flag indicating existence of at least one item linked via a host record + my $hostitemsflag; + # adding items linked via host biblios + my @hostitemInfos = GetHostItemsInfo($marcrecord); + if (@hostitemInfos){ + $hostitemsflag =1; + push (@itemInfos, at hostitemInfos); + } + $biblioData->{itemInfos} = \@itemInfos; @@ -196,9 +194,11 @@ if ( $query->param('place_reserve') ) { } #item may belong to a host biblio, if yes change biblioNum to hosts bilbionumber - my $hostbiblioNum = GetBiblionumberFromItemnumber($itemNum); - if ($hostbiblioNum ne $biblioNum) { - $biblioNum = $hostbiblioNum; + if ($itemNum ne '') { + my $hostbiblioNum = GetBiblionumberFromItemnumber($itemNum); + if ($hostbiblioNum ne $biblioNum) { + $biblioNum = $hostbiblioNum; + } } my $biblioData = $biblioDataHash{$biblioNum}; -- 1.5.4.5 From savitra.sirohi at osslabs.biz Wed Nov 24 05:48:30 2010 From: savitra.sirohi at osslabs.biz (savitra.sirohi at osslabs.biz) Date: Wed, 24 Nov 2010 10:18:30 +0530 Subject: [Koha-patches] [PATCH] Analytical records: Support for holds on items linked via host records Message-ID: <1290574110-23112-1-git-send-email-savitra.sirohi@osslabs.biz> From: Amit Gupta --- C4/Items.pm | 38 ++++++++++++++++++++ C4/Reserves.pm | 8 ++++ .../prog/en/modules/reserve/request.tmpl | 8 ++++- .../opac-tmpl/prog/en/includes/item-status.inc | 2 + reserve/placerequest.pl | 10 +++++ reserve/request.pl | 21 +++++++++-- 6 files changed, 82 insertions(+), 5 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index c0c223a..1f82db1 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -66,6 +66,7 @@ BEGIN { GetItemsInfo GetHostItemsInfo get_itemnumbers_of + get_hostitemnumbers_of GetItemnumberFromBarcode GetBarcodeFromItemnumber @@ -1433,6 +1434,43 @@ sub get_itemnumbers_of { return \%itemnumbers_of; } +=head2 get_hostitemnumbers_of + + my @itemnumbers_of = get_hostitemnumbers_of($biblionumber); + +Given a biblionumber, return the list of corresponding itemnumbers that are linked to it via host fields + +Return a reference on a hash where key is a biblionumber and values are +references on array of itemnumbers. + +=cut + + +sub get_hostitemnumbers_of { + my ($biblionumber) = @_; + my $marcrecord = GetMarcBiblio($biblionumber); + my @returnhostitemnumbers; + + #MARC21 mapping, UNIMARC to be added + foreach my $hostfield ( $marcrecord->field('773') ) { + my $hostbiblionumber = $hostfield->subfield("w"); + my $linkeditemnumber = $hostfield->subfield("o"); + my @itemnumbers; + if (my $itemnumbers = get_itemnumbers_of($hostbiblionumber)->{$hostbiblionumber}) + { + @itemnumbers = @$itemnumbers; + } + foreach my $itemnumber (@itemnumbers){ + if ($itemnumber eq $linkeditemnumber){ + push (@returnhostitemnumbers,$itemnumber); + last; + } + } + } + return @returnhostitemnumbers; +} + + =head2 GetItemnumberFromBarcode $result = GetItemnumberFromBarcode($barcode); diff --git a/C4/Reserves.pm b/C4/Reserves.pm index fcf9209..763830f 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -381,6 +381,14 @@ sub CanBookBeReserved{ my ($borrowernumber, $biblionumber) = @_; my @items = GetItemsInfo($biblionumber); + + #get items linked via host records + my $marcrecord= GetMarcBiblio($biblionumber); + my @hostitemInfos = GetHostItemsInfo($marcrecord); + if (@hostitemInfos){ + push (@items, at hostitemInfos); + } + foreach my $item (@items){ return 1 if CanItemBeReserved($borrowernumber, $item->{itemnumber}); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl index 53f9138..3628fa0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl @@ -253,7 +253,7 @@ function checkMultiHold() { " value=" " /> @@ -389,6 +389,9 @@ function checkMultiHold() { Call no. Copy no. Information + + Host record + "> @@ -454,6 +457,9 @@ function checkMultiHold() { Not on hold + + ">Host Record + diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc b/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc index 5e881fe..276bf24 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc @@ -9,6 +9,8 @@ to since On hold + + On hold Item withdrawn diff --git a/reserve/placerequest.pl b/reserve/placerequest.pl index bc3fc74..a665333 100755 --- a/reserve/placerequest.pl +++ b/reserve/placerequest.pl @@ -81,6 +81,7 @@ if ($checkitem ne ''){ } } + if ($type eq 'str8' && $borrowernumber ne ''){ foreach my $biblionumber (keys %bibinfos) { @@ -98,6 +99,15 @@ if ($type eq 'str8' && $borrowernumber ne ''){ } my $const; + if ($checkitem ne ''){ + my $item = GetItem($checkitem); + if ($item->{'biblionumber'} ne $biblionumber) { + $biblionumber = $item->{'biblionumber'}; + } + } + + + if ($multi_hold) { my $bibinfo = $bibinfos{$biblionumber}; AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'a',[$biblionumber], diff --git a/reserve/request.pl b/reserve/request.pl index 859a65b..ea7811e 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -285,16 +285,22 @@ foreach my $biblionumber (@biblionumbers) { my @branchcodes; my %itemnumbers_of_biblioitem; my @itemnumbers; - + ## $items is array of 'item' table numbers if (my $items = get_itemnumbers_of($biblionumber)->{$biblionumber}){ @itemnumbers = @$items; } - else { + my @hostitems = get_hostitemnumbers_of($biblionumber); + if (@hostitems){ + push(@itemnumbers, @hostitems); + } + + if (!@itemnumbers) { $template->param('noitems' => 1); $biblioloopiter{noitems} = 1; } - + + ## Hash of item number to 'item' table fields my $iteminfos_of = GetItemInfosOf(@itemnumbers); @@ -322,6 +328,9 @@ foreach my $biblionumber (@biblionumbers) { $biblioitem->{description} = $itemtypes->{ $biblioitem->{itemtype} }{description}; + if($biblioitem->{biblioitemnumber} ne $biblionumber){ + $biblioitem->{hostitemsflag}=1; + } $biblioloopiter{description} = $biblioitem->{description}; $biblioloopiter{itypename} = $biblioitem->{description}; $biblioloopiter{imageurl} = @@ -344,7 +353,11 @@ foreach my $biblionumber (@biblionumbers) { $item->{holdingbranchname} = $branches->{ $item->{holdingbranch} }{branchname}; } - + + if($item->{biblionumber} ne $biblionumber){ + $item->{hostitemsflag}=1; + } + # add information $item->{itemcallnumber} = $item->{itemcallnumber}; -- 1.5.4.5 From oleonard at myacpl.org Wed Nov 24 15:31:56 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 24 Nov 2010 09:31:56 -0500 Subject: [Koha-patches] [PATCH] Fix for Bug 5402, "add to cart" shown on checkbox hover Message-ID: <1290609116-2503-1-git-send-email-oleonard@myacpl.org> This patch removes the title hint altogether. The checkbox might be used for the cart, lists, holds, or tags, and expressing this in a title hint seems overly complicated. --- .../opac-tmpl/prog/en/modules/opac-results.tmpl | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl index aa39b9a..cfd5e36 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl @@ -367,9 +367,9 @@ $(document).ready(function(){ - " name="biblionumber" value="" title="Click to add to cart" /> -" name="biblionumber" value="" title="Click to add to cart" /> -" name="biblionumber" value="" title="Click to add to cart" /> + " name="biblionumber" value="" /> +" name="biblionumber" value="" /> +" name="biblionumber" value="" /> . -- 1.7.1 From oleonard at myacpl.org Wed Nov 24 15:48:24 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 24 Nov 2010 09:48:24 -0500 Subject: [Koha-patches] [PATCH] Fix for Bug 5416, Template syntax error in moredetails.tmpl Message-ID: <1290610104-2720-1-git-send-email-oleonard@myacpl.org> --- .../prog/en/modules/catalogue/moredetail.tmpl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl index 55ca81f..b87e14a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl @@ -42,7 +42,7 @@

    ">Barcode

    -

    Item Information &itemnumber=">[Edit Item]

    +

    Item Information &itemnumber=">[Edit Item]

    1. Home Library:  
    2. -- 1.7.1 From oleonard at myacpl.org Wed Nov 24 15:50:23 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 24 Nov 2010 09:50:23 -0500 Subject: [Koha-patches] [PATCH] Fix for Bug 5416, Template syntax error in moredetails.tmpl In-Reply-To: <1290610104-2720-1-git-send-email-oleonard@myacpl.org> References: <1290610104-2720-1-git-send-email-oleonard@myacpl.org> Message-ID: Credit for finding this bug and patching it goes to Fridolyn Somers, but the patch in Bugzilla didn't apply for me so I duplicated the changes and reformatted. -- Owen From savitra.sirohi at osslabs.biz Wed Nov 24 12:02:00 2010 From: savitra.sirohi at osslabs.biz (savitra.sirohi at osslabs.biz) Date: Wed, 24 Nov 2010 16:32:00 +0530 Subject: [Koha-patches] [PATCH] Analytical record - improvements in creating analytical record Message-ID: <1290596520-10647-1-git-send-email-savitra.sirohi@osslabs.biz> From: Amit Gupta --- cataloguing/addbiblio.pl | 44 ++------------------ .../prog/en/modules/cataloguing/addbiblio.tmpl | 2 +- 2 files changed, 5 insertions(+), 41 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index e3f69e5..79b8d17 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -348,8 +348,6 @@ sub create_input { ); # always expand all subfields of a mandatory field $subfield_data{visibility} = "" if $tagslib->{$tag}->{mandatory}; - # expand all subfields of 773 if there is a host item provided in the input - $subfield_data{visibility} ="" if ($tag eq 773 and $cgi->param('hostitemnumber')); # it's an authorised field if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) { $subfield_data{marc_value} = @@ -681,14 +679,6 @@ sub build_tabs ($$$$$) { # if breeding is empty } else { - my $hostbiblionumber; - my $hostitemnumber; - my $hostrecord; - if ($tag eq 773){ - $hostbiblionumber = $input->param('hostbiblionumber'); - $hostitemnumber = $input->param('hostitemnumber'); - $hostrecord = &GetMarcBiblio($hostbiblionumber); - } my @subfields_data; foreach my $subfield ( sort( keys %{ $tagslib->{$tag} } ) ) { next if ( length $subfield != 1 ); @@ -705,35 +695,6 @@ sub build_tabs ($$$$$) { # always include in the form regardless of the hidden setting - bug 2206 next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop ); - if ( $tag eq 773 and $hostbiblionumber){ - if ($subfield eq "w"){ - push( - @subfields_data, - &create_input( - $tag, $subfield,$hostbiblionumber, $index_tag, $tabloop, $record, - $authorised_values_sth,$input - )); - next; - } - if ($subfield eq "a"){ - push( - @subfields_data, - &create_input( - $tag, $subfield,$hostrecord->subfield('245',"a"), $index_tag, $tabloop, $record, - $authorised_values_sth,$input - )); - next; - } - if ($subfield eq "o"){ - push( - @subfields_data, - &create_input( - $tag, $subfield,$hostitemnumber, $index_tag, $tabloop, $record, - $authorised_values_sth,$input - )); - next; - } - } push( @subfields_data, &create_input( @@ -872,6 +833,8 @@ my $mode = $input->param('mode'); my $frameworkcode = $input->param('frameworkcode'); my $redirect = $input->param('redirect'); my $dbh = C4::Context->dbh; +my $hostbiblionumber = $input->param('hostbiblionumber'); +my $hostitemnumber = $input->param('hostitemnumber'); my $userflags = ($frameworkcode eq 'FA') ? "fast_cataloging" : "edit_catalogue"; @@ -932,7 +895,6 @@ if ($breedingid) { #populate hostfield if hostbiblionumber is available if ($hostbiblionumber){ $record=MARC::Record->new(); - $record->leader(''); my $field = PrepHostMarcField($hostbiblionumber, $hostitemnumber); $record->append_fields($field); } @@ -1062,6 +1024,8 @@ elsif ( $op eq "delete" ) { biblioitemnumtagfield => $biblioitemnumtagfield, biblioitemnumtagsubfield => $biblioitemnumtagsubfield, biblioitemnumber => $biblioitemnumber, + hostbiblionumber => $hostbiblionumber, + hostitemnumber => $hostitemnumber ); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl index ccd1039..3d3b9c5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl @@ -230,7 +230,7 @@ function GetZ3950Terms(){ function Changefwk(FwkList) { var fwk = FwkList.options[FwkList.selectedIndex].value; - window.location = "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=&breedingid=&frameworkcode="+fwk; + window.location = "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=&breedingid=&hostbiblionumber=&hostitemnumber=&frameworkcode="+fwk; } -- 1.5.4.5 From oleonard at myacpl.org Wed Nov 24 17:35:43 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 24 Nov 2010 11:35:43 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5430: Add Control number as option to OPACSearchForTitleIn Message-ID: <1290616543-3598-1-git-send-email-oleonard@myacpl.org> From: Katrin Fischer Makes {CONTROLNUMBER} available as new placeholder in system preference OPACSearchForTitleIn. {CONTROLNUMBER} will be replaced by the number in tag 001. Signed-off-by: Owen Leonard --- C4/Biblio.pm | 19 +++++++++++++++++++ .../prog/en/modules/admin/preferences/opac.pref | 2 +- opac/opac-detail.pl | 3 +++ 3 files changed, 23 insertions(+), 1 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 6a422be..4102e23 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -67,6 +67,7 @@ BEGIN { &GetISBDView + &GetMarcControlnumber &GetMarcNotes &GetMarcSubjects &GetMarcBiblio @@ -1254,6 +1255,24 @@ sub GetAuthorisedValueDesc { } } +=head2 GetMarcControlnumber + + $marccontrolnumber = GetMarcControlnumber($record,$marcflavour); + +Get the control number / record Identifier from the MARC record and return it. + +=cut + +sub GetMarcControlnumber { + my ( $record, $marcflavour ) = @_; + my $controlnumber = ""; + # Control number or Record identifier are the same field in MARC21 and UNIMARC + # Keep $marcflavour for possible later use + if ($marcflavour eq "MARC21" || $marcflavour eq "UNIMARC") { + $controlnumber = $record->field('001')->data(); + } +} + =head2 GetMarcNotes $marcnotesarray = GetMarcNotes( $record, $marcflavour ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index 2619d8c..55560d3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -137,7 +137,7 @@ OPAC: class: code - - 'Include a "More Searches" box on the detail pages of items on the OPAC, with the following HTML (leave blank to disable):' - - '
      Note: The placeholders {TITLE}, {ISBN} and {AUTHOR} will be replaced with information from the displayed record.' + - '
      Note: The placeholders {CONTROLNUMBER}, {TITLE}, {ISBN} and {AUTHOR} will be replaced with information from the displayed record.' - pref: OPACSearchForTitleIn type: textarea class: code diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 0cd05f7..2de8ec8 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -584,12 +584,15 @@ if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->pref } #Search for title in links +my $marccontrolnumber = GetMarcControlnumber ($record, $marcflavour); + if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ $dat->{author} ? $search_for_title =~ s/{AUTHOR}/$dat->{author}/g : $search_for_title =~ s/{AUTHOR}//g; $dat->{title} =~ s/\/+$//; # remove trailing slash $dat->{title} =~ s/\s+$//; # remove trailing space $dat->{title} ? $search_for_title =~ s/{TITLE}/$dat->{title}/g : $search_for_title =~ s/{TITLE}//g; $isbn ? $search_for_title =~ s/{ISBN}/$isbn/g : $search_for_title =~ s/{ISBN}//g; + $marccontrolnumber ? $search_for_title =~ s/{CONTROLNUMBER}/$marccontrolnumber/g : $search_for_title =~ s/{CONTROLNUMBER}//g; $template->param('OPACSearchForTitleIn' => $search_for_title); } -- 1.7.1 From oleonard at myacpl.org Wed Nov 24 20:59:34 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 24 Nov 2010 14:59:34 -0500 Subject: [Koha-patches] [PATCH 2/2] Further fixes for Bug 3652 - XSS vulnerabilities Message-ID: <1290628774-5425-1-git-send-email-oleonard@myacpl.org> Applying "ESCAPE='0'" where necessary in the staff client --- .../prog/en/includes/auth-finder-search.inc | 6 ++-- .../prog/en/includes/doc-head-close.inc | 2 +- .../prog/en/includes/doc-head-open.inc | 6 ++++- .../intranet-tmpl/prog/en/includes/header.inc | 2 +- .../prog/en/includes/intranet-bottom.inc | 10 ++++---- .../prog/en/modules/acqui/neworderbiblio.tmpl | 2 +- .../prog/en/modules/acqui/neworderempty.tmpl | 12 +++++----- .../prog/en/modules/acqui/newordersuggestion.tmpl | 2 +- .../prog/en/modules/acqui/z3950_search.tmpl | 4 +- .../prog/en/modules/admin/aqbudgetperiods.tmpl | 2 +- .../prog/en/modules/admin/aqbudgets.tmpl | 1 + .../prog/en/modules/admin/aqplan.tmpl | 8 +++--- .../en/modules/admin/auth_subfields_structure.tmpl | 18 ++++++++-------- .../prog/en/modules/admin/authorised_values.tmpl | 2 +- .../prog/en/modules/admin/classsources.tmpl | 5 +-- .../en/modules/admin/item_circulation_alerts.tmpl | 4 +- .../prog/en/modules/admin/koha2marclinks.tmpl | 22 ++++++++++---------- .../en/modules/admin/marc_subfields_structure.tmpl | 16 +++++++------- .../prog/en/modules/admin/matching-rules.tmpl | 2 +- .../prog/en/modules/admin/patron-attr-types.tmpl | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/auth.tmpl | 2 +- .../prog/en/modules/authorities/authorities.tmpl | 2 +- .../modules/authorities/searchresultlist-auth.tmpl | 2 +- .../en/modules/authorities/searchresultlist.tmpl | 2 +- .../prog/en/modules/basket/basket.tmpl | 6 ++-- .../prog/en/modules/basket/sendbasket.tmpl | 2 +- .../prog/en/modules/catalogue/ISBDdetail.tmpl | 2 +- .../prog/en/modules/catalogue/MARCdetail.tmpl | 2 +- .../prog/en/modules/catalogue/detail.tmpl | 20 +++++++++--------- .../en/modules/catalogue/labeledMARCdetail.tmpl | 2 +- .../prog/en/modules/cataloguing/addbiblio.tmpl | 2 +- .../prog/en/modules/cataloguing/additem.tmpl | 4 +- .../prog/en/modules/circ/circulation.tmpl | 10 ++++---- .../prog/en/modules/intranet-main.tmpl | 4 +- .../prog/en/modules/labels/label-edit-batch.tmpl | 2 +- .../prog/en/modules/labels/label-home.tmpl | 4 +- .../prog/en/modules/labels/spinelabel-print.tmpl | 2 +- .../prog/en/modules/members/borrowers_details.tmpl | 4 ++- .../prog/en/modules/members/member.tmpl | 2 +- .../prog/en/modules/members/memberentrygen.tmpl | 6 ++-- .../en/modules/reports/acquisitions_stats.tmpl | 14 ++++++------ .../prog/en/modules/reports/bor_issues_top.tmpl | 2 +- .../prog/en/modules/reports/borrowers_out.tmpl | 4 +- .../prog/en/modules/reports/borrowers_stats.tmpl | 4 +- .../prog/en/modules/reports/cat_issues_top.tmpl | 4 +- .../prog/en/modules/reports/catalogue_out.tmpl | 4 +- .../prog/en/modules/reports/catalogue_stats.tmpl | 4 +- .../prog/en/modules/reports/issues_avg_stats.tmpl | 16 +++++++------- .../reports/issues_by_borrower_category.tmpl | 2 +- .../prog/en/modules/reports/issues_stats.tmpl | 4 +- .../prog/en/modules/reports/itemtypes.tmpl | 2 +- .../prog/en/modules/reports/serials_stats.tmpl | 4 +- .../prog/en/modules/reserve/request.tmpl | 4 +- 53 files changed, 142 insertions(+), 136 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc index 437b313..fe4f612 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc @@ -17,7 +17,7 @@ - " /> + " />
    3. @@ -29,7 +29,7 @@ - " /> + " />
    4. @@ -41,7 +41,7 @@ - " /> + " />
    5. diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc index 1970440..f17bc29 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc @@ -75,7 +75,7 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc index df2dc01..d7b838d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc @@ -1,4 +1,8 @@ -" xml:lang="" dir="" xmlns="http://www.w3.org/1999/xhtml"> + +" xml:lang="" dir="" xmlns="http://www.w3.org/1999/xhtml"> + +" xml:lang="" xmlns="http://www.w3.org/1999/xhtml"> + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc index 95ce8dd..3e3ab36 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc @@ -9,7 +9,7 @@
    6. Cart
    7. - +
    8. More
      diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc index 78334b2..71eff05 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc @@ -7,14 +7,14 @@ -
    9. ()
      +
    10. ()
        -
      • ()
      • +
      • ()
      • -
      • "> ()
      • +
      • "> ()
      • @@ -24,9 +24,9 @@ -
      • +
      • -
      • ">
      • +
      • ">
      • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tmpl index f09f474..dbbf8f4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tmpl @@ -48,7 +48,7 @@ -

        +

        by ,

        - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl index e53c7da..21f5044 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl @@ -140,10 +140,10 @@ ff.submit();

        1. Title - " /> + " /> - " /> + " />
        2. @@ -206,8 +206,8 @@ ff.submit();
          1. "> - - + + " /> " /> @@ -340,7 +340,7 @@ ff.submit(); - + " /> @@ -350,7 +350,7 @@ ff.submit(); - + " /> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tmpl index 630d9ba..e9c0495 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tmpl @@ -27,7 +27,7 @@ -

            -

            +

            -

            copy. year: volume: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl index 2219dfa..fbf6565 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl @@ -73,7 +73,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :

            -
            1. " />
            2. +
              1. " />
              2. " />
            @@ -141,7 +141,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl index 523fd13..8f1f06b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl @@ -294,7 +294,7 @@ -
            +
            diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl index 80d9156..925cb7e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl @@ -241,6 +241,7 @@ +

            Currency =

            diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl index 2192178..fc39f8a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl @@ -104,7 +104,7 @@ YAHOO.util.Event.onAvailable("popmenu", function () { - + @@ -176,7 +176,7 @@ YAHOO.util.Event.onAvailable("popmenu", function () { - +   @@ -279,8 +279,8 @@ YAHOO.util.Event.onAvailable("popmenu", function () {
            1. -     + +     " /> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tmpl index 1b431ec..64d2a29 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tmpl @@ -75,34 +75,34 @@ function displayMoreConstraint(numlayer){
                -
              1.  
              2. +
              3.  
              4. " />
              5. -
              6.  
              7. -
              8.  
              9. +
              10.  
              11. +
              12.  
              13. " type="text" name="liblibrarian" value="" size="40" maxlength="80" />
              14. " name="libopac" value="" size="40" maxlength="80" />
              15. -
              16. (ignore means that the subfield does not display in the record editor)
              17. +
              18. (ignore means that the subfield does not display in the record editor)
              19. Display
                  -
                1. +
                2. ">Intranet: --> ">Editor: (see online help) -->
              20. -
              21. (if checked, it means that the subfield is a URL and can be clicked)
              22. +
              23. (if checked, it means that the subfield is a URL and can be clicked)
              24. Help input
                  -
                1. -
                2. -
                3. +
                4. +
                5. +
              25. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl index bef0cae..7264db1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl @@ -174,7 +174,7 @@
            - +

            An authorized value attached to patrons, that can be used for stats purposes

            diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tmpl index 569d875..a5f81b5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tmpl @@ -274,9 +274,8 @@ $(document).ready(function() { -
            +
            -

            Classification Filing Rules

            Added filing rule
            @@ -310,7 +309,7 @@ $(document).ready(function() { -
            +
            diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tmpl index 48dd3ad..d2ffbaf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tmpl @@ -157,7 +157,7 @@ $(function(){   - + @@ -181,7 +181,7 @@ $(function(){   - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tmpl index b8f664a..c1e3103 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tmpl @@ -33,7 +33,7 @@ " /> " /> - +
          2. @@ -42,7 +42,7 @@ " /> - + " />
          3. @@ -53,7 +53,7 @@ " /> " /> - +
          4. @@ -63,7 +63,7 @@ " /> " /> - +
          5. @@ -73,7 +73,7 @@ " /> " /> - +
          6. @@ -83,7 +83,7 @@ " /> " /> - +
          7. @@ -93,7 +93,7 @@ " /> " /> - +
          8. @@ -103,7 +103,7 @@ " /> " /> - +
          9. @@ -113,7 +113,7 @@ " /> " /> - +
          10. @@ -123,7 +123,7 @@ " /> " /> - +
          @@ -144,7 +144,7 @@

          Koha to MARC Mapping

          " method="post"> -

          +

          diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl index 7873296..b432d72 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl @@ -98,9 +98,9 @@
        3. " type="text" name="liblibrarian" value="" size="40" maxlength="80" />
        4. " name="libopac" value="" size="40" maxlength="80" />
        5. -
        6. -
        7. -
        8. (ignore means that the subfield does not display in the record editor)
        9. +
        10. +
        11. +
        12. (ignore means that the subfield does not display in the record editor)
        13. @@ -111,17 +111,17 @@
          1. " value="" />
          2. " name="hidden" value="" size="2" /> (see online help)
          3. -
          4. (if checked, it means that the subfield is a URL and can be clicked)
          5. +
          6. (if checked, it means that the subfield is a URL and can be clicked)
          7. " name="link" value="" size="10" maxlength="80" /> (e.g., Title or Local-Number) Warning: This value should not change after data has been added to your catalog
          8. -
          9. +
          Other Options: (choose one)
            -
          1. -
          2. -
          3. +
          4. +
          5. +

          diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tmpl index bfa2ed9..df77592 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tmpl @@ -572,7 +572,7 @@ function CheckRuleForm(f) {

          There are no saved matching rules.

          -
          +
          diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl index b445c41..8e1c7ea 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl @@ -221,7 +221,7 @@ function CheckAttributeTypeForm(f) {

          There are no saved patron attribute types.

          -
          +
          diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tmpl index fe2cd96..5d8b767 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tmpl @@ -39,7 +39,7 @@
          " method="post" name="loginform" id="loginform"> - " value="" /> + " value="" />

          " size="20" tabindex="1" /> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tmpl index cadea08..877de7b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tmpl @@ -705,7 +705,7 @@ function searchauthority() { - + Clone diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tmpl index e327451..80c7657 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tmpl @@ -93,7 +93,7 @@ function jumpfull(page) - &authtypecode=&=&op=do_search&type=intranet&index=&tagid=&orderby="> + &authtypecode=&=&op=do_search&type=intranet&index=&tagid=&orderby="> >>

      diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tmpl index 01667e5..6c7ccf6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tmpl @@ -79,7 +79,7 @@ function searchauthority() {
      -
      +
      No results found diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tmpl index d3d83ac..4057166 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tmpl @@ -133,12 +133,12 @@ function placeHold () {

      - + " name="bib" id="bib" onclick="selRecord(value,checked)" /> - + @@ -318,7 +318,7 @@ function placeHold () { ',)"> - +

      - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tmpl index e5cc60d..f4bcde0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tmpl @@ -15,7 +15,7 @@ Reference Manager or ProCite. --------------------------------------------- - + Author(s): ; ; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tmpl index 1516268..1fc87dc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tmpl @@ -17,7 +17,7 @@

      - +
      diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tmpl index 8880f8b..736e09e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tmpl @@ -391,7 +391,7 @@ function Changefwk(FwkList) { - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl index e3391ac..2f15388 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl @@ -1,5 +1,5 @@ -Koha › Catalog › Details for <!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_LOOP NAME="subtitle" --> <!-- TMPL_VAR NAME="subfield" --><!-- /TMPL_LOOP --> +Koha › Catalog › Details for <!-- TMPL_VAR NAME="title" --> <!-- TMPL_LOOP NAME="subtitle" --> <!-- TMPL_VAR NAME="subfield" --><!-- /TMPL_LOOP -->

    @@ -313,7 +312,7 @@

    Are you sure you want to close basket ?

    - +

    " name="basketno" /> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref index 2a900f0..41ebe78 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref @@ -18,6 +18,12 @@ Acquisitions: - The default tax rate is - pref: gist - (enter in numeric form, 0.12 for 12%) + - + - When closing or reopening a basket, + - pref: SkipBasketConfirmations + choices: + 0: always ask for confirmation. + 1: do not ask for confirmation. Printing: - -- 1.6.0.6 From katrin.fischer at bsz-bw.de Thu Nov 25 16:24:33 2010 From: katrin.fischer at bsz-bw.de (Katrin Fischer) Date: Thu, 25 Nov 2010 15:24:33 -0000 Subject: [Koha-patches] [PATCH] Bug 5104: Add control number as search option to acq z39.50 search Message-ID: <1284545386-21274-1-git-send-email-katrin.fischer@bsz-bw.de> From: Katrin Fischer Adds control number as search option to z39.50 search in acquisitions. --- acqui/z3950_search.pl | 6 ++++++ .../prog/en/modules/acqui/z3950_search.tmpl | 4 +++- 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl index 182e121..b0a8b92 100755 --- a/acqui/z3950_search.pl +++ b/acqui/z3950_search.pl @@ -57,6 +57,7 @@ my $lccn = $input->param('lccn'); my $lccall = $input->param('lccall'); my $subject= $input->param('subject'); my $dewey = $input->param('dewey'); +my $controlnumber = $input->param('controlnumber'); my $op = $input->param('op'); my $booksellerid = $input->param('booksellerid'); my $basketno = $input->param('basketno'); @@ -118,6 +119,7 @@ if ( $op ne "do_search" ) { lccall => $lccall, title => $title, author => $author, + controlnumber=> $controlnumber, serverloop => $serverloop, opsearch => "search", biblionumber => $biblionumber, @@ -164,6 +166,10 @@ else { $query .= " \@attr 1=16 \@attr 2=3 \@attr 3=1 \@attr 4=1 \@attr 5=1 \@attr 6=1 \"$lccall\" "; $nterms++; } + if ($controlnumber) { + $query .= " \@attr 1=12 \"$controlnumber\" "; + $nterms++; + } for my $i (1..$nterms-1) { $query = "\@and " . $query; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl index 2219dfa..063520c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl @@ -75,7 +75,9 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
    1. " />
    2. " />
    3. -
    +
  • +
  • +
    -- 1.7.1 From chrisc at catalyst.net.nz Thu Nov 25 21:05:39 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 26 Nov 2010 09:05:39 +1300 Subject: [Koha-patches] [PATCH 2/2] Fixing formatting and links in the history document Message-ID: <1290715539-3265-1-git-send-email-chrisc@catalyst.net.nz> --- docs/history.txt | 46 +++++++++++++++++++++++----------------------- 1 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/history.txt b/docs/history.txt index dfc4b4c..36173ab 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -238,7 +238,7 @@ June 3 2005 Gavin ?? becomes the 34th committer to Koha June 3 2005 Joshua Ferraro and Chris Cormack discuss trying out Koha for fulltext search on irc searching, fulltext June 3 2005 Friedrich zur Hellen becomes the 35th committer to Koha June 5 2005 Joshua experiments with Zebra, finds very positive and encouraging results searching, fulltext -June 11 2005 MJ Ray presents Koha to the British & Irish Association of Law Librarians 36th Annual Study Conference and Exhibition +June 11 2005 MJ Ray presents Koha to the British & Irish Association of Law Librarians 36th Annual Study Conference and Exhibition June 13 2005 Catalogue KOHA : mode d???emploi (in French) by the Biblioth??que de sociologie du CNRS, Paris is published on www.kohadocs.org June 13 2005 After more discussion on irc, Joshua Ferraro sets up a test site using zebra on liblime servers search, fulltext, liblime June 14 2005 Draft coding guidelines published @@ -256,7 +256,7 @@ August 18 2005 An expanded version of the first chapter of the Koha Users Guide August 19 2005 Mason James (at Katipo) becomes the 36th committer to Koha August 23 2005 A new document is available on http://www.kohadocs.org -- "MARC Holdings, Koha, and Migration" by Thomas Dukleth. Look for it in section 2.2, "Migration." documentation August 26 2005 A new link to a document has been added to http://www.kohadocs.org -- "Gestion de la biblioth??que du LabSAD avec le logiciel Koha" by Caroline Naget (available in pdf format only). This document is in the General Information section because it covers several aspects of Koha: installing on Gentoo Linux, setting parameters, and use. -September 8 2005 New website softlaunched +September 8 2005 New website softlaunched September 12-14 2005 Katipo and Koha at LIANZA conference September 20 2005 ???????????? ?????????? starts work on a Ukranian translation translation, ukranian October 6 2005 New www.koha.org website @@ -423,8 +423,8 @@ April 29 2009 Liz Rea becomes the 87th committer to have a patch pushed into the April 29 2009 Lenora Oftedahl sets up an SQL library on the koha wiki, users rejoice, and lo a multitude of reports are added May 1 2009 Colin Campbell becomes the 88th committer to have a patch pushed into the main repository developer May 1 2009 David Birmingham becomes the 89th committer to have a patch pushed into the main repository developer -May 6 2009 IRC meeting http://wiki.koha.org/doku.php?id=meetingnotes09apr07 -May 7 2009 Maintenance tree created on git.koha.org for testing for 3.0.2 +May 6 2009 IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_6_May_2009 +May 7 2009 Maintenance tree created on git.koha-community.org for testing for 3.0.2 May 21 2009 Andrei V. Toutoukine becomes the 90th committer to have a patch accepted in Koha developer May 22 2009 First feature sponsored by Northeast Kansas Library System (NEKLS) accepted sponsor May 28 2009 Rick Welykochy becomes the 91st committer to have a patch accepted developer @@ -433,54 +433,54 @@ May 28 2009 Zeno Tajoli becomes the 92nd committer to have a patch accepted deve May 29 2009 Matthias Meusburger becomes the 93rd committer to have patch accepted developer May 29 2009 First feature sponsored by Plano Independent School District committed sponsor June 3 2009 Savitra Sirohi becomes the 94th committer to have a patch accepted developer,India -June 3 2009 IRC general Meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09jun3 +June 3 2009 IRC general Meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_3_June_2009 June 4 2009 Koha 3.0.2 released releases June 8 2009 Koha passed 10,000 commits in the master branch (since December 2000) statistics June 26 2009 Koha 3.0.3 released releases -July 1 2009 IRC general Meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09jul01 +July 1 2009 IRC general Meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_1_July_2009 July 27 2009 Feature sponsored by East Brunswick Public Library, East Brunswick, NJ USA and Middletown Township Public Library, Middletown, NJ USA committed sponsor July 30 2009 First message to koha-commits mailing list August 1 2009 S??bastien Hinderer becomes the 95th committer to have a patched accepted developer,france -August 5 2009 IRC general meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09aug05 +August 5 2009 IRC general meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_5_August_2009 August 30 2009 John A. Graziano Memorial Library contributes a icon for Bridge Icon set -September 2 2009 IRC general meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09sep02 +September 2 2009 IRC general meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_2_September_2009 September 5 2009 UNIMARC XSLT cleanup and new features Sponsored by BULAC, www.bulac.fr September 5 2009 Labels rewrite committed, sponsored by Foundations Bible College & Seminary, Dunn, NC USA September 6 2009 Katrin Fischer becomes the 96th committer to have a patch accepted developer September 6 2009 Wolfgang Heymans becomes the 97th committer to have a patch accepted developer -September 15 2009 Foundation forming meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09sep15 -October 7 2009 IRC general meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09oct07 +September 15 2009 Foundation forming meeting http://wiki.koha-community.org/wiki/Foundation_Forming_IRC_Meeting,_15_September_2009 +October 7 2009 IRC general meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_7_October_2009 October 22 2009 Koha 3.0.4 released releases -October 29 2009 Foundation Forming meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09oct29 -November 4 2009 General meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09nov04 -December 2 2009 KUDOS meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:kudosmeetingnotes09dec02 -December 2 2009 General meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09dec02 -December 3 2009 Foundation meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09dec03 +October 29 2009 Foundation Forming meeting http://wiki.koha-community.org/wiki/Foundation_Forming_IRC_Meeting,_29_October_2009 +November 4 2009 General meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_4_November_2009 +December 2 2009 KUDOS meeting http://wiki.koha-community.org/wiki/KUDOS_Meeting,_2_December_2009 +December 2 2009 General meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_2_December_2009 +December 3 2009 Foundation meeting http://wiki.koha-community.org/wiki/Foundation_Forming_IRC_Meeting,_3_December_2009 December 9 2009 Piotr Wejman becomes the 98th committer to have a patch accepted developer December 19 2009 Koha 3.0.5 released releases December 20 2009 NYUHSL becomes the 99th committer to have a patch accepted developer December 23 2009 Sharon Moreland becomes the 100th committer to have a patch accepted (sent via Liz Rea) developer December 23 2009 Nicolas Morin becomes the 101st committed to have a patch accepted developer -January 13 2010 IRC General Meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes10jan13 +January 13 2010 IRC General Meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_13_January_2010 January 14 2010 Bywater Solutions and Biblibre partner to offer support in the US January 14 2010 Chris Cormack elected Release Manager for 3.4.0 January 15 2010 PTFS announce intention to buy Liblime January 26 2010 Biblibre and Libriotech partner to offer support in Norway -February 2 2010 Community Handover meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes10feb02 +February 2 2010 Community Handover meeting http://wiki.koha-community.org/wiki/Community_Handover_IRC_Meeting,_2_February_2010 February 2 2010 koha-community.org website started February 3 2010 Koha 3.2.0 Alpha released -February 9 2010 General IRC meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes10feb09 +February 9 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_9_February_2010 February 10 2010 Magnus Enger becomes the 102nd committer to have a patch accepted February 11 2010 Acquisition of Liblime by PTFS called off February 11 2010 Equinox begin to offer Koha support February 15 2010 Will Stokes becomes the 103rd committer to have a patch accepted -February 16 2010 Kohacon10 IRC meeting http://wiki.koha.org/doku.php?id=en:kohacon2010:meetingminutes16feb -March 2 2010 Community Handover meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes10mar02 -March 3 2010 General IRC meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes10mar03 +February 16 2010 Kohacon10 IRC meeting http://wiki.koha-community.org/wiki/KohaCon_Meeting,_16_Feb_2010 +March 2 2010 Community Handover meeting http://wiki.koha-community.org/wiki/Community_Handover_IRC_Meeting,_2_March_2010 +March 3 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_3_March_2010 March 15 2010 PTFS acquires LibLime after all March 16 2010 Lars Wirzenius becomes the 104th committer to have a patch accepted -April 6 2010 Community handover meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes10apr06 -April 7 2010 General meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes10apr07 +April 6 2010 Community handover meeting http://wiki.koha-community.org/wiki/Community_Handover_IRC_Meeting,_6_April_2010 +April 7 2010 General meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_7_April_2010 April 7 2010 Donovan Jones becomes the 105th committer to have a patch accepted April 7 2010 Srdjan Jankovic becomes the 106th committer to have a patch accepted April 7 2010 Cindy Murdock Ames becomes the 107th committer to have a patch accepted -- 1.7.0.4 From chrisc at catalyst.net.nz Thu Nov 25 21:18:06 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 26 Nov 2010 09:18:06 +1300 Subject: [Koha-patches] [PATCH 3/3] Adding 3.2.1 release to the history Message-ID: <1290716286-3818-1-git-send-email-chrisc@catalyst.net.nz> --- docs/history.txt | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/docs/history.txt b/docs/history.txt index 36173ab..4f9da78 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -507,3 +507,4 @@ October 25-31 2010 Kohacon10 in Wellington October 30 2010 Brian Engard becomes the 117th committer to have a patch accepted October 30 2010 Daniel Grobani becomes the 118th committer to have a patch accepted October 31 2010 Nate Curulla becomes the 119th committer to have patch accepted +November 20 2010 Koha 3.2.1 released -- 1.7.0.4 From chrisc at catalyst.net.nz Thu Nov 25 21:44:13 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 26 Nov 2010 09:44:13 +1300 Subject: [Koha-patches] [PATCH] Updating about.tmpl with new committers Message-ID: <1290717853-4595-1-git-send-email-chrisc@catalyst.net.nz> --- koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl index bef9e20..674cca0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl @@ -100,7 +100,7 @@

    Koha Release Team

    Koha Development Team

      @@ -134,7 +135,9 @@
    • DeAndre Carroll
    • Chris Catalfo (new plugin MARC editor)
    • Marc Chantreux
    • +
    • Andrew Chilton
    • Garry Collum
    • +
    • Nathan Curulla
    • Vincent Danjean
    • Kip DeGraaf
    • Fr??d??ric Demians
    • @@ -143,7 +146,9 @@
    • Ecole des Mines de Saint Etienne, Philippe Jaillon (OAI-PMH support)
    • Stephen Edwards
    • Andrew Elwell
    • +
    • Brian Engard
    • Magnus Enger
    • +
    • Jared CAMINS-ESAKOV
    • Esiee School (J??rome Vizcaino, Michel Lerenard, Pierre Cauchois)
    • Pate Eyler (Kaitiaki from 2002 to 2004)
    • Antoine Farnault
    • @@ -155,6 +160,7 @@
    • Russel Garlick
    • Daniel Kahn Gillmor
    • David Goldfein
    • +
    • Daniel Grobani
    • Amit Gupta
    • Michael Hafen
    • Mike Hansen
    • @@ -165,6 +171,7 @@
    • S??bastien Hinderer
    • Daniel Holth
    • Andrew Hooper
    • +
    • Matthew Hunt
    • Christopher Hyde
    • Cory Jaeger
    • Srdjan Jankovic
    • @@ -187,10 +194,13 @@
    • Nicolas Morin
    • Mike Mylonas
    • Chris Nighswonger
    • +
    • Eric Olsen
    • Polytechnic University
    • MJ Ray
    • Liz Rea
    • Allen Reinmeyer
    • +
    • Marcel de Rooy
    • +
    • Robin Sheat
    • Savitra Sirohi
    • Pawel Skuza (Polish for 1.2)
    • Southeastern University
    • -- 1.7.0.4 From f.demians at tamil.fr Fri Nov 26 08:22:45 2010 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 26 Nov 2010 08:22:45 +0100 Subject: [Koha-patches] [PATCH] Bug 5446 Item creation in Acquisition module doesn't control mandatory field Message-ID: <1290756165-32144-1-git-send-email-f.demians@tamil.fr> Add some JS validing form, so saving an order is blocked if any item mandatory field is empty. --- .../prog/en/modules/acqui/neworderempty.tmpl | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl index e53c7da..85ccb6f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl @@ -36,7 +36,20 @@ function Check(ff) { if (totalExceedsBudget(ff.budget_id.value, ff.total.value ) ) { ok=1; - _alertString += "\n- " + "Order total (" + ff.total.value + ") exceeds budget available ("+actTotal+")"; + _alertString += "\n- " + _("Order total (") + ff.total.value + + _(") exceeds budget available (") + actTotal+")"; + } + + var empty_item_mandatory = 0; + for (i = 0; i < ff.field_value.length; i++) { + if (ff.field_value[i].value.length == 0 && ff.mandatory[i].value == 1) { + empty_item_mandatory++; + } + } + if (empty_item_mandatory > 0) { + ok = 1; + _alertString += + "\n- " + empty_item_mandatory + _(" item mandatory fields empty"); } if (ok) { -- 1.7.3.2 From colin.campbell at ptfs-europe.com Fri Nov 26 15:39:18 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Fri, 26 Nov 2010 14:39:18 +0000 Subject: [Koha-patches] [PATCH] Fix some compile time errors reported in test suite Message-ID: <1290782358-26054-1-git-send-email-colin.campbell@ptfs-europe.com> redeclaration of itemnumber in RotatingCollections A couple of errors caused by retaining commas in qw() --- C4/Creators.pm | 2 +- C4/Patroncards.pm | 2 +- C4/RotatingCollections.pm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Creators.pm b/C4/Creators.pm index c9538e2..47900b5 100644 --- a/C4/Creators.pm +++ b/C4/Creators.pm @@ -2,7 +2,7 @@ package C4::Creators; BEGIN { use version; our $VERSION = qv('1.0.0_1'); - use vars qw(@EXPORT, @ISA); + use vars qw(@EXPORT @ISA); @ISA = qw(Exporter); our @EXPORT = qw(get_all_templates get_all_layouts diff --git a/C4/Patroncards.pm b/C4/Patroncards.pm index cc20c2c..e833193 100644 --- a/C4/Patroncards.pm +++ b/C4/Patroncards.pm @@ -2,7 +2,7 @@ package C4::Patroncards; BEGIN { use version; our $VERSION = qv('1.0.0_1'); - use vars qw(@EXPORT, @ISA); + use vars qw(@EXPORT @ISA); @ISA = qw(Exporter); our @EXPORT = qw(unpack_UTF8 text_alignment diff --git a/C4/RotatingCollections.pm b/C4/RotatingCollections.pm index c880fe8..b576868 100644 --- a/C4/RotatingCollections.pm +++ b/C4/RotatingCollections.pm @@ -504,7 +504,7 @@ sub isItemInAnyCollection { my $row = $sth->fetchrow_hashref; - my $itemnumber = $$row{'itemnumber'}; + $itemnumber = $row->{itemnumber}; $sth->finish; if ( $itemnumber ) { -- 1.7.3.2 From colin.campbell at ptfs-europe.com Fri Nov 26 17:31:34 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Fri, 26 Nov 2010 16:31:34 +0000 Subject: [Koha-patches] [PATCH 1/2] Bug 5448 Use Test::More in Boolean.t Message-ID: <1290789095-26834-1-git-send-email-colin.campbell@ptfs-europe.com> Use Test::More's structure as more readable Replaced a test of an used function with a use_ok test of the module --- t/Boolean.t | 103 ++++++++--------------------------------------------------- 1 files changed, 14 insertions(+), 89 deletions(-) diff --git a/t/Boolean.t b/t/Boolean.t index 4e67ee8..fb3b0bf 100755 --- a/t/Boolean.t +++ b/t/Boolean.t @@ -1,96 +1,21 @@ -#!/usr/bin/perl -# use strict; -#use warnings; FIXME - Bug 2505 -use C4::Boolean; - -use vars qw( @tests ); -use vars qw( $loaded ); - -sub f ($) { - my($x) = @_; - my $it; - # Returns either the value returned prefixed with 'OK:', - # or the caught exception (string expected) - local($@); - eval { - $it = 'OK:' . C4::Boolean::true_p($x); - }; - if ($@) { - $it = $@; - $it =~ s/ at \S+ line \d+\.\n//s; - } - return $it; -} - -BEGIN { - @tests = ( - [ - 'control', - sub { C4::Boolean::INVALID_BOOLEAN_STRING_EXCEPTION }, - 'The given value does not seem to be interpretable as a Boolean value', - undef - - # False strings - ], [ - '"0"', \&f, 'OK:0', '0' - ], [ - '"false"', \&f, 'OK:0', 'false' - ], [ - '"off"', \&f, 'OK:0', 'off' - ], [ - '"no"', \&f, 'OK:0', 'no' - - # True strings - ], [ - '"1"', \&f, 'OK:1', '1' - ], [ - '"true"', \&f, 'OK:1', 'true' - ], [ - '"on"', \&f, 'OK:1', 'on' - ], [ - '"yes"', \&f, 'OK:1', 'yes' - ], [ - '"YES"', \&f, 'OK:1', 'YES' # verify case insensitivity - - # Illegal strings - ], [ - 'undef', \&f, 'OK:', undef - ], [ - '"foo"', \&f, 'OK:', 'foo' - ], -); -} - -BEGIN { $| = 1; printf "1..%d\n", scalar(@tests); } -END {print "not ok 1\n" unless $loaded;} -$loaded = 1; - - -# Run all tests in sequence -for (my $i = 1; $i <= scalar @tests; $i += 1) { - my $test = $tests[$i - 1]; - my($title, $f, $expected, $input) = @$test; - die "not ok $i (malformed test case)\n" - unless @$test == 4 && ref $f eq 'CODE'; - - my $output = &$f($input); - if ( - (!defined $output && !defined $expected) - || (defined $output && defined $expected && $output eq $expected) - ) { - print "ok $i - $title\n"; - } else { - print "not ok $i - $title: got ", - (defined $output? "\"$output\"": 'undef'), - ', expected ', - (defined $expected? "\"$expected\"": 'undef'), - "\n"; - } -} +use warnings; +use Test::More tests => 12; +BEGIN { use_ok( 'C4::Boolean', qw( true_p ) ); } +is( true_p('0'), '0', 'recognizes \'0\' as false' ); +is( true_p('false'), '0', 'recognizes \'false\' as false' ); +is( true_p('off'), '0', 'recognizes \'off\' as false' ); +is( true_p('no'), '0', 'recognizes \'no\' as false' ); +is( true_p('1'), '1', 'recognizes \'1\' as true' ); +is( true_p('true'), '1', 'recognizes \'true\' as true' ); +is( true_p('on'), '1', 'recognizes \'on\' as true' ); +is( true_p('yes'), '1', 'recognizes \'yes\' as true' ); +is( true_p('YES'), '1', 'verified case insensitivity' ); +is( true_p(undef), undef, 'recognizes undefined as not boolean' ); +is( true_p('foo'), undef, 'recognizes \'foo\' as not boolean' ); -- 1.7.3.2 From colin.campbell at ptfs-europe.com Fri Nov 26 17:31:35 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Fri, 26 Nov 2010 16:31:35 +0000 Subject: [Koha-patches] [PATCH 2/2] Bug 5448: Refactor Boolean.pm In-Reply-To: <1290789095-26834-1-git-send-email-colin.campbell@ptfs-europe.com> References: <1290789095-26834-1-git-send-email-colin.campbell@ptfs-europe.com> Message-ID: <1290789095-26834-2-git-send-email-colin.campbell@ptfs-europe.com> Remove unnecesssary export Use Exporter according to best practices Use Carp not warn so we know where the error string came from Don't create warnings manipulating undefined input Replace package variables by lexicals --- C4/Boolean.pm | 69 +++++++++++++++++++++----------------------------------- 1 files changed, 26 insertions(+), 43 deletions(-) diff --git a/C4/Boolean.pm b/C4/Boolean.pm index f546464..02c0014 100644 --- a/C4/Boolean.pm +++ b/C4/Boolean.pm @@ -24,26 +24,15 @@ package C4::Boolean; use strict; use warnings; -use POSIX; - -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); - -BEGIN { - # set the version for version checking - $VERSION = 0.02; - require Exporter; - @EXPORT = qw( - &INVALID_BOOLEAN_STRING_EXCEPTION - ); - @EXPORT_OK = qw( - true_p - ); - @ISA = qw(Exporter); -} +use Carp; +use base qw(Exporter); + +our $VERSION = 0.03; +our @EXPORT_OK = qw( true_p); =head1 NAME -C4::Boolean - Convenience functions to handle boolean values +C4::Boolean - Convenience function to handle boolean values in the parameter table =head1 SYNOPSIS @@ -63,25 +52,23 @@ Boolean values in a consistent way which makes common sense. =cut -sub INVALID_BOOLEAN_STRING_EXCEPTION () - { 'The given value does not seem to be interpretable as a Boolean value' } - -use vars qw( %strings ); - -%strings = ( - '0' => 0, '1' => 1, # C - '-1' => 1, # BASIC - 'nil' => 0, 't' => 1, # LISP - 'false' => 0, 'true' => 1, # Pascal - 'off' => 0, 'on' => 1, - 'no' => 0, 'yes' => 1, - 'n' => 0, 'y' => 1, +use constant INVALID_BOOLEAN_STRING_EXCEPTION => + q{The given value does not seem to be interpretable as a Boolean value}; + +our %strings = ( + '0' => 0, '1' => 1, # C + '-1' => 1, # BASIC + 'nil' => 0, 't' => 1, # LISP + 'false' => 0, 'true' => 1, # Pascal + 'off' => 0, 'on' => 1, + 'no' => 0, 'yes' => 1, + 'n' => 0, 'y' => 1, ); =item true_p if ( C4::Boolean::true_p(C4::Context->preference("insecure")) ) { - ... + ... } Tries to interpret the passed string as a Boolean value. Returns @@ -90,27 +77,23 @@ exception is thrown. =cut -sub true_p ($) { - my($x) = @_; +sub true_p { + my $x = shift; my $it; - if (!defined $x || ref($x) ne '') { - warn INVALID_BOOLEAN_STRING_EXCEPTION; + if (!defined $x || ref $x ) { + carp INVALID_BOOLEAN_STRING_EXCEPTION; + return; } - $x = lc($x); + $x = lc $x; $x =~ s/\s//g; if (defined $strings{$x}) { - $it = $strings{$x}; + $it = $strings{$x}; } else { - warn INVALID_BOOLEAN_STRING_EXCEPTION; + carp INVALID_BOOLEAN_STRING_EXCEPTION; } return $it; } - -#--------------------------------- - -END { } # module clean-up code here (global destructor) - 1; __END__ -- 1.7.3.2 From colin.campbell at ptfs-europe.com Fri Nov 26 18:27:13 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Fri, 26 Nov 2010 17:27:13 +0000 Subject: [Koha-patches] [PATCH] Bug 5450 Avoid a name clash in ILSDI modules Message-ID: <1290792433-28233-1-git-send-email-colin.campbell@ptfs-europe.com> C4::ILSDI::Utility exports a subroutine CanBookBeReserved Both ILSDI were also importing a subroutine of that name from C4::Reserves Remove conflict by listing subroutines imported from C4::Reserves explicitly --- C4/ILSDI/Services.pm | 2 +- C4/ILSDI/Utility.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm index c99f2a9..ba0c429 100644 --- a/C4/ILSDI/Services.pm +++ b/C4/ILSDI/Services.pm @@ -26,7 +26,7 @@ use C4::Circulation; use C4::Branch; use C4::Accounts; use C4::Biblio; -use C4::Reserves; +use C4::Reserves qw(AddReserve CancelReserve GetReservesFromBiblionumber GetReservesFromBorrowernumber); use C4::Context; use C4::AuthoritiesMarc; use C4::ILSDI::Utility; diff --git a/C4/ILSDI/Utility.pm b/C4/ILSDI/Utility.pm index 708ba21..8ee1224 100644 --- a/C4/ILSDI/Utility.pm +++ b/C4/ILSDI/Utility.pm @@ -24,7 +24,7 @@ use C4::Members; use C4::Items; use C4::Circulation; use C4::Biblio; -use C4::Reserves; +use C4::Reserves qw(GetReservesFromBorrowernumber); use C4::Context; use C4::Branch qw/GetBranchName/; use Digest::MD5 qw(md5_base64); -- 1.7.3.2 From Katrin.Fischer.83 at web.de Fri Nov 26 21:51:02 2010 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Fri, 26 Nov 2010 21:51:02 +0100 Subject: [Koha-patches] [PATCH] Bug 5104: Add control number as search option to acq z39.50 search Message-ID: <1290804662-31059-1-git-send-email-Katrin.Fischer.83@web.de> Adds control number as search option to z39.50 search in acquisitions. --- acqui/z3950_search.pl | 6 ++++++ .../prog/en/modules/acqui/z3950_search.tmpl | 4 +++- 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl index 182e121..b0a8b92 100755 --- a/acqui/z3950_search.pl +++ b/acqui/z3950_search.pl @@ -57,6 +57,7 @@ my $lccn = $input->param('lccn'); my $lccall = $input->param('lccall'); my $subject= $input->param('subject'); my $dewey = $input->param('dewey'); +my $controlnumber = $input->param('controlnumber'); my $op = $input->param('op'); my $booksellerid = $input->param('booksellerid'); my $basketno = $input->param('basketno'); @@ -118,6 +119,7 @@ if ( $op ne "do_search" ) { lccall => $lccall, title => $title, author => $author, + controlnumber=> $controlnumber, serverloop => $serverloop, opsearch => "search", biblionumber => $biblionumber, @@ -164,6 +166,10 @@ else { $query .= " \@attr 1=16 \@attr 2=3 \@attr 3=1 \@attr 4=1 \@attr 5=1 \@attr 6=1 \"$lccall\" "; $nterms++; } + if ($controlnumber) { + $query .= " \@attr 1=12 \"$controlnumber\" "; + $nterms++; + } for my $i (1..$nterms-1) { $query = "\@and " . $query; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl index 2219dfa..063520c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl @@ -75,7 +75,9 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
      1. " />
      2. " />
      3. -
      +
    • +
    • +
    -- 1.7.1 From Katrin.Fischer.83 at web.de Sun Nov 28 13:40:36 2010 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sun, 28 Nov 2010 13:40:36 +0100 Subject: [Koha-patches] [PATCH] Bug 5430: Follow-up, fixes error message when no 001 exists Message-ID: <1290948036-4322-1-git-send-email-Katrin.Fischer.83@web.de> Please test. --- C4/Biblio.pm | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 4102e23..c3a3094 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1269,8 +1269,12 @@ sub GetMarcControlnumber { # Control number or Record identifier are the same field in MARC21 and UNIMARC # Keep $marcflavour for possible later use if ($marcflavour eq "MARC21" || $marcflavour eq "UNIMARC") { - $controlnumber = $record->field('001')->data(); + my $controlnumberField = $record->field('001'); + if ($controlnumberField) { + $controlnumber = $controlnumberField->data(); + } } + return $controlnumber; } =head2 GetMarcNotes -- 1.7.1 From fridolyn.somers at gmail.com Mon Nov 29 11:03:46 2010 From: fridolyn.somers at gmail.com (Fridolyn SOMERS) Date: Mon, 29 Nov 2010 11:03:46 +0100 Subject: [Koha-patches] Bug 5452 : Overdue date color in borrower's today issues Message-ID: Proposed patch. -- Fridolyn SOMERS ICT engineer PROGILONE - Lyon - France fridolyn.somers at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: od_in_today_issues.patch Type: text/x-patch Size: 1460 bytes Desc: not available URL: From M.de.Rooy at rijksmuseum.nl Mon Nov 29 11:36:40 2010 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 29 Nov 2010 10:36:40 +0000 Subject: [Koha-patches] [PATCH] bug4959 (Language inconsistencies on basket groups; skip confirmation when closing basket) REVISED Message-ID: <809BE39CD64BFD4EB9036172EBCCFA311A4ED2@S-MAIL-1B.rijksmuseum.intra> This patch adds a new pref BasketConfirmations. This adds the option to skip confirmations on closing and reopening a basket. If you skip the confirmation, you do not create a new basket group. The confusing line Create a purchase order (when closing a basket) is replaced by Attach basket to a new basket group with the same name. A warning for a null value on basketgroupid is fixed. --- acqui/basket.pl | 7 +++++-- .../prog/en/modules/acqui/basket.tmpl | 9 ++++----- .../en/modules/admin/preferences/acquisitions.pref | 7 +++++++ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index 005fcb9..330ddbf 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -90,6 +90,9 @@ if (!defined $op) { $op = q{}; } +my $confirm_pref= C4::Context->preference("BasketConfirmations") || '1'; +$template->param( skip_confirm_reopen => 1) if $confirm_pref eq '2'; + if ( $op eq 'delete_confirm' ) { my $basketno = $query->param('basketno'); DelBasket($basketno); @@ -144,7 +147,7 @@ if ( $op eq 'delete_confirm' ) { print GetBasketAsCSV($query->param('basketno')); exit; } elsif ($op eq 'close') { - my $confirm = $query->param('confirm'); + my $confirm = $query->param('confirm') || $confirm_pref eq '2'; if ($confirm) { my $basketno = $query->param('basketno'); my $booksellerid = $query->param('booksellerid'); @@ -197,7 +200,7 @@ if ( $op eq 'delete_confirm' ) { if ($basket->{closedate} && haspermission({ flagsrequired => { acquisition => 'group_manage'} })) { $basketgroups = GetBasketgroups($basket->{booksellerid}); for my $bg ( @{$basketgroups} ) { - if ($basket->{basketgroupid} == $bg->{id}){ + if ($basket->{basketgroupid} && $basket->{basketgroupid} == $bg->{id}){ $bg->{default} = 1; } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl index 9079b6d..3084b48 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl @@ -39,8 +39,8 @@
    @@ -313,7 +312,7 @@

    Are you sure you want to close basket ?

    - +

    " name="basketno" /> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref index 2a900f0..43a7ad5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref @@ -9,6 +9,13 @@ Acquisitions: receiving: receiving an order. cataloguing: cataloging the record. - + - When closing or reopening a basket, + - pref: BasketConfirmations + default: 1 + choices: + 1: always ask for confirmation. + 2: do not ask for confirmation. + - - Display currencies using the following format - pref: CurrencyFormat choices: -- 1.6.0.6 From colin.campbell at ptfs-europe.com Mon Nov 29 11:40:26 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Mon, 29 Nov 2010 10:40:26 +0000 Subject: [Koha-patches] [PATCH] Bug 5453 Do not declare variables in conditionals Message-ID: <1291027226-21654-1-git-send-email-colin.campbell@ptfs-europe.com> Removed occurences in acqui/*.pl --- acqui/basketgroup.pl | 16 ++++++---------- acqui/booksellers.pl | 5 ++++- acqui/histsearch.pl | 14 ++++++++++---- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 69de099..8df6b15 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -301,26 +301,22 @@ if ( $op eq "add" ) { # Build the combobox to select the billing place my @billingplaceloop; for (sort keys %$branches) { - my $selected = 1 if $_ eq $billingplace; - my %row = ( + push @billingplaceloop, { value => $_, - selected => $selected, + selected => $_ eq $billingplace, branchname => $branches->{$_}->{branchname}, - ); - push @billingplaceloop, \%row; + }; } $template->param( billingplaceloop => \@billingplaceloop ); # Build the combobox to select the delivery place my @deliveryplaceloop; for (sort keys %$branches) { - my $selected = 1 if $_ eq $deliveryplace; - my %row = ( + push @deliveryplaceloop, { value => $_, - selected => $selected, + selected => $_ eq $deliveryplace, branchname => $branches->{$_}->{branchname}, - ); - push @deliveryplaceloop, \%row; + }; } $template->param( deliveryplaceloop => \@deliveryplaceloop ); diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index 7641e68..cffc679 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -105,7 +105,10 @@ for ( my $i = 0 ; $i < $count ; $i++ ) { $line{name} = $suppliers[$i]->{'name'}; $line{active} = $suppliers[$i]->{'active'}; my @loop_basket; - my $uid = GetMember(borrowernumber => $loggedinuser)->{userid} if $loggedinuser; + my $uid = q{}; # initialized as haspermission does not check for undef + if ($loggedinuser) { + $uid = GetMember(borrowernumber => $loggedinuser)->{userid}; + } for ( my $i2 = 0 ; $i2 < $ordcount ; $i2++ ) { if ( $orders->[$i2]{'authorisedby'} eq $loggedinuser || haspermission($uid, { flagsrequired => { 'acquisition' => '*' } } ) ) { my %inner_line; diff --git a/acqui/histsearch.pl b/acqui/histsearch.pl index 0190e4a..2c41742 100755 --- a/acqui/histsearch.pl +++ b/acqui/histsearch.pl @@ -75,11 +75,17 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); -my $from_iso = C4::Dates->new($input->param('from'))->output('iso') if $input->param('from'); -my $to_iso = C4::Dates->new($input->param('to'))->output('iso') if $input->param('iso'); +my ( $from_iso, $to_iso, $d ); +if ( $d = $input->param('from') ) { + $from_iso = C4::Dates->new($d)->output('iso'); +} +if ( $d = $input->param('iso') ) { + $to_iso = C4::Dates->new($d)->output('iso'); +} + my ( $order_loop, $total_qty, $total_price, $total_qtyreceived ) = - &GetHistory( $title, $author, $name, $from_iso, $to_iso ); - + GetHistory( $title, $author, $name, $from_iso, $to_iso ); + $template->param( suggestions_loop => $order_loop, total_qty => $total_qty, -- 1.7.3.2 From tajoli at cile.it Mon Nov 29 12:17:54 2010 From: tajoli at cile.it (Zeno Tajoli) Date: Mon, 29 Nov 2010 12:17:54 +0100 Subject: [Koha-patches] [PATCH] Analytical record: Insert UNIMARC support in API e cgi, I set the variable $marcflavour or used C4::Context->preference('marcflavour') Message-ID: <1291029474-6403-1-git-send-email-tajoli@cile.it> From: Zeno Tajoli --- C4/Biblio.pm | 40 ++++++++++++++++++++++++++-------------- C4/Items.pm | 34 +++++++++++++++++++++++++--------- C4/Search.pm | 24 +++++++++++++++++++++++- cataloguing/addbiblio.pl | 3 ++- cataloguing/additem.pl | 17 ++++++++++++++--- cataloguing/linkitem.pl | 8 ++++++-- opac/opac-detail.pl | 28 ++++++++++++++++++++++------ 7 files changed, 118 insertions(+), 36 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index eb6ea42..692f1a8 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1572,13 +1572,13 @@ sub GetMarcHosts { $title_subf = "a"; $bibnumber_subf ="w"; $itemnumber_subf='o'; - } - elsif ($marcflavour eq "UNIMARC") { + }; + if ($marcflavour eq "UNIMARC") { $tag = "461"; $title_subf = "t"; $bibnumber_subf ="0"; $itemnumber_subf='9'; - } + }; my @marchosts; @@ -1666,23 +1666,35 @@ sub TransformKohaToMarc { =head2 PrepHostMarcField - $hostfield = PrepHostMarcField ( $hostbiblionumber ) + $hostfield = PrepHostMarcField ( $hostbiblionumber,$hostitemnumber,$marcflavour ) This function returns a host field populated with data from the host record, the field can then be added to an analytical record =cut sub PrepHostMarcField { - my ($hostbiblionumber,$hostitemnumber) = @_; - my $hostrecord = GetMarcBiblio($hostbiblionumber); - - my $hostmarcfield = MARC::Field->new( - 773, '', '', - 'w' => $hostbiblionumber, - 'o' => $hostitemnumber, - 'a' => $hostrecord->subfield('245','a'), - 'x' => $hostrecord->subfield('245','x') - ); + my ($hostbiblionumber,$hostitemnumber, $marcflavour) = @_; + $marcflavour ||="MARC21"; + + my $hostrecord = GetMarcBiblio($hostbiblionumber); + + if ( $marcflavour eq "MARC21" ) { + my $hostmarcfield = MARC::Field->new( + 773, '', '', + 'w' => $hostbiblionumber, + 'o' => $hostitemnumber, + 'a' => $hostrecord->subfield('245','a'), + 'x' => $hostrecord->subfield('245','x') + ); + }; + if ($marcflavour eq "UNIMARC") { + my $hostmarcfield = MARC::Field->new( + 461, '', '', + '0' => $hostbiblionumber, + 't' => $hostrecord->subfield('200','a'), + '9' => $hostitemnumber + ); + }; return $hostmarcfield; } diff --git a/C4/Items.pm b/C4/Items.pm index 1f82db1..ac3c9ec 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1323,7 +1323,6 @@ sub GetItemsInfo { =head2 GetHostItemsInfo $hostiteminfo = GetHostItemsInfo($hostfield); - Returns the iteminfo for items linked to records via a host field =cut @@ -1332,8 +1331,8 @@ sub GetHostItemsInfo { my ($record) = @_; my @returnitemsInfo; - #MARC21 mapping, UNIMARC to be added - foreach my $hostfield ( $record->field('773') ) { + if ( C4::Context->preference('marcflavour') eq 'MARC21'){ + foreach my $hostfield ( $record->field('773') ) { my $hostbiblionumber = $hostfield->subfield("w"); my $linkeditemnumber = $hostfield->subfield("o"); my @hostitemInfos = GetItemsInfo($hostbiblionumber); @@ -1343,6 +1342,20 @@ sub GetHostItemsInfo { last; } } + } + } + if ( C4::Context->preference('marcflavour') eq 'UNIMARC'){ + foreach my $hostfield ( $record->field('461') ) { + my $hostbiblionumber = $hostfield->subfield("0"); + my $linkeditemnumber = $hostfield->subfield("9"); + my @hostitemInfos = GetItemsInfo($hostbiblionumber); + foreach my $hostitemInfo (@hostitemInfos){ + if ($hostitemInfo->{itemnumber} eq $linkeditemnumber){ + push (@returnitemsInfo,$hostitemInfo); + last; + } + } + } } return @returnitemsInfo; } @@ -1449,12 +1462,15 @@ references on array of itemnumbers. sub get_hostitemnumbers_of { my ($biblionumber) = @_; my $marcrecord = GetMarcBiblio($biblionumber); - my @returnhostitemnumbers; - - #MARC21 mapping, UNIMARC to be added - foreach my $hostfield ( $marcrecord->field('773') ) { - my $hostbiblionumber = $hostfield->subfield("w"); - my $linkeditemnumber = $hostfield->subfield("o"); + my (@returnhostitemnumbers,$tag, $biblio_s, $item_s); + + my $marcflavor = C4::Context->preference('marcflavour'); + if ($marcflavor eq 'MARC21'){$tag='773';$biblio_s='w';$item_s='o'}; + if ($marcflavor eq 'UNIMARC'){$tag='461';$biblio_s='0';$item_s='9'}; + + foreach my $hostfield ( $marcrecord->field($tag) ) { + my $hostbiblionumber = $hostfield->subfield($biblio_s); + my $linkeditemnumber = $hostfield->subfield($item_s); my @itemnumbers; if (my $itemnumbers = get_itemnumbers_of($hostbiblionumber)->{$hostbiblionumber}) { diff --git a/C4/Search.pm b/C4/Search.pm index 7795b6f..74ae142 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1502,7 +1502,8 @@ sub searchResults { my @fields = $marcrecord->field($itemtag); # adding linked items that belong to host records - foreach my $hostfield ( $marcrecord->field('773')) { + if ($marcflavor eq 'MARC21'){ + foreach my $hostfield ( $marcrecord->field('773')) { my $hostbiblionumber = $hostfield->subfield("w"); my $linkeditemnumber = $hostfield->subfield("o"); if(!$hostbiblionumber eq undef){ @@ -1519,6 +1520,27 @@ sub searchResults { } } } + } + } + if ($marcflavor eq 'UNIMARC'){ + foreach my $hostfield ( $marcrecord->field('461')) { + my $hostbiblionumber = $hostfield->subfield("0"); + my $linkeditemnumber = $hostfield->subfield("9"); + if(!$hostbiblionumber eq undef){ + my $hostbiblio = GetMarcBiblio($hostbiblionumber); + if(!$hostbiblio eq undef){ + my @hostitems = $hostbiblio->field('995'); + foreach my $hostitem (@hostitems){ + if ($hostitem->subfield("9") eq $linkeditemnumber){ + my $linkeditem =$hostitem; + # append linked items if they exist + if (!$linkeditem eq undef){ + push (@fields, $linkeditem);} + } + } + } + } + } } # Setting item statuses for display diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 79b8d17..0bbd237 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -894,8 +894,9 @@ if ($breedingid) { } #populate hostfield if hostbiblionumber is available if ($hostbiblionumber){ + my $marcflavour = C4::Context->preference("marcflavour"); $record=MARC::Record->new(); - my $field = PrepHostMarcField($hostbiblionumber, $hostitemnumber); + my $field = PrepHostMarcField($hostbiblionumber, $hostitemnumber,$marcflavour); $record->append_fields($field); } diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 32c7a4f..869e612 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -97,6 +97,7 @@ my $biblionumber = $input->param('biblionumber'); my $itemnumber = $input->param('itemnumber'); my $op = $input->param('op'); my $hostitemnumber = $input->param('hostitemnumber'); +my $marcflavour = C4::Context->preference("marcflavour"); my $frameworkcode = &GetFrameworkCode($biblionumber); @@ -302,12 +303,22 @@ if ($op eq "additem") { } $nextop="additem"; } elsif ($op eq "delinkitem"){ - foreach my $field ($record->field('773')){ + if ($marcflavour eq 'MARC21'){ + foreach my $field ($record->field('773')){ if ($field->subfield('o') eq $hostitemnumber){ $record->delete_field($field); last; } + } } + if ($marcflavour eq 'UNIMARC'){ + foreach my $field ($record->field('461')){ + if ($field->subfield('9') eq $hostitemnumber){ + $record->delete_field($field); + last; + } + } + } my $modbibresult = ModBiblio($record, $biblionumber,''); } @@ -585,9 +596,9 @@ foreach my $tag (sort keys %{$tagslib}) { $subfield_data{marc_value} = qq(); } elsif ( length($value) > 100 - or (C4::Context->preference("marcflavour") eq "UNIMARC" and + or ($marcflavour eq "UNIMARC" and 300 <= $tag && $tag < 400 && $subfield eq 'a' ) - or (C4::Context->preference("marcflavour") eq "MARC21" and + or ($marcflavour eq "MARC21" and 500 <= $tag && $tag < 600 ) ) { # oversize field (textarea) diff --git a/cataloguing/linkitem.pl b/cataloguing/linkitem.pl index d4959ad..33a8397 100755 --- a/cataloguing/linkitem.pl +++ b/cataloguing/linkitem.pl @@ -45,7 +45,11 @@ my ($template, $loggedinuser, $cookie) }); my $biblio = GetMarcBiblio($biblionumber); -$template->param(bibliotitle => $biblio->subfield('245','a')); +my $marcflavour = C4::Context->preference("marcflavour"); +$marcflavour ||="MARC21"; +if ($marcflavour eq 'MARC21'){$template->param(bibliotitle => $biblio->subfield('245','a'))}; +if ($marcflavour eq 'UNIMARC'){$template->param(bibliotitle => $biblio->subfield('200','a'))}; + $template->param(biblionumber => $biblionumber); if ($barcode && $biblionumber) { @@ -57,7 +61,7 @@ if ($barcode && $biblionumber) { my $hostbiblionumber = GetBiblionumberFromItemnumber($hostitemnumber); if ($hostbiblionumber) { - my $field = PrepHostMarcField($hostbiblionumber, $hostitemnumber); + my $field = PrepHostMarcField($hostbiblionumber, $hostitemnumber,$marcflavour); $biblio->append_fields($field); my $modresult = ModBiblio($biblio, $biblionumber, ''); diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 0487783..48ec720 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -80,16 +80,33 @@ $template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowChec my @all_items = &GetItemsInfo( $biblionumber, 'opac' ); # adding items linked via host biblios - foreach my $hostfield ( $record->field('773')) { +my $marcflavour = C4::Context->preference("marcflavour"); + + +if ($marcflavour eq 'MARC21'){ + foreach my $hostfield ( $record->field('773')) { my $hostbiblionumber = $hostfield->subfield("w"); my $linkeditemnumber = $hostfield->subfield("o"); my @hostitemInfos = GetItemsInfo($hostbiblionumber); foreach my $hostitemInfo (@hostitemInfos){ - if ($hostitemInfo->{itemnumber} eq $linkeditemnumber){ - push(@all_items, $hostitemInfo); - } - } + if ($hostitemInfo->{itemnumber} eq $linkeditemnumber){ + push(@all_items, $hostitemInfo); + } + } } +} +if ($marcflavour eq 'UNIMARC'){ + foreach my $hostfield ( $record->field('461')) { + my $hostbiblionumber = $hostfield->subfield("0"); + my $linkeditemnumber = $hostfield->subfield("9"); + my @hostitemInfos = GetItemsInfo($hostbiblionumber); + foreach my $hostitemInfo (@hostitemInfos){ + if ($hostitemInfo->{itemnumber} eq $linkeditemnumber){ + push(@all_items, $hostitemInfo); + } + } + } +} my @items; @items = @all_items unless C4::Context->preference('hidelostitems'); @@ -209,7 +226,6 @@ for my $itm (@items) { ## get notes and subjects from MARC record my $dbh = C4::Context->dbh; -my $marcflavour = C4::Context->preference("marcflavour"); my $marcnotesarray = GetMarcNotes ($record,$marcflavour); my $marcauthorsarray = GetMarcAuthors ($record,$marcflavour); my $marcsubjctsarray = GetMarcSubjects($record,$marcflavour); -- 1.6.0.4 From M.de.Rooy at rijksmuseum.nl Mon Nov 29 13:46:55 2010 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 29 Nov 2010 12:46:55 +0000 Subject: [Koha-patches] [PATCH] bug5455 (Fix uninitialized-warnings on authorities.pl) Message-ID: <809BE39CD64BFD4EB9036172EBCCFA311A4F4E@S-MAIL-1B.rijksmuseum.intra> Fix warnings for uninitialized authtypecode on lines 646, 653. --- authorities/authorities.pl | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 9429a58..d4f1601 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -545,7 +545,9 @@ my $linkid=$input->param('linkid'); my $authtypecode = $input->param('authtypecode'); my $dbh = C4::Context->dbh; -$authtypecode = &GetAuthTypeCode($authid) if !$authtypecode; +if(!$authtypecode) { + $authtypecode = $authid? &GetAuthTypeCode($authid): ''; +} my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "authorities/authorities.tmpl", -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Mon Nov 29 15:34:45 2010 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 29 Nov 2010 14:34:45 +0000 Subject: [Koha-patches] [PATCH] Bug 4839 (System pref for MARC field 008 authorities; additional logic for position 14) REVISED Message-ID: <809BE39CD64BFD4EB9036172EBCCFA311A4F8B@S-MAIL-1B.rijksmuseum.intra> Currently, the default for this MARC control field is hardcoded in the plugin code of marc21_field_008_authorities.pl (two occurrences). This patch moves it into a new syspref. If this pref should not exist, the old hardcoded value is used. Authorities preference file is updated too. A warning is generated if the length of the field is not correct. Furthermore, the default for position 14 (heading use: main or added entry) should be dependent on the authority type. For CHRON_TERM, GENRE/FORM and TOPIC_TERM, it should be b (not appropriate) instead of a (appropriate). --- .../value_builder/marc21_field_008_authorities.pl | 34 +++++++++++++++++--- .../en/modules/admin/preferences/authorities.pref | 6 +++ 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/cataloguing/value_builder/marc21_field_008_authorities.pl b/cataloguing/value_builder/marc21_field_008_authorities.pl index b887806..d2ac1f6 100755 --- a/cataloguing/value_builder/marc21_field_008_authorities.pl +++ b/cataloguing/value_builder/marc21_field_008_authorities.pl @@ -27,6 +27,9 @@ use C4::Context; use C4::Search; use C4::Output; +use constant FIXLEN_DATA_ELTS => '|| aca||aabn | a|a d'; +use constant PREF_008 => 'MARCAuthorityControlField008'; + =head1 DESCRIPTION plugin_parameters : other parameters added when the plugin is called by the dopop function @@ -38,6 +41,8 @@ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $year +=1900; $mon +=1; my $dateentered = substr($year,2,2).sprintf ("%0.2d", $mon).sprintf ("%0.2d",$mday); +my $defaultval = Field008(); + sub plugin_parameters { my ($dbh,$record,$tagslib,$i,$tabloop) = @_; return ""; @@ -52,7 +57,12 @@ sub plugin_javascript { function Focus$function_name(subfield_managed) { if (!document.getElementById(\"$field_number\").value) { - document.getElementById(\"$field_number\").value='$dateentered' + '|| aca||aabn | a|a d'; + var authtype=document.forms['f'].elements['authtypecode'].value; + var fieldval='$dateentered$defaultval'; + if(authtype && (authtype == 'TOPIC_TERM' || authtype == 'GENRE/FORM' || authtype == 'CHRON_TERM')) { + fieldval= fieldval.substr(0,14)+'b'+fieldval.substr(15); + } + document.getElementById(\"$field_number\").value=fieldval; } return 1; } @@ -62,8 +72,9 @@ function Blur$function_name(subfield_managed) { } function Clic$function_name(i) { + var authtype=document.forms['f'].elements['authtypecode'].value; defaultvalue=document.getElementById(\"$field_number\").value; - newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_field_008_authorities.pl&index=$field_number&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes'); + newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_field_008_authorities.pl&index=$field_number&result=\"+defaultvalue+\"&authtypecode=\"+authtype,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes'); } //]]> @@ -76,7 +87,8 @@ sub plugin { my ($input) = @_; my $index= $input->param('index'); my $result= $input->param('result'); - + my $authtype= $input->param('authtypecode')||''; + substr($defaultval,14-6,1)='b' if $authtype=~ /TOPIC_TERM|GENRE.FORM|CHRON_TERM/; my $dbh = C4::Context->dbh; @@ -88,7 +100,7 @@ sub plugin { flagsrequired => {editcatalogue => '*'}, debug => 1, }); - $result = "$dateentered".'|| aca||aabn | a|a d' unless $result; + $result = "$dateentered$defaultval" unless $result; my $f1 = substr($result,0,6); my $f6 = substr($result,6,1); my $f7 = substr($result,7,1); @@ -105,7 +117,7 @@ sub plugin { my $f28 = substr($result,28,1); my $f29 = substr($result,29,1); my $f31 = substr($result,31,1); - my $f32 = substr($result,32,2); + my $f32 = substr($result,32,1); my $f33 = substr($result,33,1); my $f38 = substr($result,38,1); my $f39 = substr($result,39,1); @@ -158,4 +170,16 @@ if ((!$f1) ||($f1 =~ m/ /)){ output_html_with_http_headers $input, $cookie, $template->output; } +sub Field008 { + my $pref= C4::Context->preference(PREF_008); + if(!$pref) { + return FIXLEN_DATA_ELTS; + } + elsif(length($pref)<34) { + warn "marc21_field_008_authorities.pl: Syspref ".PREF_008." should be 34 characters long "; + return FIXLEN_DATA_ELTS; + } + return substr($pref,0,34); #ignore remainder +} + 1; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref index f06d983..6752fb5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref @@ -14,3 +14,9 @@ Authorities: yes: "Don't" no: Do - automatically update attached biblios when changing an authority record. If this is off, please ask your administrator to enable the merge_authorities.pl cronjob. + - + - Use the following text for the contents of MARC authority control field 008 position 06-39 (fixed length data elements). Do NOT include the date (position 00-05). + - pref: MARCAuthorityControlField008 + default: "|| aca||aabn | a|a d" + type: textarea + class: code -- 1.6.0.6 From colin.campbell at ptfs-europe.com Mon Nov 29 18:58:23 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Mon, 29 Nov 2010 17:58:23 +0000 Subject: [Koha-patches] [PATCH 1/6] Bug 5453: Move declarations out of conditionals Message-ID: <1291053508-23600-1-git-send-email-colin.campbell@ptfs-europe.com> Patch admin/*.pl scripts --- admin/aqbudgets.pl | 6 +++++- admin/aqcontract.pl | 32 ++++++++++++++++++++++---------- admin/auth_tag_structure.pl | 17 ++++++++--------- admin/branches.pl | 8 +++----- admin/smart-rules.pl | 13 ++++++------- 5 files changed, 44 insertions(+), 32 deletions(-) diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl index d266727..6f66773 100755 --- a/admin/aqbudgets.pl +++ b/admin/aqbudgets.pl @@ -325,7 +325,11 @@ if ($op eq 'add_form') { ); } - my $budget_period_total = $num->format_price($$period{budget_period_total}) if $$period{budget_period_total}; + my $budget_period_total; + if ( $period->{budget_period_total} ) { + $budget_period_total = + $num->format_price( $period->{budget_period_total} ); + } $template->param( else => 1, budget => \@loop, diff --git a/admin/aqcontract.pl b/admin/aqcontract.pl index 07fb757..7126c99 100755 --- a/admin/aqcontract.pl +++ b/admin/aqcontract.pl @@ -59,17 +59,29 @@ $template->param( if ( $op eq 'add_form' ) { $template->param( add_form => 1 ); - # if contractnumber exists, it's a modify action, so read values to modify... - my $contract = @{GetContract( { contractnumber => $contractnumber } )}[0] if $contractnumber; - - $template->param( - contractnumber => $$contract{contractnumber}, - contractname => $$contract{contractname}, - contractdescription => $$contract{contractdescription}, - contractstartdate => format_date( $$contract{contractstartdate} ), - contractenddate => format_date( $$contract{contractenddate} ), - DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar, - ); + # if contractnumber exists, it's a modify action, so read values to modify... + if ($contractnumber) { + my $contract = + @{ GetContract( { contractnumber => $contractnumber } ) }[0]; + + $template->param( + contractnumber => $contract->{contractnumber}, + contractname => $contract->{contractname}, + contractdescription => $contract->{contractdescription}, + contractstartdate => format_date( $contract->{contractstartdate} ), + contractenddate => format_date( $contract->{contractenddate} ), + DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar, + ); + } else { + $template->param( + contractnumber => undef, + contractname => undef, + contractdescription => undef, + contractstartdate => undef, + contractenddate => undef, + DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar, + ); + } # END $OP eq ADD_FORM } diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl index 6314c0a..fd7c1b9 100755 --- a/admin/auth_tag_structure.pl +++ b/admin/auth_tag_structure.pl @@ -55,15 +55,14 @@ my ($template, $loggedinuser, $cookie) }); # get authtype list -my $authtypes = getauthtypes; -my @authtypesloop; -foreach my $thisauthtype (keys %$authtypes) { - my $selected = 1 if $thisauthtype eq $authtypecode; - my %row =(value => $thisauthtype, - selected => $selected, - authtypetext => $authtypes->{$thisauthtype}->{'authtypetext'}, - ); - push @authtypesloop, \%row; +my $authtypes = getauthtypes; +my @authtypesloop = (); +foreach my $thisauthtype ( keys %{$authtypes} ) { + push @authtypesloop, + { value => $thisauthtype, + selected => $thisauthtype eq $authtypecode, + authtypetext => $authtypes->{$thisauthtype}->{'authtypetext'}, + }; } my $sth; diff --git a/admin/branches.pl b/admin/branches.pl index 758fa32..a97a91b 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -189,12 +189,10 @@ elsif ( $op eq 'addcategory_validate' ) { elsif ( $op eq 'delete_category' ) { # if the user has pressed the "delete branch" button. - my $message = "MESSAGE8" if CheckBranchCategorycode($categorycode); - if ($message) { + if ( CheckBranchCategorycode($categorycode) ) { $template->param( else => 1 ); - default($message,$template); - } - else { + default( 'MESSAGE8', $template ); + } else { $template->param( delete_category => 1 ); $template->param( categorycode => $categorycode ); } diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index fdd9b91..95f958e 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -335,12 +335,11 @@ elsif ($op eq "add-branch-item") { my $branches = GetBranches(); my @branchloop; for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { - my $selected = 1 if $thisbranch eq $branch; - my %row =(value => $thisbranch, - selected => $selected, - branchname => $branches->{$thisbranch}->{'branchname'}, - ); - push @branchloop, \%row; + push @branchloop, { + value => $thisbranch, + selected => $thisbranch eq $branch, + branchname => $branches->{$thisbranch}->{'branchname'}, + }; } my $sth=$dbh->prepare("SELECT description,categorycode FROM categories ORDER BY description"); @@ -413,7 +412,7 @@ foreach my $entry (@sorted_branch_cat_rules, @sorted_row_loop) { $entry->{unlimited_maxissueqty} = 1 unless defined($entry->{maxissueqty}); } -my @sorted_row_loop = sort by_category_and_itemtype @row_loop; + at sorted_row_loop = sort by_category_and_itemtype @row_loop; my $sth_branch_item; if ($branch eq "*") { -- 1.7.3.2 From colin.campbell at ptfs-europe.com Mon Nov 29 18:58:24 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Mon, 29 Nov 2010 17:58:24 +0000 Subject: [Koha-patches] [PATCH 2/6] Bug 5453: Move declarations from within conditionals in catalogue/search.pl In-Reply-To: <1291053508-23600-1-git-send-email-colin.campbell@ptfs-europe.com> References: <1291053508-23600-1-git-send-email-colin.campbell@ptfs-europe.com> Message-ID: <1291053508-23600-2-git-send-email-colin.campbell@ptfs-europe.com> --- catalogue/search.pl | 44 ++++++++++++++++++++++++++++++++------------ 1 files changed, 32 insertions(+), 12 deletions(-) diff --git a/catalogue/search.pl b/catalogue/search.pl index ac2209a..1c9024c 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -273,9 +273,13 @@ if ( $template_type eq 'advsearch' ) { $template->param(outer_sup_servers_loop => $secondary_servers_loop,); # set the default sorting - my $default_sort_by = C4::Context->preference('defaultSortField')."_".C4::Context->preference('defaultSortOrder') - if (C4::Context->preference('OPACdefaultSortField') && C4::Context->preference('OPACdefaultSortOrder')); - $template->param($default_sort_by => 1); + if ( C4::Context->preference('OPACdefaultSortField') + && C4::Context->preference('OPACdefaultSortOrder') ) { + my $default_sort_by = + C4::Context->preference('defaultSortField') . '_' + . C4::Context->preference('defaultSortOrder'); + $template->param( $default_sort_by => 1 ); + } # determine what to display next to the search boxes (ie, boolean option # shouldn't appear on the first one, scan indexes should, adding a new @@ -338,8 +342,13 @@ my $params = $cgi->Vars; # sort by is used to sort the query # in theory can have more than one but generally there's just one my @sort_by; -my $default_sort_by = C4::Context->preference('defaultSortField')."_".C4::Context->preference('defaultSortOrder') - if (C4::Context->preference('defaultSortField') && C4::Context->preference('defaultSortOrder')); +my $default_sort_by; +if ( C4::Context->preference('defaultSortField') + && C4::Context->preference('defaultSortOrder') ) { + $default_sort_by = + C4::Context->preference('defaultSortField') . '_' + . C4::Context->preference('defaultSortOrder'); +} @sort_by = split("\0",$params->{'sort_by'}) if $params->{'sort_by'}; $sort_by[0] = $default_sort_by unless $sort_by[0]; @@ -561,7 +570,10 @@ for (my $i=0;$i<@servers;$i++) { # default page number my $current_page_number = 1; $current_page_number = ($offset / $results_per_page + 1) if $offset; - my $previous_page_offset = $offset - $results_per_page unless ($offset - $results_per_page <0); + my $previous_page_offset; + if ( $offset >= $results_per_page ) { + $previous_page_offset = $offset - $results_per_page; + } my $next_page_offset = $offset + $results_per_page; # If we're within the first 10 pages, keep it simple #warn "current page:".$current_page_number; @@ -575,10 +587,14 @@ for (my $i=0;$i<@servers;$i++) { my $this_offset = (($i*$results_per_page)-$results_per_page); # the page number for this page my $this_page_number = $i; - # it should only be highlighted if it's the current page - my $highlight = 1 if ($this_page_number == $current_page_number); # put it in the array - push @page_numbers, { offset => $this_offset, pg => $this_page_number, highlight => $highlight, sort_by => join " ", at sort_by }; + push @page_numbers, + { offset => $this_offset, + pg => $this_page_number, + # it should only be highlighted if it's the current page + highlight => $this_page_number == $current_page_number, + sort_by => join ' ', @sort_by + }; } @@ -589,9 +605,13 @@ for (my $i=0;$i<@servers;$i++) { for (my $i=$current_page_number; $i<=($current_page_number + 20 );$i++) { my $this_offset = ((($i-9)*$results_per_page)-$results_per_page); my $this_page_number = $i-9; - my $highlight = 1 if ($this_page_number == $current_page_number); - if ($this_page_number <= $pages) { - push @page_numbers, { offset => $this_offset, pg => $this_page_number, highlight => $highlight, sort_by => join " ", at sort_by }; + if ( $this_page_number <= $pages ) { + push @page_numbers, + { offset => $this_offset, + pg => $this_page_number, + highlight => $this_page_number == $current_page_number, + sort_by => join ' ', @sort_by + }; } } } -- 1.7.3.2 From colin.campbell at ptfs-europe.com Mon Nov 29 18:58:25 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Mon, 29 Nov 2010 17:58:25 +0000 Subject: [Koha-patches] [PATCH 3/6] Bug 5453 Move declarations out of conditionals In-Reply-To: <1291053508-23600-1-git-send-email-colin.campbell@ptfs-europe.com> References: <1291053508-23600-1-git-send-email-colin.campbell@ptfs-europe.com> Message-ID: <1291053508-23600-3-git-send-email-colin.campbell@ptfs-europe.com> Fix im members scripts --- members/mancredit.pl | 7 +++++-- members/maninvoice.pl | 7 +++++-- members/memberentry.pl | 38 +++++++++++++++++++++----------------- 3 files changed, 31 insertions(+), 21 deletions(-) diff --git a/members/mancredit.pl b/members/mancredit.pl index 51b71d6..42f8274 100755 --- a/members/mancredit.pl +++ b/members/mancredit.pl @@ -42,8 +42,11 @@ my $data=GetMember('borrowernumber' => $borrowernumber); my $add=$input->param('add'); if ($add){ - my $barcode=$input->param('barcode'); - my $itemnum = GetItemnumberFromBarcode($barcode) if $barcode; + my $barcode = $input->param('barcode'); + my $itemnum; + if ($barcode) { + $itemnum = GetItemnumberFromBarcode($barcode); + } my $desc=$input->param('desc'); my $amount=$input->param('amount') || 0; $amount = -$amount; diff --git a/members/maninvoice.pl b/members/maninvoice.pl index df12a2a..49b8611 100755 --- a/members/maninvoice.pl +++ b/members/maninvoice.pl @@ -42,8 +42,11 @@ my $data=GetMember('borrowernumber'=>$borrowernumber); my $add=$input->param('add'); if ($add){ # print $input->header; - my $barcode=$input->param('barcode'); - my $itemnum = GetItemnumberFromBarcode($barcode) if $barcode; + my $barcode = $input->param('barcode'); + my $itemnum; + if ($barcode) { + $itemnum = GetItemnumberFromBarcode($barcode); + } my $desc=$input->param('desc'); my $amount=$input->param('amount'); my $type=$input->param('type'); diff --git a/members/memberentry.pl b/members/memberentry.pl index fbd8538..dd4c069 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -177,24 +177,28 @@ if ($op eq 'insert' || $op eq 'modify' || $op eq 'save') { } #############test for member being unique ############# -if (($op eq 'insert') and !$nodouble){ - my $category_type_send=$category_type if ($category_type eq 'I'); - my $check_category; # recover the category code of the doublon suspect borrowers - # ($result,$categorycode) = checkuniquemember($collectivity,$surname,$firstname,$dateofbirth) - ($check_member,$check_category) = checkuniquemember( - $category_type_send, - ($newdata{surname} ? $newdata{surname} : $data{surname} ), - ($newdata{firstname} ? $newdata{firstname} : $data{firstname} ), - ($newdata{dateofbirth} ? $newdata{dateofbirth} : $data{dateofbirth}) - ); - if(!$check_member){ - $nodouble = 1; - } - # recover the category type if the borrowers is a doublon +if ( ( $op eq 'insert' ) and !$nodouble ) { + my $category_type_send; + if ( $category_type eq 'I' ) { + $category_type_send = $category_type; + } + my $check_category; # recover the category code of the doublon suspect borrowers + # ($result,$categorycode) = checkuniquemember($collectivity,$surname,$firstname,$dateofbirth) + ( $check_member, $check_category ) = checkuniquemember( + $category_type_send, + ( $newdata{surname} ? $newdata{surname} : $data{surname} ), + ( $newdata{firstname} ? $newdata{firstname} : $data{firstname} ), + ( $newdata{dateofbirth} ? $newdata{dateofbirth} : $data{dateofbirth} ) + ); + if ( !$check_member ) { + $nodouble = 1; + } + + # recover the category type if the borrowers is a doublon if ($check_category) { - my $tmpborrowercategory=GetBorrowercategory($check_category); - $check_categorytype=$tmpborrowercategory->{'category_type'}; - } + my $tmpborrowercategory = GetBorrowercategory($check_category); + $check_categorytype = $tmpborrowercategory->{'category_type'}; + } } #recover all data from guarantor address phone ,fax... -- 1.7.3.2 From colin.campbell at ptfs-europe.com Mon Nov 29 18:58:26 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Mon, 29 Nov 2010 17:58:26 +0000 Subject: [Koha-patches] [PATCH 4/6] Bug 5453 Move declarations out of conditionals in opac In-Reply-To: <1291053508-23600-1-git-send-email-colin.campbell@ptfs-europe.com> References: <1291053508-23600-1-git-send-email-colin.campbell@ptfs-europe.com> Message-ID: <1291053508-23600-4-git-send-email-colin.campbell@ptfs-europe.com> --- opac/opac-ISBDdetail.pl | 5 +++- opac/opac-authorities-home.pl | 26 +++++++++++--------- opac/opac-authoritiesdetail.pl | 16 +++++------- opac/opac-detail.pl | 17 +++++++++----- opac/opac-search.pl | 49 ++++++++++++++++++++++++++++----------- opac/opac-topissues.pl | 17 ++++++++----- opac/opac-user.pl | 14 +++++++---- 7 files changed, 90 insertions(+), 54 deletions(-) diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl index 88904da..aea48ff 100755 --- a/opac/opac-ISBDdetail.pl +++ b/opac/opac-ISBDdetail.pl @@ -84,7 +84,10 @@ my $upc = GetNormalizedUPC($record,$marcflavour); my $ean = GetNormalizedEAN($record,$marcflavour); my $oclc = GetNormalizedOCLCNumber($record,$marcflavour); my $isbn = GetNormalizedISBN(undef,$record,$marcflavour); -my $content_identifier_exists = 1 if ($isbn or $ean or $oclc or $upc); +my $content_identifier_exists; +if ( $isbn or $ean or $oclc or $upc ) { + $content_identifier_exists = 1; +} $template->param( normalized_upc => $upc, normalized_ean => $ean, diff --git a/opac/opac-authorities-home.pl b/opac/opac-authorities-home.pl index 104dff2..45d18b4 100755 --- a/opac/opac-authorities-home.pl +++ b/opac/opac-authorities-home.pl @@ -41,18 +41,20 @@ $startfrom = 0 if ( !defined $startfrom ); my ( $template, $loggedinuser, $cookie ); my $resultsperpage; -my $authtypes = getauthtypes; -my @authtypesloop; -foreach my $thisauthtype ( sort { $authtypes->{$a}{'authtypetext'} cmp $authtypes->{$b}{'authtypetext'} } - keys %$authtypes ) -{ - my $selected = 1 if $thisauthtype eq $authtypecode; - my %row = ( - value => $thisauthtype, - selected => $selected, - authtypetext => $authtypes->{$thisauthtype}{'authtypetext'}, - ); - push @authtypesloop, \%row; +my $authtypes = getauthtypes(); +my @authtypesloop = (); +foreach my $thisauthtype ( + sort { + $authtypes->{$a}->{'authtypetext'} + cmp $authtypes->{$b}->{'authtypetext'} + } + keys %{$authtypes} + ) { + push @authtypesloop, + { value => $thisauthtype, + selected => $thisauthtype eq $authtypecode, + authtypetext => $authtypes->{$thisauthtype}->{'authtypetext'}, + }; } if ( $op eq "do_search" ) { diff --git a/opac/opac-authoritiesdetail.pl b/opac/opac-authoritiesdetail.pl index 71f746e..ead3e75 100755 --- a/opac/opac-authoritiesdetail.pl +++ b/opac/opac-authoritiesdetail.pl @@ -165,16 +165,14 @@ foreach my $field (@fields) { } $template->param( "0XX" => \@loop_data ); -my $authtypes = getauthtypes; -my @authtypesloop; -foreach my $thisauthtype ( keys %$authtypes ) { - my $selected = 1 if $thisauthtype eq $authtypecode; - my %row = ( - value => $thisauthtype, - selected => $selected, +my $authtypes = getauthtypes(); +my @authtypesloop = (); +foreach my $thisauthtype ( keys %{$authtypes} ) { + push @authtypesloop, + { value => $thisauthtype, + selected => $thisauthtype eq $authtypecode, authtypetext => $authtypes->{$thisauthtype}{'authtypetext'}, - ); - push @authtypesloop, \%row; + }; } $template->param( diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 2de8ec8..047c95d 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -232,7 +232,10 @@ my $upc = GetNormalizedUPC($record,$marcflavour); my $ean = GetNormalizedEAN($record,$marcflavour); my $oclc = GetNormalizedOCLCNumber($record,$marcflavour); my $isbn = GetNormalizedISBN(undef,$record,$marcflavour); -my $content_identifier_exists = 1 if ($isbn or $ean or $oclc or $upc); +my $content_identifier_exists; +if ( $isbn or $ean or $oclc or $upc ) { + $content_identifier_exists = 1; +} $template->param( normalized_upc => $upc, normalized_ean => $ean, @@ -534,11 +537,13 @@ if (C4::Context->preference("OPACShelfBrowser")) { } push @next_items, $this_item; } - - # alas, these won't auto-vivify, see http://www.perlmonks.org/?node_id=508481 - my $shelfbrowser_next_itemnumber = $next_items[-1]->{itemnumber} if @next_items; - my $shelfbrowser_next_biblionumber = $next_items[-1]->{biblionumber} if @next_items; - + + my ( $shelfbrowser_next_itemnumber, $shelfbrowser_next_biblionumber ); + if (@next_items) { + $shelfbrowser_next_itemnumber = $next_items[-1]->{itemnumber}; + $shelfbrowser_next_biblionumber = $next_items[-1]->{biblionumber}; + } + $template->param( starting_homebranch => $starting_homebranch->{description}, starting_location => $starting_location->{description}, diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 2bfcb6d..4058a08 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -203,9 +203,13 @@ if ( $template_type && $template_type eq 'advsearch' ) { $template->param(outer_sup_servers_loop => $secondary_servers_loop,); # set the default sorting - my $default_sort_by = C4::Context->preference('OPACdefaultSortField')."_".C4::Context->preference('OPACdefaultSortOrder') - if (C4::Context->preference('OPACdefaultSortField') && C4::Context->preference('OPACdefaultSortOrder')); - $template->param($default_sort_by => 1); + if ( C4::Context->preference('OPACdefaultSortField') + && C4::Context->preference('OPACdefaultSortOrder') ) { + my $default_sort_by = + C4::Context->preference('OPACdefaultSortField') . '_' + . C4::Context->preference('OPACdefaultSortOrder'); + $template->param( $default_sort_by => 1 ); + } # determine what to display next to the search boxes (ie, boolean option # shouldn't appear on the first one, scan indexes should, adding a new @@ -269,8 +273,13 @@ $tag = $params->{tag} if $params->{tag}; # sort by is used to sort the query # in theory can have more than one but generally there's just one my @sort_by; -my $default_sort_by = C4::Context->preference('OPACdefaultSortField')."_".C4::Context->preference('OPACdefaultSortOrder') - if (C4::Context->preference('OPACdefaultSortField') && C4::Context->preference('OPACdefaultSortOrder')); +my $default_sort_by; +if ( C4::Context->preference('OPACdefaultSortField') + && C4::Context->preference('OPACdefaultSortOrder') ) { + $default_sort_by = + C4::Context->preference('OPACdefaultSortField') . '_' + . C4::Context->preference('OPACdefaultSortOrder'); +} @sort_by = split("\0",$params->{'sort_by'}) if $params->{'sort_by'}; $sort_by[0] = $default_sort_by if !$sort_by[0] && defined($default_sort_by); @@ -551,8 +560,13 @@ for (my $i=0;$i<@servers;$i++) { my $pages = ceil($hits / $results_per_page); # default page number my $current_page_number = 1; - $current_page_number = ($offset / $results_per_page + 1) if $offset; - my $previous_page_offset = $offset - $results_per_page unless ($offset - $results_per_page <0); + if ($offset) { + $current_page_number = ( $offset / $results_per_page + 1 ); + } + my $previous_page_offset; + if ( $offset >= $results_per_page ) { + $previous_page_offset = $offset - $results_per_page; + } my $next_page_offset = $offset + $results_per_page; # If we're within the first 10 pages, keep it simple #warn "current page:".$current_page_number; @@ -566,11 +580,14 @@ for (my $i=0;$i<@servers;$i++) { my $this_offset = (($i*$results_per_page)-$results_per_page); # the page number for this page my $this_page_number = $i; - # it should only be highlighted if it's the current page - my $highlight = 1 if ($this_page_number == $current_page_number); # put it in the array - push @page_numbers, { offset => $this_offset, pg => $this_page_number, highlight => $highlight, sort_by => join " ", at sort_by }; - + push @page_numbers, + { offset => $this_offset, + pg => $this_page_number, + highlight => $this_page_number == $current_page_number, + sort_by => join ' ', @sort_by + }; + } } @@ -579,9 +596,13 @@ for (my $i=0;$i<@servers;$i++) { for ($i=$current_page_number; $i<=($current_page_number + 20 );$i++) { my $this_offset = ((($i-9)*$results_per_page)-$results_per_page); my $this_page_number = $i-9; - my $highlight = 1 if ($this_page_number == $current_page_number); - if ($this_page_number <= $pages) { - push @page_numbers, { offset => $this_offset, pg => $this_page_number, highlight => $highlight, sort_by => join " ", at sort_by }; + if ( $this_page_number <= $pages ) { + push @page_numbers, + { offset => $this_offset, + pg => $this_page_number, + highlight => $this_page_number == $current_page_number, + sort_by => join ' ', @sort_by + }; } } diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl index 70b712e..a89823e 100755 --- a/opac/opac-topissues.pl +++ b/opac/opac-topissues.pl @@ -101,13 +101,16 @@ $template->param( branchloop => GetBranchesLoop(C4::Context->userenv->{'branch'} #doctype $itemtypes = GetItemTypes; my @itemtypeloop; -foreach my $thisitemtype (sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'}} keys %$itemtypes) { - my $selected = 1 if $thisitemtype eq $itemtype; - my %row =(value => $thisitemtype, - description => $itemtypes->{$thisitemtype}->{'description'}, - selected => $selected, - ); - push @itemtypeloop, \%row; +foreach my $thisitemtype ( + sort { + $itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} + } keys %{$itemtypes} + ) { + push @itemtypeloop, + { value => $thisitemtype, + description => $itemtypes->{$thisitemtype}->{'description'}, + selected => $thisitemtype eq $itemtype, + }; } $template->param( diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 634b77a..7b4684c 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -169,13 +169,17 @@ $template->param( overdues_count => $overdues_count ); # load the branches my $branches = GetBranches(); my @branch_loop; -for my $branch_hash (sort keys %$branches ) { - my $selected=(C4::Context->userenv && ($branch_hash eq C4::Context->userenv->{branch})) if (C4::Context->preference('SearchMyLibraryFirst')); +for my $branch_hash ( sort keys %{$branches} ) { + my $selected; + if ( C4::Context->preference('SearchMyLibraryFirst') ) { + $selected = + ( C4::Context->userenv + && ( $branch_hash eq C4::Context->userenv->{branch} ) ); + } push @branch_loop, - { - value => "branch: $branch_hash", + { value => "branch: $branch_hash", branchname => $branches->{$branch_hash}->{'branchname'}, - selected => $selected + selected => $selected, }; } $template->param( branchloop => \@branch_loop ); -- 1.7.3.2 From colin.campbell at ptfs-europe.com Mon Nov 29 18:58:27 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Mon, 29 Nov 2010 17:58:27 +0000 Subject: [Koha-patches] [PATCH 5/6] Bug 5453 Move declarations out of conditionals In-Reply-To: <1291053508-23600-1-git-send-email-colin.campbell@ptfs-europe.com> References: <1291053508-23600-1-git-send-email-colin.campbell@ptfs-europe.com> Message-ID: <1291053508-23600-5-git-send-email-colin.campbell@ptfs-europe.com> --- cataloguing/addbiblio.pl | 5 ++++- reports/issues_avg_stats.pl | 35 +++++++++++++++++++++++++++-------- suggestion/suggestion.pl | 12 +++++++++--- tools/export.pl | 17 +++++++++-------- tools/holidays.pl | 20 +++++++++++--------- tools/picture-upload.pl | 12 +++++++++--- 6 files changed, 69 insertions(+), 32 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 2c0c63d..00a52d6 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -916,7 +916,10 @@ if ( $op eq "addbiblio" ) { my @params = $input->param(); $record = TransformHtmlToMarc( \@params , $input ); # check for a duplicate - my ($duplicatebiblionumber,$duplicatetitle) = FindDuplicate($record) if (!$is_a_modif); + my ( $duplicatebiblionumber, $duplicatetitle ); + if ( !$is_a_modif ) { + ( $duplicatebiblionumber, $duplicatetitle ) = FindDuplicate($record); + } my $confirm_not_duplicate = $input->param('confirm_not_duplicate'); # it is not a duplicate (determined either by Koha itself or by user checking it's not a duplicate) if ( !$duplicatebiblionumber or $confirm_not_duplicate ) { diff --git a/reports/issues_avg_stats.pl b/reports/issues_avg_stats.pl index f0f1dd5..c6a3859 100755 --- a/reports/issues_avg_stats.pl +++ b/reports/issues_avg_stats.pl @@ -554,8 +554,23 @@ sub calculate { # and the number matches the number of columns my $colcount=0; foreach my $col ( @loopcol ) { - my $value =$table{$row}->{(($col->{coltitle} eq "NULL")or ($col->{coltitle} eq ""))?"zzEMPTY":$col->{coltitle}} / $wgttable{$row}->{(($col->{coltitle} eq "NULL")or ($col->{coltitle} eq ""))?"zzEMPTY":$col->{coltitle}} if ($table{$row}->{(($col->{coltitle} eq "NULL")or ($col->{coltitle} eq ""))?"zzEMPTY":$col->{coltitle}}); - + my $value; + if ($table{$row}->{ + ( ( $col->{coltitle} eq 'NULL' ) + or ( $col->{coltitle} eq q{} ) + ) ? 'zzEMPTY' : $col->{coltitle} + } + ) { + $value = $table{$row}->{ + ( ( $col->{coltitle} eq 'NULL' ) + or ( $col->{coltitle} eq q{} ) + ) ? 'zzEMPTY' : $col->{coltitle} + } / $wgttable{$row}->{ + ( ( $col->{coltitle} eq 'NULL' ) + or ( $col->{coltitle} eq q{} ) + ) ? 'zzEMPTY' : $col->{coltitle} + }; + } $table{$row}->{(($col->{coltitle} eq "NULL")or ($col->{coltitle} eq ""))?"zzEMPTY":$col->{coltitle}} = $value; $table{$row}->{totalrow}+=$value; #warn "row : $row col:$col $cnttable{$row}->{(($col->{coltitle} eq \"NULL\")or ($col->{coltitle} eq \"\"))?\"zzEMPTY\":$col->{coltitle}}"; @@ -563,12 +578,16 @@ sub calculate { push @loopcell, {value => ($value)?sprintf("%.2f",$value):0 } ; } #warn "row : $row colcount:$colcount"; - my $total = $table{$row}->{totalrow}/$colcount if ($colcount>0); - push @looprow,{ 'rowtitle' => ($row eq "zzEMPTY")?"NULL":$row, - 'loopcell' => \@loopcell, - 'hilighted' => ($hilighted >0), - 'totalrow' => ($total)?sprintf("%.2f",$total):0 - }; + my $total; + if ( $colcount > 0 ) { + $total = $table{$row}->{totalrow} / $colcount; + } + push @looprow, + { 'rowtitle' => ( $row eq "zzEMPTY" ) ? "NULL" : $row, + 'loopcell' => \@loopcell, + 'hilighted' => ( $hilighted > 0 ), + 'totalrow' => ($total) ? sprintf( "%.2f", $total ) : 0 + }; $hilighted = -$hilighted; } # diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index 57a1ba7..3142f0d 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -260,10 +260,16 @@ foreach my $support(@$supportlist){ $template->param(itemtypeloop=>$supportlist); #Budgets management -my $searchbudgets={ budget_branchcode=>$branchfilter} if $branchfilter; -my $budgets = GetBudgets($searchbudgets); +my $budgets = []; +if ($branchfilter) { + my $searchbudgets = { budget_branchcode => $branchfilter }; + $budgets = GetBudgets($searchbudgets); +} else { + $budgets = GetBudgets(undef); +} -foreach my $budget (@$budgets){ +foreach my $budget ( @{$budgets} ) { +## Please see file perltidy.ERR $budget->{'selected'}=1 if ($$suggestion_ref{'budgetid'} && $budget->{'budget_id'} eq $$suggestion_ref{'budgetid'}) }; diff --git a/tools/export.pl b/tools/export.pl index a1e9a22..dc692e1 100755 --- a/tools/export.pl +++ b/tools/export.pl @@ -183,16 +183,17 @@ else { push @itemtypesloop, \%row; } my @branchloop; - for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { - my $selected = 1 if $thisbranch eq $branch; - my %row = ( - value => $thisbranch, - selected => $selected, + for my $thisbranch ( + sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } + keys %{$branches} + ) { + push @branchloop, + { value => $thisbranch, + selected => $thisbranch eq $branch, branchname => $branches->{$thisbranch}->{'branchname'}, - ); - push @branchloop, \%row; + }; } - + $template->param( branchloop => \@branchloop, itemtypeloop => \@itemtypesloop, diff --git a/tools/holidays.pl b/tools/holidays.pl index eb3bc9c..90ef56a 100755 --- a/tools/holidays.pl +++ b/tools/holidays.pl @@ -65,18 +65,20 @@ if ( $onlymine ) { $branch = C4::Context->userenv->{'branch'}; } my $branchname = GetBranchName($branch); -my $branches = GetBranches($onlymine); +my $branches = GetBranches($onlymine); my @branchloop; -for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { - my $selected = 1 if $thisbranch eq $branch; - my %row =(value => $thisbranch, - selected => $selected, - branchname => $branches->{$thisbranch}->{'branchname'}, - ); - push @branchloop, \%row; +for my $thisbranch ( + sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } + keys %{$branches} ) { + push @branchloop, + { value => $thisbranch, + selected => $thisbranch eq $branch, + branchname => $branches->{$thisbranch}->{'branchname'}, + }; } + # branches calculated - put branch codes in a single string so they can be passed in a form -my $branchcodes = join("|", keys %$branches); +my $branchcodes = join '|', keys %{$branches}; # Get all the holidays diff --git a/tools/picture-upload.pl b/tools/picture-upload.pl index f4c75d8..bfb233e 100755 --- a/tools/picture-upload.pl +++ b/tools/picture-upload.pl @@ -78,7 +78,10 @@ my ( $total, $handled, @counts, $tempfile, $tfh ); if ( ($op eq 'Upload') && $uploadfile ) { # Case is important in these operational values as the template must use case to be visually pleasing! my $dirname = File::Temp::tempdir( CLEANUP => 1); $debug and warn "dirname = $dirname"; - my $filesuffix = $1 if $uploadfilename =~ m/(\..+)$/i; + my $filesuffix; + if ( $uploadfilename =~ m/(\..+)$/i ) { + my $filesuffix = $1; + } ( $tfh, $tempfile ) = File::Temp::tempfile( SUFFIX => $filesuffix, UNLINK => 1 ); $debug and warn "tempfile = $tempfile"; my ( @directories, $errors ); @@ -254,8 +257,11 @@ sub handle_file { undef $srcimage; # This object can get big... } $debug and warn "Image is of mimetype $mimetype"; - my $dberror = PutPatronImage($cardnumber,$mimetype, $imgfile) if $mimetype; - if ( !$dberror && $mimetype ) { # Errors from here on are fatal only to the import of a particular image, so don't bail, just note the error and keep going + my $dberror; + if ($mimetype) { + $dberror = PutPatronImage( $cardnumber, $mimetype, $imgfile ); + } + if ( !$dberror && $mimetype ) { # Errors from here on are fatal only to the import of a particular image, so don't bail, just note the error and keep going $count{count}++; push @{ $count{filenames} }, { source => $filename, cardnumber => $cardnumber }; } elsif ( $dberror ) { -- 1.7.3.2 From colin.campbell at ptfs-europe.com Mon Nov 29 18:58:28 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Mon, 29 Nov 2010 17:58:28 +0000 Subject: [Koha-patches] [PATCH 6/6] Bug 5453 : Move declarations out of conditionals In-Reply-To: <1291053508-23600-1-git-send-email-colin.campbell@ptfs-europe.com> References: <1291053508-23600-1-git-send-email-colin.campbell@ptfs-europe.com> Message-ID: <1291053508-23600-6-git-send-email-colin.campbell@ptfs-europe.com> Patched for C4 Modules --- C4/Auth.pm | 15 ++++++---- C4/Auth_with_ldap.pm | 5 ++- C4/Biblio.pm | 79 ++++++++++++++++++++++++++++++++++++++----------- C4/Budgets.pm | 5 ++- C4/Letters.pm | 24 +++++++++------ C4/Members.pm | 8 +++-- C4/Record.pm | 17 +++++++--- 7 files changed, 108 insertions(+), 45 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 7404f96..16bda1e 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -128,12 +128,15 @@ sub get_template_and_user { my $in = shift; my $template = gettemplate( $in->{'template_name'}, $in->{'type'}, $in->{'query'} ); - my ( $user, $cookie, $sessionID, $flags ) = checkauth( - $in->{'query'}, - $in->{'authnotrequired'}, - $in->{'flagsrequired'}, - $in->{'type'} - ) unless ($in->{'template_name'}=~/maintenance/); + my ( $user, $cookie, $sessionID, $flags ); + if ( $in->{'template_name'} !~m/maintenance/ ) { + ( $user, $cookie, $sessionID, $flags ) = checkauth( + $in->{'query'}, + $in->{'authnotrequired'}, + $in->{'flagsrequired'}, + $in->{'type'} + ); + } my $borrowernumber; my $insecure = C4::Context->preference('insecure'); diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm index b25697c..7d30d2a 100644 --- a/C4/Auth_with_ldap.pm +++ b/C4/Auth_with_ldap.pm @@ -165,8 +165,9 @@ sub checkpw_ldap { if (C4::Context->preference('ExtendedPatronAttributes') && $borrowernumber && ($config{update} ||$config{replicate})) { my @types = C4::Members::AttributeTypes::GetAttributeTypes(); my @attributes = grep{my $key=$_; any{$_ eq $key}@types;} keys %borrower; - my $extended_patron_attributes = map{{code=>$_,value=>$borrower{$_}}}@attributes; - my $extended_patron_attributes = [] unless $extended_patron_attributes; + my $extended_patron_attributes; + @{$extended_patron_attributes} = + map { { code => $_, value => $borrower{$_} } } @attributes; my @errors; #Check before add for (my $i; $i< scalar(@$extended_patron_attributes)-1;$i++) { diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 4102e23..89acfd2 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1358,7 +1358,10 @@ sub GetMarcSubjects { my $value = $subject_subfield->[1]; my $linkvalue = $value; $linkvalue =~ s/(\(|\))//g; - my $operator = " and " unless $counter == 0; + my $operator; + if ( $counter != 0 ) { + $operator = ' and '; + } if ( $code eq 9 ) { $found9 = 1; @link_loop = ( { 'limit' => 'an', link => "$linkvalue" } ); @@ -1366,7 +1369,10 @@ sub GetMarcSubjects { if ( not $found9 ) { push @link_loop, { 'limit' => 'su', link => $linkvalue, operator => $operator }; } - my $separator = C4::Context->preference("authoritysep") unless $counter == 0; + my $separator; + if ( $counter != 0 ) { + $separator = C4::Context->preference('authoritysep'); + } # ignore $9 my @this_link_loop = @link_loop; @@ -1424,7 +1430,10 @@ sub GetMarcAuthors { my $value = $authors_subfield->[1]; my $linkvalue = $value; $linkvalue =~ s/(\(|\))//g; - my $operator = " and " unless $count_auth == 0; + my $operator; + if ( $count_auth != 0 ) { + $operator = ' and '; + } # if we have an authority link, use that as the link, otherwise use standard searching if ($subfield9) { @@ -1440,8 +1449,17 @@ sub GetMarcAuthors { $value = GetAuthorisedValueDesc( $field->tag(), $authors_subfield->[0], $authors_subfield->[1], '', $tagslib ) if ( $marcflavour eq 'UNIMARC' and ( $authors_subfield->[0] =~ /4/ ) ); my @this_link_loop = @link_loop; - my $separator = C4::Context->preference("authoritysep") unless $count_auth == 0; - push @subfields_loop, { code => $subfieldcode, value => $value, link_loop => \@this_link_loop, separator => $separator } unless ( $authors_subfield->[0] eq '9' ); + my $separator; + if ( $count_auth != 0 ) { + $separator = C4::Context->preference('authoritysep'); + } + push @subfields_loop, + { code => $subfieldcode, + value => $value, + link_loop => \@this_link_loop, + separator => $separator + } + unless ( $authors_subfield->[0] eq '9' ); $count_auth++; } push @marcauthors, { MARCAUTHOR_SUBFIELDS_LOOP => \@subfields_loop }; @@ -1552,13 +1570,25 @@ sub GetMarcSeries { my $value = $series_subfield->[1]; my $linkvalue = $value; $linkvalue =~ s/(\(|\))//g; - my $operator = " and " unless $counter == 0; - push @link_loop, { link => $linkvalue, operator => $operator }; - my $separator = C4::Context->preference("authoritysep") unless $counter == 0; + if ( $counter != 0 ) { + push @link_loop, { link => $linkvalue, operator => ' and ', }; + } else { + push @link_loop, { link => $linkvalue, operator => undef, }; + } + my $separator; + if ( $counter != 0 ) { + $separator = C4::Context->preference('authoritysep'); + } if ($volume_number) { push @subfields_loop, { volumenum => $value }; } else { - push @subfields_loop, { code => $code, value => $value, link_loop => \@link_loop, separator => $separator, volumenum => $volume_number }; + push @subfields_loop, + { code => $code, + value => $value, + link_loop => \@link_loop, + separator => $separator, + volumenum => $volume_number + }; } $counter++; } @@ -2193,8 +2223,11 @@ sub PrepareItemrecordDisplay { my $tagslib = &GetMarcStructure( 1, $frameworkcode ); # return nothing if we don't have found an existing framework. - return "" unless $tagslib; - my $itemrecord = C4::Items::GetMarcItem( $bibnum, $itemnum ) if ($itemnum); + return q{} unless $tagslib; + my $itemrecord; + if ($itemnum) { + $itemrecord = C4::Items::GetMarcItem( $bibnum, $itemnum ); + } my @loop_data; my $authorised_values_sth = $dbh->prepare( "SELECT authorised_value,lib FROM authorised_values WHERE category=? ORDER BY lib" ); foreach my $tag ( sort keys %{$tagslib} ) { @@ -2233,15 +2266,20 @@ sub PrepareItemrecordDisplay { && C4::Context->preference('itemcallnumber') ) { my $CNtag = substr( C4::Context->preference('itemcallnumber'), 0, 3 ); my $CNsubfield = substr( C4::Context->preference('itemcallnumber'), 3, 1 ); - my $temp = $itemrecord->field($CNtag) if ($itemrecord); - if ($temp) { - $defaultvalue = $temp->subfield($CNsubfield); + if ($itemrecord) { + my $temp = $itemrecord->field($CNtag); + if ($temp) { + $defaultvalue = $temp->subfield($CNsubfield); + } } } if ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.itemcallnumber' && $defaultvalues && $defaultvalues->{'callnumber'} ) { - my $temp = $itemrecord->field($subfield) if ($itemrecord); + my $temp; + if ($itemrecord) { + $temp = $itemrecord->field($subfield); + } unless ($temp) { $defaultvalue = $defaultvalues->{'callnumber'} if $defaultvalues; } @@ -2249,7 +2287,10 @@ sub PrepareItemrecordDisplay { if ( ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.holdingbranch' || $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.homebranch' ) && $defaultvalues && $defaultvalues->{'branchcode'} ) { - my $temp = $itemrecord->field($subfield) if ($itemrecord); + my $temp; + if ($itemrecord) { + $temp = $itemrecord->field($subfield); + } unless ($temp) { $defaultvalue = $defaultvalues->{branchcode} if $defaultvalues; } @@ -2332,8 +2373,10 @@ sub PrepareItemrecordDisplay { } } } - my $itemnumber = $itemrecord->subfield( $itemtagfield, $itemtagsubfield ) - if ( $itemrecord && $itemrecord->field($itemtagfield) ); + my $itemnumber; + if ( $itemrecord && $itemrecord->field($itemtagfield) ) { + $itemnumber = $itemrecord->subfield( $itemtagfield, $itemtagsubfield ); + } return { 'itemtagfield' => $itemtagfield, 'itemtagsubfield' => $itemtagsubfield, diff --git a/C4/Budgets.pm b/C4/Budgets.pm index 005bba8..27dd146 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -587,7 +587,10 @@ sub GetBudgetHierarchy { # add budget-percent and allocation, and flags for html-template foreach my $r (@sort) { my $subs_href = $r->{'child'}; - my @subs_arr = @$subs_href if defined $subs_href; + my @subs_arr = (); + if ( defined $subs_href ) { + @subs_arr = @{$subs_href}; + } my $moo = $r->{'budget_code_indent'}; $moo =~ s/\ /\ \;/g; diff --git a/C4/Letters.pm b/C4/Letters.pm index 5414adb..4454c5b 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -322,12 +322,14 @@ sub SendAlerts { $letter->{content} =~ s/<>/$userenv->{surname}/g; $letter->{content} =~ s/<>/$userenv->{emailaddress}/g; - foreach my $data (@$dataorders) { - my $line = $1 if ( $letter->{content} =~ m/(<<.*>>)/ ); - foreach my $field ( keys %$data ) { - $line =~ s/(<<[^\.]+.$field>>)/$data->{$field}/; + foreach my $data ( @{$dataorders} ) { + if ( $letter->{content} =~ m/(<<.*>>)/ ) { + my $line = $1; + foreach my $field ( keys %{$data} ) { + $line =~ s/(<<[^\.]+.$field>>)/$data->{$field}/; + } + $letter->{content} =~ s/(<<.*>>)/$line\n$1/; } - $letter->{content} =~ s/(<<.*>>)/$line\n$1/; } $letter->{content} =~ s/<<[^>]*>>//g; my $innerletter = $letter; @@ -390,12 +392,14 @@ sub SendAlerts { $letter->{content} =~ s/<>/$userenv->{surname}/g; $letter->{content} =~ s/<>/$userenv->{emailaddress}/g; - foreach my $data (@$dataorders) { - my $line = $1 if ( $letter->{content} =~ m/(<<.*>>)/ ); - foreach my $field ( keys %$data ) { - $line =~ s/(<<[^\.]+.$field>>)/$data->{$field}/; + foreach my $data ( @{$dataorders} ) { + if ( $letter->{content} =~ m/(<<.*>>)/ ) { + my $line = $1; + foreach my $field ( keys %{$data} ) { + $line =~ s/(<<[^\.]+.$field>>)/$data->{$field}/; + } + $letter->{content} =~ s/(<<.*>>)/$line\n$1/; } - $letter->{content} =~ s/(<<.*>>)/$line\n$1/; } $letter->{content} =~ s/<<[^>]*>>//g; my $innerletter = $letter; diff --git a/C4/Members.pm b/C4/Members.pm index 4c1d37c..102cf1a 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -1097,9 +1097,11 @@ sub GetMemberAccountRecords { $sth->execute( @bind ); my $total = 0; while ( my $data = $sth->fetchrow_hashref ) { - my $biblio = GetBiblioFromItemNumber($data->{itemnumber}) if $data->{itemnumber}; - $data->{biblionumber} = $biblio->{biblionumber}; - $data->{title} = $biblio->{title}; + if ( $data->{itemnumber} ) { + my $biblio = GetBiblioFromItemNumber( $data->{itemnumber} ); + $data->{biblionumber} = $biblio->{biblionumber}; + $data->{title} = $biblio->{title}; + } $acctlines[$numlines] = $data; $numlines++; $total += int(1000 * $data->{'amountoutstanding'}); # convert float to integer to avoid round-off errors diff --git a/C4/Record.pm b/C4/Record.pm index 497c03d..61da777 100644 --- a/C4/Record.pm +++ b/C4/Record.pm @@ -266,12 +266,19 @@ sub marc2modsxml { sub marc2endnote { my ($marc) = @_; my $marc_rec_obj = MARC::Record->new_from_usmarc($marc); - my $f260 = $marc_rec_obj->field('260'); - my $f260a = $f260->subfield('a') if $f260; + my ( $abstract, $f260a, $f710a ); + my $f260 = $marc_rec_obj->field('260'); + if ($f260) { + $f260a = $f260->subfield('a') if $f260; + } my $f710 = $marc_rec_obj->field('710'); - my $f710a = $f710->subfield('a') if $f710; - my $f500 = $marc_rec_obj->field('500'); - my $abstract = $f500->subfield('a') if $f500; + if ($f710) { + $f710a = $f710->subfield('a'); + } + my $f500 = $marc_rec_obj->field('500'); + if ($f500) { + $abstract = $f500->subfield('a'); + } my $fields = { DB => C4::Context->preference("LibraryName"), Title => $marc_rec_obj->title(), -- 1.7.3.2 From colin.campbell at ptfs-europe.com Mon Nov 29 19:09:07 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Mon, 29 Nov 2010 18:09:07 +0000 Subject: [Koha-patches] Pull Request Message-ID: <4CF3EC43.8000706@ptfs-europe.com> The seven patches posted earlier to address bug 5453 can be pulled from branch bug_5453 at git://github.com/colinsc/koha.git -- Colin Campbell Chief Software Engineer, PTFS Europe Limited Content Management and Library Solutions +44 (0) 208 366 1295 (phone) +44 (0) 7759 633626 (mobile) colin.campbell at ptfs-europe.com skype: colin_campbell2 http://www.ptfs-europe.com From ian.walls at bywatersolutions.com Tue Nov 30 15:38:51 2010 From: ian.walls at bywatersolutions.com (Ian Walls) Date: Tue, 30 Nov 2010 09:38:51 -0500 Subject: [Koha-patches] [PATCH] [SIGNED OFF] bug 5293 remove references to email on suggestions Message-ID: <1291127931-16329-1-git-send-email-ian.walls@bywatersolutions.com> From: Nicole Engard The purchase suggestions form in the opac says it will send an email to the patron, but there is no such functionality so I've removed that reference. Signed-off-by: Ian Walls --- .../prog/en/modules/opac-suggestions.tmpl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl index ab5b753..3c8dd47 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl @@ -74,8 +74,8 @@ $.tablesorter.addParser({

    Enter a new purchase suggestion

    -

    Please fill out this form to make a purchase suggestion. You will receive an email when the library processes your suggestion

    -

    Only the title is required, but the more information you enter the easier it will be for the librarians to find title you're requesting. The "Notes" field can be used to provide any additional information.

    +

    Please fill out this form to make a purchase suggestion. You can follow the progress of your suggestion by going to 'my purchase suggestions' once you are logged in.

    +

    Only the title is required, but the more information you enter the easier it will be for the librarians to find title you're requesting. The 'Notes' field can be used to provide any additional information.

    1. -- 1.5.6.5 From paul.poulain at biblibre.com Tue Nov 30 15:54:32 2010 From: paul.poulain at biblibre.com (Paul Poulain) Date: Tue, 30 Nov 2010 15:54:32 +0100 Subject: [Koha-patches] [PATCH] [SIGNED OFF] bug 5293 remove references to email on suggestions In-Reply-To: <1291127931-16329-1-git-send-email-ian.walls@bywatersolutions.com> References: <1291127931-16329-1-git-send-email-ian.walls@bywatersolutions.com> Message-ID: <4CF51028.5000207@biblibre.com> Le 30/11/2010 15:38, Ian Walls a ?crit : > From: Nicole Engard > > The purchase suggestions form in the opac says it will > send an email to the patron, but there is no such functionality > so I've removed that reference. ??? There used to be mails on accepting the suggestion, placing the order and receiving the order. Has this code disappeared ? -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc Tel : (33) 4 91 81 35 08 From cnighswonger at foundations.edu Tue Nov 30 15:57:55 2010 From: cnighswonger at foundations.edu (Chris Nighswonger) Date: Tue, 30 Nov 2010 09:57:55 -0500 Subject: [Koha-patches] [PATCH] [SIGNED OFF] bug 5293 remove references to email on suggestions In-Reply-To: <4CF51028.5000207@biblibre.com> References: <1291127931-16329-1-git-send-email-ian.walls@bywatersolutions.com> <4CF51028.5000207@biblibre.com> Message-ID: On Tue, Nov 30, 2010 at 9:54 AM, Paul Poulain wrote: > Le 30/11/2010 15:38, Ian Walls a ?crit : > > From: Nicole Engard > > > > The purchase suggestions form in the opac says it will > > send an email to the patron, but there is no such functionality > > so I've removed that reference. > ??? There used to be mails on accepting the suggestion, placing the > order and receiving the order. Has this code disappeared ? > > I think bugs 4211 and 5127 both touch upon this and fix it iirc. Kind Regards, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian.walls at bywatersolutions.com Tue Nov 30 16:06:00 2010 From: ian.walls at bywatersolutions.com (Ian Walls) Date: Tue, 30 Nov 2010 10:06:00 -0500 Subject: [Koha-patches] [PATCH] [SIGNED OFF] bug 5293 remove references to email on suggestions In-Reply-To: References: <1291127931-16329-1-git-send-email-ian.walls@bywatersolutions.com> <4CF51028.5000207@biblibre.com> Message-ID: Delightful, thank you all! This was an older patch I'd rebased, and it's nice to know it's no longer necessary. -Ian On Tue, Nov 30, 2010 at 9:57 AM, Chris Nighswonger < cnighswonger at foundations.edu> wrote: > > > On Tue, Nov 30, 2010 at 9:54 AM, Paul Poulain wrote: > >> Le 30/11/2010 15:38, Ian Walls a ?crit : >> > From: Nicole Engard >> > >> > The purchase suggestions form in the opac says it will >> > send an email to the patron, but there is no such functionality >> > so I've removed that reference. >> ??? There used to be mails on accepting the suggestion, placing the >> order and receiving the order. Has this code disappeared ? >> >> > I think bugs 4211 and 5127 both touch upon this and fix it iirc. > > Kind Regards, > Chris > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ > -- Ian Walls Lead Development Specialist ByWater Solutions Phone # (888) 900-8944 http://bywatersolutions.com ian.walls at bywatersolutions.com Twitter: @sekjal -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian.walls at bywatersolutions.com Tue Nov 30 16:14:23 2010 From: ian.walls at bywatersolutions.com (Ian Walls) Date: Tue, 30 Nov 2010 10:14:23 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5402, "add to cart" shown on checkbox hover Message-ID: <1291130063-16872-1-git-send-email-ian.walls@bywatersolutions.com> From: Owen Leonard This patch removes the title hint altogether. The checkbox might be used for the cart, lists, holds, or tags, and expressing this in a title hint seems overly complicated. Signed-off-by: Ian Walls --- .../opac-tmpl/prog/en/modules/opac-results.tmpl | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl index aa39b9a..cfd5e36 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl @@ -367,9 +367,9 @@ $(document).ready(function(){ - " name="biblionumber" value="" title="Click to add to cart" /> -" name="biblionumber" value="" title="Click to add to cart" /> -" name="biblionumber" value="" title="Click to add to cart" /> + " name="biblionumber" value="" /> +" name="biblionumber" value="" /> +" name="biblionumber" value="" /> . -- 1.5.6.5 From ian.walls at bywatersolutions.com Tue Nov 30 19:20:40 2010 From: ian.walls at bywatersolutions.com (Ian Walls) Date: Tue, 30 Nov 2010 13:20:40 -0500 Subject: [Koha-patches] [PATCH] Bug 5460: AutoEmailPrimaryAddress set to invalid value in sysprefs.sql Message-ID: <1291141240-18263-1-git-send-email-ian.walls@bywatersolutions.com> Fixes de-DE, en, fr-FR, pl-PL, ru-RU and uk-UA default install values for this system preference (changing from '0' to 'OFF', the preferred value). Signed-off-by: Ian Walls --- installer/data/mysql/de-DE/mandatory/sysprefs.sql | 2 +- installer/data/mysql/en/mandatory/sysprefs.sql | 2 +- .../1-Obligatoire/unimarc_standard_systemprefs.sql | 2 +- installer/data/mysql/pl-PL/mandatory/sysprefs.sql | 2 +- ...m_preferences_full_optimal_for_install_only.sql | 2 +- ...m_preferences_full_optimal_for_install_only.sql | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql b/installer/data/mysql/de-DE/mandatory/sysprefs.sql index 07f8567..96ded44 100644 --- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql +++ b/installer/data/mysql/de-DE/mandatory/sysprefs.sql @@ -181,7 +181,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('RandomizeHoldsQueueWeight','0','if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaticHoldsQueueWeight','0','Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailOpacUser','0','Sends notification emails containing new account details to patrons - when account is created.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailPrimaryAddress','0','Defines the default email address where \'Account Details\' emails are sent.','email|emailpro|B_email|cardnumber|OFF','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailPrimaryAddress','OFF','Defines the default email address where \'Account Details\' emails are sent.','email|emailpro|B_email|cardnumber|OFF','Choice'); -- Tags and BakerTaylor (note field order differs from above) INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index 214d198..d4fb9a2 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -182,7 +182,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('RandomizeHoldsQueueWeight','0','if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaticHoldsQueueWeight','0','Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailOpacUser','0','Sends notification emails containing new account details to patrons - when account is created.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailPrimaryAddress','0','Defines the default email address where \'Account Details\' emails are sent.','email|emailpro|B_email|cardnumber|OFF','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailPrimaryAddress','OFF','Defines the default email address where \'Account Details\' emails are sent.','email|emailpro|B_email|cardnumber|OFF','Choice'); -- Tags and BakerTaylor (note field order differs from above) INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES 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 1be8d7d..8be770a 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 @@ -186,7 +186,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RandomizeHoldsQueueWeight','0','if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight',NULL,'YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('StaticHoldsQueueWeight','0','Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailOpacUser','0','Envoie des notifications par mail lors de l''inscription de nouveaux lecteurs. ',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailPrimaryAddress','0','D?finit l''adresse utilis?e par d?faut utilis?e lors des envois de mail ','email|emailpro|B_email|cardnumber|OFF','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailPrimaryAddress','OFF','D?finit l''adresse utilis?e par d?faut utilis?e lors des envois de mail ','email|emailpro|B_email|cardnumber|OFF','Choice'); -- Tags and BakerTaylor (note field order differs from above) INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES diff --git a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql index 1735fe5..06f0801 100644 --- a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql +++ b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql @@ -181,7 +181,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('RandomizeHoldsQueueWeight','0','if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaticHoldsQueueWeight','0','Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailOpacUser','0','Sends notification emails containing new account details to patrons - when account is created.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailPrimaryAddress','0','Defines the default email address where \'Account Details\' emails are sent.','email|emailpro|B_email|cardnumber|OFF','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailPrimaryAddress','OFF','Defines the default email address where \'Account Details\' emails are sent.','email|emailpro|B_email|cardnumber|OFF','Choice'); -- Tags and BakerTaylor (note field order differs from above) INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES diff --git a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql index 9fc7690..33aabfd 100644 --- a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -209,7 +209,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('RandomizeHoldsQueueWeight','0','if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaticHoldsQueueWeight','0','Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailOpacUser','0','Sends notification emails containing new account details to patrons - when account is created.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailPrimaryAddress','0','Defines the default email address where \'Account Details\' emails are sent.','email|emailpro|B_email|cardnumber|OFF','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailPrimaryAddress','OFF','Defines the default email address where \'Account Details\' emails are sent.','email|emailpro|B_email|cardnumber|OFF','Choice'); -- Tags and BakerTaylor (note field order differs from above) INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES diff --git a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql index 607a9ec..eb430ac 100644 --- a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -235,7 +235,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('RandomizeHoldsQueueWeight','0','if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaticHoldsQueueWeight','0','Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailOpacUser','0','Sends notification emails containing new account details to patrons - when account is created.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailPrimaryAddress','0','Defines the default email address where \'Account Details\' emails are sent.','email|emailpro|B_email|cardnumber|OFF','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailPrimaryAddress','OFF','Defines the default email address where \'Account Details\' emails are sent.','email|emailpro|B_email|cardnumber|OFF','Choice'); -- Tags and BakerTaylor (note field order differs from above) INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES -- 1.5.6.5 From nengard at bywatersolutions.com Tue Nov 30 08:19:49 2010 From: nengard at bywatersolutions.com (Nicole Engard) Date: Tue, 30 Nov 2010 02:19:49 -0500 Subject: [Koha-patches] [PATCH] [SIGNED OFF] Bug 4449: AllowHoldPolicyOverride does not override all hold policies Message-ID: <1291101589-3247-1-git-send-email-nengard@bywatersolutions.com> From: Ian Walls This patch provides a universal override to any hold policy if the AllowHoldPolicyOverride is set. Amongst other overrides, this patch allows missing, non-checked out items to be placed on hold even with AllowShelfHolds turned off. Signed-off-by: Nicole Engard --- reserve/request.pl | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/reserve/request.pl b/reserve/request.pl index 859a65b..7e51364 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -435,6 +435,9 @@ foreach my $biblionumber (@biblionumbers) { $item->{available} = 1; $num_available++; } + } elsif (C4::Context->preference( 'AllowHoldPolicyOverride' ) ) { + $item->{override} = 1; + $num_override++; } # If none of the conditions hold true, then neither override nor available is set and the item cannot be checked -- 1.5.6.5 From nengard at bywatersolutions.com Tue Nov 30 08:25:30 2010 From: nengard at bywatersolutions.com (Nicole Engard) Date: Tue, 30 Nov 2010 02:25:30 -0500 Subject: [Koha-patches] [PATCH] Fixes bug 5232: Shelfname won't display on high-numbered lists Message-ID: <1291101930-3333-1-git-send-email-nengard@bywatersolutions.com> From: Ian Walls This bugfix adds an explicit GetShelf for the specific shelfnumber when viewing that individual shelfnumber. This captures the shelfname, which was originally pulled from shelflist->{$shelfnumber}, which may not have been populated if the List in question was beyond the 20th private or public list in the system. Also adds a more explicit sort: the sort from the CGI takes top priority, then it falls back to the default sort for the list, and ultimate falls to 'title' if neither CGI nor default sort exist. Signed-off-by: Ian Walls Signed-off-by: Nicole Engard --- C4/VirtualShelves/Page.pm | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index e772db8..80d8f3c 100644 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -174,13 +174,22 @@ sub shelfpage ($$$$$) { last SWITCH; } if ( $shelfnumber = $query->param('viewshelf') ) { + # explicitly fetch this shelf + my ($shelfnumber2,$shelfname,$owner,$category,$sorton) = GetShelf($shelfnumber); #check that the user can view the shelf if ( ShelfPossibleAction( $loggedinuser, $shelfnumber, 'view' ) ) { my $items; my $authorsort; my $yearsort; - my $sortfield = ( $query->param('sortfield') ? $query->param('sortfield') : 'title' ); + my $sortfield; + if ( $query->param('sortfield')) { + $sortfield = $query->param('sortfield'); + } elsif ($sorton) { + $sortfield = $sorton; + } else { + $sortfield = 'title'; + } if ( $sortfield eq 'author' ) { $authorsort = 'author'; } @@ -210,7 +219,7 @@ sub shelfpage ($$$$$) { my $i = 0; my $manageshelf = ShelfPossibleAction( $loggedinuser, $shelfnumber, 'manage' ); $template->param( - shelfname => $shelflist->{$shelfnumber}->{'shelfname'} || $privshelflist->{$shelfnumber}->{'shelfname'}, + shelfname => $shelfname, shelfnumber => $shelfnumber, viewshelf => $shelfnumber, authorsort => $authorsort, -- 1.5.6.5