From magnus at enger.priv.no Sat Oct 1 17:45:42 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Sat, 1 Oct 2011 17:45:42 +0200 Subject: [Koha-patches] [PATCH] Bug 6953 - Value builder for NORMARC 007 does not show further options Message-ID: <1317483942-5566-1-git-send-email-magnus@enger.priv.no> A previous commit introduced a missing TT control structure, but forgot to include the trailing "\" for multiline JavaScript. This patch simply adds the missing "\". --- .../cataloguing/value_builder/normarc_field_007.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_007.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_007.tt index cb36c85..b959357 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_007.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_007.tt @@ -254,7 +254,7 @@ function RedrawChoices(typ){ \ [% ELSE %] \ \ - [% END %] + [% END %] \ [% IF ( f4a ) %] \ \ [% ELSE %] \ -- 1.7.4.1 From oleonard at myacpl.org Mon Oct 3 15:32:50 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 3 Oct 2011 09:32:50 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6955, Toolbar on reading history broken Message-ID: <1317648770-20542-1-git-send-email-oleonard@myacpl.org> Table sorter script causes error if there is no to sort. JS errors cause the YUI toolbar js to abort, causing the problem observed. When there are no results the whole table should be omitted and a message displayed in its place. --- .../prog/en/modules/members/readingrec.tt | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt index c61006b..ac5ee68 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -30,6 +30,7 @@
[% INCLUDE 'circ-toolbar.inc' %]

Circulation History

+[% IF ( loop_reading ) %]
@@ -93,7 +94,9 @@ [% END %] - +[% ELSE %] +
This patron has no circulation history.
+[% END %]
-- 1.7.3 From oleonard at myacpl.org Mon Oct 3 16:48:16 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 3 Oct 2011 10:48:16 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6957, authors disappearing when emailing lists Message-ID: <1317653296-21377-1-git-send-email-oleonard@myacpl.org> Standard author information wasn't even in the template markup, only "additional author." Added standard author and improved output of additional authors (hiding label when empty). Also added subtitle via GetRecordValue (see bug 3550). Also added check for and output of OPACBaseURL in order to make OPAC links in the email clickable. --- .../prog/en/modules/virtualshelves/sendshelf.tt | 12 +++++++----- .../opac-tmpl/prog/en/modules/opac-sendshelf.tt | 11 +++++++---- opac/opac-sendshelf.pl | 10 ++++++++-- virtualshelves/sendshelf.pl | 10 ++++++++-- 4 files changed, 30 insertions(+), 13 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt index 5fbb31f..52f36c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt @@ -17,9 +17,11 @@ Reference Manager or ProCite. [% IF ( comment ) %] [% comment %] [% END %] -[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %][% BIBLIO_RESULT.title %][% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %][% IF ( BIBLIO_RESULT.MARCAUTHORS ) %] -Author(s): [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %][% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %][% MARCAUTHOR_SUBFIELDS_LOO.value %][% END %][% UNLESS ( loop.last ) %]; [% ELSE %] -[% END %][% END %][% END %][% IF ( BIBLIO_RESULT.ISBN ) %] +[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %][% BIBLIO_RESULT.title %][% IF ( BIBLIO_RESULT.subtitle.size ) %] [% FOREACH subtitle IN BIBLIO_RESULT.subtitle %][% subtitle.subfield %][% END %][% END %][% IF ( BIBLIO_RESULT.author ) %] + +by [% BIBLIO_RESULT.author %][% END %] +[% IF ( BIBLIO_RESULT.MARCAUTHORS.size ) %] +Additional author(s): [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %][% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %] [% MARCAUTHOR_SUBFIELDS_LOO.value %][% END %][% UNLESS ( loop.last ) %];[% END %][% END %][% END %][% IF ( BIBLIO_RESULT.ISBN ) %] ISBN: [% BIBLIO_RESULT.ISBN %][% END %] [% IF ( BIBLIO_RESULT.publishercode ) %]Published by: [% BIBLIO_RESULT.publishercode %][% END %][% IF ( BIBLIO_RESULT.publicationyear ) %] in [% END %][% BIBLIO_RESULT.publicationyear %][% IF ( BIBLIO_RESULT.pages ) %], [% END %][% BIBLIO_RESULT.pages %][% IF ( BIBLIO_RESULT.size ) %], [% END %][% BIBLIO_RESULT.size %][% IF ( BIBLIO_RESULT.collection ) %] Collection: [% BIBLIO_RESULT.seriestitle %][% END %][% IF ( BIBLIO_RESULT.subject ) %] @@ -31,9 +33,9 @@ Serial: [% BIBLIO_RESULT.serial %][% END %][% IF ( BIBLIO_RESULT.dewey ) %] Dewey: [% BIBLIO_RESULT.dewey %][% END %][% IF ( BIBLIO_RESULT.classification ) %] Classification: [% BIBLIO_RESULT.classification %][% END %][% IF ( BIBLIO_RESULT.lccn ) %] LCCN: [% BIBLIO_RESULT.lccn %][% END %][% IF ( BIBLIO_RESULT.url ) %] -url : [% BIBLIO_RESULT.url %][% END %] +url : [% BIBLIO_RESULT.url %][% END %][% IF ( OPACBaseurl ) %] In the online catalog: -[% BIBLIO_RESULT.OPACBaseurl %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %] + http://[% OPACBaseurl %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %][% END %] Items : [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %] [% ITEM_RESULT.branchname %] [% ITEM_RESULT.location %] [% IF ( ITEM_RESULT.itemcallnumber ) %]([% ITEM_RESULT.itemcallnumber %])[% END %] [% ITEM_RESULT.barcode %][% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tt index e39d450..b329cd4 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tt @@ -17,8 +17,11 @@ Reference Manager or ProCite. [% IF ( comment ) %] [% comment %] [% END %] -[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %][% BIBLIO_RESULT.title %][% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %][% IF ( BIBLIO_RESULT.MARCAUTHORS ) %] -Author(s): [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %][% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %][% MARCAUTHOR_SUBFIELDS_LOO.value %][% END %][% UNLESS ( loop.last ) %]; [% ELSE %] +[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %][% BIBLIO_RESULT.title %][% IF ( BIBLIO_RESULT.subtitle.size ) %] [% FOREACH subtitle IN BIBLIO_RESULT.subtitle %][% subtitle.subfield %][% END %][% END %][% IF ( BIBLIO_RESULT.author ) %] + +by [% BIBLIO_RESULT.author %][% END %] +[% IF ( BIBLIO_RESULT.MARCAUTHORS.size ) %] +Additional author(s): [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %][% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %] [% MARCAUTHOR_SUBFIELDS_LOO.value %][% END %][% UNLESS ( loop.last ) %]; [% ELSE %] [% END %][% END %][% END %][% IF ( BIBLIO_RESULT.ISBN ) %] ISBN: [% BIBLIO_RESULT.ISBN %][% END %] [% IF ( BIBLIO_RESULT.publishercode ) %]Published by: [% BIBLIO_RESULT.publishercode %][% END %][% IF ( BIBLIO_RESULT.publicationyear ) %] in [% END %][% BIBLIO_RESULT.publicationyear %][% IF ( BIBLIO_RESULT.pages ) %], [% END %][% BIBLIO_RESULT.pages %][% IF ( BIBLIO_RESULT.size ) %], [% END %][% BIBLIO_RESULT.size %][% IF ( BIBLIO_RESULT.collection ) %] @@ -31,9 +34,9 @@ Serial: [% BIBLIO_RESULT.serial %][% END %][% IF ( BIBLIO_RESULT.dewey ) %] Dewey: [% BIBLIO_RESULT.dewey %][% END %][% IF ( BIBLIO_RESULT.classification ) %] Classification: [% BIBLIO_RESULT.classification %][% END %][% IF ( BIBLIO_RESULT.lccn ) %] LCCN: [% BIBLIO_RESULT.lccn %][% END %][% IF ( BIBLIO_RESULT.url ) %] -url : [% BIBLIO_RESULT.url %][% END %] +url : [% BIBLIO_RESULT.url %][% END %][% IF ( OPACBaseurl ) %] In the online catalog: -[% BIBLIO_RESULT.OPACBaseurl %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %] + http://[% OPACBaseurl %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %][% END %] Items : [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %] [% ITEM_RESULT.branchname %] [% ITEM_RESULT.location %] [% IF ( ITEM_RESULT.itemcallnumber ) %]([% ITEM_RESULT.itemcallnumber %])[% END %] [% ITEM_RESULT.barcode %][% END %] diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl index b571e07..55abd14 100755 --- a/opac/opac-sendshelf.pl +++ b/opac/opac-sendshelf.pl @@ -81,12 +81,13 @@ if ( $email ) { # retrieve biblios from shelf foreach my $biblio (@$items) { my $biblionumber = $biblio->{biblionumber}; - + my $fw = GetFrameworkCode($biblionumber); my $dat = GetBiblioData($biblionumber); my $record = GetMarcBiblio($biblionumber); my $marcnotesarray = GetMarcNotes( $record, $marcflavour ); my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); + my $subtitle = GetRecordValue('subtitle', $record, $fw); my @items = GetItemsInfo( $biblionumber ); @@ -95,13 +96,18 @@ if ( $email ) { $dat->{MARCAUTHORS} = $marcauthorsarray; $dat->{'biblionumber'} = $biblionumber; $dat->{ITEM_RESULTS} = \@items; + $dat->{subtitle} = $subtitle; $iso2709 .= $record->as_usmarc(); push( @results, $dat ); } - my $user = GetMember(borrowernumber => $borrowernumber); + my $user = GetMember(borrowernumber => $borrowernumber); + + if (C4::Context->preference('OPACBaseURL')){ + $template2->param( OPACBaseurl => C4::Context->preference('OPACBaseURL') ); + } $template2->param( BIBLIO_RESULTS => \@results, diff --git a/virtualshelves/sendshelf.pl b/virtualshelves/sendshelf.pl index 16ada89..37ec545 100755 --- a/virtualshelves/sendshelf.pl +++ b/virtualshelves/sendshelf.pl @@ -77,13 +77,14 @@ if ( $email ) { # retrieve biblios from shelf foreach my $biblio (@$items) { - my $biblionumber = $biblio->{biblionumber}; - + my $biblionumber = $biblio->{biblionumber}; + my $fw = GetFrameworkCode($biblionumber); my $dat = GetBiblioData($biblionumber); my $record = GetMarcBiblio($biblionumber); my $marcnotesarray = GetMarcNotes( $record, $marcflavour ); my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); + my $subtitle = GetRecordValue('subtitle', $record, $fw); my @items = GetItemsInfo( $biblionumber ); @@ -92,12 +93,17 @@ if ( $email ) { $dat->{MARCAUTHORS} = $marcauthorsarray; $dat->{'biblionumber'} = $biblionumber; $dat->{ITEM_RESULTS} = \@items; + $dat->{subtitle} = $subtitle; $iso2709 .= $record->as_usmarc(); push( @results, $dat ); } + if (C4::Context->preference('OPACBaseURL')){ + $template2->param( OPACBaseurl => C4::Context->preference('OPACBaseURL') ); + } + $template2->param( BIBLIO_RESULTS => \@results, email_sender => $email_from, -- 1.7.3 From ruth at bywatersolutions.com Mon Oct 3 17:07:40 2011 From: ruth at bywatersolutions.com (D Ruth Bavousett) Date: Mon, 3 Oct 2011 08:07:40 -0700 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6789: biblios with many items can result in broken search results link Message-ID: <1317654460-17554-1-git-send-email-ruth@bywatersolutions.com> From: Ian Walls This patch fixes an issue whereby biblios with many items (often > 500) would index, but not the biblionumber itself, resulting in search results with a) inaccurate item counts and b) no biblionumber to use in the link to the details page. This is due to Net::Z3950::ZOOM not providing a mechanism for specifying different connection attributes; the maximumRecordSize ZOOM connection attribute, if not specified, defaults to 1MB, which is less than the size of a MARC record with many, many 952 fields. Since it is unlikely we can fix Net::Z3950::ZOOM in a timely fashion, this patch aims to build a workaround on the Koha end. This patch changes EmbedItemsInMarcBiblio to use append_fields instead of insert_ordered_fields, so the 999$c will come before the item records. It's VERY unlikely we will encounter more than 1MB of biblio-level MARC content, as this would break the ISO-2709 standard by a large factor. To this end, it also moves the fix_biblio_ids portion of get_corrected_marc_record out of rebuild_zebra.pl, and makes it a part of GetMarcBiblio (right before EmbedItemsInMarcBiblio, so the 952s still come last). fix_biblio_ids is kept as a subroutine for the deletion portion of rebuild_zebra.pl, which still uses it. It also uses the subroutine parameter in GetMarcBiblio to do the EmbedItemsInMarcBiblio action, rather than having rebuild_zebra.pl perform it on the itemless record returned from GetMarcBiblio. Simpler and cleaner that way. To verify bug issue: 1. Find a biblio with over 700 items (or enough that the resulting MARCXML is greater than 1MB) 2. search for this biblio (in a search that would return multiple results, not just this title). You should get the title in the results list 3. attempt to click the link to this biblio's details page; the biblionumber should be blank, leading to a 404 To test solution: 1. Apply patch 2. modify the biblio slightly (click the 005 for example) and save OR manually add the biblio to zebraqueue for reindexing 3. after rebuild_zebra.pl -z -b -x runs, use the same search as above. The title should still appear. 4. click the link, and find yourself on the biblio detail page as desired Signed-off-by: D Ruth Bavousett --- C4/Biblio.pm | 4 ++-- misc/migration_tools/rebuild_zebra.pl | 9 ++------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 915139e..6fcb022 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1070,9 +1070,9 @@ sub GetMarcBiblio { if ($@) { warn " problem with :$biblionumber : $@ \n$marcxml"; } return unless $record; + C4::Biblio::_koha_marc_update_bib_ids($record, '', $biblionumber, $biblionumber); C4::Biblio::EmbedItemsInMarcBiblio($record, $biblionumber) if ($embeditems); - # $record = MARC::Record::new_from_usmarc( $marc) if $marc; return $record; } else { return undef; @@ -2730,7 +2730,7 @@ sub EmbedItemsInMarcBiblio { my $item_marc = C4::Items::GetMarcItem($biblionumber, $itemnumber); push @item_fields, $item_marc->field($itemtag); } - $marc->insert_fields_ordered(@item_fields); + $marc->append_fields(@item_fields); } =head1 INTERNAL FUNCTIONS diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl index dadf43f..6fa6501 100755 --- a/misc/migration_tools/rebuild_zebra.pl +++ b/misc/migration_tools/rebuild_zebra.pl @@ -433,10 +433,7 @@ sub get_corrected_marc_record { if (defined $marc) { fix_leader($marc); - if ($record_type eq 'biblio') { - my $succeeded = fix_biblio_ids($marc, $record_number); - return unless $succeeded; - } else { + if ($record_type eq 'authority') { fix_authority_id($marc, $record_number); } if (C4::Context->preference("marcflavour") eq "UNIMARC") { @@ -468,7 +465,7 @@ sub get_raw_marc_record { $fetch_sth->finish(); return unless $marc; } else { - eval { $marc = GetMarcBiblio($record_number); }; + eval { $marc = GetMarcBiblio($record_number, 1); }; if ($@ || !$marc) { # here we do warn since catching an exception # means that the bib was found but failed @@ -477,8 +474,6 @@ sub get_raw_marc_record { return; } } - # ITEM - C4::Biblio::EmbedItemsInMarcBiblio($marc, $record_number); } else { eval { $marc = GetAuthority($record_number); }; if ($@) { -- 1.7.2.5 From cfouts at liblime.com Mon Oct 3 19:50:19 2011 From: cfouts at liblime.com (Clay Fouts) Date: Mon, 3 Oct 2011 10:50:19 -0700 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6789: biblios with many items can result in broken search results link In-Reply-To: <1317654460-17554-1-git-send-email-ruth@bywatersolutions.com> References: <1317654460-17554-1-git-send-email-ruth@bywatersolutions.com> Message-ID: You can avoid having to use this hack by setting and appropriately large maximumRecordSize in C4::Context::_new_Zconn() and then specifying the -k option for zebrasrv. Clay On Mon, Oct 3, 2011 at 8:07 AM, D Ruth Bavousett wrote: > From: Ian Walls > > This patch fixes an issue whereby biblios with many items (often > 500) > would index, > but not the biblionumber itself, resulting in search results with a) > inaccurate item counts > and b) no biblionumber to use in the link to the details page. This is due > to Net::Z3950::ZOOM not providing > a mechanism for specifying different connection attributes; the > maximumRecordSize ZOOM connection attribute, > if not specified, defaults to 1MB, which is less than the size of a MARC > record with many, many 952 fields. Since > it is unlikely we can fix Net::Z3950::ZOOM in a timely fashion, this patch > aims to build a workaround on the Koha end. > > This patch changes EmbedItemsInMarcBiblio to use append_fields instead of > insert_ordered_fields, > so the 999$c will come before the item records. It's VERY unlikely we will > encounter more than 1MB of biblio-level MARC > content, as this would break the ISO-2709 standard by a large factor. > > To this end, it also moves the fix_biblio_ids portion of > get_corrected_marc_record out of rebuild_zebra.pl, > and makes it a part of GetMarcBiblio (right before EmbedItemsInMarcBiblio, > so the 952s still come last). fix_biblio_ids > is kept as a subroutine for the deletion portion of rebuild_zebra.pl, > which still uses it. > > It also uses the subroutine parameter in GetMarcBiblio to do the > EmbedItemsInMarcBiblio action, rather than having > rebuild_zebra.pl perform it on the itemless record returned from > GetMarcBiblio. Simpler and cleaner that way. > > To verify bug issue: > 1. Find a biblio with over 700 items (or enough that the resulting MARCXML > is greater than 1MB) > 2. search for this biblio (in a search that would return multiple results, > not just this title). You should get the title in > the results list > 3. attempt to click the link to this biblio's details page; the > biblionumber should be blank, leading to a 404 > > To test solution: > 1. Apply patch > 2. modify the biblio slightly (click the 005 for example) and save > OR manually add the biblio to zebraqueue for reindexing > 3. after rebuild_zebra.pl -z -b -x runs, use the same search as above. The > title should still appear. > 4. click the link, and find yourself on the biblio detail page as desired > > Signed-off-by: D Ruth Bavousett > --- > C4/Biblio.pm | 4 ++-- > misc/migration_tools/rebuild_zebra.pl | 9 ++------- > 2 files changed, 4 insertions(+), 9 deletions(-) > > diff --git a/C4/Biblio.pm b/C4/Biblio.pm > index 915139e..6fcb022 100644 > --- a/C4/Biblio.pm > +++ b/C4/Biblio.pm > @@ -1070,9 +1070,9 @@ sub GetMarcBiblio { > if ($@) { warn " problem with :$biblionumber : $@ \n$marcxml"; } > return unless $record; > > + C4::Biblio::_koha_marc_update_bib_ids($record, '', $biblionumber, > $biblionumber); > C4::Biblio::EmbedItemsInMarcBiblio($record, $biblionumber) if > ($embeditems); > > - # $record = MARC::Record::new_from_usmarc( $marc) if $marc; > return $record; > } else { > return undef; > @@ -2730,7 +2730,7 @@ sub EmbedItemsInMarcBiblio { > my $item_marc = C4::Items::GetMarcItem($biblionumber, $itemnumber); > push @item_fields, $item_marc->field($itemtag); > } > - $marc->insert_fields_ordered(@item_fields); > + $marc->append_fields(@item_fields); > } > > =head1 INTERNAL FUNCTIONS > diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/ > rebuild_zebra.pl > index dadf43f..6fa6501 100755 > --- a/misc/migration_tools/rebuild_zebra.pl > +++ b/misc/migration_tools/rebuild_zebra.pl > @@ -433,10 +433,7 @@ sub get_corrected_marc_record { > > if (defined $marc) { > fix_leader($marc); > - if ($record_type eq 'biblio') { > - my $succeeded = fix_biblio_ids($marc, $record_number); > - return unless $succeeded; > - } else { > + if ($record_type eq 'authority') { > fix_authority_id($marc, $record_number); > } > if (C4::Context->preference("marcflavour") eq "UNIMARC") { > @@ -468,7 +465,7 @@ sub get_raw_marc_record { > $fetch_sth->finish(); > return unless $marc; > } else { > - eval { $marc = GetMarcBiblio($record_number); }; > + eval { $marc = GetMarcBiblio($record_number, 1); }; > if ($@ || !$marc) { > # here we do warn since catching an exception > # means that the bib was found but failed > @@ -477,8 +474,6 @@ sub get_raw_marc_record { > return; > } > } > - # ITEM > - C4::Biblio::EmbedItemsInMarcBiblio($marc, $record_number); > } else { > eval { $marc = GetAuthority($record_number); }; > if ($@) { > -- > 1.7.2.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/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nengard at bywatersolutions.com Sun Oct 2 08:12:02 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Sun, 2 Oct 2011 02:12:02 -0400 Subject: [Koha-patches] [PATCH] Bug 6716 - Document Items Table Message-ID: <1317535922-4225-1-git-send-email-nengard@bywatersolutions.com> This patch documents the items table. Some fields were left undocumented because I was unsure of what data was stored there: stack - might be linked to shelving number, but need confirmation paidfor - pretty sure this is unused, but don't want to document it that way --- installer/data/mysql/kohastructure.sql | 76 ++++++++++++++++---------------- 1 files changed, 38 insertions(+), 38 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3a51df5..cdd7e78 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -996,46 +996,46 @@ CREATE TABLE `issuingrules` ( -- DROP TABLE IF EXISTS `items`; -CREATE TABLE `items` ( - `itemnumber` int(11) NOT NULL auto_increment, - `biblionumber` int(11) NOT NULL default 0, - `biblioitemnumber` int(11) NOT NULL default 0, - `barcode` varchar(20) default NULL, - `dateaccessioned` date default NULL, - `booksellerid` mediumtext default NULL, - `homebranch` varchar(10) default NULL, - `price` decimal(8,2) default NULL, - `replacementprice` decimal(8,2) default NULL, - `replacementpricedate` date default NULL, - `datelastborrowed` date default NULL, - `datelastseen` date default NULL, +CREATE TABLE `items` ( -- holdings/item information + `itemnumber` int(11) NOT NULL auto_increment, -- primary key and unique identifier added by Koha + `biblionumber` int(11) NOT NULL default 0, -- foreign key from biblio table used to link this item to the right bib record + `biblioitemnumber` int(11) NOT NULL default 0, -- foreign key from the biblioitems table to link to item to additional information + `barcode` varchar(20) default NULL, -- item barcode (MARC21 952$p) + `dateaccessioned` date default NULL, -- date the item was acquired or added to Koha (MARC21 952$d) + `booksellerid` mediumtext default NULL, -- where the item was purchased (MARC21 952$e) + `homebranch` varchar(10) default NULL, -- foreign key from the branches table for the library that owns this item (MARC21 952$a) + `price` decimal(8,2) default NULL, -- purchase price (MARC21 952$g) + `replacementprice` decimal(8,2) default NULL, -- cost the library charges to replace the item if it has been marked lost (MARC21 952$v) + `replacementpricedate` date default NULL, -- the date the price is effective from (MARC21 952$w) + `datelastborrowed` date default NULL, -- the date the item was last checked out/issued + `datelastseen` date default NULL, -- the date the item was last see (usually the last time the barcode was scanned or inventory was done) `stack` tinyint(1) default NULL, - `notforloan` tinyint(1) NOT NULL default 0, - `damaged` tinyint(1) NOT NULL default 0, - `itemlost` tinyint(1) NOT NULL default 0, - `wthdrawn` tinyint(1) NOT NULL default 0, - `itemcallnumber` varchar(255) default NULL, - `issues` smallint(6) default NULL, - `renewals` smallint(6) default NULL, - `reserves` smallint(6) default NULL, - `restricted` tinyint(1) default NULL, - `itemnotes` mediumtext, - `holdingbranch` varchar(10) default NULL, + `notforloan` tinyint(1) NOT NULL default 0, -- authorized value defining why this item is not for loan (MARC21 952$7) + `damaged` tinyint(1) NOT NULL default 0, -- authorized value defining this item as damaged (MARC21 952$4) + `itemlost` tinyint(1) NOT NULL default 0, -- authorized value defining this item as lost (MARC21 952$1) + `wthdrawn` tinyint(1) NOT NULL default 0, -- authorized value defining this item as withdrawn (MARC21 952$0) + `itemcallnumber` varchar(255) default NULL, -- call number for this item (MARC21 952$o) + `issues` smallint(6) default NULL, -- number of times this item has been checked out/issued + `renewals` smallint(6) default NULL, -- number of times this item has been renewed + `reserves` smallint(6) default NULL, -- number of times this item has been placed on hold/reserved + `restricted` tinyint(1) default NULL, -- authorized value defining use restrictions for this item (MARC21 952$5) + `itemnotes` mediumtext, -- public notes on this item (MARC21 952$x) + `holdingbranch` varchar(10) default NULL, -- foreign key from the branches table for the library that is currently in possession item (MARC21 952$b) `paidfor` mediumtext, - `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `location` varchar(80) default NULL, - `permanent_location` varchar(80) default NULL, - `onloan` date default NULL, - `cn_source` varchar(10) default NULL, - `cn_sort` varchar(30) default NULL, - `ccode` varchar(10) default NULL, - `materials` varchar(10) default NULL, - `uri` varchar(255) default NULL, - `itype` varchar(10) default NULL, - `more_subfields_xml` longtext default NULL, - `enumchron` text default NULL, - `copynumber` varchar(32) default NULL, - `stocknumber` varchar(32) default NULL, + `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this item was last altered + `location` varchar(80) default NULL, -- authorized value for the shelving location for this item (MARC21 952$c) + `permanent_location` varchar(80) default NULL, -- linked to the CART and PROC temporary locations feature, stores the permanent shelving location + `onloan` date default NULL, -- defines if this item is currently checked out (1 for yes, 0 for no) + `cn_source` varchar(10) default NULL, -- classification source used on this item (MARC21 952$2) + `cn_sort` varchar(30) default NULL, -- normalized form of the call number (MARC21 952$o) used for sorting + `ccode` varchar(10) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8) + `materials` varchar(10) default NULL, -- materials specified (MARC21 952$3) + `uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u) + `itype` varchar(10) default NULL, -- foreign key from the itemtypes table defining the type for this item (MARC21 952$y) + `more_subfields_xml` longtext default NULL, -- additional 952 subfields in XML format + `enumchron` text default NULL, -- serial enumeration/chronology for the item (MARC21 952$h) + `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t) + `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i) PRIMARY KEY (`itemnumber`), UNIQUE KEY `itembarcodeidx` (`barcode`), KEY `itemstocknumberidx` (`stocknumber`), -- 1.7.2.3 From nengard at bywatersolutions.com Sun Oct 2 08:17:51 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Sun, 2 Oct 2011 02:17:51 -0400 Subject: [Koha-patches] [PATCH] Bug 6716 Document deleteditems table Message-ID: <1317536271-4341-1-git-send-email-nengard@bywatersolutions.com> This patch documents the deleted items table. Some fields were left undocumented because I was unsure of what data was stored there: stack - might be linked to shelving number, but need confirmation paidfor - pretty sure this is unused, but don't want to document it that way --- installer/data/mysql/kohastructure.sql | 76 ++++++++++++++++---------------- 1 files changed, 38 insertions(+), 38 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3a51df5..d1b8c67 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -731,46 +731,46 @@ CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower DROP TABLE IF EXISTS `deleteditems`; CREATE TABLE `deleteditems` ( - `itemnumber` int(11) NOT NULL default 0, - `biblionumber` int(11) NOT NULL default 0, - `biblioitemnumber` int(11) NOT NULL default 0, - `barcode` varchar(20) default NULL, - `dateaccessioned` date default NULL, - `booksellerid` mediumtext default NULL, - `homebranch` varchar(10) default NULL, - `price` decimal(8,2) default NULL, - `replacementprice` decimal(8,2) default NULL, - `replacementpricedate` date default NULL, - `datelastborrowed` date default NULL, - `datelastseen` date default NULL, + `itemnumber` int(11) NOT NULL default 0, -- primary key and unique identifier added by Koha + `biblionumber` int(11) NOT NULL default 0, -- foreign key from biblio table used to link this item to the right bib record + `biblioitemnumber` int(11) NOT NULL default 0, -- foreign key from the biblioitems table to link to item to additional information + `barcode` varchar(20) default NULL, -- item barcode (MARC21 952$p) + `dateaccessioned` date default NULL, -- date the item was acquired or added to Koha (MARC21 952$d) + `booksellerid` mediumtext default NULL, -- where the item was purchased (MARC21 952$e) + `homebranch` varchar(10) default NULL, -- foreign key from the branches table for the library that owns this item (MARC21 952$a) + `price` decimal(8,2) default NULL, -- purchase price (MARC21 952$g) + `replacementprice` decimal(8,2) default NULL, -- cost the library charges to replace the item if it has been marked lost (MARC21 952$v) + `replacementpricedate` date default NULL, -- the date the price is effective from (MARC21 952$w) + `datelastborrowed` date default NULL, -- the date the item was last checked out + `datelastseen` date default NULL, -- the date the item was last see (usually the last time the barcode was scanned or inventory was done) `stack` tinyint(1) default NULL, - `notforloan` tinyint(1) NOT NULL default 0, - `damaged` tinyint(1) NOT NULL default 0, - `itemlost` tinyint(1) NOT NULL default 0, - `wthdrawn` tinyint(1) NOT NULL default 0, - `itemcallnumber` varchar(255) default NULL, - `issues` smallint(6) default NULL, - `renewals` smallint(6) default NULL, - `reserves` smallint(6) default NULL, - `restricted` tinyint(1) default NULL, - `itemnotes` mediumtext, - `holdingbranch` varchar(10) default NULL, + `notforloan` tinyint(1) NOT NULL default 0, -- authorized value defining why this item is not for loan (MARC21 952$7) + `damaged` tinyint(1) NOT NULL default 0, -- authorized value defining this item as damaged (MARC21 952$4) + `itemlost` tinyint(1) NOT NULL default 0, -- authorized value defining this item as lost (MARC21 952$1) + `wthdrawn` tinyint(1) NOT NULL default 0, -- authorized value defining this item as withdrawn (MARC21 952$0) + `itemcallnumber` varchar(255) default NULL, -- call number for this item (MARC21 952$o) + `issues` smallint(6) default NULL, -- number of times this item has been checked out + `renewals` smallint(6) default NULL, -- number of times this item has been renewed + `reserves` smallint(6) default NULL, -- number of times this item has been placed on hold/reserved + `restricted` tinyint(1) default NULL, -- authorized value defining use restrictions for this item (MARC21 952$5) + `itemnotes` mediumtext, -- public notes on this item (MARC21 952$x) + `holdingbranch` varchar(10) default NULL, -- foreign key from the branches table for the library that is currently in possession item (MARC21 952$b) `paidfor` mediumtext, - `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `location` varchar(80) default NULL, - `permanent_location` varchar(80) default NULL, - `onloan` date default NULL, - `cn_source` varchar(10) default NULL, - `cn_sort` varchar(30) default NULL, - `ccode` varchar(10) default NULL, - `materials` varchar(10) default NULL, - `uri` varchar(255) default NULL, - `itype` varchar(10) default NULL, - `more_subfields_xml` longtext default NULL, - `enumchron` text default NULL, - `copynumber` varchar(32) default NULL, - `stocknumber` varchar(32) default NULL, - `marc` longblob, + `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this item was last altered + `location` varchar(80) default NULL, -- authorized value for the shelving location for this item (MARC21 952$c) + `permanent_location` varchar(80) default NULL, -- linked to the CART and PROC temporary locations feature, stores the permanent shelving location + `onloan` date default NULL, -- defines if this item is currently checked out (1 for yes, 0 for no) + `cn_source` varchar(10) default NULL, -- classification source used on this item (MARC21 952$2) + `cn_sort` varchar(30) default NULL, -- normalized form of the call number (MARC21 952$o) used for sorting + `ccode` varchar(10) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8) + `materials` varchar(10) default NULL, -- materials specified (MARC21 952$3) + `uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u) + `itype` varchar(10) default NULL, -- foreign key from the itemtypes table defining the type for this item (MARC21 952$y) + `more_subfields_xml` longtext default NULL, -- additional 952 subfields in XML format + `enumchron` text default NULL, -- serial enumeration/chronology for the item (MARC21 952$h) + `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t) + `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i) + `marc` longblob, -- unused in Koha PRIMARY KEY (`itemnumber`), KEY `delitembarcodeidx` (`barcode`), KEY `delitemstocknumberidx` (`stocknumber`), -- 1.7.2.3 From nengard at bywatersolutions.com Sun Oct 2 10:05:35 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Sun, 2 Oct 2011 04:05:35 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Use unitprice in neworder so that the value is saved in the database and so it will be the same field used as to receive shipments Message-ID: <1317542735-4928-1-git-send-email-nengard@bywatersolutions.com> From: Maxime Pelletier http://bugs.koha-community.org/show_bug.cgi?id=6879 Signed-off-by: Nicole C. Engard Signed off with a note: this doesn't fix everything mentioned in the bug. It also might clash with bug 4831 and should be tested with that patch. --- acqui/neworderempty.pl | 1 + .../prog/en/modules/acqui/neworderempty.tt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 6361125..02b829a 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -383,6 +383,7 @@ $template->param( listprice => sprintf("%.2f", $data->{'listprice'}||$data->{'price'}||$listprice), total => sprintf("%.2f", ($data->{'ecost'}||0)*($data->{'quantity'}||0) ), ecost => $data->{'ecost'}, + unitprice => sprintf("%.2f", $data->{'unitprice'}), notes => $data->{'notes'}, publishercode => $data->{'publishercode'}, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index 39e9ca2..e74a0e5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -416,10 +416,10 @@ $(document).ready(function()
  • [% IF ( close ) %] - + [% ELSE %] - + [% END %]
  • -- 1.7.2.3 From oleonard at myacpl.org Tue Oct 4 16:23:51 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 4 Oct 2011 10:23:51 -0400 Subject: [Koha-patches] [PATCH] Follow-up fix for Bug 4473 - Recent comments view for the OPAC Message-ID: <1317738231-24928-1-git-send-email-oleonard@myacpl.org> This follow-up adds a system preference which controls display of a link to recent comments in the OPAC masthead alongside "Advanced search," "Tag cloud," etc. --- C4/Auth.pm | 1 + installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 +++++++ .../prog/en/modules/admin/preferences/opac.pref | 7 +++++++ koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc | 1 + 5 files changed, 17 insertions(+), 0 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 7211769..3690f5e 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -424,6 +424,7 @@ sub get_template_and_user { OpacHighlightedWords => C4::Context->preference("OpacHighlightedWords"), OPACItemHolds => C4::Context->preference("OPACItemHolds"), OPACShelfBrowser => "". C4::Context->preference("OPACShelfBrowser"), + OpacShowRecentComments => C4::Context->preference("OpacShowRecentComments"), OPACURLOpenInNewWindow => "" . C4::Context->preference("OPACURLOpenInNewWindow"), OPACUserCSS => "". C4::Context->preference("OPACUserCSS"), OPACViewOthersSuggestions => "" . C4::Context->preference("OPACViewOthersSuggestions"), diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 79d4893..27bef9a 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -318,3 +318,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('MARCAuthorityControlField008', '|| aca||aabn | a|a d', NULL, NULL, 'Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6b88c29..ebb6cb3 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4446,6 +4446,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');"); + print "Upgrade to $DBversion done (Add syspref OpacShowRecentComments. When the preference is turned on a link to recent comments will appear in the OPAC masthead. )\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS 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 8bbf692..deb7cbb 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 @@ -86,6 +86,13 @@ OPAC: no: "Don't show" - the name of the patron that has an item checked out on item detail pages on the OPAC. - + - pref: OpacShowRecentComments + default: 0 + choices: + yes: Show + no: "Don't show" + - a link to recent comments in the OPAC masthead. + - - pref: OpacHighlightedWords choices: yes: Highlight diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc index 2510a7f..07268a2 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc @@ -112,6 +112,7 @@ Advanced Search [% IF ( OpacBrowser ) %] | Browse by Hierarchy[% END %] [% IF ( OpacAuthorities ) %] | Browse by author or subject[% END %] +[% IF ( OpacShowRecentComments ) %] | Recent Comments[% END %] [% IF ( TagsEnabled ) %] | Tag Cloud[% END %] [% IF ( OpacCloud ) %] | Subject Cloud[% END %] [% IF ( OpacTopissue ) %] | Most Popular[% END %] -- 1.7.3 From ruth at bywatersolutions.com Tue Oct 4 16:40:29 2011 From: ruth at bywatersolutions.com (D Ruth Bavousett) Date: Tue, 4 Oct 2011 07:40:29 -0700 Subject: [Koha-patches] [PATCH] Bug 6867: Date last seen ignored on import Message-ID: <1317739229-30615-1-git-send-email-ruth@bywatersolutions.com> The date last seen field (952 $r) and replacement price date (952 $w) were being ignored on import, being replaced with NOW() as a hardcoded value. This patch will allow a value to be imported, but if none is, it will use the ISO date of import as a default. --- C4/Items.pm | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index bc36dd1..69557aa 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1971,9 +1971,9 @@ sub _koha_new_item { homebranch = ?, price = ?, replacementprice = ?, - replacementpricedate = NOW(), + replacementpricedate = ?, datelastborrowed = ?, - datelastseen = NOW(), + datelastseen = ?, stack = ?, notforloan = ?, damaged = ?, @@ -2002,6 +2002,7 @@ sub _koha_new_item { stocknumber = ? "; my $sth = $dbh->prepare($query); + my $today = C4::Dates->today('iso'); $sth->execute( $item->{'biblionumber'}, $item->{'biblioitemnumber'}, @@ -2011,7 +2012,9 @@ sub _koha_new_item { $item->{'homebranch'}, $item->{'price'}, $item->{'replacementprice'}, + $item->{'replacementpricedate'} || $today, $item->{datelastborrowed}, + $item->{datelastseen} || $today, $item->{stack}, $item->{'notforloan'}, $item->{'damaged'}, -- 1.7.2.5 From nengard at bywatersolutions.com Sun Oct 2 11:39:27 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Sun, 2 Oct 2011 05:39:27 -0400 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_Bug_6966=3A_Admin_Help_Files?= Message-ID: <1317548367-5240-1-git-send-email-nengard@bywatersolutions.com> This patch updates help files in the admin folder. It removes two files that aren't used anymore and adds links to the manual for all files that weren't edit in patches for bug 6942. --- .../prog/en/modules/help/admin/aqbookfund.tt | 41 -------------------- .../prog/en/modules/help/admin/aqbudget.tt | 33 ---------------- .../prog/en/modules/help/admin/aqbudgetperiods.tt | 2 + .../prog/en/modules/help/admin/aqbudgets.tt | 4 +- .../prog/en/modules/help/admin/aqplan.tt | 2 + .../modules/help/admin/auth_subfields_structure.tt | 1 + .../en/modules/help/admin/auth_tag_structure.tt | 2 + .../en/modules/help/admin/authorised_values.tt | 2 + .../prog/en/modules/help/admin/authtypes.tt | 2 + .../prog/en/modules/help/admin/biblio_framework.tt | 2 + .../modules/help/admin/branch_transfer_limits.tt | 2 + .../prog/en/modules/help/admin/branches.tt | 4 +- .../prog/en/modules/help/admin/categorie.tt | 2 + .../prog/en/modules/help/admin/checkmarc.tt | 2 + .../prog/en/modules/help/admin/cities.tt | 2 + .../prog/en/modules/help/admin/classsources.tt | 2 + .../prog/en/modules/help/admin/currency.tt | 2 + .../prog/en/modules/help/admin/fieldmapping.tt | 2 + .../modules/help/admin/item_circulation_alerts.tt | 2 + .../prog/en/modules/help/admin/itemtypes.tt | 2 + .../prog/en/modules/help/admin/koha2marclinks.tt | 2 + .../modules/help/admin/marc_subfields_structure.tt | 2 + .../prog/en/modules/help/admin/marctagstructure.tt | 2 + .../prog/en/modules/help/admin/matching-rules.tt | 2 + .../en/modules/help/admin/patron-attr-types.tt | 2 + .../prog/en/modules/help/admin/preferences.tt | 2 + .../prog/en/modules/help/admin/roadtype.tt | 2 + .../prog/en/modules/help/admin/smart-rules.tt | 24 +++++------- .../prog/en/modules/help/admin/stopwords.tt | 2 + .../prog/en/modules/help/admin/z3950servers.tt | 2 + 30 files changed, 65 insertions(+), 90 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbookfund.tt delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbudget.tt diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbookfund.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbookfund.tt deleted file mode 100644 index 4127cb6..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbookfund.tt +++ /dev/null @@ -1,41 +0,0 @@ -[% INCLUDE 'help-top.inc' %] - -

    Fund Administration

    -

    -TIP: Funds may be ignored if you are setting your Global System Preferences for 'Acquisitions' to -"simple" acquisitions: the funds are only useful when using "normal" -acquisitions.
    -
    -

    -

    Funds & Budgets
    -

    -

    -"Funds" are accounts that you establish to track your -expenditures for library materials. They may be used for any kind of -material and should match the lines in your materials budget. For -instance, if your library establishes a budget line for books, another -for audiovisual materials, a third line for magazines, and a fourth -budget line for electronic databases, then you would have four funds.
    -
    -TIP: The first time you access this page, you will be asked to add your -first fund -- thereafter you will have the option of editing and -deleting funds. -

    -

    Adding a Fund

    -
      -
    • Click 'New Fund'
    • -
    • Each fund has a unique fund code, limited to a maximum of five characters, which identifies it
    • -
    • Enter in a fund name to provide more information for staff members about the fund
    • -
    • Funds can be library/branch specific if needed, but this is an optional field
    • -
    • Once a fund is created a budget can then be applied to it
    • -
    • Click 'Add budget' next to the fund you want to edit
    • -
    • IMPORTANT: Your dates will not save correctly unless you have set your date - format ('dateformat') in the Global System Preferences under 'I18N/L10N' -- DO - THIS BEFORE setting budgets
    • -
    • Once budgets have been added you can see/search them all by clicking 'Show all budgets' under the list of funds
    • -
    • Budget information will also be accessible via the 'Acquisitions' module
      -
    • -
    -From this module you can easily see what has been spent from each budget - -[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbudget.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbudget.tt deleted file mode 100644 index 590a11f..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbudget.tt +++ /dev/null @@ -1,33 +0,0 @@ -[% INCLUDE 'help-top.inc' %] - -

    Funds & Budgets

    - -

    TIP: Funds may be ignored if you are setting your Global System Preferences for 'Acquisitions' to "simple" acquisitions: the funds are only useful when using "normal" acquisitions.

    - -

    "Funds" are accounts that you establish to track your expenditures for library materials. They may be used for any kind of material and should match the lines in your materials budget. For instance, if your library establishes a budget line for books, another for audiovisual materials, a third line for magazines, and a fourth budget line for electronic databases, then you would have four funds.

    - -

    -TIP: The first time you access this page, you will be asked to add your first fund -- thereafter you will have the option of editing and deleting funds.

    - -

    Adding a Fund

    -
      -
    • Click 'New Fund'
    • -
    -
      -
    • Each fund has a unique fund code, limited to a maximum of five characters, which identifies it
    • -
    • Enter in a fund name to provide more information for staff members about the fund
    • -
    • Funds can be library specific if needed, but this is an optional field
    • -
    • Once a fund is created a budget can then be applied to it
    • -
    • Click 'Add budget' next to the fund you want to edit
    • -
    • IMPORTANT: Your dates will not save correctly unless you have set your date format ('dateformat') in the Global System Preferences under 'I18N/L10N'-- DO THIS BEFORE setting budgets
    • -
    - -
      -
    • Once budgets have been added you can see/search them all by clicking 'Show all budgets' under the list of funds
    • -
    • Budget information will also be accessible via the 'Acquisitions' module
    • -
    -
      -
    • From this module you can easily see what has been spent from each budget
    • -
    - -[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbudgetperiods.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbudgetperiods.tt index 6eae39d..5d362e8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbudgetperiods.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbudgetperiods.tt @@ -20,4 +20,6 @@

    Once you have made your edits, click the 'Save Changes' button. You will be brought to a list of your existing budgets.

    +

    See the full documentation for Budgets in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbudgets.tt index fb93814..08133af 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbudgets.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqbudgets.tt @@ -2,7 +2,7 @@

    Funds

    -

    Budgets are broken in to funds.

    +

    Budgets are broken into funds.

    Add a Fund

    @@ -31,4 +31,6 @@

    To the right of each fund you will find the 'Edit,' 'Delete,' and 'Add Child Fund' options. A child fund simply a sub-fund of the fund listed. An example would be to have a fund for 'Fiction' and under that have a fund for 'New Releases' and a fund for 'Science Fiction.' It is an optional way to further organize your finances.

    +

    See the full documentation for Funds in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqplan.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqplan.tt index 278cfed..2518ced 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqplan.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqplan.tt @@ -12,4 +12,6 @@

    Once your changes are made, click the 'Save' button. If you would like to export your data as a CSV file you can do so by entering a file name in the 'Output to a file named' field and clicking the 'Output' button.

    +

    See the full documentation for Budget Planning in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/auth_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/auth_subfields_structure.tt index cf6b639..282b96a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/auth_subfields_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/auth_subfields_structure.tt @@ -137,6 +137,7 @@ To edit the subfields associated with the tag, click 'Subfields' to the right of
  • To save your changes simply click the 'Save Changes' button at the top of the screen
  • +

    See the full documentation for Authorities in the manual (online).

    [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/auth_tag_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/auth_tag_structure.tt index db28c7d..dc01409 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/auth_tag_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/auth_tag_structure.tt @@ -21,4 +21,6 @@

    To the right of the new field is a link to 'Subfields,' you will need to add subfields before this tag will appear in your MARC editor.

    +

    See the full documentation for Authorities in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authorised_values.tt index 6da96c4..ce3b346 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authorised_values.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authorised_values.tt @@ -146,4 +146,6 @@
  • The new value will appear in the list along with existing values
  • +

    See the full documentation for Authorized Values in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authtypes.tt index c17c772..78a2095 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authtypes.tt @@ -6,4 +6,6 @@

    Koha comes with many of the necessary Authority frameworks already installed.

    +

    See the full documentation for Authorities in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/biblio_framework.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/biblio_framework.tt index 26cd5c8..9183344 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/biblio_framework.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/biblio_framework.tt @@ -34,4 +34,6 @@

    To make edits to the fields associated with the Framework you must first click 'MARC Structure' and then follow the instructions for editing subfields

    +

    See the full documentation for Frameworks in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/branch_transfer_limits.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/branch_transfer_limits.tt index 7cc9fe5..168d69c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/branch_transfer_limits.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/branch_transfer_limits.tt @@ -16,4 +16,6 @@

    In the above example, Centerville library will allow patrons to return items from all libraries except Liberty and Franklin to their branch.

    +

    See the full documentation for Library Transfer Limits in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/branches.tt index 62d09e0..973e2af 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/branches.tt @@ -1,6 +1,6 @@ [% INCLUDE 'help-top.inc' %] -

    Libraries & Groups

    +

    Libraries & Groups

    When setting up your Koha system you will want to add information for every library that will be sharing your system. This data is used in several areas of Koha.

    @@ -47,4 +47,6 @@

    Properties are then applied to libraries via the add or edit library form.

    +

    See the full documentation for Libraries & Groups in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/categorie.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/categorie.tt index 97e3cbe..4102c46 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/categorie.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/categorie.tt @@ -77,4 +77,6 @@ +

    See the full documentation for Patron Categories in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/checkmarc.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/checkmarc.tt index 54cd878..e9eeba8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/checkmarc.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/checkmarc.tt @@ -6,4 +6,6 @@

    If you change your MARC Bibliographic framework it's recommended that you run this tool to test for errors in your definition.

    +

    See the full documentation for the MARC Bibliographic Framework Test in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/cities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/cities.tt index fdb27ac..f1574af 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/cities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/cities.tt @@ -18,4 +18,6 @@

    This will allow for easy entry of local cities into the patron record without risking the potential for typos or mistaken zip/postal codes.

    +

    See the full documentation for Cities and Towns in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/classsources.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/classsources.tt index f7e8bbd..aad39f0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/classsources.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/classsources.tt @@ -53,4 +53,6 @@
  • Choose an appropriate filing routine - dewey, generic or lcc
  • +

    See the full documentation for Classification Sources in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/currency.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/currency.tt index b6d9d19..22d2d63 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/currency.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/currency.tt @@ -8,4 +8,6 @@

    The active currency is the main currency you use in your library. Your active currency will have a check mark in the 'Active' column. If you don't have an active currency you will see an error message telling you to choose an active currency.

    +

    See the full documentation for Currencies and Exchange Rates in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/fieldmapping.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/fieldmapping.tt index 6c4a3b0..d689c55 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/fieldmapping.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/fieldmapping.tt @@ -20,4 +20,6 @@

    Future developments will include additional keyword assigned fields.

    +

    See the full documentation for Keyword to MARC Mapping in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/item_circulation_alerts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/item_circulation_alerts.tt index fd324a4..e93bdd8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/item_circulation_alerts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/item_circulation_alerts.tt @@ -19,4 +19,6 @@
  • By default all item types and all patrons are notified of check ins and check outs. To change this, click on the item/patron type combo that you would like to stop notices for.
  • +

    See the full documentation for Item Circulation Alerts in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/itemtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/itemtypes.tt index bb68cb6..bbf42b5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/itemtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/itemtypes.tt @@ -57,4 +57,6 @@

    You will not be able to delete item types that are being used by items within your system.

    +

    See the full documentation for Item Types in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/koha2marclinks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/koha2marclinks.tt index deaced4..85becbd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/koha2marclinks.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/koha2marclinks.tt @@ -12,4 +12,6 @@

    Important: At this time you can map only 1 MARC field to 1 Koha field. This means that you won't be able to map both the 100a and the 700a to the author field, you need to choose one or the other.

    +

    See the full documentation for Koha to MARC Mapping in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/marc_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/marc_subfields_structure.tt index 6b70760..2a8801c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/marc_subfields_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/marc_subfields_structure.tt @@ -137,4 +137,6 @@ To edit the subfields associated with the tag, click 'Subfields' to the right of
  • To save your changes simply click the 'Save Changes' button at the top of the screen
  • +

    See the full documentation for MARC Frameworks in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/marctagstructure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/marctagstructure.tt index f4a250c..fcd52d9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/marctagstructure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/marctagstructure.tt @@ -21,4 +21,6 @@

    To the right of the new field is a link to 'Subfields,' you will need to add subfields before this tag will appear in your MARC editor.

    +

    See the full documentation for MARC Frameworks in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/matching-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/matching-rules.tt index 10d0a6d..c318cac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/matching-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/matching-rules.tt @@ -46,4 +46,6 @@
  • Required Match checks: none (remove the blank one)
  • +

    See the full documentation for Record Matching Rules in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/patron-attr-types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/patron-attr-types.tt index e304b69..c068da7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/patron-attr-types.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/patron-attr-types.tt @@ -56,4 +56,6 @@

    You will be unable to delete an attribute if it's in use.

    +

    See the full documentation for Patron Attribute Types in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/preferences.tt index 09df1fe..edc4c97 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/preferences.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/preferences.tt @@ -33,4 +33,6 @@
  • Web Services: includes preferences related to services like OAI-PMH.
  • +

    See the full documentation for System Preferences in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/roadtype.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/roadtype.tt index 9793051..4431222 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/roadtype.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/roadtype.tt @@ -10,4 +10,6 @@

    When adding or editing a patron, if you have road types defined, there will be a pull down to choose the road type from.

    +

    See the full documentation for Road Types in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/smart-rules.tt index 3b43612..3f63222 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/smart-rules.tt @@ -5,10 +5,9 @@

    These rules define how your items are circulated, how/when fines are calculated and how holds are handled.

    The rules are applied from most specific to less specific, using the first found in this order:

    -
      -
    • same library, same patron type, all item types
    • -
    • same library, same patron type, alll item types
    • +
    • same library, same patron type, same item type
    • +
    • same library, same patron type, all item type
    • same library, all patron types, same item type
    • same library, all patron types, all item types
    • all libraries, same patron type, same item type
    • @@ -19,24 +18,23 @@

      Tip: If you are a single library system choose your branch name before creating rules (sometimes having only rules for the 'all libraries' option can cause issues with holds)

      -

      Important: At the very least you will need to set an default circulation rule. This rule should be set for all item types, all libraries and all patron types. That will catch all instances that do not match a specific rule. When checking out if you do not have a rule for all libraries, all item types and all patron types then you may see patrons getting blocked from placing holds. You will also want a rule for your specific library set for all item types and all patron types to avoid this holds issue. Koha needs to know what rule to fall back on.

      +

      Important: At the very least you will need to set a default circulation rule. This rule should be set for all item types, all libraries and all patron categories. That will catch all instances that do not match a specific rule. When checking out if you do not have a rule for all libraries, all item types and all patron types then you may see patrons getting blocked from placing holds. You will also want a rule for your specific library set for all item types and all patron types to avoid this holds issue. Koha needs to know what rule to fall back on.

      Default Circulation Rules

      Using the issuing rules matrix you can define rules that depend on patron/item type combos. To set your rules, choose a library from the pull down (or 'all libraries' if you want to apply these rules to all branches):

      From the matrix you can choose any combination of patron categories and item types to apply the rules to

      -
      • First choose which patron category you'd like the rule to be applied to. If you leave this to 'All' it will apply to all patron categories
      • Choose the 'Item Type' you would like this rule to apply to. If you leave this to 'All' it will apply to all item types
      • Limit the number of items a patron can have checked out at the same time by entering a number in the 'Current Checkouts Allowed' field
      • Define the period of time and item can be checked out to a patron by entering the number of days in the 'Loan Period' box.
      • -
      • 'Fine Amount' should have the amount you would like to charge for overdue items +
      • You can also define a hard due date for a specific patron category and item type. A hard due date ignores your usual circulation rules and makes it so that all items of the type defined are due on, before or after the date you specify.
      • +
      • 'Fine Amount' should have the amount you would like to charge for overdue items
        • -
        • Enter only numbers and decimal points (no currency symbols).
        • +
        • Important Enter only numbers and decimal points (no currency symbols).
        -
      • The 'Fine Grace Period' is the period of time an item can be overdue before you start charging fines.
      • Enter the 'Fine Charging Interval' in days (ex. charge fines every 1 day, or every 2 days)
      • If your library 'fines' patrons by suspending their account you can enter the number of days their fine should be suspended in the 'Suspension in Days' field
      • @@ -56,31 +54,27 @@

        You can set a default maximum number of checkouts and hold policy that will be used if none is defined below for a particular item type or category.

        From this menu you can set a default to apply to all item types and patrons in the library.

        -
        • In 'Total Current Checkouts Allowed' enter the total number of items patrons can have checked out at one time
        • -
        • Control where patrons can place holds from using the 'Hold Policy' menu +
        • Control where patrons can place holds from using the 'Hold Policy' menu
          • From Any Library: Patrons from any library may put this item on hold. (default if none is defined)
          • From Home Library: Only patrons from the item's home library may put this book on hold.
          • No Holds Allowed: No patron may put this book on hold.
          -
        • Once your policy is set, you can unset it by clicking the 'Unset' link to the right of the rule
        -

        Checkouts Per Patron

        For this library, you can specify the maximum number of loans that a patron of a given category can make, regardless of the item type.

        -

        If the total amount loanable for a given patron category is left blank, no limit applies, except possibly for a limit you define for a specific item type.

        +

        Tip: If the total amount loanable for a given patron category is left blank, no limit applies, except possibly for a limit you define for a specific item type.

        Item Hold Policies

        For this library, you can edit rules for given itemtypes, regardless of the patron's category. Currently, this means hold policies.

        The various policies have the following effects:

        -
        • From Any Library: Patrons from any library may put this item on hold. (default if none is defined)
        • From Home Library: Only patrons from the item's home library may put this book on hold.
        • @@ -91,4 +85,6 @@

          Important: These policies are based on the patron's home branch, not the branch that the reserving staff member is from.

          +

          See the full documentation for Circulation and Fine Rules in the manual (online).

          + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/stopwords.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/stopwords.tt index 7fa1807..12e54e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/stopwords.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/stopwords.tt @@ -12,4 +12,6 @@

          Important: If you change something in this table, ask your administrator to run misc/batchRebuildBiblioTables.pl script.

          +

          See the full documentation for Stop Words in the manual (online).

          + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/z3950servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/z3950servers.tt index 1d5d284..51a2a8f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/z3950servers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/z3950servers.tt @@ -38,4 +38,6 @@
        • VANCOUVER PUBLIC LIBRARY z3950.vpl.ca:210 Horizon
        +

        See the full documentation for Z39.50 Servers in the manual (online).

        + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From nengard at bywatersolutions.com Sun Oct 2 11:48:53 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Sun, 2 Oct 2011 05:48:53 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6867: Date last seen ignored on import Message-ID: <1317548933-5439-1-git-send-email-nengard@bywatersolutions.com> From: D Ruth Bavousett The date last seen field (952 $r) and replacement price date (952 $w) were being ignored on import, being replaced with NOW() as a hardcoded value. This patch will allow a value to be imported, but if none is, it will use the ISO date of import as a default. Signed-off-by: Nicole C. Engard --- C4/Items.pm | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index bc36dd1..69557aa 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1971,9 +1971,9 @@ sub _koha_new_item { homebranch = ?, price = ?, replacementprice = ?, - replacementpricedate = NOW(), + replacementpricedate = ?, datelastborrowed = ?, - datelastseen = NOW(), + datelastseen = ?, stack = ?, notforloan = ?, damaged = ?, @@ -2002,6 +2002,7 @@ sub _koha_new_item { stocknumber = ? "; my $sth = $dbh->prepare($query); + my $today = C4::Dates->today('iso'); $sth->execute( $item->{'biblionumber'}, $item->{'biblioitemnumber'}, @@ -2011,7 +2012,9 @@ sub _koha_new_item { $item->{'homebranch'}, $item->{'price'}, $item->{'replacementprice'}, + $item->{'replacementpricedate'} || $today, $item->{datelastborrowed}, + $item->{datelastseen} || $today, $item->{stack}, $item->{'notforloan'}, $item->{'damaged'}, -- 1.7.2.3 From nengard at bywatersolutions.com Sun Oct 2 11:52:38 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Sun, 2 Oct 2011 05:52:38 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Follow-up fix for Bug 4473 - Recent comments view for the OPAC Message-ID: <1317549158-5571-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard This follow-up adds a system preference which controls display of a link to recent comments in the OPAC masthead alongside "Advanced search," "Tag cloud," etc. Signed-off-by: Nicole C. Engard --- C4/Auth.pm | 1 + installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 +++++++ .../prog/en/modules/admin/preferences/opac.pref | 7 +++++++ koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc | 1 + 5 files changed, 17 insertions(+), 0 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 7211769..3690f5e 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -424,6 +424,7 @@ sub get_template_and_user { OpacHighlightedWords => C4::Context->preference("OpacHighlightedWords"), OPACItemHolds => C4::Context->preference("OPACItemHolds"), OPACShelfBrowser => "". C4::Context->preference("OPACShelfBrowser"), + OpacShowRecentComments => C4::Context->preference("OpacShowRecentComments"), OPACURLOpenInNewWindow => "" . C4::Context->preference("OPACURLOpenInNewWindow"), OPACUserCSS => "". C4::Context->preference("OPACUserCSS"), OPACViewOthersSuggestions => "" . C4::Context->preference("OPACViewOthersSuggestions"), diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 79d4893..27bef9a 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -318,3 +318,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('MARCAuthorityControlField008', '|| aca||aabn | a|a d', NULL, NULL, 'Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6b88c29..ebb6cb3 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4446,6 +4446,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');"); + print "Upgrade to $DBversion done (Add syspref OpacShowRecentComments. When the preference is turned on a link to recent comments will appear in the OPAC masthead. )\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS 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 8bbf692..deb7cbb 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 @@ -86,6 +86,13 @@ OPAC: no: "Don't show" - the name of the patron that has an item checked out on item detail pages on the OPAC. - + - pref: OpacShowRecentComments + default: 0 + choices: + yes: Show + no: "Don't show" + - a link to recent comments in the OPAC masthead. + - - pref: OpacHighlightedWords choices: yes: Highlight diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc index 2510a7f..07268a2 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc @@ -112,6 +112,7 @@ Advanced Search [% IF ( OpacBrowser ) %] | Browse by Hierarchy[% END %] [% IF ( OpacAuthorities ) %] | Browse by author or subject[% END %] +[% IF ( OpacShowRecentComments ) %] | Recent Comments[% END %] [% IF ( TagsEnabled ) %] | Tag Cloud[% END %] [% IF ( OpacCloud ) %] | Subject Cloud[% END %] [% IF ( OpacTopissue ) %] | Most Popular[% END %] -- 1.7.2.3 From oleonard at myacpl.org Tue Oct 4 17:52:22 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 4 Oct 2011 11:52:22 -0400 Subject: [Koha-patches] [PATCH] Suggested change to Bug 5725 - Batch modifications for Biblios Message-ID: <1317743542-25530-1-git-send-email-oleonard@myacpl.org> This modification changes the "Batch edit" button to a link in the "Selected items: " set alongside "add to a list," "place hold," etc. Instead of always batch editing all items, the user can select individual ones to be passed to the batch edit page. --- koha-tmpl/intranet-tmpl/prog/en/js/basket.js | 12 ++++--- .../intranet-tmpl/prog/en/modules/basket/basket.tt | 31 +++++++++----------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js index 03dc306..31ffc11 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js @@ -434,9 +434,11 @@ $(document).ready(function(){ }); function batchEdit(){ - var valCookie = readCookie(nameCookie); - var strCookie = nameParam + "=" + valCookie; - - var loc = CGIBIN + "tools/batchedit.pl?" + strCookie; - window.opener.location = loc; + var items = document.getElementById('records').value; + if(items){ + var loc = CGIBIN + "tools/batchedit.pl?" + nameParam + "=" + items; + window.opener.location = loc; + } else { + alert(MSG_NO_RECORD_SELECTED); + } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt index 05a8acc..6049f08 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt @@ -13,16 +13,6 @@ @@ -194,10 +198,34 @@ $(document).ready(function(){
        Merge reference + + + + + +
          -
        1. -
        2. +
        3. +
        +
        + [% IF frameworkselect %] +
        + + [% END %] +
        +
        -- 1.6.5 From nengard at bywatersolutions.com Mon Oct 3 05:16:14 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Sun, 2 Oct 2011 23:16:14 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5459 - Holds not being shifted when merging biblios Message-ID: <1317611774-9784-1-git-send-email-nengard@bywatersolutions.com> From: Chris Cormack Holds are now shifted and reordered by date placed. Holds already marked waiting, or in transit are not reordered. Signed-off-by: Nicole C. Engard --- C4/Reserves.pm | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- cataloguing/merge.pl | 5 +++++ 2 files changed, 53 insertions(+), 1 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index f83f0ff..6677d91 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -3,6 +3,7 @@ package C4::Reserves; # Copyright 2000-2002 Katipo Communications # 2006 SAN Ouest Provence # 2007-2010 BibLibre Paul POULAIN +# 2011 Catalyst IT # # This file is part of Koha. # @@ -86,7 +87,7 @@ This modules provides somes functions to deal with reservations. BEGIN { # set the version for version checking $VERSION = 3.01; - require Exporter; + require Exporter; @ISA = qw(Exporter); @EXPORT = qw( &AddReserve @@ -121,6 +122,7 @@ BEGIN { &AlterPriority &ToggleLowestPriority ); + @EXPORT_OK = qw( MergeHolds ); } =head2 AddReserve @@ -1809,6 +1811,51 @@ sub _ShiftPriorityByDateAndPriority { return $new_priority; # so the caller knows what priority they wind up receiving } +=head2 MergeHolds + + MergeHolds($dbh,$to_biblio, $from_biblio); + +This shifts the holds from C<$from_biblio> to C<$to_biblio> and reorders them by the date they were placed + +=cut + +sub MergeHolds { + my ( $dbh, $to_biblio, $from_biblio ) = @_; + my $sth = $dbh->prepare( + "SELECT count(*) as reservenumber FROM reserves WHERE biblionumber = ?" + ); + $sth->execute($from_biblio); + if ( my $data = $sth->fetchrow_hashref() ) { + + # holds exist on old record, if not we don't need to do anything + $sth = $dbh->prepare( + "UPDATE reserves SET biblionumber = ? WHERE biblionumber = ?"); + $sth->execute( $to_biblio, $from_biblio ); + + # Reorder by date + # don't reorder those already waiting + + $sth = $dbh->prepare( +"SELECT * FROM reserves WHERE biblionumber = ? AND (found <> ? AND found <> ? OR found is NULL) ORDER BY reservedate ASC" + ); + my $upd_sth = $dbh->prepare( +"UPDATE reserves SET priority = ? WHERE biblionumber = ? AND borrowernumber = ? + AND reservedate = ? AND constrainttype = ? AND (itemnumber = ? or itemnumber is NULL) " + ); + $sth->execute( $to_biblio, 'W', 'T' ); + my $priority = 1; + while ( my $reserve = $sth->fetchrow_hashref() ) { + $upd_sth->execute( + $priority, $to_biblio, + $reserve->{'borrowernumber'}, $reserve->{'reservedate'}, + $reserve->{'constrainttype'}, $reserve->{'itemnumber'} + ); + $priority++; + } + } +} + + =head1 AUTHOR Koha Development Team diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl index c97ca7a..e3ee725 100755 --- a/cataloguing/merge.pl +++ b/cataloguing/merge.pl @@ -2,6 +2,7 @@ # Copyright 2009 BibLibre +# Parts Copyright Catalyst IT 2011 # # This file is part of Koha. # @@ -26,6 +27,7 @@ use C4::Auth; use C4::Items; use C4::Biblio; use C4::Serials; +use C4::Reserves qw/MergeHolds/; my $input = new CGI; my @biblionumber = $input->param('biblionumber'); @@ -100,6 +102,8 @@ if ($merge) { # Deleting the other record if (scalar(@errors) == 0) { + # Move holds + MergeHolds($dbh,$tobiblio,$frombiblio); my $error = DelBiblio($frombiblio); push @errors, $error if ($error); } @@ -251,3 +255,4 @@ sub createKey(){ } + -- 1.7.2.3 From oleonard at myacpl.org Thu Oct 6 14:40:51 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 6 Oct 2011 08:40:51 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] bug_6974: bugfix: do not create empty record before building input for new biblio Message-ID: <1317904851-30761-1-git-send-email-oleonard@myacpl.org> From: Srdjan Jankovic It messes up javascript default values Signed-off-by: Owen Leonard --- cataloguing/addbiblio.pl | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index ba10332..29df4a5 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -1037,10 +1037,7 @@ elsif ( $op eq "delete" ) { $biblionumber = ""; } - if ( $record eq -1 ) { - $record = TransformHtmlToMarc( $input ); - } - else { + if ( $record ne -1 ) { #FIXME: it's kind of silly to go from MARC::Record to MARC::File::XML and then back again just to fix the encoding eval { my $uxml = $record->as_xml; -- 1.7.3 From nengard at bywatersolutions.com Mon Oct 3 05:35:37 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Sun, 2 Oct 2011 23:35:37 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] bug_6210: Select framework if merging two records with different frameworks Message-ID: <1317612937-10088-1-git-send-email-nengard@bywatersolutions.com> From: Srdjan Jankovic Signed-off-by: Nicole C. Engard --- cataloguing/merge.pl | 134 ++++++++++++-------- .../prog/en/modules/cataloguing/merge.tt | 32 +++++- 2 files changed, 108 insertions(+), 58 deletions(-) diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl index c97ca7a..7a4f61e 100755 --- a/cataloguing/merge.pl +++ b/cataloguing/merge.pl @@ -26,6 +26,7 @@ use C4::Auth; use C4::Items; use C4::Biblio; use C4::Serials; +use C4::Koha; my $input = new CGI; my @biblionumber = $input->param('biblionumber'); @@ -104,77 +105,98 @@ if ($merge) { push @errors, $error if ($error); } - # Errors - my @errors_loop = map{{error => $_}}@errors; - # Parameters $template->param( - errors => \@errors_loop, result => 1, biblio1 => $input->param('biblio1') ); - #------------------------- # Show records to merge #------------------------- } else { - my $mergereference = $input->param('mergereference'); my $biblionumber = $input->param('biblionumber'); - my $data1 = GetBiblioData($biblionumber[0]); - my $data2 = GetBiblioData($biblionumber[1]); - - # Ask the user to choose which record will be the kept - if (not $mergereference) { - $template->param( - choosereference => 1, - biblio1 => $biblionumber[0], - biblio2 => $biblionumber[1], - title1 => $data1->{'title'}, - title2 => $data2->{'title'} - ); - } else { - - if (scalar(@biblionumber) != 2) { - push @errors, "An unexpected number of records was provided for merging. Currently only two records at a time can be merged."; - } - - # Checks if both records use the same framework - my $frameworkcode1 = &GetFrameworkCode($biblionumber[0]); - my $frameworkcode2 = &GetFrameworkCode($biblionumber[1]); - my $framework; - if ($frameworkcode1 ne $frameworkcode2) { - push @errors, "The records selected for merging are using different frameworks. Currently merging is only available for records using the same framework."; - } else { - $framework = $frameworkcode1; - } - - # Getting MARC Structure - my $tagslib = GetMarcStructure(1, $framework); - - my $notreference = ($biblionumber[0] == $mergereference) ? $biblionumber[1] : $biblionumber[0]; - - # Creating a loop for display - my @record1 = _createMarcHash(GetMarcBiblio($mergereference), $tagslib); - my @record2 = _createMarcHash(GetMarcBiblio($notreference), $tagslib); - - # Errors - my @errors_loop = map{{error => $_}}@errors; - - # Parameters - $template->param( - errors => \@errors_loop, - biblio1 => $mergereference, - biblio2 => $notreference, - mergereference => $mergereference, - record1 => @record1, - record2 => @record2, - framework => $framework - ); + if (scalar(@biblionumber) != 2) { + push @errors, "An unexpected number of records was provided for merging. Currently only two records at a time can be merged."; + } + else { + my $data1 = GetBiblioData($biblionumber[0]); + my $data2 = GetBiblioData($biblionumber[1]); + + # Checks if both records use the same framework + my $frameworkcode1 = &GetFrameworkCode($biblionumber[0]); + my $frameworkcode2 = &GetFrameworkCode($biblionumber[1]); + + if ($mergereference) { + + my $framework; + if ($frameworkcode1 ne $frameworkcode2) { + $framework = $input->param('frameworkcode') + or push @errors, "Famework not selected."; + } else { + $framework = $frameworkcode1; + } + + # Getting MARC Structure + my $tagslib = GetMarcStructure(1, $framework); + + my $notreference = ($biblionumber[0] == $mergereference) ? $biblionumber[1] : $biblionumber[0]; + + # Creating a loop for display + my @record1 = _createMarcHash(GetMarcBiblio($mergereference), $tagslib); + my @record2 = _createMarcHash(GetMarcBiblio($notreference), $tagslib); + + # Parameters + $template->param( + biblio1 => $mergereference, + biblio2 => $notreference, + mergereference => $mergereference, + record1 => @record1, + record2 => @record2, + framework => $framework + ); + } + else { + + # Ask the user to choose which record will be the kept + $template->param( + choosereference => 1, + biblio1 => $biblionumber[0], + biblio2 => $biblionumber[1], + title1 => $data1->{'title'}, + title2 => $data2->{'title'} + ); + if ($frameworkcode1 ne $frameworkcode2) { + my $frameworks = getframeworks; + my @frameworkselect; + foreach my $thisframeworkcode ( keys %$frameworks ) { + my %row = ( + value => $thisframeworkcode, + frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'}, + ); + if ($frameworkcode1 eq $thisframeworkcode){ + $row{'selected'} = 1; + } + push @frameworkselect, \%row; + } + $template->param( + frameworkselect => \@frameworkselect, + frameworkcode1 => $frameworkcode1, + frameworkcode2 => $frameworkcode2, + ); + } + } } } + +if (@errors) { + # Errors + my @errors_loop = map{{error => $_}}@errors; + $template->param( errors => \@errors_loop ); +} + output_html_with_http_headers $input, $cookie, $template->output; exit; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt index 0d8a84c..de14f24 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt @@ -161,6 +161,10 @@ $(document).ready(function(){ }); +function changeFramework(fw) { + $("#Frameworks").val(fw); +} + //]]> @@ -194,10 +198,34 @@ $(document).ready(function(){
        Merge reference + + + + + +
          -
        1. -
        2. +
        3. +
        +
        + [% IF frameworkselect %] +
        + + [% END %] +
        +
        -- 1.7.2.3 From paul.poulain at biblibre.com Thu Oct 6 14:56:08 2011 From: paul.poulain at biblibre.com (paul.poulain at biblibre.com) Date: Thu, 6 Oct 2011 14:56:08 +0200 Subject: [Koha-patches] [PATCH 1/3] Bug 6299 - Provide a list of authorized values for Relator terms Message-ID: <1317905770-3482-1-git-send-email-paul.poulain@biblibre.com> From: Tomas Cohen Arazi Signed-off-by: Marcel de Rooy August 10,2011: Tested install and upgrade. --- .../mysql/de-DE/optional/marc21_relatorterms.sql | 226 ++++++++++++++++++++ .../mysql/de-DE/optional/marc21_relatorterms.txt | 1 + .../data/mysql/en/optional/marc21_relatorterms.sql | 226 ++++++++++++++++++++ .../data/mysql/en/optional/marc21_relatorterms.txt | 1 + .../mysql/fr-FR/2-Optionel/marc21_relatorterms.sql | 226 ++++++++++++++++++++ .../mysql/fr-FR/2-Optionel/marc21_relatorterms.txt | 1 + .../nb-NO/2-Valgfritt/marc21_relatorterms.sql | 226 ++++++++++++++++++++ .../nb-NO/2-Valgfritt/marc21_relatorterms.txt | 1 + .../mysql/pl-PL/optional/marc21_relatorterms.sql | 226 ++++++++++++++++++++ .../mysql/pl-PL/optional/marc21_relatorterms.txt | 1 + .../mysql/ru-RU/optional/marc21_relatorterms.sql | 226 ++++++++++++++++++++ .../mysql/ru-RU/optional/marc21_relatorterms.txt | 1 + .../mysql/uk-UA/optional/marc21_relatorterms.sql | 226 ++++++++++++++++++++ .../mysql/uk-UA/optional/marc21_relatorterms.txt | 1 + 14 files changed, 1589 insertions(+), 0 deletions(-) create mode 100644 installer/data/mysql/de-DE/optional/marc21_relatorterms.sql create mode 100644 installer/data/mysql/de-DE/optional/marc21_relatorterms.txt create mode 100644 installer/data/mysql/en/optional/marc21_relatorterms.sql create mode 100644 installer/data/mysql/en/optional/marc21_relatorterms.txt create mode 100644 installer/data/mysql/fr-FR/2-Optionel/marc21_relatorterms.sql create mode 100644 installer/data/mysql/fr-FR/2-Optionel/marc21_relatorterms.txt create mode 100644 installer/data/mysql/nb-NO/2-Valgfritt/marc21_relatorterms.sql create mode 100644 installer/data/mysql/nb-NO/2-Valgfritt/marc21_relatorterms.txt create mode 100644 installer/data/mysql/pl-PL/optional/marc21_relatorterms.sql create mode 100644 installer/data/mysql/pl-PL/optional/marc21_relatorterms.txt create mode 100644 installer/data/mysql/ru-RU/optional/marc21_relatorterms.sql create mode 100644 installer/data/mysql/ru-RU/optional/marc21_relatorterms.txt create mode 100644 installer/data/mysql/uk-UA/optional/marc21_relatorterms.sql create mode 100644 installer/data/mysql/uk-UA/optional/marc21_relatorterms.txt diff --git a/installer/data/mysql/de-DE/optional/marc21_relatorterms.sql b/installer/data/mysql/de-DE/optional/marc21_relatorterms.sql new file mode 100644 index 0000000..485bbed --- /dev/null +++ b/installer/data/mysql/de-DE/optional/marc21_relatorterms.sql @@ -0,0 +1,226 @@ +-- MARC code list for Relators, taken from +-- http://www.loc.gov/marc/relators/relacode.html + +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','acp','Art copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','act','Actor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','adp','Adapter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aft','Author of afterword, colophon, etc.'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anl','Analyst'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anm','Animator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ann','Annotator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ant','Bibliographic antecedent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','app','Applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aqt','Author in quotations or text abstracts'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arc','Architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ard','Artistic director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arr','Arranger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','art','Artist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asg','Assignee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asn','Associated name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','att','Attributed name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','auc','Auctioneer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aud','Author of dialog'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aui','Author of introduction'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aus','Author of screenplay'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aut','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bdd','Binding designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bjd','Bookjacket designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkd','Book designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkp','Book producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','blw','Blurb writer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bnd','Binder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bpd','Bookplate designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bsl','Bookseller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ccp','Conceptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','chr','Choreographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clb','Collaborator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cli','Client'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cll','Calligrapher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clr','Colorist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clt','Collotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmm','Commentator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmp','Composer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmt','Compositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cng','Cinematographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cnd','Conductor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cns','Censor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','coe','Contestant -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','col','Collector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','com','Compiler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','con','Conservator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cos','Contestant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cot','Contestant -appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cov','Cover designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpc','Copyright claimant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpe','Complainant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cph','Copyright holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpl','Complainant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpt','Complainant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cre','Creator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crp','Correspondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crr','Corrector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csl','Consultant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csp','Consultant to a project'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cst','Costume designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctb','Contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cte','Contestee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctg','Cartographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctr','Contractor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cts','Contestee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctt','Contestee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cur','Curator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cwt','Commentator for written text'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfd','Defendant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfe','Defendant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dft','Defendant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dgg','Degree grantor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dis','Dissertant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dln','Delineator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnc','Dancer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnr','Donor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpb','Distribution place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpc','Depicted'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpt','Depositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drm','Draftsman'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drt','Director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dsr','Designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dst','Distributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtc','Data contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dte','Dedicatee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtm','Data manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dto','Dedicator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dub','Dubious author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','edt','Editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','egr','Engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elg','Electrician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elt','Electrotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','eng','Engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','etr','Etcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','evp','Event place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','exp','Expert'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fac','Facsimilist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fld','Field director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','flm','Film editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fmo','Former owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fpy','First party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fnd','Funder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','frg','Forger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','gis','Geographic information specialist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','-grt','Graphic technician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hnr','Honoree'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hst','Host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ill','Illustrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ilu','Illuminator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ins','Inscriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','inv','Inventor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','itr','Instrumentalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ive','Interviewee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ivr','Interviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbr','Laboratory'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbt','Librettist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ldr','Laboratory director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','led','Lead'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lee','Libelee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lel','Libelee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','len','Lender'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','let','Libelee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lgd','Lighting designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lie','Libelant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lil','Libelant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lit','Libelant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lsa','Landscape architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lse','Licensee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lso','Licensor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ltg','Lithographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lyr','Lyricist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mcp','Music copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfp','Manufacture place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfr','Manufacturer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mdc','Metadata contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mod','Moderator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mon','Monitor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrb','Marbler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrk','Markup editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','msd','Musical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mte','Metal-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mus','Musician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','nrt','Narrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','opn','Opponent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','org','Originator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','orm','Organizer of meeting'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','oth','Other'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','own','Owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pat','Patron'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbd','Publishing director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbl','Publisher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pdr','Project director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pfr','Proofreader'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pht','Photographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','plt','Platemaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pma','Permitting agency'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pmn','Production manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pop','Printer of plates'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppm','Papermaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppt','Puppeteer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prc','Process contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prd','Production personnel'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prf','Performer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prg','Programmer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prm','Printmaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pro','Producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prp','Production place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prt','Printer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pta','Patent applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pte','Plaintiff -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptf','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pth','Patent holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptt','Plaintiff-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pup','Publication place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rbr','Rubricator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rce','Recording engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rcp','Recipient'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','red','Redactor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ren','Renderer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','res','Researcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rev','Reviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rps','Repository'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpt','Reporter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpy','Responsible party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rse','Respondent-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsg','Restager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsp','Respondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rst','Respondent-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rth','Research team head'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rtm','Research team member'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sad','Scientific advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sce','Scenarist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scl','Sculptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scr','Scribe'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sds','Sound designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sec','Secretary'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sgn','Signer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sht','Supporting host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sng','Singer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spk','Speaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spn','Sponsor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spy','Second party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','srv','Surveyor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','std','Set designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stl','Storyteller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stm','Stage manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stn','Standards body'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','str','Stereotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tcd','Technical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tch','Teacher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ths','Thesis advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trc','Transcriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trl','Translator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyd','Type designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyg','Typographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','uvp','University place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','vdg','Videographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','voc','Vocalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wam','Writer of accompanying material'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wdc','Woodcutter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wde','Wood-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wit','Witness'); diff --git a/installer/data/mysql/de-DE/optional/marc21_relatorterms.txt b/installer/data/mysql/de-DE/optional/marc21_relatorterms.txt new file mode 100644 index 0000000..ef8264b --- /dev/null +++ b/installer/data/mysql/de-DE/optional/marc21_relatorterms.txt @@ -0,0 +1 @@ +MARC Code List for Relators, as of http://www.loc.gov/marc/relators/relaterm.html diff --git a/installer/data/mysql/en/optional/marc21_relatorterms.sql b/installer/data/mysql/en/optional/marc21_relatorterms.sql new file mode 100644 index 0000000..485bbed --- /dev/null +++ b/installer/data/mysql/en/optional/marc21_relatorterms.sql @@ -0,0 +1,226 @@ +-- MARC code list for Relators, taken from +-- http://www.loc.gov/marc/relators/relacode.html + +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','acp','Art copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','act','Actor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','adp','Adapter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aft','Author of afterword, colophon, etc.'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anl','Analyst'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anm','Animator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ann','Annotator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ant','Bibliographic antecedent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','app','Applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aqt','Author in quotations or text abstracts'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arc','Architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ard','Artistic director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arr','Arranger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','art','Artist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asg','Assignee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asn','Associated name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','att','Attributed name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','auc','Auctioneer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aud','Author of dialog'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aui','Author of introduction'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aus','Author of screenplay'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aut','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bdd','Binding designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bjd','Bookjacket designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkd','Book designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkp','Book producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','blw','Blurb writer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bnd','Binder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bpd','Bookplate designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bsl','Bookseller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ccp','Conceptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','chr','Choreographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clb','Collaborator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cli','Client'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cll','Calligrapher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clr','Colorist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clt','Collotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmm','Commentator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmp','Composer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmt','Compositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cng','Cinematographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cnd','Conductor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cns','Censor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','coe','Contestant -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','col','Collector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','com','Compiler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','con','Conservator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cos','Contestant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cot','Contestant -appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cov','Cover designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpc','Copyright claimant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpe','Complainant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cph','Copyright holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpl','Complainant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpt','Complainant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cre','Creator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crp','Correspondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crr','Corrector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csl','Consultant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csp','Consultant to a project'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cst','Costume designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctb','Contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cte','Contestee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctg','Cartographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctr','Contractor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cts','Contestee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctt','Contestee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cur','Curator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cwt','Commentator for written text'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfd','Defendant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfe','Defendant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dft','Defendant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dgg','Degree grantor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dis','Dissertant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dln','Delineator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnc','Dancer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnr','Donor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpb','Distribution place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpc','Depicted'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpt','Depositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drm','Draftsman'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drt','Director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dsr','Designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dst','Distributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtc','Data contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dte','Dedicatee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtm','Data manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dto','Dedicator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dub','Dubious author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','edt','Editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','egr','Engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elg','Electrician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elt','Electrotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','eng','Engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','etr','Etcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','evp','Event place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','exp','Expert'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fac','Facsimilist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fld','Field director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','flm','Film editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fmo','Former owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fpy','First party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fnd','Funder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','frg','Forger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','gis','Geographic information specialist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','-grt','Graphic technician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hnr','Honoree'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hst','Host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ill','Illustrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ilu','Illuminator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ins','Inscriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','inv','Inventor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','itr','Instrumentalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ive','Interviewee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ivr','Interviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbr','Laboratory'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbt','Librettist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ldr','Laboratory director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','led','Lead'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lee','Libelee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lel','Libelee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','len','Lender'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','let','Libelee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lgd','Lighting designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lie','Libelant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lil','Libelant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lit','Libelant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lsa','Landscape architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lse','Licensee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lso','Licensor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ltg','Lithographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lyr','Lyricist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mcp','Music copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfp','Manufacture place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfr','Manufacturer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mdc','Metadata contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mod','Moderator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mon','Monitor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrb','Marbler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrk','Markup editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','msd','Musical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mte','Metal-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mus','Musician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','nrt','Narrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','opn','Opponent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','org','Originator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','orm','Organizer of meeting'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','oth','Other'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','own','Owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pat','Patron'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbd','Publishing director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbl','Publisher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pdr','Project director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pfr','Proofreader'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pht','Photographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','plt','Platemaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pma','Permitting agency'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pmn','Production manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pop','Printer of plates'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppm','Papermaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppt','Puppeteer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prc','Process contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prd','Production personnel'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prf','Performer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prg','Programmer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prm','Printmaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pro','Producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prp','Production place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prt','Printer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pta','Patent applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pte','Plaintiff -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptf','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pth','Patent holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptt','Plaintiff-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pup','Publication place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rbr','Rubricator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rce','Recording engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rcp','Recipient'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','red','Redactor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ren','Renderer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','res','Researcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rev','Reviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rps','Repository'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpt','Reporter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpy','Responsible party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rse','Respondent-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsg','Restager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsp','Respondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rst','Respondent-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rth','Research team head'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rtm','Research team member'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sad','Scientific advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sce','Scenarist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scl','Sculptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scr','Scribe'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sds','Sound designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sec','Secretary'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sgn','Signer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sht','Supporting host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sng','Singer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spk','Speaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spn','Sponsor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spy','Second party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','srv','Surveyor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','std','Set designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stl','Storyteller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stm','Stage manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stn','Standards body'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','str','Stereotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tcd','Technical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tch','Teacher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ths','Thesis advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trc','Transcriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trl','Translator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyd','Type designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyg','Typographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','uvp','University place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','vdg','Videographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','voc','Vocalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wam','Writer of accompanying material'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wdc','Woodcutter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wde','Wood-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wit','Witness'); diff --git a/installer/data/mysql/en/optional/marc21_relatorterms.txt b/installer/data/mysql/en/optional/marc21_relatorterms.txt new file mode 100644 index 0000000..ef8264b --- /dev/null +++ b/installer/data/mysql/en/optional/marc21_relatorterms.txt @@ -0,0 +1 @@ +MARC Code List for Relators, as of http://www.loc.gov/marc/relators/relaterm.html diff --git a/installer/data/mysql/fr-FR/2-Optionel/marc21_relatorterms.sql b/installer/data/mysql/fr-FR/2-Optionel/marc21_relatorterms.sql new file mode 100644 index 0000000..485bbed --- /dev/null +++ b/installer/data/mysql/fr-FR/2-Optionel/marc21_relatorterms.sql @@ -0,0 +1,226 @@ +-- MARC code list for Relators, taken from +-- http://www.loc.gov/marc/relators/relacode.html + +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','acp','Art copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','act','Actor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','adp','Adapter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aft','Author of afterword, colophon, etc.'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anl','Analyst'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anm','Animator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ann','Annotator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ant','Bibliographic antecedent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','app','Applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aqt','Author in quotations or text abstracts'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arc','Architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ard','Artistic director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arr','Arranger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','art','Artist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asg','Assignee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asn','Associated name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','att','Attributed name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','auc','Auctioneer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aud','Author of dialog'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aui','Author of introduction'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aus','Author of screenplay'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aut','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bdd','Binding designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bjd','Bookjacket designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkd','Book designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkp','Book producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','blw','Blurb writer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bnd','Binder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bpd','Bookplate designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bsl','Bookseller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ccp','Conceptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','chr','Choreographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clb','Collaborator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cli','Client'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cll','Calligrapher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clr','Colorist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clt','Collotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmm','Commentator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmp','Composer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmt','Compositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cng','Cinematographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cnd','Conductor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cns','Censor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','coe','Contestant -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','col','Collector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','com','Compiler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','con','Conservator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cos','Contestant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cot','Contestant -appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cov','Cover designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpc','Copyright claimant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpe','Complainant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cph','Copyright holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpl','Complainant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpt','Complainant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cre','Creator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crp','Correspondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crr','Corrector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csl','Consultant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csp','Consultant to a project'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cst','Costume designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctb','Contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cte','Contestee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctg','Cartographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctr','Contractor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cts','Contestee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctt','Contestee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cur','Curator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cwt','Commentator for written text'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfd','Defendant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfe','Defendant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dft','Defendant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dgg','Degree grantor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dis','Dissertant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dln','Delineator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnc','Dancer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnr','Donor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpb','Distribution place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpc','Depicted'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpt','Depositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drm','Draftsman'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drt','Director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dsr','Designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dst','Distributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtc','Data contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dte','Dedicatee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtm','Data manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dto','Dedicator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dub','Dubious author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','edt','Editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','egr','Engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elg','Electrician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elt','Electrotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','eng','Engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','etr','Etcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','evp','Event place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','exp','Expert'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fac','Facsimilist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fld','Field director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','flm','Film editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fmo','Former owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fpy','First party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fnd','Funder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','frg','Forger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','gis','Geographic information specialist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','-grt','Graphic technician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hnr','Honoree'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hst','Host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ill','Illustrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ilu','Illuminator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ins','Inscriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','inv','Inventor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','itr','Instrumentalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ive','Interviewee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ivr','Interviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbr','Laboratory'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbt','Librettist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ldr','Laboratory director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','led','Lead'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lee','Libelee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lel','Libelee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','len','Lender'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','let','Libelee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lgd','Lighting designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lie','Libelant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lil','Libelant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lit','Libelant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lsa','Landscape architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lse','Licensee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lso','Licensor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ltg','Lithographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lyr','Lyricist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mcp','Music copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfp','Manufacture place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfr','Manufacturer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mdc','Metadata contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mod','Moderator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mon','Monitor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrb','Marbler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrk','Markup editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','msd','Musical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mte','Metal-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mus','Musician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','nrt','Narrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','opn','Opponent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','org','Originator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','orm','Organizer of meeting'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','oth','Other'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','own','Owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pat','Patron'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbd','Publishing director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbl','Publisher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pdr','Project director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pfr','Proofreader'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pht','Photographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','plt','Platemaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pma','Permitting agency'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pmn','Production manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pop','Printer of plates'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppm','Papermaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppt','Puppeteer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prc','Process contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prd','Production personnel'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prf','Performer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prg','Programmer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prm','Printmaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pro','Producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prp','Production place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prt','Printer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pta','Patent applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pte','Plaintiff -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptf','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pth','Patent holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptt','Plaintiff-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pup','Publication place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rbr','Rubricator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rce','Recording engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rcp','Recipient'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','red','Redactor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ren','Renderer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','res','Researcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rev','Reviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rps','Repository'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpt','Reporter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpy','Responsible party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rse','Respondent-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsg','Restager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsp','Respondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rst','Respondent-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rth','Research team head'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rtm','Research team member'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sad','Scientific advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sce','Scenarist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scl','Sculptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scr','Scribe'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sds','Sound designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sec','Secretary'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sgn','Signer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sht','Supporting host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sng','Singer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spk','Speaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spn','Sponsor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spy','Second party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','srv','Surveyor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','std','Set designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stl','Storyteller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stm','Stage manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stn','Standards body'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','str','Stereotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tcd','Technical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tch','Teacher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ths','Thesis advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trc','Transcriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trl','Translator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyd','Type designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyg','Typographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','uvp','University place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','vdg','Videographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','voc','Vocalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wam','Writer of accompanying material'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wdc','Woodcutter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wde','Wood-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wit','Witness'); diff --git a/installer/data/mysql/fr-FR/2-Optionel/marc21_relatorterms.txt b/installer/data/mysql/fr-FR/2-Optionel/marc21_relatorterms.txt new file mode 100644 index 0000000..ef8264b --- /dev/null +++ b/installer/data/mysql/fr-FR/2-Optionel/marc21_relatorterms.txt @@ -0,0 +1 @@ +MARC Code List for Relators, as of http://www.loc.gov/marc/relators/relaterm.html diff --git a/installer/data/mysql/nb-NO/2-Valgfritt/marc21_relatorterms.sql b/installer/data/mysql/nb-NO/2-Valgfritt/marc21_relatorterms.sql new file mode 100644 index 0000000..485bbed --- /dev/null +++ b/installer/data/mysql/nb-NO/2-Valgfritt/marc21_relatorterms.sql @@ -0,0 +1,226 @@ +-- MARC code list for Relators, taken from +-- http://www.loc.gov/marc/relators/relacode.html + +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','acp','Art copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','act','Actor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','adp','Adapter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aft','Author of afterword, colophon, etc.'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anl','Analyst'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anm','Animator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ann','Annotator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ant','Bibliographic antecedent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','app','Applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aqt','Author in quotations or text abstracts'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arc','Architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ard','Artistic director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arr','Arranger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','art','Artist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asg','Assignee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asn','Associated name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','att','Attributed name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','auc','Auctioneer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aud','Author of dialog'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aui','Author of introduction'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aus','Author of screenplay'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aut','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bdd','Binding designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bjd','Bookjacket designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkd','Book designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkp','Book producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','blw','Blurb writer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bnd','Binder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bpd','Bookplate designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bsl','Bookseller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ccp','Conceptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','chr','Choreographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clb','Collaborator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cli','Client'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cll','Calligrapher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clr','Colorist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clt','Collotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmm','Commentator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmp','Composer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmt','Compositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cng','Cinematographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cnd','Conductor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cns','Censor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','coe','Contestant -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','col','Collector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','com','Compiler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','con','Conservator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cos','Contestant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cot','Contestant -appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cov','Cover designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpc','Copyright claimant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpe','Complainant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cph','Copyright holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpl','Complainant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpt','Complainant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cre','Creator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crp','Correspondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crr','Corrector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csl','Consultant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csp','Consultant to a project'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cst','Costume designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctb','Contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cte','Contestee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctg','Cartographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctr','Contractor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cts','Contestee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctt','Contestee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cur','Curator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cwt','Commentator for written text'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfd','Defendant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfe','Defendant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dft','Defendant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dgg','Degree grantor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dis','Dissertant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dln','Delineator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnc','Dancer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnr','Donor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpb','Distribution place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpc','Depicted'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpt','Depositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drm','Draftsman'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drt','Director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dsr','Designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dst','Distributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtc','Data contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dte','Dedicatee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtm','Data manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dto','Dedicator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dub','Dubious author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','edt','Editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','egr','Engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elg','Electrician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elt','Electrotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','eng','Engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','etr','Etcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','evp','Event place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','exp','Expert'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fac','Facsimilist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fld','Field director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','flm','Film editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fmo','Former owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fpy','First party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fnd','Funder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','frg','Forger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','gis','Geographic information specialist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','-grt','Graphic technician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hnr','Honoree'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hst','Host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ill','Illustrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ilu','Illuminator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ins','Inscriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','inv','Inventor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','itr','Instrumentalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ive','Interviewee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ivr','Interviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbr','Laboratory'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbt','Librettist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ldr','Laboratory director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','led','Lead'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lee','Libelee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lel','Libelee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','len','Lender'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','let','Libelee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lgd','Lighting designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lie','Libelant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lil','Libelant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lit','Libelant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lsa','Landscape architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lse','Licensee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lso','Licensor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ltg','Lithographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lyr','Lyricist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mcp','Music copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfp','Manufacture place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfr','Manufacturer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mdc','Metadata contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mod','Moderator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mon','Monitor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrb','Marbler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrk','Markup editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','msd','Musical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mte','Metal-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mus','Musician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','nrt','Narrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','opn','Opponent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','org','Originator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','orm','Organizer of meeting'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','oth','Other'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','own','Owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pat','Patron'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbd','Publishing director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbl','Publisher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pdr','Project director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pfr','Proofreader'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pht','Photographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','plt','Platemaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pma','Permitting agency'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pmn','Production manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pop','Printer of plates'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppm','Papermaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppt','Puppeteer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prc','Process contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prd','Production personnel'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prf','Performer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prg','Programmer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prm','Printmaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pro','Producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prp','Production place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prt','Printer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pta','Patent applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pte','Plaintiff -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptf','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pth','Patent holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptt','Plaintiff-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pup','Publication place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rbr','Rubricator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rce','Recording engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rcp','Recipient'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','red','Redactor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ren','Renderer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','res','Researcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rev','Reviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rps','Repository'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpt','Reporter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpy','Responsible party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rse','Respondent-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsg','Restager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsp','Respondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rst','Respondent-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rth','Research team head'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rtm','Research team member'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sad','Scientific advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sce','Scenarist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scl','Sculptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scr','Scribe'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sds','Sound designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sec','Secretary'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sgn','Signer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sht','Supporting host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sng','Singer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spk','Speaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spn','Sponsor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spy','Second party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','srv','Surveyor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','std','Set designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stl','Storyteller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stm','Stage manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stn','Standards body'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','str','Stereotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tcd','Technical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tch','Teacher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ths','Thesis advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trc','Transcriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trl','Translator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyd','Type designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyg','Typographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','uvp','University place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','vdg','Videographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','voc','Vocalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wam','Writer of accompanying material'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wdc','Woodcutter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wde','Wood-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wit','Witness'); diff --git a/installer/data/mysql/nb-NO/2-Valgfritt/marc21_relatorterms.txt b/installer/data/mysql/nb-NO/2-Valgfritt/marc21_relatorterms.txt new file mode 100644 index 0000000..ef8264b --- /dev/null +++ b/installer/data/mysql/nb-NO/2-Valgfritt/marc21_relatorterms.txt @@ -0,0 +1 @@ +MARC Code List for Relators, as of http://www.loc.gov/marc/relators/relaterm.html diff --git a/installer/data/mysql/pl-PL/optional/marc21_relatorterms.sql b/installer/data/mysql/pl-PL/optional/marc21_relatorterms.sql new file mode 100644 index 0000000..485bbed --- /dev/null +++ b/installer/data/mysql/pl-PL/optional/marc21_relatorterms.sql @@ -0,0 +1,226 @@ +-- MARC code list for Relators, taken from +-- http://www.loc.gov/marc/relators/relacode.html + +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','acp','Art copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','act','Actor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','adp','Adapter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aft','Author of afterword, colophon, etc.'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anl','Analyst'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anm','Animator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ann','Annotator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ant','Bibliographic antecedent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','app','Applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aqt','Author in quotations or text abstracts'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arc','Architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ard','Artistic director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arr','Arranger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','art','Artist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asg','Assignee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asn','Associated name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','att','Attributed name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','auc','Auctioneer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aud','Author of dialog'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aui','Author of introduction'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aus','Author of screenplay'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aut','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bdd','Binding designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bjd','Bookjacket designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkd','Book designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkp','Book producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','blw','Blurb writer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bnd','Binder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bpd','Bookplate designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bsl','Bookseller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ccp','Conceptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','chr','Choreographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clb','Collaborator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cli','Client'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cll','Calligrapher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clr','Colorist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clt','Collotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmm','Commentator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmp','Composer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmt','Compositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cng','Cinematographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cnd','Conductor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cns','Censor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','coe','Contestant -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','col','Collector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','com','Compiler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','con','Conservator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cos','Contestant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cot','Contestant -appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cov','Cover designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpc','Copyright claimant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpe','Complainant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cph','Copyright holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpl','Complainant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpt','Complainant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cre','Creator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crp','Correspondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crr','Corrector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csl','Consultant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csp','Consultant to a project'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cst','Costume designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctb','Contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cte','Contestee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctg','Cartographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctr','Contractor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cts','Contestee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctt','Contestee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cur','Curator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cwt','Commentator for written text'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfd','Defendant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfe','Defendant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dft','Defendant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dgg','Degree grantor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dis','Dissertant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dln','Delineator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnc','Dancer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnr','Donor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpb','Distribution place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpc','Depicted'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpt','Depositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drm','Draftsman'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drt','Director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dsr','Designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dst','Distributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtc','Data contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dte','Dedicatee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtm','Data manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dto','Dedicator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dub','Dubious author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','edt','Editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','egr','Engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elg','Electrician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elt','Electrotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','eng','Engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','etr','Etcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','evp','Event place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','exp','Expert'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fac','Facsimilist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fld','Field director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','flm','Film editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fmo','Former owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fpy','First party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fnd','Funder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','frg','Forger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','gis','Geographic information specialist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','-grt','Graphic technician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hnr','Honoree'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hst','Host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ill','Illustrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ilu','Illuminator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ins','Inscriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','inv','Inventor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','itr','Instrumentalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ive','Interviewee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ivr','Interviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbr','Laboratory'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbt','Librettist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ldr','Laboratory director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','led','Lead'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lee','Libelee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lel','Libelee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','len','Lender'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','let','Libelee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lgd','Lighting designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lie','Libelant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lil','Libelant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lit','Libelant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lsa','Landscape architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lse','Licensee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lso','Licensor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ltg','Lithographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lyr','Lyricist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mcp','Music copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfp','Manufacture place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfr','Manufacturer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mdc','Metadata contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mod','Moderator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mon','Monitor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrb','Marbler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrk','Markup editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','msd','Musical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mte','Metal-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mus','Musician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','nrt','Narrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','opn','Opponent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','org','Originator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','orm','Organizer of meeting'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','oth','Other'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','own','Owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pat','Patron'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbd','Publishing director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbl','Publisher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pdr','Project director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pfr','Proofreader'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pht','Photographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','plt','Platemaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pma','Permitting agency'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pmn','Production manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pop','Printer of plates'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppm','Papermaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppt','Puppeteer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prc','Process contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prd','Production personnel'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prf','Performer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prg','Programmer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prm','Printmaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pro','Producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prp','Production place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prt','Printer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pta','Patent applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pte','Plaintiff -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptf','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pth','Patent holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptt','Plaintiff-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pup','Publication place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rbr','Rubricator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rce','Recording engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rcp','Recipient'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','red','Redactor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ren','Renderer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','res','Researcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rev','Reviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rps','Repository'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpt','Reporter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpy','Responsible party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rse','Respondent-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsg','Restager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsp','Respondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rst','Respondent-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rth','Research team head'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rtm','Research team member'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sad','Scientific advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sce','Scenarist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scl','Sculptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scr','Scribe'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sds','Sound designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sec','Secretary'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sgn','Signer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sht','Supporting host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sng','Singer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spk','Speaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spn','Sponsor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spy','Second party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','srv','Surveyor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','std','Set designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stl','Storyteller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stm','Stage manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stn','Standards body'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','str','Stereotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tcd','Technical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tch','Teacher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ths','Thesis advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trc','Transcriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trl','Translator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyd','Type designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyg','Typographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','uvp','University place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','vdg','Videographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','voc','Vocalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wam','Writer of accompanying material'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wdc','Woodcutter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wde','Wood-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wit','Witness'); diff --git a/installer/data/mysql/pl-PL/optional/marc21_relatorterms.txt b/installer/data/mysql/pl-PL/optional/marc21_relatorterms.txt new file mode 100644 index 0000000..ef8264b --- /dev/null +++ b/installer/data/mysql/pl-PL/optional/marc21_relatorterms.txt @@ -0,0 +1 @@ +MARC Code List for Relators, as of http://www.loc.gov/marc/relators/relaterm.html diff --git a/installer/data/mysql/ru-RU/optional/marc21_relatorterms.sql b/installer/data/mysql/ru-RU/optional/marc21_relatorterms.sql new file mode 100644 index 0000000..485bbed --- /dev/null +++ b/installer/data/mysql/ru-RU/optional/marc21_relatorterms.sql @@ -0,0 +1,226 @@ +-- MARC code list for Relators, taken from +-- http://www.loc.gov/marc/relators/relacode.html + +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','acp','Art copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','act','Actor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','adp','Adapter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aft','Author of afterword, colophon, etc.'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anl','Analyst'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anm','Animator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ann','Annotator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ant','Bibliographic antecedent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','app','Applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aqt','Author in quotations or text abstracts'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arc','Architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ard','Artistic director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arr','Arranger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','art','Artist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asg','Assignee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asn','Associated name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','att','Attributed name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','auc','Auctioneer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aud','Author of dialog'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aui','Author of introduction'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aus','Author of screenplay'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aut','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bdd','Binding designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bjd','Bookjacket designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkd','Book designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkp','Book producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','blw','Blurb writer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bnd','Binder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bpd','Bookplate designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bsl','Bookseller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ccp','Conceptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','chr','Choreographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clb','Collaborator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cli','Client'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cll','Calligrapher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clr','Colorist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clt','Collotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmm','Commentator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmp','Composer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmt','Compositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cng','Cinematographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cnd','Conductor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cns','Censor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','coe','Contestant -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','col','Collector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','com','Compiler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','con','Conservator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cos','Contestant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cot','Contestant -appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cov','Cover designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpc','Copyright claimant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpe','Complainant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cph','Copyright holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpl','Complainant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpt','Complainant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cre','Creator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crp','Correspondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crr','Corrector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csl','Consultant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csp','Consultant to a project'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cst','Costume designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctb','Contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cte','Contestee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctg','Cartographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctr','Contractor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cts','Contestee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctt','Contestee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cur','Curator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cwt','Commentator for written text'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfd','Defendant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfe','Defendant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dft','Defendant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dgg','Degree grantor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dis','Dissertant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dln','Delineator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnc','Dancer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnr','Donor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpb','Distribution place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpc','Depicted'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpt','Depositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drm','Draftsman'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drt','Director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dsr','Designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dst','Distributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtc','Data contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dte','Dedicatee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtm','Data manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dto','Dedicator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dub','Dubious author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','edt','Editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','egr','Engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elg','Electrician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elt','Electrotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','eng','Engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','etr','Etcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','evp','Event place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','exp','Expert'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fac','Facsimilist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fld','Field director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','flm','Film editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fmo','Former owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fpy','First party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fnd','Funder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','frg','Forger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','gis','Geographic information specialist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','-grt','Graphic technician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hnr','Honoree'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hst','Host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ill','Illustrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ilu','Illuminator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ins','Inscriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','inv','Inventor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','itr','Instrumentalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ive','Interviewee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ivr','Interviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbr','Laboratory'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbt','Librettist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ldr','Laboratory director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','led','Lead'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lee','Libelee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lel','Libelee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','len','Lender'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','let','Libelee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lgd','Lighting designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lie','Libelant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lil','Libelant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lit','Libelant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lsa','Landscape architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lse','Licensee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lso','Licensor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ltg','Lithographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lyr','Lyricist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mcp','Music copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfp','Manufacture place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfr','Manufacturer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mdc','Metadata contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mod','Moderator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mon','Monitor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrb','Marbler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrk','Markup editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','msd','Musical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mte','Metal-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mus','Musician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','nrt','Narrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','opn','Opponent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','org','Originator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','orm','Organizer of meeting'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','oth','Other'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','own','Owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pat','Patron'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbd','Publishing director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbl','Publisher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pdr','Project director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pfr','Proofreader'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pht','Photographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','plt','Platemaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pma','Permitting agency'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pmn','Production manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pop','Printer of plates'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppm','Papermaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppt','Puppeteer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prc','Process contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prd','Production personnel'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prf','Performer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prg','Programmer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prm','Printmaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pro','Producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prp','Production place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prt','Printer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pta','Patent applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pte','Plaintiff -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptf','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pth','Patent holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptt','Plaintiff-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pup','Publication place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rbr','Rubricator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rce','Recording engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rcp','Recipient'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','red','Redactor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ren','Renderer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','res','Researcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rev','Reviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rps','Repository'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpt','Reporter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpy','Responsible party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rse','Respondent-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsg','Restager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsp','Respondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rst','Respondent-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rth','Research team head'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rtm','Research team member'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sad','Scientific advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sce','Scenarist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scl','Sculptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scr','Scribe'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sds','Sound designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sec','Secretary'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sgn','Signer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sht','Supporting host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sng','Singer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spk','Speaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spn','Sponsor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spy','Second party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','srv','Surveyor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','std','Set designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stl','Storyteller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stm','Stage manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stn','Standards body'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','str','Stereotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tcd','Technical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tch','Teacher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ths','Thesis advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trc','Transcriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trl','Translator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyd','Type designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyg','Typographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','uvp','University place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','vdg','Videographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','voc','Vocalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wam','Writer of accompanying material'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wdc','Woodcutter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wde','Wood-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wit','Witness'); diff --git a/installer/data/mysql/ru-RU/optional/marc21_relatorterms.txt b/installer/data/mysql/ru-RU/optional/marc21_relatorterms.txt new file mode 100644 index 0000000..ef8264b --- /dev/null +++ b/installer/data/mysql/ru-RU/optional/marc21_relatorterms.txt @@ -0,0 +1 @@ +MARC Code List for Relators, as of http://www.loc.gov/marc/relators/relaterm.html diff --git a/installer/data/mysql/uk-UA/optional/marc21_relatorterms.sql b/installer/data/mysql/uk-UA/optional/marc21_relatorterms.sql new file mode 100644 index 0000000..485bbed --- /dev/null +++ b/installer/data/mysql/uk-UA/optional/marc21_relatorterms.sql @@ -0,0 +1,226 @@ +-- MARC code list for Relators, taken from +-- http://www.loc.gov/marc/relators/relacode.html + +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','acp','Art copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','act','Actor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','adp','Adapter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aft','Author of afterword, colophon, etc.'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anl','Analyst'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anm','Animator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ann','Annotator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ant','Bibliographic antecedent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','app','Applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aqt','Author in quotations or text abstracts'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arc','Architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ard','Artistic director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arr','Arranger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','art','Artist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asg','Assignee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asn','Associated name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','att','Attributed name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','auc','Auctioneer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aud','Author of dialog'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aui','Author of introduction'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aus','Author of screenplay'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aut','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bdd','Binding designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bjd','Bookjacket designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkd','Book designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkp','Book producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','blw','Blurb writer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bnd','Binder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bpd','Bookplate designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bsl','Bookseller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ccp','Conceptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','chr','Choreographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clb','Collaborator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cli','Client'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cll','Calligrapher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clr','Colorist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clt','Collotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmm','Commentator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmp','Composer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmt','Compositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cng','Cinematographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cnd','Conductor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cns','Censor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','coe','Contestant -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','col','Collector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','com','Compiler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','con','Conservator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cos','Contestant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cot','Contestant -appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cov','Cover designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpc','Copyright claimant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpe','Complainant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cph','Copyright holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpl','Complainant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpt','Complainant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cre','Creator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crp','Correspondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crr','Corrector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csl','Consultant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csp','Consultant to a project'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cst','Costume designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctb','Contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cte','Contestee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctg','Cartographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctr','Contractor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cts','Contestee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctt','Contestee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cur','Curator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cwt','Commentator for written text'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfd','Defendant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfe','Defendant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dft','Defendant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dgg','Degree grantor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dis','Dissertant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dln','Delineator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnc','Dancer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnr','Donor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpb','Distribution place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpc','Depicted'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpt','Depositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drm','Draftsman'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drt','Director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dsr','Designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dst','Distributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtc','Data contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dte','Dedicatee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtm','Data manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dto','Dedicator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dub','Dubious author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','edt','Editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','egr','Engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elg','Electrician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elt','Electrotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','eng','Engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','etr','Etcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','evp','Event place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','exp','Expert'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fac','Facsimilist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fld','Field director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','flm','Film editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fmo','Former owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fpy','First party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fnd','Funder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','frg','Forger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','gis','Geographic information specialist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','-grt','Graphic technician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hnr','Honoree'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hst','Host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ill','Illustrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ilu','Illuminator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ins','Inscriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','inv','Inventor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','itr','Instrumentalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ive','Interviewee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ivr','Interviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbr','Laboratory'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbt','Librettist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ldr','Laboratory director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','led','Lead'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lee','Libelee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lel','Libelee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','len','Lender'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','let','Libelee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lgd','Lighting designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lie','Libelant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lil','Libelant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lit','Libelant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lsa','Landscape architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lse','Licensee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lso','Licensor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ltg','Lithographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lyr','Lyricist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mcp','Music copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfp','Manufacture place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfr','Manufacturer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mdc','Metadata contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mod','Moderator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mon','Monitor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrb','Marbler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrk','Markup editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','msd','Musical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mte','Metal-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mus','Musician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','nrt','Narrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','opn','Opponent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','org','Originator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','orm','Organizer of meeting'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','oth','Other'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','own','Owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pat','Patron'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbd','Publishing director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbl','Publisher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pdr','Project director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pfr','Proofreader'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pht','Photographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','plt','Platemaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pma','Permitting agency'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pmn','Production manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pop','Printer of plates'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppm','Papermaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppt','Puppeteer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prc','Process contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prd','Production personnel'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prf','Performer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prg','Programmer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prm','Printmaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pro','Producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prp','Production place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prt','Printer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pta','Patent applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pte','Plaintiff -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptf','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pth','Patent holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptt','Plaintiff-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pup','Publication place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rbr','Rubricator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rce','Recording engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rcp','Recipient'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','red','Redactor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ren','Renderer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','res','Researcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rev','Reviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rps','Repository'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpt','Reporter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpy','Responsible party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rse','Respondent-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsg','Restager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsp','Respondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rst','Respondent-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rth','Research team head'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rtm','Research team member'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sad','Scientific advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sce','Scenarist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scl','Sculptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scr','Scribe'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sds','Sound designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sec','Secretary'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sgn','Signer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sht','Supporting host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sng','Singer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spk','Speaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spn','Sponsor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spy','Second party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','srv','Surveyor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','std','Set designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stl','Storyteller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stm','Stage manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stn','Standards body'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','str','Stereotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tcd','Technical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tch','Teacher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ths','Thesis advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trc','Transcriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trl','Translator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyd','Type designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyg','Typographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','uvp','University place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','vdg','Videographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','voc','Vocalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wam','Writer of accompanying material'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wdc','Woodcutter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wde','Wood-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wit','Witness'); diff --git a/installer/data/mysql/uk-UA/optional/marc21_relatorterms.txt b/installer/data/mysql/uk-UA/optional/marc21_relatorterms.txt new file mode 100644 index 0000000..ef8264b --- /dev/null +++ b/installer/data/mysql/uk-UA/optional/marc21_relatorterms.txt @@ -0,0 +1 @@ +MARC Code List for Relators, as of http://www.loc.gov/marc/relators/relaterm.html -- 1.7.4.1 From paul.poulain at biblibre.com Thu Oct 6 14:56:09 2011 From: paul.poulain at biblibre.com (paul.poulain at biblibre.com) Date: Thu, 6 Oct 2011 14:56:09 +0200 Subject: [Koha-patches] [PATCH 2/3] Bug 6299 - Advertise this addition during upgrade In-Reply-To: <1317905770-3482-1-git-send-email-paul.poulain@biblibre.com> References: <1317905770-3482-1-git-send-email-paul.poulain@biblibre.com> Message-ID: <1317905770-3482-2-git-send-email-paul.poulain@biblibre.com> From: Tomas Cohen Arazi Signed-off-by: Marcel de Rooy August 10, 2011: Fixed some small typos. Signed-off-by: Paul Poulain Oct 7th, 2011: rebased for master --- installer/data/mysql/updatedatabase.pl | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6b88c29..8560a21 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4399,6 +4399,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +<<<<<<< HEAD $DBversion = "3.05.00.009"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do("INSERT INTO old_issues (borrowernumber, itemnumber, date_due, branchcode, issuingbranch, returndate, lastreneweddate, `return`, renewals, timestamp, issuedate) @@ -4446,6 +4447,11 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + print "RELTERMS category available for relator terms. They are not loaded during upgrade but can be easily inserted using the provided marc21_relatorterms.sql SQL script.\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS -- 1.7.4.1 From paul.poulain at biblibre.com Thu Oct 6 14:56:10 2011 From: paul.poulain at biblibre.com (paul.poulain at biblibre.com) Date: Thu, 6 Oct 2011 14:56:10 +0200 Subject: [Koha-patches] =?utf-8?q?=5BPATCH_3/3=5D_Bug_6299_-_add_es-ES?= In-Reply-To: <1317905770-3482-2-git-send-email-paul.poulain@biblibre.com> References: <1317905770-3482-1-git-send-email-paul.poulain@biblibre.com> <1317905770-3482-2-git-send-email-paul.poulain@biblibre.com> Message-ID: <1317905770-3482-3-git-send-email-paul.poulain@biblibre.com> From: Tomas Cohen Arazi Translation will come next, when our librarians finish the translation. Signed-off-by: Marcel de Rooy August 11, 2011: Follow up for Spanish signed off. Signed-off-by: Paul Poulain --- .../mysql/es-ES/optional/marc21_relatorterms.sql | 226 ++++++++++++++++++++ .../mysql/es-ES/optional/marc21_relatorterms.txt | 1 + 2 files changed, 227 insertions(+), 0 deletions(-) create mode 100644 installer/data/mysql/es-ES/optional/marc21_relatorterms.sql create mode 100644 installer/data/mysql/es-ES/optional/marc21_relatorterms.txt diff --git a/installer/data/mysql/es-ES/optional/marc21_relatorterms.sql b/installer/data/mysql/es-ES/optional/marc21_relatorterms.sql new file mode 100644 index 0000000..2991e31 --- /dev/null +++ b/installer/data/mysql/es-ES/optional/marc21_relatorterms.sql @@ -0,0 +1,226 @@ +-- Listado de c?digos MARC21 de Designaciones de funci?n, seg?n +-- http://www.loc.gov/marc/relators/relacode.html + +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','acp','Art copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','act','Actor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','adp','Adapter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aft','Author of afterword, colophon, etc.'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anl','Analyst'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','anm','Animator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ann','Annotator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ant','Bibliographic antecedent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','app','Applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aqt','Author in quotations or text abstracts'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arc','Architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ard','Artistic director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arr','Arranger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','art','Artist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asg','Assignee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','asn','Associated name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','att','Attributed name'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','auc','Auctioneer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aud','Author of dialog'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aui','Author of introduction'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aus','Author of screenplay'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aut','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bdd','Binding designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bjd','Bookjacket designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkd','Book designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkp','Book producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','blw','Blurb writer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bnd','Binder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bpd','Bookplate designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bsl','Bookseller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ccp','Conceptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','chr','Choreographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clb','Collaborator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cli','Client'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cll','Calligrapher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clr','Colorist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','clt','Collotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmm','Commentator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmp','Composer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cmt','Compositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cng','Cinematographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cnd','Conductor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cns','Censor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','coe','Contestant -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','col','Collector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','com','Compiler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','con','Conservator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cos','Contestant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cot','Contestant -appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cov','Cover designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpc','Copyright claimant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpe','Complainant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cph','Copyright holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpl','Complainant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpt','Complainant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cre','Creator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crp','Correspondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','crr','Corrector'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csl','Consultant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','csp','Consultant to a project'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cst','Costume designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctb','Contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cte','Contestee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctg','Cartographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctr','Contractor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cts','Contestee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ctt','Contestee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cur','Curator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cwt','Commentator for written text'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfd','Defendant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dfe','Defendant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dft','Defendant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dgg','Degree grantor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dis','Dissertant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dln','Delineator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnc','Dancer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dnr','Donor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpb','Distribution place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpc','Depicted'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dpt','Depositor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drm','Draftsman'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','drt','Director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dsr','Designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dst','Distributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtc','Data contributor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dte','Dedicatee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtm','Data manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dto','Dedicator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dub','Dubious author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','edt','Editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','egr','Engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elg','Electrician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','elt','Electrotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','eng','Engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','etr','Etcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','evp','Event place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','exp','Expert'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fac','Facsimilist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fld','Field director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','flm','Film editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fmo','Former owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fpy','First party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fnd','Funder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','frg','Forger'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','gis','Geographic information specialist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','-grt','Graphic technician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hnr','Honoree'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','hst','Host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ill','Illustrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ilu','Illuminator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ins','Inscriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','inv','Inventor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','itr','Instrumentalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ive','Interviewee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ivr','Interviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbr','Laboratory'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lbt','Librettist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ldr','Laboratory director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','led','Lead'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lee','Libelee-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lel','Libelee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','len','Lender'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','let','Libelee-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lgd','Lighting designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lie','Libelant-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lil','Libelant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lit','Libelant-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lsa','Landscape architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lse','Licensee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lso','Licensor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ltg','Lithographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','lyr','Lyricist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mcp','Music copyist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfp','Manufacture place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfr','Manufacturer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mdc','Metadata contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mod','Moderator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mon','Monitor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrb','Marbler'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mrk','Markup editor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','msd','Musical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mte','Metal-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mus','Musician'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','nrt','Narrator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','opn','Opponent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','org','Originator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','orm','Organizer of meeting'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','oth','Other'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','own','Owner'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pat','Patron'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbd','Publishing director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbl','Publisher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pdr','Project director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pfr','Proofreader'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pht','Photographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','plt','Platemaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pma','Permitting agency'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pmn','Production manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pop','Printer of plates'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppm','Papermaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ppt','Puppeteer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prc','Process contact'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prd','Production personnel'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prf','Performer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prg','Programmer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prm','Printmaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pro','Producer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prp','Production place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prt','Printer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pta','Patent applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pte','Plaintiff -appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptf','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pth','Patent holder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptt','Plaintiff-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pup','Publication place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rbr','Rubricator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rce','Recording engineer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rcp','Recipient'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','red','Redactor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ren','Renderer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','res','Researcher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rev','Reviewer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rps','Repository'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpt','Reporter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rpy','Responsible party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rse','Respondent-appellee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsg','Restager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rsp','Respondent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rst','Respondent-appellant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rth','Research team head'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rtm','Research team member'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sad','Scientific advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sce','Scenarist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scl','Sculptor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','scr','Scribe'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sds','Sound designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sec','Secretary'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sgn','Signer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sht','Supporting host'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sng','Singer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spk','Speaker'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spn','Sponsor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','spy','Second party'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','srv','Surveyor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','std','Set designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stl','Storyteller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stm','Stage manager'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stn','Standards body'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','str','Stereotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tcd','Technical director'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tch','Teacher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ths','Thesis advisor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trc','Transcriber'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','trl','Translator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyd','Type designer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyg','Typographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','uvp','University place'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','vdg','Videographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','voc','Vocalist'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wam','Writer of accompanying material'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wdc','Woodcutter'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wde','Wood-engraver'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','wit','Witness'); diff --git a/installer/data/mysql/es-ES/optional/marc21_relatorterms.txt b/installer/data/mysql/es-ES/optional/marc21_relatorterms.txt new file mode 100644 index 0000000..7fafc34 --- /dev/null +++ b/installer/data/mysql/es-ES/optional/marc21_relatorterms.txt @@ -0,0 +1 @@ +Listado de c?digos MARC21 de Designaciones de funci?n, seg?n http://www.loc.gov/marc/relators/relaterm.html -- 1.7.4.1 From oleonard at myacpl.org Thu Oct 6 15:21:04 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 6 Oct 2011 09:21:04 -0400 Subject: [Koha-patches] [PATCH] [Revised] Fix for Bug 6616 - Move common table pager markup to include Message-ID: <1317907264-32306-1-git-send-email-oleonard@myacpl.org> Created new include for the tablesorter pager markup: [% INCLUDE 'table-pager.inc' perpage='20' %] 'perpage' variable defines the default items per page for the paged table. Unique changes in branch_transfer_limits.tt: - Moved tablesorter configuration out of a loop and changed it to work by class instead of id (less repeated markup). - Corrected an errant TMPL tag. --- .../intranet-tmpl/prog/en/includes/table-pager.inc | 17 ++++++++++ .../prog/en/modules/admin/auth_tag_structure.tt | 21 ++---------- .../prog/en/modules/admin/authorised_values.tt | 22 ++----------- .../en/modules/admin/branch_transfer_limits.tt | 34 +++++-------------- .../prog/en/modules/admin/branches.tt | 21 ++---------- .../prog/en/modules/admin/categorie.tt | 21 ++---------- .../intranet-tmpl/prog/en/modules/admin/cities.tt | 21 ++---------- .../prog/en/modules/admin/itemtypes.tt | 21 ++---------- .../prog/en/modules/admin/marctagstructure.tt | 21 ++---------- .../prog/en/modules/members/readingrec.tt | 21 ++---------- .../en/modules/reports/guided_reports_start.tt | 20 ++---------- 11 files changed, 53 insertions(+), 187 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/table-pager.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/table-pager.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/table-pager.inc new file mode 100644 index 0000000..961c07b --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/table-pager.inc @@ -0,0 +1,17 @@ +
        + + + +
        \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt index eb1d47e..af03d1c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt @@ -208,24 +208,9 @@ return false;
        - -
         page(s) : - - - - - - , entries/page : - -
        -
        +
        +[% INCLUDE 'table-pager.inc' perpage='20' %] +
        diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt index f235634..7e71789 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt @@ -221,25 +221,9 @@ [% END %]

        Authorized values for category [% category %]:

        -[% IF ( loop ) %] -
         page(s) : - - - - - - , entries/page : - - -
        [% END %] +[% IF ( loop ) %]
        +[% INCLUDE 'table-pager.inc' perpage='50' %] +
        [% END %] [% IF ( loop ) %]
        Tag
        diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt index 2b007bf..5e4e58f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt @@ -5,6 +5,7 @@ @@ -96,32 +101,11 @@

        Policy for [% codes_loo.limit_phrase %]: [% codes_loo.code %]

        Check All | Uncheck All

        -
        -

         page(s) : - - - - - - , entries/page : - -

        -
        -
        + [% INCLUDE 'table-pager.inc' perpage='20' %] + +
        diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt index 1107624..df5e56c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -168,24 +168,9 @@ [% IF ( MESSAGE10 ) %]
        Library cannot be deleted because there are items held by that library
        [% END %] [% IF ( MESSAGE11 ) %]
        Library cannot be deleted because there are patrons registered at that library
        [% END %] [% IF ( branches ) %] - -
         page(s) : - - - - - - , entries/page : - - -
        +
        +[% INCLUDE 'table-pager.inc' perpage='10' %] +
        Library
        diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt index b50012f..62322fa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt @@ -274,24 +274,9 @@ Confirm Deletion of Category [% categorycode |html %][% END %] You Searched for [% searchfield %] [% END %] [% IF ( loop ) %] - -
         page(s) : - - - - - - , entries/page : - - -
        +
        +[% INCLUDE 'table-pager.inc' perpage='20' %] +
        Name
        diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt index f286b7c..c1fccde 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt @@ -129,24 +129,9 @@ [% END %] [% IF ( loop ) %] - -
         page(s) : - - - - - - , entries/page : - - -
        +
        +[% INCLUDE 'table-pager.inc' perpage='20' %] +
        Code
        diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt index 9174247..13ece6e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt @@ -285,24 +285,9 @@ Item Types Administration [% IF ( else ) %]

        Item Types Administration

        -[% IF ( loop ) %] -
         page(s):  - - - - - - , entries/page: - - -
        +[% IF ( loop ) %]
        +[% INCLUDE 'table-pager.inc' perpage='10' %] +
        City ID
        [% UNLESS ( noItemTypeImages ) %][% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt index 275f232..c889820 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt @@ -157,24 +157,9 @@ $(document).ready(function() { [% END %]

        - -
         page(s) : - - - - - - , entries/page : - - -
        +
        +[% INCLUDE 'table-pager.inc' perpage='20' %] +
        Image
        diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt index c61006b..1ab1130 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -32,24 +32,9 @@

        Circulation History

        - -
         page(s) : - - - - - - , entries/page : - - -
        +
        +[% INCLUDE 'table-pager.inc' perpage='20' %] +
        Tag
        diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 487f9a2..3836a02 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -124,23 +124,9 @@ canned reports and writing custom SQL reports.

        [% IF ( saved1 ) %] [% IF ( savedreports ) %]

        Saved Reports

        - -
         page(s) : - - - - - - , entries/page: - - -
        +
        +[% INCLUDE 'table-pager.inc' perpage='20' %] +
        Date
        -- 1.7.3 From magnus at enger.priv.no Thu Oct 6 16:08:56 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Thu, 6 Oct 2011 16:08:56 +0200 Subject: [Koha-patches] [PATCH] Bug 6915 - [SIGNED-OFF] reduce module name truncation problem in koha_perl_deps.pl Message-ID: <1317910136-16912-1-git-send-email-magnus@enger.priv.no> From: Greg Barniskis Widen module name allowance in the format statement, adjust other columns to be generous but not-so-much as before, modify report header and footer print statements to align and clarify. Very very long module names or version numbers are still subject to possible truncation. Signed-off-by: Magnus Enger Sign off comment: With this patch module names are not truncated, which is an improvement. Lines are still too long to fit an 80 column display, and so they wrap around, but tht is a minor annoyance compared to the truncated names. --- koha_perl_deps.pl | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/koha_perl_deps.pl b/koha_perl_deps.pl index 934dea5..c5b614e 100755 --- a/koha_perl_deps.pl +++ b/koha_perl_deps.pl @@ -41,8 +41,9 @@ push @pm, 'current_pm' if $installed || $all; print color 'bold white' if $color; print" -Module Name Current Version Required Version Module Required --------------------------------------------------------------------------------------------------------------------------- + Installed Required Module is +Module Name Version Version Required +-------------------------------------------------------------------------------------------- "; my $count = 0; @@ -60,8 +61,8 @@ foreach my $type (@pm) { my $current_version = ($color ? $_->{$pm}->{'cur_ver'} : $type eq 'missing_pm' || $type eq 'upgrade_pm' ? $_->{$pm}->{'cur_ver'}." *" : $_->{$pm}->{'cur_ver'}); format = -@<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<< @<<<<<<<<<< @<<<<< -$pm, $current_version, $_->{$pm}->{'min_ver'}, $required +@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<< @<<<<< +$pm, $current_version, $_->{$pm}->{'min_ver'}, $required . write; } @@ -69,8 +70,8 @@ write; } print color 'bold white' if $color; my $footer = " --------------------------------------------------------------------------------------------------------------------------- -Total modules reported: $count "; +-------------------------------------------------------------------------------------------- +Total modules reported: $count "; if ($color) { $footer .= "\n\n"; -- 1.7.4.1 From nengard at bywatersolutions.com Thu Oct 6 17:30:24 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Thu, 6 Oct 2011 11:30:24 -0400 Subject: [Koha-patches] [PATCH] Bug 6966: Circulation Help Files Message-ID: <1317915024-10923-1-git-send-email-nengard@bywatersolutions.com> This patch updates the help files in the circ folder. It also adds links to manual pages where needed. --- .../prog/en/modules/help/circ/branchoverdues.tt | 5 ++- .../prog/en/modules/help/circ/branchtransfers.tt | 4 ++- .../prog/en/modules/help/circ/circulation-home.tt | 26 +++++++------- .../prog/en/modules/help/circ/circulation.tt | 24 ++++++++++-- .../prog/en/modules/help/circ/overdue.tt | 2 + .../prog/en/modules/help/circ/pendingreserves.tt | 2 + .../prog/en/modules/help/circ/reserveratios.tt | 2 + .../prog/en/modules/help/circ/returns.tt | 12 ++++--- .../en/modules/help/circ/selectbranchprinter.tt | 38 ++++--------------- .../en/modules/help/circ/transferstoreceive.tt | 2 + .../prog/en/modules/help/circ/view_holdsqueue.tt | 2 + .../prog/en/modules/help/circ/waitingreserves.tt | 4 ++ 12 files changed, 69 insertions(+), 54 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/branchoverdues.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/branchoverdues.tt index 0b8fce8..e4043ec 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/branchoverdues.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/branchoverdues.tt @@ -1,6 +1,6 @@ [% INCLUDE 'help-top.inc' %] -

        Overdue fines

        +

        Overdues with Fines

        This report shows items that:

          @@ -13,3 +13,6 @@

          Once open the report can be filtered by the shelving location.

          +

          See the full documentation for Overdues with Fines in the manual (online).

          + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/branchtransfers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/branchtransfers.tt index b05e86a..7382f4c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/branchtransfers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/branchtransfers.tt @@ -20,5 +20,7 @@
        - + +

        See the full documentation for Transfers in the manual (online).

        + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/circulation-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/circulation-home.tt index 1f069b7..887bad5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/circulation-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/circulation-home.tt @@ -1,14 +1,13 @@ - [% INCLUDE 'help-top.inc' %] +[% INCLUDE 'help-top.inc' %] +

        Circulation

        -

        -Circulation functions can be accessed in several different ways. On the main page of the staff client there are some quick links in the center of the page to check items out, in or transfer them. For a complete listing of Circulation functions you can visit the Circulation page which is linked from the top left of every page or from the center of the main page. -

        -

        -Before circulating your collection you will want to set your Global System Preferences, Basic Parameters and Patrons & Circulation Rules. -

        -

        -While in Circulation you can jump between the tabs on the quick search box at the top of the screen by using the following hot keys: -

        + +

        Circulation functions can be accessed in several different ways. On the main page of the staff client there are some quick links in the center of the page to check items out, in or transfer them. For a complete listing of Circulation functions you can visit the Circulation page which is linked from the top left of every page or from the center of the main page.

        + +

        Before circulating your collection you will want to set your Global System Preferences, Basic Parameters and Patrons & Circulation Rules.

        + +

        While in Circulation you can jump between the tabs on the quick search box at the top of the screen by using the following hot keys:

        +
        • jump to the catalog search with Alt+Q
        • jump to the checkout with Alt+U @@ -18,8 +17,9 @@ While in Circulation you can jump between the tabs on the quick search box at th
        • jump to the checkin with Alt+R
        -

        -Tip: Mac users use the OPTION button in place of ALT -

        + +

        Tip: Mac users use the OPTION button in place of ALT

        + +

        See the full documentation for Circulation in the manual (online).

        [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/circulation.tt index a818f86..f9f92ab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/circulation.tt @@ -17,7 +17,8 @@

        At the top of the Check Out screen is a box for you to type or scan the item's barcode into.

          -
        • Many modern barcode scanners will send a 'return' to the browser, making it so that the 'Check Out' button is automatically clicked
        • +
        • Important: Many modern barcode scanners will send a 'return' to the browser, making it so that the 'Check Out' button is automatically clicked
        • +
        • If the barcode is not found you will be prompted to use fast cataloging to add the item. Learn more about fast cataloging later in this manual.

        Below the box for the barcode there may be options for you to override the default due date for the item.

        @@ -30,13 +31,20 @@
        • This screen will show whether an item is renewable and if not, why not.
        • -
        • To override the renewal limits you can set the AllowRenewalLimitOverride system preference to allow overrides and a checkbox will appear below the list of checkouts that reads 'Override Renewal Limit'
        • +
        • To override the renewal limits you can set the AllowRenewalLimitOverride system preference to allow overrides and a checkbox will appear below the list of checkouts that reads 'Override Renewal Limit' +
          • Checking that box will add checkboxes in the renew column above where before the item was not renewable.
          +
        • +
        + +

        Also at the bottom of the page is the list of items the patron has on hold + +

        Once you have checked out all of the items for the patron you can print them a receipt by choosing one of two methods.

        -

        Also at the bottom of the page is the list of items the patron has on hold

        +

        The first is that you can simply hit enter on your keyboard or scan a blank piece of paper with your barcode scanner. The idea being that you're "checking out" a blank barcode which triggers Koha to print the 'Quick Slip.'

        -

        Once you have checked out all of the items for the patron you can print them a receipt by clicking the Print button at the top of the screen and choosing 'Print Slip' or 'Quick Slip'.

        +

        The second is that you can click the Print button at the top of the screen and choosing 'Print Slip' or 'Quick Slip'.

        If you choose 'Print Slip' it will print all of the items the patron has checked out, including those they checked out at an earlier date. Choosing 'Quick Slip' will print only the items that were checked out today.

        @@ -44,10 +52,14 @@

        If the patron has a hold waiting at the library that too will appear to the right of the check out box making it easy for the circulation librarian to see that there is another item to give the patron

        +

        When you're done checking an item out if you have the DisplayClearScreenButton preference set to 'Show' you can clear the current patron by clicking the X in the top right of the patron's info to remove the current patron from the screen and start over.

        +

        Check Out Messages

        There are times when Koha will prevent the librarian from being able to check out items to a patron. When this happens a warning will appear notifying the librarian of why the patron cannot check items out.

        +

        These are the possible messages you might see:

        +
        • Patron owes too much in fines
            @@ -75,6 +87,8 @@

            Sometimes checkouts will trigger warning messages that will appear in a yellow box above the check out field. These warnings need to be acknowledged before you will be able to continue checking items out.

            +

            These are the possible warnings you might see:

            +
            • Patron has outstanding fines
            • Item on hold for someone else
            • @@ -91,4 +105,6 @@
            • Barcode not found
            +

            See the full documentation for Checking Out in the manual (online).

            + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/overdue.tt index a65a2fb..c6446dd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/overdue.tt @@ -11,4 +11,6 @@
          • Tip: Large libraries can choose to filter the report before it runs by setting the FilterBeforeOverdueReport system preference to 'Require'.
          +

          See the full documentation for Overdues in the manual (online).

          + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/pendingreserves.tt index 09cc0e1..4ab1ae1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/pendingreserves.tt @@ -23,4 +23,6 @@

          You can limit the results you see by using the Refine box on the left side of the page

          +

          See the full documentation for Holds to Pull in the manual (online).

          + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/reserveratios.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/reserveratios.tt index 12edd81..ab3b231 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/reserveratios.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/reserveratios.tt @@ -4,5 +4,7 @@

          Hold ratios help with collection development. Using this report you will be able to see how many of your patrons have holds on items and whether you should buy more. By default it will be set to the library needing 3 items per hold that has been placed. The report will tell you how many additional items need to be purchased to meet this quota.

          +

          See the full documentation for Hold Ratios in the manual (online).

          + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/returns.tt index bc9b239..29a5421 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/returns.tt @@ -5,8 +5,8 @@

          Checking in items can be performed from various different locations

            -
          • The check in link on main staff client 
          • -
          • The check in option on the quick search bar on the Circulation page 
          • +
          • The check in box on main staff client
          • +
          • The check in option on the quick search bar on the Circulation page
          • The check in link on the patron's checkout summary (and on the checkout summary page)
          @@ -29,7 +29,7 @@
          • If you are checking an item in at a library other than the home branch, a message will appear asking you to transfer the book to the home library
              -
            • After this item is checked in the status of the item will be changed in the catalog to 'in transit' 
            • +
            • After this item is checked in the status of the item will be changed in the catalog to 'in transit'
            • To mark an item as back at the home branch, check the item in at the home branch
              • A message will appear tell you that the item is not checked out, but the status will now say available in the catalog. This step is necessary to mark items as received by the home branch.
              • @@ -39,18 +39,20 @@
              • If you're checking an item in that has a hold on it, you will be prompted to confirm the hold
                  -
                • Clicking the Confirm hold button will mark the item as waiting for pickup from the library 
                • +
                • Clicking the Confirm hold button will mark the item as waiting for pickup from the library
                • Clicking the Print Slip and Confirm button will mark the item as waiting for pickup at the library and present the library with a receipt to print and place on the book with the patron's information
                • Ignoring the hold will leave the item on hold, but leave its status as Available (it will not cancel the hold)
              • If you're checking in an item that has a hold on it at another branch you will be prompted to confirm and transfer the item
                  -
                • Clicking the Confirm hold and Transfer button will mark the item as in transit to the library where the hold was placed 
                • +
                • Clicking the Confirm hold and Transfer button will mark the item as in transit to the library where the hold was placed
                • Clicking the Print Slip, Transfer and Confirm button will mark the item as in transit to the library where the hold was placed and present the library with a receipt to print and place on the book with the patron's information
                • Ignoring the hold will leave the item on hold, but leave its status as Available (it will not cancel the hold)
              +

              See the full documentation for Checking In in the manual (online).

              + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/selectbranchprinter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/selectbranchprinter.tt index 9a8badb..4f399cc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/selectbranchprinter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/selectbranchprinter.tt @@ -1,35 +1,13 @@ [% INCLUDE 'help-top.inc' %] -

              Set Library:

              +

              Set Library

              -

              There are three ways to set your home branch.

              -

              -IMPORTANT: You will not be able to perform circulation functions without first setting a library.

              -
                -
              • - Most commonly the home branch is set when adding a staff patron. (See the Adding Staff Patrons part of this manual). When staff members login their home branch will be set automatically. You can see that branch in the top right of the staff client
              • -
              • - If a library is not set you will see a notice to that affect.
              • -
              • - To set the library you can click '(Set)' to the right of the 'NO_LIBRARY_SET' label
              • -
              • - The other way to set the library is to click 'Set library' on the main circulation page
              • -
              • - Choose your home branch from the menu you are presented with
              • -
              • - Click 'Submit'
              • -
              - -

              What is a home branch?

              -

              - The home branch is the branch you want recorded as the origination of circulation functions while you are logged in.

              -

              - For example, if your home branch is set to 'Main Library', any items checked out to a patron on your terminal will be considered by Koha to be checked out from the - 'Main Library' - branch. An item transferred on that computer will be recorded as transferred from the 'Main Library' branch.

              - -

              Why would I want to set a home branch?

              -

              - Setting your home branch is critical. It enables Koha to accurately record statistics, circulation (what branch an item has been checked out from or returned to), and transfers.

              +

              By default you will enter the staff client as if you are at your home library. This library will appear in the top right of the Staff Client.

              + +

              This is the library that all circulation transactions will take place at. If you are at another library (or on a bookmobile) you will want to set your library before you start circulating items. To do this you can click 'Set' at the top right or on the Circulation page.

              + +

              Once you have saved your changes you new library will appear in the top right.

              + +

              See the full documentation for Setting your Library in the manual (online).

              [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/transferstoreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/transferstoreceive.tt index d84793b..865aaa7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/transferstoreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/transferstoreceive.tt @@ -8,4 +8,6 @@

              Important: An item is considered late based on the number of days you have entered in the TransfersMaxDaysWarning system preference.

              +

              See the full documentation for Transfers to Receive in the manual (online).

              + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/view_holdsqueue.tt index ee59ef9..409cce0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/view_holdsqueue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/view_holdsqueue.tt @@ -4,4 +4,6 @@

              This report will show you all of the holds at your library. To generate this report, you must have the Build Holds Queue cron job running.

              +

              See the full documentation for the Holds Queue in the manual (online).

              + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/waitingreserves.tt index d80497e..eb1e3ec 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/waitingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/waitingreserves.tt @@ -4,4 +4,8 @@

              This report will show all of the holds that are waiting for patrons to pick them up.

              +

              Items that have been on the hold shelf longer than you normally allow (based on the ReservesMaxPickUpDelay preference value) will appear on the 'Holds Over' tab, they will not automatically be cancelled.

              + +

              See the full documentation for Holds Awaiting Pickup in the manual (online).

              + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From nengard at bywatersolutions.com Thu Oct 6 17:53:38 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Thu, 6 Oct 2011 11:53:38 -0400 Subject: [Koha-patches] [PATCH] Bug 6966: Export help files Message-ID: <1317916418-11041-1-git-send-email-nengard@bywatersolutions.com> This adds the manual link to the export help file. --- .../prog/en/modules/help/export/marc.tt | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/export/marc.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/export/marc.tt index 87da107..cac8df8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/export/marc.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/export/marc.tt @@ -34,4 +34,6 @@
            +

            See the full documentation for Marc Export in the manual (online).

            + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From nengard at bywatersolutions.com Thu Oct 6 17:58:30 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Thu, 6 Oct 2011 11:58:30 -0400 Subject: [Koha-patches] [PATCH] bug 6966 update help files Message-ID: <1317916710-11127-1-git-send-email-nengard@bywatersolutions.com> This patch updates help files not in a module specific folder. --- .../intranet-tmpl/prog/en/modules/help/about.tt | 2 ++ .../intranet-tmpl/prog/en/modules/help/nohelp.tt | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/about.tt index 15df829..e7c9d96 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/about.tt @@ -14,4 +14,6 @@

            Koha is developed and supported by a large number of developers around the world. Thanks to all the developers and libraries who support Koha

            +

            See the full documentation for the About page in the manual (online).

            + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/nohelp.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/nohelp.tt index d46c818..57c5ffc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/nohelp.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/nohelp.tt @@ -1,11 +1,13 @@ [% INCLUDE 'help-top.inc' %] -

            Online Help

            -

            Sorry, there is no help available for this topic

            +

            Online Help

            + +

            Sorry, there is no help available for this topic, please refer to the Koha 3.6 manual (online).

            +
            - - - + + + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From nengard at bywatersolutions.com Thu Oct 6 18:03:55 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Thu, 6 Oct 2011 12:03:55 -0400 Subject: [Koha-patches] [PATCH] Bug 6966 update help files for labels Message-ID: <1317917035-11215-1-git-send-email-nengard@bywatersolutions.com> This patch adds the manual links to the label maker help files. --- .../en/modules/help/labels/label-edit-batch.tt | 2 ++ .../en/modules/help/labels/label-edit-layout.tt | 2 ++ .../en/modules/help/labels/label-edit-profile.tt | 2 +- .../en/modules/help/labels/label-edit-template.tt | 2 ++ .../prog/en/modules/help/labels/label-home.tt | 2 ++ .../prog/en/modules/help/labels/spinelabel-home.tt | 2 ++ 6 files changed, 11 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-batch.tt index 7bddbbf..62a3335 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-batch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-batch.tt @@ -22,4 +22,6 @@

            After saving your file, simply print to the blank labels you have in your library.

            +

            See the full documentation for Label Batches in the manual (online).

            + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-layout.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-layout.tt index 44d7fd5..23d1332 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-layout.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-layout.tt @@ -12,4 +12,6 @@

            After saving, your layouts will appear on the 'Manage Layouts' page.

            +

            See the full documentation for Label Layouts in the manual (online).

            + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-profile.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-profile.tt index ddf4d81..1d5627e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-profile.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-profile.tt @@ -28,6 +28,6 @@

            Once you have saved your new profile, you can return to the list of templates and choose to edit the template that this profile is for.

            - +

            See the full documentation for Label Profiles in the manual (online).

            [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-template.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-template.tt index 17e3cca..d5b2674 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-template.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-edit-template.tt @@ -30,4 +30,6 @@

            After saving, your templates will appear on the 'Manage Templates' page.

            +

            See the full documentation for Label Templates in the manual (online).

            + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-home.tt index ad7407e..fe90abb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/label-home.tt @@ -41,4 +41,6 @@

            Batches are made up of the barcodes you would like to print. Once in this tool you can search for the item records you would like to print out labels for.

            +

            See the full documentation for the Label Creator in the manual (online).

            + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/spinelabel-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/spinelabel-home.tt index 5449f67..8dc513d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/spinelabel-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/spinelabel-home.tt @@ -11,4 +11,6 @@

            To use this tool you simply need the barcode for the book you'd like to print the spine label for.

            +

            See the full documentation for Quick Spine Label Creator in the manual (online).

            + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From cnighswonger at foundations.edu Thu Oct 6 19:23:47 2011 From: cnighswonger at foundations.edu (Chris Nighswonger) Date: Thu, 6 Oct 2011 13:23:47 -0400 Subject: [Koha-patches] [PATCH] Fixing typo in image filename which introduced a space causing problems on win32 Message-ID: <1317921827-21738-1-git-send-email-cnighswonger@foundations.edu> --- .../prog/img/itemtypeimg/Seshat/archival lDVD.gif | Bin 3126 -> 0 bytes .../prog/img/itemtypeimg/Seshat/archivalDVD.gif | Bin 0 -> 3126 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archival lDVD.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archivalDVD.gif diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archival lDVD.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archival lDVD.gif deleted file mode 100644 index 5b278cb4aad324760ccd336bccfe8ad79f79e73c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3126 zcmV-649W9HNk%w1VLSjd0O$Vz00RIC0ssyN1qKQS3lI|&5DyR%4;2;^85j{97#1KI z4WnzV6F??n)d}u06 zaFK{-I%{oei)l7$ZgEs}j+JXIkZd%Fa4nH;JB4#HQhAw`a50o|H*_e$ zl{k}_o0gcBz?nS5n>U=DpuU|zyP!axpqe$o%%V2Tqdv)|K&Ggs&8a)bt3=ML zMA5B2(ym9h0+3=k4$7@$>NZ z`1Sew`2GL_CX>@2HM at dak04x9i002AyGynhy{s8$297wRB!Grte z!Ap1T+BbOj4oaLzv7*3z=|)NM-~ok47br at 2AoD7n#gi2K{aZOu-!LR4N}ND(V&;jM z9%q(7(rX^dpZ)x;{O3=g%N#Os%FHQp0)qnv4j at 2aK+d;)KPLtqN>pI995-#+3^@To zj60@`Wi!XFtvP6)vP6oPm7q|rEb9%58M9_h6dnu^fn`oz+rx<4s%r&Bj=ZdQ@&4l{ zPYU0fB|>H}V51ec#GntC`}ONoi(x1u^9jTbLn#L7K80&k+^e*9Mc>g&>%?~FHiJU~-Nt{gSn z<)$Cj6-yVdZR*g0%ku5ucY#EWa?@)`K!QgG#u(O?HqA&QjeP8QL*FS68m3M;T)0!v ze*;~ETnRH&f=36GD0rAR)JWrveAdKr3NP`sg$_F7_~4U3s&zHcJ+Ae&0w{uDK?FFT zn8KD~)Ff#lXw00F$~2;_vrakC$T5&)1-%kdSRrU42p$B$FaQ7o_<&eB*f4_)ZtCPx zUySUOV<9_-m=xY>JBCzV9+mV!$2Zrw0000Mz=D`Kwk_FKIW6jfO^oBPV_1CPi~%55 zMGZ7ec_>7%0s%Yftx{qVUYQC6(+M6hFhBsn z1^~bl*QgYa3#T$#PC4UPL(Dkf;9?3c(|B{rDcr<2>7m#pGsvAoEM zK(Ol`utXZh9L5bc*l4rOEihQnM<$s(u>l&#EW7B1%Sw~XG0Y6H53T~qBgX(a%rlfe zy=X8f01X^+OfuDM6K7j#Dq?{%_w1w3$?s?Z1vqe);|(*%YI?t_T2SCXCt&9iO8y)#G$4QkTQH-|Gak at W&*4^=e2+f%h=2<) zq{&hWDV%VE2_}yaatS}z44k128DzJ0H6TE3IG{| z@&sU^U?r$n7a8^u4K(E90#eh*E^1K=RUiTn-vHhU;J^n*@b3{Qw8Z5wL4z(xFM@*# zz$Magk4VG~9{+$xu$JLH1O`9?{tKu;3M?Ukeca<78{{A)1aXa%=|cql!$c`UAqr81 zf)ksl+!3OI1S!Y?d_NS*Jp=%(C#*yc!Ro^kBme;r{6Ggh;K2qgae=7a;~bjcAR at 3} zM|(to6PDmaC`w_)6-vT?^~k|L>=6Jmq5^`!x`Zp*P=EwfKm~Brfe at HL1s)Wk1`m)# z6i9ZDdMKj|SnxtP_F=VfkU)8u5M(SZhY3%3LJa;W!9QHFE&(WH83t%%5LqAt9 at Kyb zRG>l;co2jd{NM*dC_)8bQH&el!- at Hr$Ks at R4=qGt4u0^%@-RWU%ZY*$a`1-~VOG4SU at nCW*BcwLmR(nhG*lXjz~pF z7mwfrA0FWdIE(^EAZP+`Ls|sIMiZb#utGnXzylUswU{RT=MM%dusB(R8_Xa^H_#Cu zag4*c>Hr2O3IWs!iQXA>UlNq@?Km^C1;Jb4g?Wi<^Q+ZacD z=PM5TqJwFNX;C5OpaO!d0tEQP>NDfW;vh&knxCuzV{0G-d~!fw%MyonXhDtojzh=J zUDPpNaNQ0q0Hut at sx!qJ$B`CztK}tT9C at pQ2QbaTSEfZX=*z5f%xFc2>BIr(G7xzb zpr0p=qy7-Az|taoccec!tbya$Pm at 9b8aS2{JFqjOWpzUw-UxJCV8Jtk{57gfsHYXC z99b(ky3OiEsWZFEg9;?5%d;W|E#ySs4sT-{^fHA3JfNY1Om!kQaQTNPAb z0R>P%7(P*qA9pxDyJp5FlJVI zBw*nSY;b at YsOr2R z3}^*;P{k}*(R4fL!3;fczyvVBfe~;310kPySWa+_x*X&lWcW}_LNJ9yu!8PRx4RvJ zw1W_o=QTOlx#0_%nL%dqS6sC}b8O-1V8Mw at V2GoVeY`G5cbJ5h`fN&o-= diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archivalDVD.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archivalDVD.gif new file mode 100644 index 0000000000000000000000000000000000000000..5b278cb4aad324760ccd336bccfe8ad79f79e73c GIT binary patch literal 3126 zcmV-649W9HNk%w1VLSjd0O$Vz00RIC0ssyN1qKQS3lI|&5DyR%4;2;^85j{97#1KI z4WnzV6F??n)d}u06 zaFK{-I%{oei)l7$ZgEs}j+JXIkZd%Fa4nH;JB4#HQhAw`a50o|H*_e$ zl{k}_o0gcBz?nS5n>U=DpuU|zyP!axpqe$o%%V2Tqdv)|K&Ggs&8a)bt3=ML zMA5B2(ym9h0+3=k4$7@$>NZ z`1Sew`2GL_CX>@2HM at dak04x9i002AyGynhy{s8$297wRB!Grte z!Ap1T+BbOj4oaLzv7*3z=|)NM-~ok47br at 2AoD7n#gi2K{aZOu-!LR4N}ND(V&;jM z9%q(7(rX^dpZ)x;{O3=g%N#Os%FHQp0)qnv4j at 2aK+d;)KPLtqN>pI995-#+3^@To zj60@`Wi!XFtvP6)vP6oPm7q|rEb9%58M9_h6dnu^fn`oz+rx<4s%r&Bj=ZdQ@&4l{ zPYU0fB|>H}V51ec#GntC`}ONoi(x1u^9jTbLn#L7K80&k+^e*9Mc>g&>%?~FHiJU~-Nt{gSn z<)$Cj6-yVdZR*g0%ku5ucY#EWa?@)`K!QgG#u(O?HqA&QjeP8QL*FS68m3M;T)0!v ze*;~ETnRH&f=36GD0rAR)JWrveAdKr3NP`sg$_F7_~4U3s&zHcJ+Ae&0w{uDK?FFT zn8KD~)Ff#lXw00F$~2;_vrakC$T5&)1-%kdSRrU42p$B$FaQ7o_<&eB*f4_)ZtCPx zUySUOV<9_-m=xY>JBCzV9+mV!$2Zrw0000Mz=D`Kwk_FKIW6jfO^oBPV_1CPi~%55 zMGZ7ec_>7%0s%Yftx{qVUYQC6(+M6hFhBsn z1^~bl*QgYa3#T$#PC4UPL(Dkf;9?3c(|B{rDcr<2>7m#pGsvAoEM zK(Ol`utXZh9L5bc*l4rOEihQnM<$s(u>l&#EW7B1%Sw~XG0Y6H53T~qBgX(a%rlfe zy=X8f01X^+OfuDM6K7j#Dq?{%_w1w3$?s?Z1vqe);|(*%YI?t_T2SCXCt&9iO8y)#G$4QkTQH-|Gak at W&*4^=e2+f%h=2<) zq{&hWDV%VE2_}yaatS}z44k128DzJ0H6TE3IG{| z@&sU^U?r$n7a8^u4K(E90#eh*E^1K=RUiTn-vHhU;J^n*@b3{Qw8Z5wL4z(xFM@*# zz$Magk4VG~9{+$xu$JLH1O`9?{tKu;3M?Ukeca<78{{A)1aXa%=|cql!$c`UAqr81 zf)ksl+!3OI1S!Y?d_NS*Jp=%(C#*yc!Ro^kBme;r{6Ggh;K2qgae=7a;~bjcAR at 3} zM|(to6PDmaC`w_)6-vT?^~k|L>=6Jmq5^`!x`Zp*P=EwfKm~Brfe at HL1s)Wk1`m)# z6i9ZDdMKj|SnxtP_F=VfkU)8u5M(SZhY3%3LJa;W!9QHFE&(WH83t%%5LqAt9 at Kyb zRG>l;co2jd{NM*dC_)8bQH&el!- at Hr$Ks at R4=qGt4u0^%@-RWU%ZY*$a`1-~VOG4SU at nCW*BcwLmR(nhG*lXjz~pF z7mwfrA0FWdIE(^EAZP+`Ls|sIMiZb#utGnXzylUswU{RT=MM%dusB(R8_Xa^H_#Cu zag4*c>Hr2O3IWs!iQXA>UlNq@?Km^C1;Jb4g?Wi<^Q+ZacD z=PM5TqJwFNX;C5OpaO!d0tEQP>NDfW;vh&knxCuzV{0G-d~!fw%MyonXhDtojzh=J zUDPpNaNQ0q0Hut at sx!qJ$B`CztK}tT9C at pQ2QbaTSEfZX=*z5f%xFc2>BIr(G7xzb zpr0p=qy7-Az|taoccec!tbya$Pm at 9b8aS2{JFqjOWpzUw-UxJCV8Jtk{57gfsHYXC z99b(ky3OiEsWZFEg9;?5%d;W|E#ySs4sT-{^fHA3JfNY1Om!kQaQTNPAb z0R>P%7(P*qA9pxDyJp5FlJVI zBw*nSY;b at YsOr2R z3}^*;P{k}*(R4fL!3;fczyvVBfe~;310kPySWa+_x*X&lWcW}_LNJ9yu!8PRx4RvJ zw1W_o=QTOlx#0_%nL%dqS6sC}b8O-1V8Mw at V2GoVeY`G5cbJ5h`fN&o-= literal 0 HcmV?d00001 -- 1.7.0.4 From oleonard at myacpl.org Thu Oct 6 20:30:21 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 6 Oct 2011 14:30:21 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6980, Patron attributes are shown when ExtendedPatronAttributes is disabled Message-ID: <1317925821-2237-1-git-send-email-oleonard@myacpl.org> This patch adds a check for the value of the ExtendedPatronAttributes preference to the scripts and corresponding logic to the templates controlling the sidebar menu. The patch also corrects a duplication of attributes code in moremember.pl --- circ/circulation.pl | 10 ++++++++-- .../intranet-tmpl/prog/en/includes/circ-menu.inc | 4 ++-- .../intranet-tmpl/prog/en/includes/circ-menu.tt | 4 ++-- .../prog/en/modules/members/moremember.tt | 10 +++++----- members/boraccount.pl | 10 ++++++++-- members/mancredit.pl | 8 +++++++- members/maninvoice.pl | 9 +++++++-- members/member-flags.pl | 10 ++++++++-- members/member-password.pl | 10 ++++++++-- members/moremember.pl | 9 +++++---- members/notices.pl | 10 ++++++++-- members/pay.pl | 8 +++++++- members/readingrec.pl | 10 ++++++++-- 13 files changed, 83 insertions(+), 29 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 98fee97..7b7b270 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -632,7 +632,14 @@ my $fast_cataloging = 0; if (defined getframeworkinfo('FA')) { $fast_cataloging = 1 } -my $attributes = GetBorrowerAttributes($borrowernumber); + +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( lib_messages_loop => $lib_messages_loop, @@ -682,7 +689,6 @@ $template->param( circview => 1, soundon => C4::Context->preference("SoundOn"), fast_cataloging => $fast_cataloging, - extendedattributes => $attributes, ); # save stickyduedate to session diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index a9fd453..67300d5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -48,13 +48,13 @@
          • No email stored.
          • [% END %] [% END %] - [% FOREACH extendedattribute IN extendedattributes %] + [% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN extendedattributes %] [% IF ( extendedattribute.display_checkout ) %] [% IF ( extendedattribute.value ) %]
          • [% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]
          • [% END %] [% END %] - [% END %] + [% END %][% END %]
          • Category: [% categoryname %] ([% categorycode %])
          • Home Library: [% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]
          diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt index 47c1290..fe04b63 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt @@ -50,13 +50,13 @@ in the global namespace %]
        • No email stored.
        • [% END %] [% END %] - [% FOREACH extendedattribute IN borrower.extendedattributes %] + [% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN borrower.extendedattributes %] [% IF ( extendedattribute.display_checkout ) %] [% IF ( extendedattribute.value ) %]
        • [% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]
        • [% END %] [% END %] - [% END %] + [% END %][% END %]
        • Category: [% borrower.description %] ([% borrower.categorycode %])
        • Home Library: [% IF ( borrower.branchname ) %][% borrower.branchname %][% ELSE %][% borrower.branch %][% END %]
        diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 3eb42f3..49a56cf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -285,12 +285,12 @@ function validate1(date) {
        - [% FOREACH patron_attribute IN patron_attributes %] + [% FOREACH extendedattribute IN extendedattributes %] - - + diff --git a/members/boraccount.pl b/members/boraccount.pl index b197b3f..e16405b 100755 --- a/members/boraccount.pl +++ b/members/boraccount.pl @@ -94,7 +94,14 @@ $template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); $template->param( picture => 1 ) if $picture; -my $attributes = GetBorrowerAttributes($borrowernumber); + +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( finesview => 1, @@ -120,7 +127,6 @@ $template->param( is_child => ($data->{'category_type'} eq 'C'), reverse_col => $reverse_col, accounts => $accts, - extendedattributes => $attributes, ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/mancredit.pl b/members/mancredit.pl index 801fcc2..3c664c2 100755 --- a/members/mancredit.pl +++ b/members/mancredit.pl @@ -78,7 +78,14 @@ if ($add){ $template->param( adultborrower => 1 ) if ( $data->{category_type} eq 'A' ); my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); $template->param( picture => 1 ) if $picture; + +if (C4::Context->preference('ExtendedPatronAttributes')) { my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( borrowernumber => $borrowernumber, @@ -99,7 +106,6 @@ if ($add){ branchcode => $data->{'branchcode'}, branchname => GetBranchName($data->{'branchcode'}), is_child => ($data->{'category_type'} eq 'C'), - extendedattributes => $attributes, ); output_html_with_http_headers $input, $cookie, $template->output; } diff --git a/members/maninvoice.pl b/members/maninvoice.pl index 9a040b6..1f42093 100755 --- a/members/maninvoice.pl +++ b/members/maninvoice.pl @@ -106,8 +106,14 @@ if ($add){ $template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); $template->param( picture => 1 ) if $picture; - my $attributes = GetBorrowerAttributes($borrowernumber); +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( borrowernumber => $borrowernumber, firstname => $data->{'firstname'}, @@ -127,7 +133,6 @@ if ($add){ branchcode => $data->{'branchcode'}, branchname => GetBranchName($data->{'branchcode'}), is_child => ($data->{'category_type'} eq 'C'), - extendedattributes => $attributes, ); output_html_with_http_headers $input, $cookie, $template->output; } diff --git a/members/member-flags.pl b/members/member-flags.pl index 00a3268..76f300e 100755 --- a/members/member-flags.pl +++ b/members/member-flags.pl @@ -162,7 +162,14 @@ if ($input->param('newflags')) { $template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' ); my ($picture, $dberror) = GetPatronImage($bor->{'cardnumber'}); $template->param( picture => 1 ) if $picture; -my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'}); + +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'}); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( borrowernumber => $bor->{'borrowernumber'}, @@ -184,7 +191,6 @@ $template->param( branchname => GetBranchName($bor->{'branchcode'}), loop => \@loop, is_child => ($bor->{'category_type'} eq 'C'), - extendedattributes => $attributes, ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/member-password.pl b/members/member-password.pl index 03f5243..25e9551 100755 --- a/members/member-password.pl +++ b/members/member-password.pl @@ -90,7 +90,14 @@ if ( $newpassword && ! $errormsg ) { $template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' ); my ($picture, $dberror) = GetPatronImage($bor->{'cardnumber'}); $template->param( picture => 1 ) if $picture; -my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'}); + +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'}); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( othernames => $bor->{'othernames'}, surname => $bor->{'surname'}, @@ -114,7 +121,6 @@ my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'}); destination => $destination, is_child => ($bor->{'category_type'} eq 'C'), defaultnewpassword => $defaultnewpassword, - extendedattributes => $attributes, ); diff --git a/members/moremember.pl b/members/moremember.pl index 7f47dd6..9115dd1 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -425,8 +425,11 @@ my $branch=C4::Context->userenv->{'branch'}; $template->param(%$data); if (C4::Context->preference('ExtendedPatronAttributes')) { - $template->param(ExtendedPatronAttributes => 1); - $template->param(patron_attributes => C4::Members::Attributes::GetBorrowerAttributes($borrowernumber)); + my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); my @types = C4::Members::AttributeTypes::GetAttributeTypes(); if (scalar(@types) == 0) { $template->param(no_patron_attribute_types => 1); @@ -439,7 +442,6 @@ if (C4::Context->preference('EnhancedMessagingPreferences')) { $template->param(SMSSendDriver => C4::Context->preference("SMSSendDriver")); $template->param(SMSnumber => defined $data->{'smsalertnumber'} ? $data->{'smsalertnumber'} : $data->{'mobile'}); } -my $attributes = GetBorrowerAttributes($borrowernumber); $template->param( detailview => 1, @@ -469,7 +471,6 @@ $template->param( "dateformat_" . (C4::Context->preference("dateformat") || '') => 1, samebranch => $samebranch, quickslip => $quickslip, - extendedattributes => $attributes, ); #Get the slip news items diff --git a/members/notices.pl b/members/notices.pl index a6e65c8..41f2a90 100755 --- a/members/notices.pl +++ b/members/notices.pl @@ -53,7 +53,14 @@ $template->param( picture => 1 ) if $picture; # Getting the messages my $queued_messages = C4::Letters::GetQueuedMessages({borrowernumber => $borrowernumber}); $template->param( %{$borrower} ); -my $attributes = GetBorrowerAttributes($borrowernumber); + +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( QUEUED_MESSAGES => $queued_messages, @@ -61,7 +68,6 @@ $template->param( sentnotices => 1, branchname => GetBranchName($borrower->{'branchcode'}), categoryname => $borrower->{'description'}, - extendedattributes => $attributes, ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/pay.pl b/members/pay.pl index 9389f82..6bc18fc 100755 --- a/members/pay.pl +++ b/members/pay.pl @@ -233,7 +233,13 @@ sub borrower_add_additional_fields { if ($picture) { $b_ref->{has_picture} = 1; } - $b_ref->{extendedattributes} = GetBorrowerAttributes($borrowernumber); + + if (C4::Context->preference('ExtendedPatronAttributes')) { + $b_ref->{extendedattributes} = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + ); + } $b_ref->{branchname} = GetBranchName( $b_ref->{branchcode} ); return; diff --git a/members/readingrec.pl b/members/readingrec.pl index 04414e3..8c0cd6f 100755 --- a/members/readingrec.pl +++ b/members/readingrec.pl @@ -96,7 +96,14 @@ if (! $limit){ my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); $template->param( picture => 1 ) if $picture; -my $attributes = GetBorrowerAttributes($borrowernumber); + +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( readingrecordview => 1, @@ -125,7 +132,6 @@ $template->param( branchname => GetBranchName($data->{'branchcode'}), showfulllink => (scalar @loop_reading > 50), loop_reading => \@loop_reading, - extendedattributes => $attributes, ); output_html_with_http_headers $input, $cookie, $template->output; -- 1.7.3 From ian.walls at bywatersolutions.com Thu Oct 6 20:34:56 2011 From: ian.walls at bywatersolutions.com (Ian Walls) Date: Thu, 6 Oct 2011 14:34:56 -0400 Subject: [Koha-patches] [PATCH] Fixing typo in image filename which introduced a space causing problems on win32 In-Reply-To: <1317921827-21738-1-git-send-email-cnighswonger@foundations.edu> References: <1317921827-21738-1-git-send-email-cnighswonger@foundations.edu> Message-ID: Chris, Good catch! We need a couple more bits to this, though. 1) reopen the bug report for the Seshat icon set http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5604 2) we need a database update line to make sure any itemtypes or authorised values currently pointing to this image will continue to do so after the update. Cheers, -Ian On Thu, Oct 6, 2011 at 1:23 PM, Chris Nighswonger < cnighswonger at foundations.edu> wrote: > --- > .../prog/img/itemtypeimg/Seshat/archival lDVD.gif | Bin 3126 -> 0 bytes > .../prog/img/itemtypeimg/Seshat/archivalDVD.gif | Bin 0 -> 3126 bytes > 2 files changed, 0 insertions(+), 0 deletions(-) > delete mode 100644 > koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archival lDVD.gif > create mode 100644 > koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archivalDVD.gif > > diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archival > lDVD.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archival > lDVD.gif > deleted file mode 100644 > index > 5b278cb4aad324760ccd336bccfe8ad79f79e73c..0000000000000000000000000000000000000000 > GIT binary patch > literal 0 > HcmV?d00001 > > literal 3126 > zcmV-649W9HNk%w1VLSjd0O$Vz00RIC0ssyN1qKQS3lI|&5DyR%4;2;^85j{97#1KI > z4 zFeelqDmN)AC?qQ}GAJo0D=jT6E;lO^Gb zG9NNCF+?&PKQtRYH5NlMFD*AhJT)*wGc`mw6gN0LKsGiwIW|W%GA%nxMm9JnJySqC > zB}q3mOgSA$I66r=J4QVwNIn@%IyXx_A4EPdJwH4!K~YOPJwrY?OguhLJUS*sVnaVa > zPe2_|KPo^%KR829Q9e9aKO|2-K|V!HFi2ugMkYf?Nm52KRYxF3NJTeFUo1{ zNg7Z}L`_UZO;1feQD!MsenL at UWlbYsPbOecAWu+OGFEz3P)|lwWjtAUX;M3HQY%ze > zQ*u! zcUdxgSTlcGFmhigJZ6wcWqf*HD}7!!T4QZ`UO{|cJ%C^{L}`y>WnzV6F??n)d}u06 > zaFK{-I%{oei)l7$ZgEs}j+JXIkZd%Fa4nH;JB4#HQhAw`a50o|H* zGoE)bdVG1Ncr9ImqIrIRVuGEXeKmxCet&^}n1MH at elewfIA@2Vu753LiK&H$gr|iy > zqK7%Hgg38+F at uSXvxqE;jERelkhO|7vW+*fkus{1Kai4-yN@)nk~*!GI=7NMz>_e$ > zl{k}_o0gcBz?nS5n>U=DpuU|zyP!axpqe$o%%V2Tqdv)|K&Ggs&8a)bt3=ML > zMA5B2(ym9 z-MvlTzfQlwzsASQ$jQde(9F`+(%IYC*4*CT;ojWhh0+3=k4$7@$>NZ > z`1Sew`2GL_CX>@2HM at dak04x9i002AyGynhy{s8$297wRB!Grte > z!Ap1T+BbOj4oaLzv7*3z=|)NM-~ok47br at 2AoD7n#gi2K{aZOu-!LR4N}ND(V&;jM > z9%q(7(rX^dpZ)x;{O3=g%N#Os%FHQp0)qnv4j at 2aK+d;)KPLtqN>pI995-#+3^@To > zj60@`Wi!XFtvP6)vP6oPm7q|rEb9%58M9_h6dnu^fn`oz+rx<4s%r&Bj=ZdQ@&4l{ > zPYU0fB|>H}V51ec#GntC`}ONoi(x1u zzT0me%-1DiztK=k9JXf2tl>^9jTbLn#L7K80&k+^e*9Mc>g&>%?~FHiJU~-Nt{gSn > z<)$Cj6-yVdZR*g0%ku5ucY#EWa?@)`K!QgG#u(O?HqA&QjeP8QL*FS68m3M;T)0!v > ze*;~ETnRH&f=36GD0rAR)JWrveAdKr3NP`sg$_F7_~4U3s&zHcJ+Ae&0w{uDK?FFT > zn8KD~)Ff#lXw00F$~2;_vrakC$T5&)1-%kdSRrU42p$B$FaQ7o_<&eB*f4_)ZtCPx > zUySUOV<9_-m=xY>JBCzV9+mV!$2Zrw0000Mz=D`Kwk_FKIW6jfO^oBPV_1CPi~%55 > zMGZ7ec_>7%0s%Yftx{qVUYQC6(+M6hFhBsn > z1^~bl*QgYa3#T$#PC4UPL(Dkf;9?3c(|B{rDcr<2>7m#pGsvAoEM > zK(Ol`utXZh9L5bc*l4rOEihQnM<$s(u>l&#EW7B1%Sw~XG0Y6H53T~qBgX(a%rlfe > zy=X8f01X^+OfuDM6K7j#Dq?{%_w1w3$?s?Z1vqe);|(*%Y zBNW9603nGdqR8?KF~|UejW^|p)5#6==u;0o^3 zFe?2c&n0qPvrG=a>I?t_T2SCXCt&9iO8y)#G$4QkTQH-|Gak at W&*4^=e2+f%h=2<) > zq{&hWDV%VE2_}yaatS}z zeGVgDFd~oC`#57nDV3L zG<9G?g5mnaQwAuAAacgZ_t=xbBa1AeydQJ$5r`p=V6p at m>44k128DzJ0H6TE3IG{| > z@&sU^U?r$n7a8^u4K(E90#eh*E^1K=RUiTn-vHhU;J^n*@b3{Qw8Z5wL4z(xFM@*# > zz$Magk4VG~9{+$xu$JLH1O`9?{tKu;3M?Ukeca<78{{A)1aXa%=|cql!$c`UAqr81 > zf)ksl+!3OI1S!Y?d_NS*Jp=%(C#*yc!Ro^kBme;r{6Ggh;K2qgae=7a;~bjcAR at 3} > zM|(to6PDmaC`w_)6-vT?^~k|L>=6Jmq5^`!x`Zp*P=EwfKm~Brfe at HL1s)Wk1`m)# > z6i9ZDdMKj|SnxtP_F=VfkU)8u5M(SZhY3%3LJa;W!9QHFE&(WH83t%%5LqAt9 at Kyb > zRG>l;co2jd{NM*dC_)8bQH&el!- at Hr$Ks at R4=qGt4u0^%@-RWU%ZY*$a`1-~ z7NCtR(7`i{5Ck36pq at PbV1f*apadTLfCo(o0th-G4lek at WcApG$#SO;Ul at TCaR|g7 > zB)SJa)K7(yxP(70 at lFsFlLt!ZXAz1Z10lpQ2*!+K4VqAde}dGXTwq2sTCfUy9PWrx > zTLlcjp^Z~4!ViIHL^%Dh2R{I!3eoUKG%65MD#*YJOt3-_sL; zGzdXZ!ZKk%uWh6u1ilEzJI*l*6CA=C&xjK zNstEN2cOhI5LmzilM2DAOi;oDwjquS2_p?KfPoPdVGVDfLmZ!Bhc!;|2%r`s5PoRH > z68O=NeiXn8fQ9~}5^CVgdMe?c$JD_x;fPpc>VOG4SU at nCW*BcwLmR(nhG*lXjz~pF > z7mwfrA0FWdIE(^EAZP+`Ls|sIMiZb#utGnXzylUswU{RT=MM%dusB(R8_Xa^H_#Cu > zag4*c>Hr2O3IWs!iQXA>UlNq@?Km^C1;Jb4g?Wi<^Q+ZacD > z=PM5TqJwFNX;C5OpaO!d0tEQP>NDfW;vh&knxCuzV{0G-d~!fw%MyonXhDtojzh=J > zUDPpNaNQ0q0Hut at sx!qJ$B`CztK}tT9C at pQ2QbaTSEfZX=*z5f%xFc2>BIr(G7xzb > zpr0p=qy7-Az|taoccec!tbya$Pm at 9b8aS2{JFqjOWpzUw-UxJCV8Jtk{57gfsHYXC > z99b(ky3OiEsWZFEg9;?5%d;W|E#ySs4sT-{^fHA3JfNY1 zX;*U#f&_3N8*+-2%h(|eT37=efBtMYK&^%YlwflPi3AQJ3)nOm!kQaQTNPAb > z0R>P%7(P*qA9pxDyJp5FlJVI > zBw*nSY;b at Ys z{t_{Zl2<|xc5p%l?l285djrr=@ zA~{3JX8{UG=s^!ohyW2xkqvLqOFHE!MI7o7g9B)QFDU2_Mf9S9E{q}?bnypx>Or2R > z3}^*;P{k}*(R4fL!3;fczyvVBfe~;310kPySWa+_x*X&lWcW}_LNJ9yu!8PRx4RvJ > zw1W_o=QTOlx#0_%nL%dqS6sC}b8O-1V8Mw at V2GoVeY z$LlS^#oK4b_k1BksdsOYeJrExp#ME`JkU1c8{QqLFgox{K!#zs-ubVu$2XP_VT)Iw > Q;`_FUhC6h>`G5cbJ5h`fN&o-= > > diff --git > a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archivalDVD.gif > b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archivalDVD.gif > new file mode 100644 > index > 0000000000000000000000000000000000000000..5b278cb4aad324760ccd336bccfe8ad79f79e73c > GIT binary patch > literal 3126 > zcmV-649W9HNk%w1VLSjd0O$Vz00RIC0ssyN1qKQS3lI|&5DyR%4;2;^85j{97#1KI > z4 zFeelqDmN)AC?qQ}GAJo0D=jT6E;lO^Gb zG9NNCF+?&PKQtRYH5NlMFD*AhJT)*wGc`mw6gN0LKsGiwIW|W%GA%nxMm9JnJySqC > zB}q3mOgSA$I66r=J4QVwNIn@%IyXx_A4EPdJwH4!K~YOPJwrY?OguhLJUS*sVnaVa > zPe2_|KPo^%KR829Q9e9aKO|2-K|V!HFi2ugMkYf?Nm52KRYxF3NJTeFUo1{ zNg7Z}L`_UZO;1feQD!MsenL at UWlbYsPbOecAWu+OGFEz3P)|lwWjtAUX;M3HQY%ze > zQ*u! zcUdxgSTlcGFmhigJZ6wcWqf*HD}7!!T4QZ`UO{|cJ%C^{L}`y>WnzV6F??n)d}u06 > zaFK{-I%{oei)l7$ZgEs}j+JXIkZd%Fa4nH;JB4#HQhAw`a50o|H* zGoE)bdVG1Ncr9ImqIrIRVuGEXeKmxCet&^}n1MH at elewfIA@2Vu753LiK&H$gr|iy > zqK7%Hgg38+F at uSXvxqE;jERelkhO|7vW+*fkus{1Kai4-yN@)nk~*!GI=7NMz>_e$ > zl{k}_o0gcBz?nS5n>U=DpuU|zyP!axpqe$o%%V2Tqdv)|K&Ggs&8a)bt3=ML > zMA5B2(ym9 z-MvlTzfQlwzsASQ$jQde(9F`+(%IYC*4*CT;ojWhh0+3=k4$7@$>NZ > z`1Sew`2GL_CX>@2HM at dak04x9i002AyGynhy{s8$297wRB!Grte > z!Ap1T+BbOj4oaLzv7*3z=|)NM-~ok47br at 2AoD7n#gi2K{aZOu-!LR4N}ND(V&;jM > z9%q(7(rX^dpZ)x;{O3=g%N#Os%FHQp0)qnv4j at 2aK+d;)KPLtqN>pI995-#+3^@To > zj60@`Wi!XFtvP6)vP6oPm7q|rEb9%58M9_h6dnu^fn`oz+rx<4s%r&Bj=ZdQ@&4l{ > zPYU0fB|>H}V51ec#GntC`}ONoi(x1u zzT0me%-1DiztK=k9JXf2tl>^9jTbLn#L7K80&k+^e*9Mc>g&>%?~FHiJU~-Nt{gSn > z<)$Cj6-yVdZR*g0%ku5ucY#EWa?@)`K!QgG#u(O?HqA&QjeP8QL*FS68m3M;T)0!v > ze*;~ETnRH&f=36GD0rAR)JWrveAdKr3NP`sg$_F7_~4U3s&zHcJ+Ae&0w{uDK?FFT > zn8KD~)Ff#lXw00F$~2;_vrakC$T5&)1-%kdSRrU42p$B$FaQ7o_<&eB*f4_)ZtCPx > zUySUOV<9_-m=xY>JBCzV9+mV!$2Zrw0000Mz=D`Kwk_FKIW6jfO^oBPV_1CPi~%55 > zMGZ7ec_>7%0s%Yftx{qVUYQC6(+M6hFhBsn > z1^~bl*QgYa3#T$#PC4UPL(Dkf;9?3c(|B{rDcr<2>7m#pGsvAoEM > zK(Ol`utXZh9L5bc*l4rOEihQnM<$s(u>l&#EW7B1%Sw~XG0Y6H53T~qBgX(a%rlfe > zy=X8f01X^+OfuDM6K7j#Dq?{%_w1w3$?s?Z1vqe);|(*%Y zBNW9603nGdqR8?KF~|UejW^|p)5#6==u;0o^3 zFe?2c&n0qPvrG=a>I?t_T2SCXCt&9iO8y)#G$4QkTQH-|Gak at W&*4^=e2+f%h=2<) > zq{&hWDV%VE2_}yaatS}z zeGVgDFd~oC`#57nDV3L zG<9G?g5mnaQwAuAAacgZ_t=xbBa1AeydQJ$5r`p=V6p at m>44k128DzJ0H6TE3IG{| > z@&sU^U?r$n7a8^u4K(E90#eh*E^1K=RUiTn-vHhU;J^n*@b3{Qw8Z5wL4z(xFM@*# > zz$Magk4VG~9{+$xu$JLH1O`9?{tKu;3M?Ukeca<78{{A)1aXa%=|cql!$c`UAqr81 > zf)ksl+!3OI1S!Y?d_NS*Jp=%(C#*yc!Ro^kBme;r{6Ggh;K2qgae=7a;~bjcAR at 3} > zM|(to6PDmaC`w_)6-vT?^~k|L>=6Jmq5^`!x`Zp*P=EwfKm~Brfe at HL1s)Wk1`m)# > z6i9ZDdMKj|SnxtP_F=VfkU)8u5M(SZhY3%3LJa;W!9QHFE&(WH83t%%5LqAt9 at Kyb > zRG>l;co2jd{NM*dC_)8bQH&el!- at Hr$Ks at R4=qGt4u0^%@-RWU%ZY*$a`1-~ z7NCtR(7`i{5Ck36pq at PbV1f*apadTLfCo(o0th-G4lek at WcApG$#SO;Ul at TCaR|g7 > zB)SJa)K7(yxP(70 at lFsFlLt!ZXAz1Z10lpQ2*!+K4VqAde}dGXTwq2sTCfUy9PWrx > zTLlcjp^Z~4!ViIHL^%Dh2R{I!3eoUKG%65MD#*YJOt3-_sL; zGzdXZ!ZKk%uWh6u1ilEzJI*l*6CA=C&xjK zNstEN2cOhI5LmzilM2DAOi;oDwjquS2_p?KfPoPdVGVDfLmZ!Bhc!;|2%r`s5PoRH > z68O=NeiXn8fQ9~}5^CVgdMe?c$JD_x;fPpc>VOG4SU at nCW*BcwLmR(nhG*lXjz~pF > z7mwfrA0FWdIE(^EAZP+`Ls|sIMiZb#utGnXzylUswU{RT=MM%dusB(R8_Xa^H_#Cu > zag4*c>Hr2O3IWs!iQXA>UlNq@?Km^C1;Jb4g?Wi<^Q+ZacD > z=PM5TqJwFNX;C5OpaO!d0tEQP>NDfW;vh&knxCuzV{0G-d~!fw%MyonXhDtojzh=J > zUDPpNaNQ0q0Hut at sx!qJ$B`CztK}tT9C at pQ2QbaTSEfZX=*z5f%xFc2>BIr(G7xzb > zpr0p=qy7-Az|taoccec!tbya$Pm at 9b8aS2{JFqjOWpzUw-UxJCV8Jtk{57gfsHYXC > z99b(ky3OiEsWZFEg9;?5%d;W|E#ySs4sT-{^fHA3JfNY1 zX;*U#f&_3N8*+-2%h(|eT37=efBtMYK&^%YlwflPi3AQJ3)nOm!kQaQTNPAb > z0R>P%7(P*qA9pxDyJp5FlJVI > zBw*nSY;b at Ys z{t_{Zl2<|xc5p%l?l285djrr=@ zA~{3JX8{UG=s^!ohyW2xkqvLqOFHE!MI7o7g9B)QFDU2_Mf9S9E{q}?bnypx>Or2R > z3}^*;P{k}*(R4fL!3;fczyvVBfe~;310kPySWa+_x*X&lWcW}_LNJ9yu!8PRx4RvJ > zw1W_o=QTOlx#0_%nL%dqS6sC}b8O-1V8Mw at V2GoVeY z$LlS^#oK4b_k1BksdsOYeJrExp#ME`JkU1c8{QqLFgox{K!#zs-ubVu$2XP_VT)Iw > Q;`_FUhC6h>`G5cbJ5h`fN&o-= > > literal 0 > HcmV?d00001 > > -- > 1.7.0.4 > > _______________________________________________ > 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 nengard at bywatersolutions.com Thu Oct 6 20:44:29 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Thu, 6 Oct 2011 14:44:29 -0400 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_Bug_6966=3A_Members_Help_Fil?= =?utf-8?q?es?= Message-ID: <1317926669-12105-1-git-send-email-nengard@bywatersolutions.com> This patch updates the members help files. It removes an unused file and adds a new one for the partial fines payments. It also adds links to the manuals to all pages. --- .../prog/en/modules/help/members/boraccount.tt | 6 +- .../prog/en/modules/help/members/mancredit.tt | 3 + .../prog/en/modules/help/members/maninvoice.tt | 3 + .../prog/en/modules/help/members/member-flags.tt | 67 +++++++++++++------- .../en/modules/help/members/member-password.tt | 9 +++- .../prog/en/modules/help/members/member.tt | 2 + .../prog/en/modules/help/members/memberentry.tt | 2 + .../prog/en/modules/help/members/members-home.tt | 21 +++--- .../prog/en/modules/help/members/messaging.tt | 9 --- .../prog/en/modules/help/members/moremember.tt | 16 +++-- .../prog/en/modules/help/members/notices.tt | 6 ++- .../prog/en/modules/help/members/pay.tt | 2 + .../prog/en/modules/help/members/paycollect.tt | 53 +++++++++++++++ .../prog/en/modules/help/members/readingrec.tt | 4 +- 14 files changed, 150 insertions(+), 53 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/help/members/messaging.tt create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/help/members/paycollect.tt diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/boraccount.tt index 8307e15..fd8cc7f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/boraccount.tt @@ -9,8 +9,8 @@

        Most fees and fines will be charged automatically if the fines cron job is running:

          -
        • Fines will be charged based on your Circulation & Fines Rules
        • -
        • Hold fees will be charged based on the rules you set in the Patron Types & Categories administration area
        • +
        • Fines will be charged based on your Circulation & Fines Rules
        • +
        • Hold fees will be charged based on the rules you set in the Patron Types & Categories administration area
        • Rental fees will be charged based on the settings in your Item Types administration area
        • Marking an item 'Lost' via the cataloging module will automatically charge the patron the replacement cost for that item
        @@ -19,4 +19,6 @@

        To the right of each account line there is a print link. Clicking that link will print an invoice for the line item that includes the date and description of the line item along with the total outstanding on the account.

        +

        See the full documentation for Patron Fines in the manual (online).

        + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/mancredit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/mancredit.tt index c0e76f8..4238795 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/mancredit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/mancredit.tt @@ -3,6 +3,7 @@

        Create Manual Credit

        Manual credits can be used to pay off parts of fines, or to forgive a fine amount.

        +
        • First choose the type of credit you'd like to apply
        • If this credit is associated with an item you can enter that item's barcode so that the line item links to the right item
        • @@ -10,4 +11,6 @@
        • In the amount field, do not enter currency symbols, only numbers and decimals
        +

        See the full documentation for Creating Manual Credits in the manual (online).

        + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/maninvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/maninvoice.tt index e062142..0b6378f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/maninvoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/maninvoice.tt @@ -3,6 +3,7 @@

        Create Manual Invoice

        For fees that are not automatically charged, librarians can create a manual invoice

        +
        • First choose the type of invoice you would like to create
            @@ -14,4 +15,6 @@
          • In the amount field, do not enter currency symbols, only numbers and decimals
          +

          See the full documentation for Creating Manual Invoices in the manual (online).

          + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/member-flags.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/member-flags.tt index 82efa4f..9559314 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/member-flags.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/member-flags.tt @@ -1,23 +1,22 @@ [% INCLUDE 'help-top.inc' %] -

          Setting Patron Permissions

          +

          Patron Permissions

          -

          Patron permissions are used to define the rights of staff members when in the intranet/staff client.

          -
            -
          • To alter patron permissions, click on Patrons on the main menu at the top of the screen.
          • -
          • Search or browse for the patron you'd like to edit
          • -
          • Click on the patron's name from the results
          • -
          • Click the 'More' button on the top right of the patron profile and choose 'Set Permissions'
          • -
          • Choose the permissions you'd like this patron to have
          • -
          • You can pick as many permissions as you'd like for each staff member -
              -
            • TIP: If a staff member is set to 'superlibrarian' they have access to all functions and do not need any other permissions checked
            • -
          • -
          +

          Patron Permissions are used to allow staff members access to the staff client.

          -

          Patron Permissions Defined

          +

          Important: In order for a staff member to log into the staff interface they must have (at the very least) 'catalogue' permissions which allow them to view the staff interface.

          + +

          6.1. Setting Patron Permissions

          + +

          To set patron permissions, you must first have a patron of the 'Staff' type open

          + +
            +
          • On the patron record click More and choose Set Permissions to alter patron permissions
          • +
          • You will be presented with a list of preferences, some of which can be expanded by clicking the plus sign to the left of the section title.
          • +
          + +

          Patron Permissions Defined

          -

          Depending on the permission certain menu items will be removed from the menus in Koha, preventing users from accessing them.

          • superlibrarian
              @@ -27,7 +26,7 @@
            • circulate
              • Ability to check (issue) books out and in and access the 'Circulation' page in the staff client
              • -
              • This section can be expanded (Learn more below)
              • +
              • This section can be expanded
            • catalogue @@ -54,7 +53,7 @@
            • reserveforothers
              • Ability to place holds on books for patrons via the staff interface
              • -
              • This section can be expanded (Learn more below)
              • +
              • This section can be expanded
            • borrow @@ -65,7 +64,7 @@
            • editcatalogue
              • Ability to catalog items (add and edit bibliographic and holdings data)
              • -
              • This section can be expanded (Learn more below)
              • +
              • This section can be expanded
            • updatecharges @@ -76,7 +75,7 @@
            • acquisition
              • Provides access to the acquisitions and patron purchase suggestion modules
              • -
              • This section can be expanded (Learn more below)
              • +
              • This section can be expanded
            • management @@ -87,7 +86,7 @@
            • tools
              • Access to all items in the Tools section of the staff client
              • -
              • This section can be expanded (Learn more below)
              • +
              • This section can be expanded
            • editauthorities @@ -98,14 +97,14 @@
            • serials
              • Allows access to the serials module
              • -
              • This section can be expanded (Learn more below)
              • +
              • This section can be expanded
            • reports
              • Allow access to the Reports module (ability to create, edit and run all reports)
              • Reports found on the Circulation page are not controlled by this permission
              • -
              • This section can be expanded (Learn more below)
              • +
              • This section can be expanded
            • staffaccess @@ -114,8 +113,11 @@
          +

          Granular Circulate Permissions

          +

          If the staff member has 'circulate' permissions they have the ability to perform all of these actions. If you would like to control circulation permissions on a more granular level choose from these options:

          +
          • circulate_remaining_permissions
              @@ -128,8 +130,11 @@
          +

          Granular Holds Permissions

          +

          If the staff member has 'reserveforothers' permissions they have the ability to perform all of these actions. If you would like to control holds permissions on a more granular level choose from these options:

          +
          • modify_holds_priority
              @@ -142,8 +147,11 @@
          +

          Granular Cataloging Permissions

          +

          If the staff member has 'editcatalogue' permissions they have the ability to perform all of these actions. If you would like to control cataloging permissions on a more granular level choose from these options:

          +
          • edit_catalogue
              @@ -161,8 +169,11 @@
          +

          Granular Acquisitions Permissions

          +

          If the staff member has 'acquisition' permissions they have the ability to perform all of these actions. If you would like to control acquisitions permissions on a more granular level choose from these options:

          +
          • budget_add_del
              @@ -215,8 +226,11 @@
          +

          Granular Serials Permissions

          +

          If the staff member has 'serials' permissions they have the ability to perform all of these actions. If you would like to control serials permissions on a more granular level choose from these options:

          +
          • check_expiration
              @@ -259,8 +273,11 @@
          +

          Granular Tools Permissions

          +

          If the staff member has 'tools' permissions they have the ability to access and use all items under the Tools menu. If you would like to control which tools staff members have access to on a more granular level choose from these options:

          +
          • batch_upload_patron_images
              @@ -353,8 +370,11 @@
          +

          Granular Reports Permissions

          +

          If the staff member has 'reports' permissions they have the ability to perform all of these actions. If you would like to control reports permissions on a more granular level choose from these options:

          +
          • create_reports
              @@ -367,4 +387,7 @@
          + +

          See the full documentation for Patron Permissions in the manual (online).

          + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/member-password.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/member-password.tt index 2bb4dd2..3aa783c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/member-password.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/member-password.tt @@ -2,7 +2,12 @@

          Change Patron Password

          -

          Koha cannot display existing passwords, so this form can only be used to change a patron's username and/or password, but not to recover an existing password.

          +

          To only change the patron's password, click the 'Change Password' button

          + +
            +
          • Patron passwords are encrypted and cannot be recovered by the library staff
          • +
          • This form will automatically generate a random password, this password is not the patron's current password, just a new random password
          • +

          The default minimum password length is 3 characters long. To change this value, update your system preferences.

          @@ -10,5 +15,7 @@
        • Get there: More > Administration > Global System Preferences > Patrons > minPasswordLength
        +

        See the full documentation for Editing Patrons in the manual (online).

        + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/member.tt index 5cc430f..4a6e75f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/member.tt @@ -8,4 +8,6 @@

        You can also browse through the patron records by clicking on the linked letters across the top.

        +

        See the full documentation for Patron Search in the manual (online).

        + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/memberentry.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/memberentry.tt index b832f4c..f61f5c1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/memberentry.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/memberentry.tt @@ -76,4 +76,6 @@

        Remember to assign your staff secure usernames and passwords since these will be used to log into the staff client.

        +

        See the full documentation for Adding Patrons in the manual (online).

        + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/members-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/members-home.tt index 0a73eb6..765a813 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/members-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/members-home.tt @@ -1,16 +1,15 @@ [% INCLUDE 'help-top.inc' %] -

        Patrons help

        +

        Patrons

        -

        The Patrons portion stores the information you add about your patrons.

        -
          -
        • To add a patron, type their name into the search box and click the 'Search' button.
        • -
        • If there is already a patron matching the name you searched, it will show on the results list.
          -
            -
          • This can be particularly useful when people have lost their cards or when children forget their cards. That way, you can avoid having multiple numbers for the same patron.
          • -
        • -
        • Alternatively, you can browse a section of patron by selecting the first letter of the Patron's last name from the list on the right.
        • -
        • If the patron does not already have an account, click the 'New' button and choose the patron type you'd like to add
        • -
        +

        The Patrons module stores the information you add about your patrons.

        + +

        From here you can search for a patron by entering any part of their name, username, email address or barcode in the search box at the top.

        + +

        If you want to search for more than just a part of a patron name, username, email address or barcode, you can click the plus sign [+] to the right of the search box.

        + +

        You can also browse through the patron records by clicking on the linked letters across the top.

        + +

        See the full documentation for the Patrons module in the manual (online).

        [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/messaging.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/messaging.tt deleted file mode 100644 index c3b1396..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/messaging.tt +++ /dev/null @@ -1,9 +0,0 @@ -[% INCLUDE 'help-top.inc' %] - -

        Patron Messaging

        - -

        The patron's messaging preferences are set when adding or editing the patron. This tab will show the messages that have been sent and those that are queued to be sent

        - -

        Once a message is sent it will say so in the status column.

        - -[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/moremember.tt index 9384e6f..d674919 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/moremember.tt @@ -10,13 +10,17 @@

        Details

        -

        All patron information will appear on the Details tab. This includes all the contact information, notes, messaging preferences, etc entered when adding the patron. -In the case of patrons who are marked as 'Child' or 'Professional' and their Guarantors additional information will appear on their record.

        +

        All patron information will appear on the Details tab. This includes all the contact information, notes, messaging preferences, etc entered when adding the patron. In the case of patrons who are marked as 'Child' or 'Professional' and their Guarantors additional information will appear on their record.

        • A child patron will list their Guarantor
        • On the Guarantor's record, all children and/or professionals will be listed
        + +

        Below the patron's information on the details screen is a tabbed display of the items they have checked out, overdue, and on hold.

        + +

        If they have family at the library staff can see what the other family members have checked out.

        +

        Fines

        The patron's complete accounting history will appear on the Fines tab. Contrary to its name, the Fines tab does not just show fine data, it also shows membership fees, rental fees, reserve fees and any other charge you may have for patrons.

        @@ -34,13 +38,11 @@ In the case of patrons who are marked as 'Child' or 'Professional' and their Gua
      • The Object field lists the patron that is being modified
      • -

        Messaging

        +

        Notices

        The patron's messaging preferences are set when adding or editing the patron. This tab will show the messages that have been sent and those that are queued to be sent

        -

        Notices

        - -

        The patron's messaging preferences are set when adding or editing the patron. This tab will show the messages that have been sent and those that are queued to be sent with their entire body content

        +

        Clicking on the message title will expand the view to show you the full text of the message that was sent.

        Editing Patrons

        @@ -88,4 +90,6 @@ In the case of patrons who are marked as 'Child' or 'Professional' and their Gua
      • You will be brought to your new patron
      • +

        See the full documentation for the Patron Details in the manual (online).

        + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/notices.tt index ac0e53e..df521c4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/notices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/notices.tt @@ -2,6 +2,10 @@

        Patron Notices

        -

        The patron's messaging preferences are set when adding or editing the patron. This tab will show the messages that have been sent and those that are queued to be sent with their entire body content

        +

        The patron's messaging preferences are set when adding or editing the patron. This tab will show the messages that have been sent and those that are queued to be sent

        + +

        Clicking on the message title will expand the view to show you the full text of the message that was sent.

        + +

        See the full documentation for Patron Notices in the manual (online).

        [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/pay.tt index e0dbfd0..beb76e5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/pay.tt @@ -48,4 +48,6 @@
      • The fine totals will be updated with the payment applied to the oldest selected fines first.
      • +

        See the full documentation for Paying Fines in the manual (online).

        + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/paycollect.tt new file mode 100644 index 0000000..beb76e5 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/paycollect.tt @@ -0,0 +1,53 @@ +[% INCLUDE 'help-top.inc' %] + +

        Pay and Writeoff Fines

        + +

        Each line item can be paid in full, partially paid, or written off.

        + +

        Pay a fine in full

        +
          +
        • Click "Pay" next to the fine you want to pay in full
        • +
        • The full amount of the fine will be populated for you in the "Collect From Patron" box
        • +
        • Click "Confirm"
        • +
        • The fine will be removed from outstanding fines, and displayed as fully paid.
        • +
        + +

        Pay a partial fine

        +
          +
        • Click "Pay" next to the fine you want to partially pay
        • +
        • Enter the amount you are collecting from the patron in the "Collect From Patron" box
        • +
        • Click "Confirm"
        • +
        • The fine will be updated to show the original Amount, and the current Amount Outstanding
        • +
        + +

        Writeoff a single fine

        +
          +
        • Click "Writeoff" next to the fine you wish to writeoff.
        • +
        • The fine will be removed from outstanding fines, and displayed as fully paid.
        • +
        + +

        Pay an amount towards all fines

        +
          +
        • Click the "Pay Amount" button
        • +
        • Enter the amount you are collecting from the patron in "Collect from Patron." The sum of all fines is shown in "Total Amount Outstanding"
        • +
        • Click "Confirm"
        • +
        • The fine totals will be updated with the payment applied to oldest fines first.
        • +
        + +

        Writeoff All fines

        +
          +
        • Click the "Writeoff All" button
        • +
        • All fines will be removed from outstanding fines, and displayed as written off.
        • +
        + +

        Pay Selected fines

        +
          +
        • Check the selection boxes next to the fines you wish to pay, click "Pay Selected"
        • +
        • Enter an amount to pay towards the fines.
        • +
        • Click "Confirm"
        • +
        • The fine totals will be updated with the payment applied to the oldest selected fines first.
        • +
        + +

        See the full documentation for Paying Fines in the manual (online).

        + +[% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/readingrec.tt index 9cb0e01..6e9a837 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/readingrec.tt @@ -1,7 +1,9 @@ [% INCLUDE 'help-top.inc' %] -

        Patron Cirulation History Help

        +

        Patron Cirulation History

        The circulation history tab will appear if you have set the intranetreadinghistory preference to allow it to appear. If you have the OPACPrivacy system preference set to 'Allow' and the patron has decided that the library cannot keep this information this tab will only show currently checked out items.

        +

        See the full documentation for Circulation History in the manual (online).

        + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From oleonard at myacpl.org Thu Oct 6 21:14:39 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 6 Oct 2011 15:14:39 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6983 - Item type filter on overdues report does not respect item-level_itypes Message-ID: <1317928479-3840-1-git-send-email-oleonard@myacpl.org> This patch adds a check for the item-level_itypes preference when building the SQL for the overdues report. --- circ/overdue.pl | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/circ/overdue.pl b/circ/overdue.pl index 2bdafe1..7467874 100755 --- a/circ/overdue.pl +++ b/circ/overdue.pl @@ -265,7 +265,13 @@ if ($noreport) { $strsth.=" AND date_due < '" . $todaysdate . "' " unless ($showall); $strsth.=" AND (borrowers.firstname like '".$bornamefilter."%' or borrowers.surname like '".$bornamefilter."%' or borrowers.cardnumber like '".$bornamefilter."%')" if($bornamefilter) ; $strsth.=" AND borrowers.categorycode = '" . $borcatfilter . "' " if $borcatfilter; - $strsth.=" AND biblioitems.itemtype = '" . $itemtypefilter . "' " if $itemtypefilter; + if( $itemtypefilter ){ + if( C4::Context->preference('item-level_itypes') ){ + $strsth.=" AND items.itype = '" . $itemtypefilter . "' "; + } else { + $strsth.=" AND biblioitems.itemtype = '" . $itemtypefilter . "' "; + } + } $strsth.=" AND borrowers.flags = '" . $borflagsfilter . "' " if $borflagsfilter; $strsth.=" AND borrowers.branchcode = '" . $branchfilter . "' " if $branchfilter; $strsth.=" AND date_due < '" . $datedueto . "' " if $datedueto; -- 1.7.3 From nengard at bywatersolutions.com Thu Oct 6 21:16:07 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Thu, 6 Oct 2011 15:16:07 -0400 Subject: [Koha-patches] [PATCH] Bug 6966: Offline Circ Help Message-ID: <1317928567-12256-1-git-send-email-nengard@bywatersolutions.com> This patch adds the manual link to the offline circ help. --- .../en/modules/help/offline_circ/process_koc.tt | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/offline_circ/process_koc.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/offline_circ/process_koc.tt index d16d0cc..ab66580 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/offline_circ/process_koc.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/offline_circ/process_koc.tt @@ -10,4 +10,6 @@

        When this is complete you'll see the summary of actions from when you were offline (including any errors).

        +

        See the full documentation for the Offline Circulation File Uploader in the manual (online).

        + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From oleonard at myacpl.org Thu Oct 6 21:40:26 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 6 Oct 2011 15:40:26 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6817 Downloading the overdues as a file ignores the filters if the page isn't in english Message-ID: <1317930026-4243-1-git-send-email-oleonard@myacpl.org> From: Fr?d?ric Demians F. Capovila patch ported to TT. Signed-off-by: Owen Leonard --- .../intranet-tmpl/prog/en/modules/circ/overdue.tt | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt index 3e8dfba..890463a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt @@ -268,7 +268,8 @@
        - + +
        -- 1.7.3 From oleonard at myacpl.org Thu Oct 6 21:53:54 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 6 Oct 2011 15:53:54 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6689 - Improve styling of table pager Message-ID: <1317930834-4735-1-git-send-email-oleonard@myacpl.org> Adds some style to the table pager include. Also styles the pages "1/2" input field so that it does not look like an input field (since editing the value does nothing). --- .../intranet-tmpl/prog/en/css/staff-global.css | 21 ++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 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 c52c252..8784694 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -2048,3 +2048,24 @@ fieldset.rows+h3 {clear:both;padding-top:.5em;} color : #cc0000; } +div.pager { + background-color : #E8E8E8; + border : 1px solid #BCBCBC; + -moz-border-radius : 5px; + display : inline-block; + font-size : 85%; + padding : .3em .5em .3em .5em; + margin : .4em 0; +} +div.pager img { + vertical-align : middle; +} +div.pager img.last { + padding-right: 5px; +} +div.pager input.pagedisplay { + border : 0; + background-color : transparent; + font-weight: bold; + text-align : center; +} \ No newline at end of file -- 1.7.3 From nengard at bywatersolutions.com Thu Oct 6 22:13:23 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Thu, 6 Oct 2011 16:13:23 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6689 - Improve styling of table pager Message-ID: <1317932003-12743-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard Adds some style to the table pager include. Also styles the pages "1/2" input field so that it does not look like an input field (since editing the value does nothing). Signed-off-by: Nicole C. Engard --- .../intranet-tmpl/prog/en/css/staff-global.css | 21 ++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 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 c52c252..8784694 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -2048,3 +2048,24 @@ fieldset.rows+h3 {clear:both;padding-top:.5em;} color : #cc0000; } +div.pager { + background-color : #E8E8E8; + border : 1px solid #BCBCBC; + -moz-border-radius : 5px; + display : inline-block; + font-size : 85%; + padding : .3em .5em .3em .5em; + margin : .4em 0; +} +div.pager img { + vertical-align : middle; +} +div.pager img.last { + padding-right: 5px; +} +div.pager input.pagedisplay { + border : 0; + background-color : transparent; + font-weight: bold; + text-align : center; +} \ No newline at end of file -- 1.7.2.3 From robin at catalyst.net.nz Fri Oct 7 00:57:49 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Fri, 7 Oct 2011 11:57:49 +1300 Subject: [Koha-patches] [PATCH] Bug 6636 - add 'powered by Koha' text to OPAC footer Message-ID: <1317941869-12517-1-git-send-email-robin@catalyst.net.nz> Signed-off-by: Robin Sheat --- C4/Auth.pm | 1 + installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 ++++++ .../prog/en/modules/admin/preferences/opac.pref | 7 ++++++ koha-tmpl/opac-tmpl/prog/en/css/opac.css | 12 ++++++++++ .../opac-tmpl/prog/en/includes/opac-bottom.inc | 23 +++++++++++++------- 6 files changed, 43 insertions(+), 8 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 7211769..47a8b82 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -435,6 +435,7 @@ sub get_template_and_user { opac_limit_override => $opac_limit_override, OpacBrowser => C4::Context->preference("OpacBrowser"), OpacCloud => C4::Context->preference("OpacCloud"), + OpacKohaUrl => C4::Context->preference("OpacKohaUrl"), OpacMainUserBlock => "" . C4::Context->preference("OpacMainUserBlock"), OpacNav => "" . C4::Context->preference("OpacNav"), OpacPasswordChange => C4::Context->preference("OpacPasswordChange"), diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 79d4893..1b40d2d 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -318,3 +318,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('MARCAuthorityControlField008', '|| aca||aabn | a|a d', NULL, NULL, 'Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6b88c29..cccf88f 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4446,6 +4446,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do(qq|INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','0',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL)|); + print "Upgrade to $DBversion done (Add syspref 'OpacKohaUrl')\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS 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 8bbf692..8d6974e 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 @@ -86,6 +86,13 @@ OPAC: no: "Don't show" - the name of the patron that has an item checked out on item detail pages on the OPAC. - + - pref: OpacKohaUrl + default: 0 + choices: + yes: Show + no: "Don't show" + - "'Powered by Koha' text on OPAC footer." + - - pref: OpacHighlightedWords choices: yes: Highlight diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 09ed022..665d143 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -2047,3 +2047,15 @@ div.bibmessage { background-color : #ffffb0; border-radius : 5px; padding : 3px; #renewall_link { background-image : url(../../images/checks.png); } + +div.koha_url { + border-top: none !important; +} +span.koha_url { + position: absolute; + right: 0; +} +a.koha_url { + text-decoration:none; + color: #666666; +} diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc index c76d85c..a5ad55f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc @@ -1,14 +1,15 @@ - [% IF ( opaccredits ) %]
        [% opaccredits %]
        [% END %] -[% IF ( opaclanguagesdisplay ) %] -[% IF ( languages_loop ) %] + +[% IF opaclanguagesdisplay || OpacKohaUrl %] +
        +[% IF languages_loop && opaclanguagesdisplay %] [% UNLESS ( one_language_enabled ) %] -
        Languages: + Languages: [% FOREACH languages_loo IN languages_loop %] [% IF ( languages_loo.group_enabled ) %] [% IF ( languages_loo.plural ) %] @@ -22,14 +23,13 @@ [% ELSE %]
      • [% sublanguages_loo.native_description %] [% sublanguages_loo.script_description %] [% sublanguages_loo.region_description %] [% sublanguages_loo.variant_description %] ([% sublanguages_loo.rfc4646_subtag %])
      • [% END %] - [% END %] + [% END %] [% END %]
        - [% ELSE %] - [% IF ( languages_loo.group_enabled ) %] + [% IF ( languages_loo.group_enabled ) %] [% IF ( languages_loo.current ) %] [% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %] [% ELSE %] @@ -39,9 +39,16 @@ [% END %] [% END %][% UNLESS ( loop.last ) %] | [% END %] [% END %] - [% END %] [% END %] + +[% IF ( OpacKohaUrl ) %] + + Powered by Koha   + +[% END %] + + [% END %] [% IF ( Babeltheque ) %] -- 1.7.4.1 From lrea at nekls.org Fri Oct 7 01:46:34 2011 From: lrea at nekls.org (Liz Rea) Date: Thu, 6 Oct 2011 18:46:34 -0500 Subject: [Koha-patches] [PATCH 2/3] Bug 6299 - Advertise this addition during upgrade In-Reply-To: <1317905770-3482-2-git-send-email-paul.poulain@biblibre.com> References: <1317905770-3482-1-git-send-email-paul.poulain@biblibre.com> <1317905770-3482-2-git-send-email-paul.poulain@biblibre.com> Message-ID: It looks like this patch has a bit of conflict management text still in it? On Thu, Oct 6, 2011 at 7:56 AM, wrote: > From: Tomas Cohen Arazi > > Signed-off-by: Marcel de Rooy > August 10, 2011: Fixed some small typos. > > Signed-off-by: Paul Poulain > Oct 7th, 2011: rebased for master > --- > ?installer/data/mysql/updatedatabase.pl | ? ?6 ++++++ > ?1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl > index 6b88c29..8560a21 100755 > --- a/installer/data/mysql/updatedatabase.pl > +++ b/installer/data/mysql/updatedatabase.pl > @@ -4399,6 +4399,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > ? ? SetVersion($DBversion); > ?} HERE -------------v > +<<<<<<< HEAD > ?$DBversion = "3.05.00.009"; > ?if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > ? ? $dbh->do("INSERT INTO old_issues (borrowernumber, itemnumber, date_due, branchcode, issuingbranch, returndate, lastreneweddate, `return`, renewals, timestamp, issuedate) > @@ -4446,6 +4447,11 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > ? ? SetVersion($DBversion); > ?} > > +$DBversion = "3.05.00.XXX"; > +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > + ? ?print "RELTERMS category available for relator terms. They are not loaded during upgrade but can be easily inserted using the provided marc21_relatorterms.sql SQL script.\n"; > + ? ?SetVersion($DBversion); > +} > > ?=head1 FUNCTIONS > > -- > 1.7.4.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/ > From mtj at kohaaloha.com Fri Oct 7 02:38:31 2011 From: mtj at kohaaloha.com (Mason James) Date: Fri, 07 Oct 2011 13:38:31 +1300 Subject: [Koha-patches] [PATCH] Bug 6986 - update perltidy with new official style Message-ID: <1317947911-18459-1-git-send-email-mtj@kohaaloha.com> generated by running 'perltidy -npro -opt' modified: xt/perltidyrc --- xt/perltidyrc | 144 ++++++++++++++++++++++++++++----------------------------- 1 files changed, 70 insertions(+), 74 deletions(-) diff --git a/xt/perltidyrc b/xt/perltidyrc index f7d9a3c..bde56e0 100644 --- a/xt/perltidyrc +++ b/xt/perltidyrc @@ -1,75 +1,71 @@ -# --add-newlines -# --add-semicolons -# --add-whitespace -# --backup-file-extension=bak -# --blanks-before-blocks -# --blanks-before-comments -# --blanks-before-subs -# --block-brace-tightness=0 -# --block-brace-vertical-tightness=0 -# --brace-tightness=1 -# --brace-vertical-tightness-closing=0 -# --brace-vertical-tightness=0 -# --break-at-old-keyword-breakpoints -# --break-at-old-logical-breakpoints -# --break-at-old-ternary-breakpoints -# --closing-brace-indentation=0 -# --closing-paren-indentation=0 -# --closing-side-comment-else-flag=0 -# --closing-side-comment-interval=6 -# --closing-side-comment-maximum-text=20 -# --closing-square-bracket-indentation=0 -# --comma-arrow-breakpoints=1 -# --continuation-indentation=2 ---cuddled-else -# --delete-old-newlines -# --delete-semicolons -# --format-skipping -# --format=tidy -# --fuzzy-line-length -# --hanging-side-comments -# --html-entities -# --html-table-of-contents -# --indent-block-comments -# --indent-columns=4 -# --long-block-line-count=8 -# --look-for-autoloader -# --look-for-selfloader -# --maximum-consecutive-blank-lines=1 -# --maximum-fields-per-table=0 ---maximum-line-length=178 -# --minimum-space-to-comment=4 -# --nobrace-left-and-indent -# --nocheck-syntax -# --nodelete-old-whitespace -# --nohtml -# --nologfile -# --noquiet -# --noshow-options -# --nostatic-side-comments -# --noswallow-optional-blank-lines -# --notabs -# --nowarning-output ---opening-brace-always-on-right -# --outdent-labels -# --outdent-long-comments -# --outdent-long-quotes +# See utility 'perltidyrc_dump.pl' for nicer formatting. +--add-newlines +--add-semicolons +--add-whitespace +--backup-file-extension="bak" +--blanks-before-blocks +--blanks-before-comments +--blanks-before-subs +--block-brace-tightness=0 +--block-brace-vertical-tightness=0 +--nobrace-left-and-indent +--brace-tightness=1 +--brace-vertical-tightness=0 +--brace-vertical-tightness-closing=0 +--break-at-old-keyword-breakpoints +--break-at-old-logical-breakpoints +--break-at-old-ternary-breakpoints +--nocheck-syntax +--closing-brace-indentation=0 +--closing-paren-indentation=0 +--closing-side-comment-else-flag=0 +--closing-side-comment-interval=6 +--closing-side-comment-maximum-text=20 +--closing-square-bracket-indentation=0 +--comma-arrow-breakpoints=1 +--continuation-indentation=2 +--nocuddled-else +--delete-old-newlines +--nodelete-old-whitespace +--delete-semicolons +--format="tidy" +--format-skipping +--fuzzy-line-length +--hanging-side-comments +--nohtml +--html-entities +--html-table-of-contents +--indent-block-comments +--indent-columns=4 +--nologfile +--long-block-line-count=8 +--look-for-autoloader +--look-for-selfloader +--maximum-consecutive-blank-lines=1 +--maximum-fields-per-table=0 +--maximum-line-length=80 +--minimum-space-to-comment=4 +--outdent-labels +--outdent-long-comments +--outdent-long-quotes --paren-tightness=1 -# --paren-vertical-tightness-closing=0 -# --paren-vertical-tightness=0 -# --pass-version-line -# --perl-syntax-check-flags=-c -T -# --pod2html -# --recombine -# --short-concatenation-item-length=8 -# --space-for-semicolon -# --square-bracket-tightness=1 -# --square-bracket-vertical-tightness-closing=0 -# --square-bracket-vertical-tightness=0 -# --static-block-comments -# --trim-qw -# --valign ---vertical-tightness=2 - - - +--paren-vertical-tightness=0 +--paren-vertical-tightness-closing=0 +--pass-version-line +--perl-syntax-check-flags="-c -T" +--pod2html +--noquiet +--recombine +--short-concatenation-item-length=8 +--show-options +--space-for-semicolon +--square-bracket-tightness=1 +--square-bracket-vertical-tightness=0 +--square-bracket-vertical-tightness-closing=0 +--static-block-comments +--nostatic-side-comments +--noswallow-optional-blank-lines +--notabs +--trim-qw +--valign +--nowarning-output -- 1.7.1 From amit.gupta at osslabs.biz Fri Oct 7 02:01:26 2011 From: amit.gupta at osslabs.biz (Amit Gupta) Date: Fri, 7 Oct 2011 05:31:26 +0530 Subject: [Koha-patches] [PATCH] Bug 6774 Display barcode on OPAC detail page(Correcting Typo). Message-ID: <1317945686-7764-1-git-send-email-amit.gupta@osslabs.biz> --- installer/data/mysql/sysprefs.sql | 2 ++ installer/data/mysql/updatedatabase.pl | 6 ++++++ .../prog/en/modules/admin/preferences/opac.pref | 8 ++++++++ koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 2 ++ opac/opac-detail.pl | 3 ++- 5 files changed, 20 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 79d4893..f8aac7c 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -318,3 +318,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('MARCAuthorityControlField008', '|| aca||aabn | a|a d', NULL, NULL, 'Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OPACShowBarcode','0','Show items barcode in holding tab','','YesNo'); + diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6b88c29..0a207cd 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4446,6 +4446,12 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACShowBarcode','0','Show items barcode in holding tab','','YesNo')"); + print "Upgrade to $DBversion done (Add syspref OPACShowBarcode)\n"; + SetVersion ($DBversion); +} =head1 FUNCTIONS 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 8bbf692..c942527 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 @@ -86,6 +86,14 @@ OPAC: no: "Don't show" - the name of the patron that has an item checked out on item detail pages on the OPAC. - + - pref: OPACShowBarcode + default: 0 + choices: + yes: Show + no: "Don't show" + - Show items barcode in holding tab. + - + - pref: OpacHighlightedWords choices: yes: Highlight diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt index 3e8586d..2a0f9d1 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -412,6 +412,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
        [% IF ( itemdata_itemnotes ) %][% END %] + [% IF ( OPACShowBarcode ) %][% END %] [% FOREACH ITEM_RESULT IN ITEM_RESULTS %] [% IF ( item_level_itypes ) %][% END %] @@ -424,6 +425,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% IF ( itemdata_itemnotes ) %][% END %] + [% IF ( OPACShowBarcode ) %][% END %] [% END %]
        Type Value
        [% patron_attribute.code %] ([% patron_attribute.description %])[% patron_attribute.value %] - [% IF ( patron_attribute.value_description ) %] - ([% patron_attribute.value_description %]) + [% extendedattribute.code %] ([% extendedattribute.description %])[% extendedattribute.value %] + [% IF ( extendedattribute.value_description ) %] + ([% extendedattribute.value_description %]) [% END %]
        StatusNotesDate DueBarcode
        [% UNLESS ( noItemTypeImages ) %][% IF ( ITEM_RESULT.imageurl ) %][% ITEM_RESULT.description %][% END %][% END %] [% ITEM_RESULT.description %][% INCLUDE 'item-status.inc' item = ITEM_RESULT %][% ITEM_RESULT.itemnotes %][% ITEM_RESULT.datedue %][% ITEM_RESULT.barcode %]
        diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index e18e046..5e57566 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -83,7 +83,8 @@ if (C4::Context->preference("OPACXSLTDetailsDisplay") ) { $template->param( 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, 'Detail', 'opac') ); } -$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); +$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); +$template->param('OPACShowBarcode' => C4::Context->preference("OPACShowBarcode") ); # change back when ive fixed request.pl my @all_items = GetItemsInfo( $biblionumber ); my @items; -- 1.6.4.2 From srdjan at catalyst.net.nz Fri Oct 7 07:38:02 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Fri, 7 Oct 2011 18:38:02 +1300 Subject: [Koha-patches] [PATCH] bug_6210: Select framework if merging two records with different frameworks In-Reply-To: References: Message-ID: <1317965882-10884-1-git-send-email-srdjan@catalyst.net.nz> --- cataloguing/merge.pl | 136 +++++++++++-------- .../prog/en/modules/cataloguing/merge.tt | 39 +++++- 2 files changed, 113 insertions(+), 62 deletions(-) diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl index c97ca7a..a394b47 100755 --- a/cataloguing/merge.pl +++ b/cataloguing/merge.pl @@ -26,6 +26,7 @@ use C4::Auth; use C4::Items; use C4::Biblio; use C4::Serials; +use C4::Koha; my $input = new CGI; my @biblionumber = $input->param('biblionumber'); @@ -59,7 +60,7 @@ if ($merge) { # Rewriting the leader $record->leader(GetMarcBiblio($tobiblio)->leader()); - my $frameworkcode = &GetFrameworkCode($tobiblio); + my $frameworkcode = $input->param('frameworkcode'); my @notmoveditems; # Modifying the reference record @@ -104,77 +105,98 @@ if ($merge) { push @errors, $error if ($error); } - # Errors - my @errors_loop = map{{error => $_}}@errors; - # Parameters $template->param( - errors => \@errors_loop, result => 1, biblio1 => $input->param('biblio1') ); - #------------------------- # Show records to merge #------------------------- } else { - my $mergereference = $input->param('mergereference'); my $biblionumber = $input->param('biblionumber'); - my $data1 = GetBiblioData($biblionumber[0]); - my $data2 = GetBiblioData($biblionumber[1]); - - # Ask the user to choose which record will be the kept - if (not $mergereference) { - $template->param( - choosereference => 1, - biblio1 => $biblionumber[0], - biblio2 => $biblionumber[1], - title1 => $data1->{'title'}, - title2 => $data2->{'title'} - ); - } else { - - if (scalar(@biblionumber) != 2) { - push @errors, "An unexpected number of records was provided for merging. Currently only two records at a time can be merged."; - } - - # Checks if both records use the same framework - my $frameworkcode1 = &GetFrameworkCode($biblionumber[0]); - my $frameworkcode2 = &GetFrameworkCode($biblionumber[1]); - my $framework; - if ($frameworkcode1 ne $frameworkcode2) { - push @errors, "The records selected for merging are using different frameworks. Currently merging is only available for records using the same framework."; - } else { - $framework = $frameworkcode1; - } - - # Getting MARC Structure - my $tagslib = GetMarcStructure(1, $framework); - - my $notreference = ($biblionumber[0] == $mergereference) ? $biblionumber[1] : $biblionumber[0]; - - # Creating a loop for display - my @record1 = _createMarcHash(GetMarcBiblio($mergereference), $tagslib); - my @record2 = _createMarcHash(GetMarcBiblio($notreference), $tagslib); - - # Errors - my @errors_loop = map{{error => $_}}@errors; - - # Parameters - $template->param( - errors => \@errors_loop, - biblio1 => $mergereference, - biblio2 => $notreference, - mergereference => $mergereference, - record1 => @record1, - record2 => @record2, - framework => $framework - ); + if (scalar(@biblionumber) != 2) { + push @errors, "An unexpected number of records was provided for merging. Currently only two records at a time can be merged."; + } + else { + my $data1 = GetBiblioData($biblionumber[0]); + my $data2 = GetBiblioData($biblionumber[1]); + + # Checks if both records use the same framework + my $frameworkcode1 = &GetFrameworkCode($biblionumber[0]); + my $frameworkcode2 = &GetFrameworkCode($biblionumber[1]); + + if ($mergereference) { + + my $framework; + if ($frameworkcode1 ne $frameworkcode2) { + $framework = $input->param('frameworkcode') + or push @errors, "Famework not selected."; + } else { + $framework = $frameworkcode1; + } + + # Getting MARC Structure + my $tagslib = GetMarcStructure(1, $framework); + + my $notreference = ($biblionumber[0] == $mergereference) ? $biblionumber[1] : $biblionumber[0]; + + # Creating a loop for display + my @record1 = _createMarcHash(GetMarcBiblio($mergereference), $tagslib); + my @record2 = _createMarcHash(GetMarcBiblio($notreference), $tagslib); + + # Parameters + $template->param( + biblio1 => $mergereference, + biblio2 => $notreference, + mergereference => $mergereference, + record1 => @record1, + record2 => @record2, + framework => $framework, + ); + } + else { + + # Ask the user to choose which record will be the kept + $template->param( + choosereference => 1, + biblio1 => $biblionumber[0], + biblio2 => $biblionumber[1], + title1 => $data1->{'title'}, + title2 => $data2->{'title'} + ); + if ($frameworkcode1 ne $frameworkcode2) { + my $frameworks = getframeworks; + my @frameworkselect; + foreach my $thisframeworkcode ( keys %$frameworks ) { + my %row = ( + value => $thisframeworkcode, + frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'}, + ); + if ($frameworkcode1 eq $thisframeworkcode){ + $row{'selected'} = 1; + } + push @frameworkselect, \%row; + } + $template->param( + frameworkselect => \@frameworkselect, + frameworkcode1 => $frameworkcode1, + frameworkcode2 => $frameworkcode2, + ); + } + } } } + +if (@errors) { + # Errors + my @errors_loop = map{{error => $_}}@errors; + $template->param( errors => \@errors_loop ); +} + output_html_with_http_headers $input, $cookie, $template->output; exit; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt index 0d8a84c..3300f78 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt @@ -161,6 +161,10 @@ $(document).ready(function(){ }); +function changeFramework(fw) { + $("#Frameworks").val(fw); +} + //]]> @@ -194,10 +198,34 @@ $(document).ready(function(){
        Merge reference + + + + + +
          -
        1. -
        2. +
        3. +
        +
        + [% IF frameworkselect %] +
        + + [% END %] +
        +
        @@ -332,14 +360,15 @@ $(document).ready(function(){ [% END %]
      + + + + - - -
      -- 1.6.5 From amit.gupta at osslabs.biz Fri Oct 7 02:16:12 2011 From: amit.gupta at osslabs.biz (Amit Gupta) Date: Fri, 7 Oct 2011 05:46:12 +0530 Subject: [Koha-patches] [PATCH] Bug 6761 - Longer userid field Message-ID: <1317946572-9076-1-git-send-email-amit.gupta@osslabs.biz> --- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3a51df5..c119ca1 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -244,7 +244,7 @@ CREATE TABLE `borrowers` ( -- this table includes information about your patrons `sex` varchar(1) default NULL, -- patron/borrower's gender `password` varchar(30) default NULL, -- patron/borrower's encrypted password `flags` int(11) default NULL, -- will include a number associated with the staff member's permissions - `userid` varchar(30) default NULL, -- patron/borrower's opac and/or staff client log in + `userid` varchar(75) default NULL, -- patron/borrower's opac and/or staff client log in `opacnote` mediumtext, -- a note on the patron/borrower's account that is visible in the OPAC and staff client `contactnote` varchar(255) default NULL, -- a note related to the patron/borrower's alternate address `sort1` varchar(80) default NULL, -- a field that can be used for any information unique to the library diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6b88c29..8e0b423 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4446,6 +4446,12 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE `borrowers` MODIFY `userid` VARCHAR(75)"); + print "Modified userid column length into 75 in borrowers\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS -- 1.6.4.2 From amit.gupta at osslabs.biz Fri Oct 7 02:55:04 2011 From: amit.gupta at osslabs.biz (Amit Gupta) Date: Fri, 7 Oct 2011 06:25:04 +0530 Subject: [Koha-patches] [PATCH 2/2] Bug 6776 - Add Checkin tab to patron search tool. Message-ID: <1317948904-12207-1-git-send-email-amit.gupta@osslabs.biz> wrapped in [% IF ( CAN_user_circulate ) %] --- .../prog/en/includes/patron-search.inc | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index 0be014a..99bae87 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -98,6 +98,14 @@ YAHOO.util.Event.onContentReady("header_search", function() { [% END %] [% END %] + [% IF ( CAN_user_circulate ) %] + [% END %] [% IF ( CAN_user_catalogue ) %] -- 1.6.4.2 From julian.maurice at biblibre.com Fri Oct 7 12:23:38 2011 From: julian.maurice at biblibre.com (Julian Maurice) Date: Fri, 7 Oct 2011 12:23:38 +0200 Subject: [Koha-patches] [PATCH] Bug 6874: Adds the ability to upload a file for a subfield Message-ID: <1317983018-21476-1-git-send-email-julian.maurice@biblibre.com> From: Matthias Meusburger Biblibre MT5108 --- C4/Biblio.pm | 18 ++- basket/basket.pl | 2 +- catalogue/MARCdetail.pl | 11 + catalogue/detail.pl | 2 +- cataloguing/value_builder/upload.pl | 221 ++++++++++++++++++++ installer/data/mysql/sysprefs.sql | 2 + installer/data/mysql/updatedatabase.pl | 14 ++ .../prog/en/modules/catalogue/MARCdetail.tt | 80 ++++++- .../en/modules/cataloguing/value_builder/upload.tt | 50 +++++ .../value_builder/upload_delete_file.tt | 52 +++++ kohaversion.pl | 2 +- misc/strip_value_from_tag.pl | 60 ++++++ opac/opac-MARCdetail.pl | 10 + opac/opac-basket.pl | 2 +- opac/opac-detail.pl | 2 +- 15 files changed, 508 insertions(+), 20 deletions(-) create mode 100755 cataloguing/value_builder/upload.pl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/upload.tt create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/upload_delete_file.tt create mode 100644 misc/strip_value_from_tag.pl diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 915139e..05d7cc5 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1624,7 +1624,7 @@ sub GetMarcAuthors { =head2 GetMarcUrls - $marcurls = GetMarcUrls($record,$marcflavour); + $marcurls = GetMarcUrls($record,$marcflavour,$frameworkcode); Returns arrayref of URLs from MARC data, suitable to pass to tmpl loop. Assumes web resources (not uncommon in MARC21 to omit resource type ind) @@ -1632,15 +1632,19 @@ Assumes web resources (not uncommon in MARC21 to omit resource type ind) =cut sub GetMarcUrls { - my ( $record, $marcflavour ) = @_; + my ( $record, $marcflavour, $frameworkcode ) = @_; + + my $tagslib = &GetMarcStructure(1, $frameworkcode); + my $urltag = '856'; + my $urlsubtag = 'u'; my @marcurls; - for my $field ( $record->field('856') ) { + for my $field ( $record->field($urltag) ) { my @notes; for my $note ( $field->subfield('z') ) { push @notes, { note => $note }; } - my @urls = $field->subfield('u'); + my @urls = $field->subfield($urlsubtag); foreach my $url (@urls) { my $marcurl; if ( $marcflavour eq 'MARC21' ) { @@ -1669,7 +1673,11 @@ sub GetMarcUrls { $marcurl->{'toc'} = 1 if ( defined($s3) && $s3 =~ /^[Tt]able/ ); } else { $marcurl->{'linktext'} = $field->subfield('2') || C4::Context->preference('URLLinkText') || $url; - $marcurl->{'MARCURL'} = $url; + if ($tagslib->{ $urltag }->{ $urlsubtag }->{value_builder} eq "upload.pl") { + $marcurl->{'MARCURL'} = C4::Context->preference('uploadWebPath') . "/" . $url; + } else { + $marcurl->{'MARCURL'} = $url; + } } push @marcurls, $marcurl; } diff --git a/basket/basket.pl b/basket/basket.pl index 8fc15e4..59894b3 100755 --- a/basket/basket.pl +++ b/basket/basket.pl @@ -65,7 +65,7 @@ foreach my $biblionumber ( @bibs ) { my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); my $marcseriesarray = GetMarcSeries ($record,$marcflavour); - my $marcurlsarray = GetMarcUrls ($record,$marcflavour); + my $marcurlsarray = GetMarcUrls ($record,$marcflavour, GetFrameworkCode($biblionumber)); my @items = GetItemsInfo( $biblionumber ); my $hasauthors = 0; diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl index 0a2974b..19d26b8 100755 --- a/catalogue/MARCdetail.pl +++ b/catalogue/MARCdetail.pl @@ -82,6 +82,11 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); +my $uploadWebPath; +if (C4::Context->preference('uploadWebPath')) { + $uploadWebPath = C4::Context->preference('uploadWebPath'); +} + my $record = GetMarcBiblio($biblionumber); if ( not defined $record ) { @@ -215,6 +220,12 @@ for ( my $tabloop = 0 ; $tabloop <= 10 ; $tabloop++ ) { GetAuthorisedValueDesc( $fields[$x_i]->tag(), $subf[$i][0], $subf[$i][1], '', $tagslib) || $subf[$i][1]; + if ($tagslib->{ $fields[$x_i]->tag() }->{ $subf[$i][0] }->{value_builder} eq "upload.pl" and $uploadWebPath) { + my $file_uri = qq($uploadWebPath/$subf[$i][1]); + $subfield_data{marc_value} = qq/$subfield_data{marc_value}<\/a>/; + $subfield_data{is_file} = 1; + } + } $subfield_data{marc_subfield} = $subf[$i][0]; $subfield_data{marc_tag} = $fields[$x_i]->tag(); diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 8738737..744af0c 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -104,7 +104,7 @@ my $marcisbnsarray = GetMarcISBN( $record, $marcflavour ); my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); my $marcseriesarray = GetMarcSeries($record,$marcflavour); -my $marcurlsarray = GetMarcUrls ($record,$marcflavour); +my $marcurlsarray = GetMarcUrls ($record, $marcflavour, $fw); my $subtitle = GetRecordValue('subtitle', $record, $fw); # Get Branches, Itemtypes and Locations diff --git a/cataloguing/value_builder/upload.pl b/cataloguing/value_builder/upload.pl new file mode 100755 index 0000000..c768ade --- /dev/null +++ b/cataloguing/value_builder/upload.pl @@ -0,0 +1,221 @@ +#!/usr/bin/perl + +# Copyright 2011 BibLibre +# +# 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 CGI qw/-utf8/; +use C4::Context; +use C4::Debug; + +use C4::AuthoritiesMarc; +use C4::Output; +use File::Basename; +use Text::Undiacritic qw/undiacritic/; +use Encode; + + +my $upload_path = C4::Context->preference('uploadPath'); + +sub plugin_parameters { + my ( $dbh, $record, $tagslib, $i, $tabloop ) = @_; + return ""; +} + +sub plugin_javascript { + my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_; + my $function_name = $field_number; + my $res = " + +"; + + return ( $function_name, $res ); +} + +sub plugin { + my ($input) = @_; + my $index = $input->param('index'); + my $result = $input->param('result'); + my $delete = $input->param('delete'); + my $uploaded_file = $input->param('uploaded_file'); + + my $template_name = ($result || $delete) + ? "upload_delete_file.tt" + : "upload.tt"; + + my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { template_name => "cataloguing/value_builder/$template_name", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => { editcatalogue => '*' }, + debug => 1, + } + ); + + + my $filefield = CGI::filefield( -name=>'uploaded_file', + -default=>'starting value', + -size=>50, + -maxlength=>80); + + $template->param( + index => $index, + result => $result, + filefield => $filefield + ); + + + # If there's already a file uploaded for this field, + # We handle is deletion + if ($delete) { + $result =~ s/\.\.\///g; # remove "../" in path + warn "deletion of $upload_path/$result"; + my $success = unlink("$upload_path/$result"); + if ($success) { + $template->param(success => $success); + } else { + $template->param(error => 1); + } + } + + + # Dealing with the uploaded file + if ($uploaded_file) { + + my $fh = $input->upload('uploaded_file'); + my $error; + my $success; + + if (defined $fh) { + # Dealing with filenames: + + # Normalizing filename: + $uploaded_file = normalize_string($uploaded_file); + $uploaded_file = undiacritic($uploaded_file); + # remove leading dot to prevent uploading files like .htaccess + $uploaded_file =~ s/^\.//; + + # Checking for an existing filename in destination directory + if (-f "$upload_path/$uploaded_file") { + # And getting a new one if needed + my ($file, $dir, $ext) = fileparse("$upload_path/$uploaded_file", qr/\.[^.]*/); + warn "FILE = '$file'"; + warn "DIR = '$dir'"; + warn "EXT = '$ext'"; + $uploaded_file = findname($file, $dir, $ext); + } + + # Copying the temp file to the destination directory + my $io_fh = $fh->handle; + open (OUTFILE, '>', "$upload_path/$uploaded_file") or $error = $!; + if (!$error) { + my $buffer; + while (my $bytesread = $io_fh->read($buffer,1024)) { + print OUTFILE $buffer; + } + close(OUTFILE); + # prevent executable bit to be set + chmod 0644, "$upload_path/$uploaded_file"; + $success = 1; + } else { + $error = "Could not write to destination file"; + } + } else { + $error = "Could not get the file"; + } + $template->param(success => $success) if ($success); + $template->param(error => $error) if ($error); + $template->param(uploaded_file => $uploaded_file); + } + + output_html_with_http_headers $input, $cookie, $template->output; +} + +# Search a valid non-existing filename using an incremental number +sub findname { + my $file = shift; + my $dir = shift; + my $ext = shift; + + my $count = 1; + my $found = 0; + + while ($found == 0) { + if (-f "$dir/$file-$count$ext") { + $count++; + } else { + $found = 1; + } + } + + return "$file-$count$ext"; +} + + +# Given a string +# Returns a utf8 NFC normalized string +sub normalize_string{ + my ($string)=@_; + $debug and warn " string in normalize before normalize :",$string; + $string=decode_utf8($string,1); + $debug and warn " string in normalize :",$string; + $string=~s/\<|\>|\^|\;|\?|,|\-|\(|\)|\[|\]|\{|\}|\$|\%|\!|\*|\:|\\|\/|\&|\"|\'|\s/_/g; + $string=~s/\s+$//g; + $string=~s/^\s+//g; + return $string; +} + + +1; + + +__END__ + +=head1 upload.pl + +This plugin allow to upload files on the server and reference it in a marc +field. + +Two system preferences are used: + +=over 4 + +=item uploadPath: the real absolute path where files will be stored + +=item uploadWebPath: the path from the server root directory. If you want to +access files through http://koha.tld/files, uploadWebPath must be "/files". + +=back + diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 79d4893..a8562c0 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -318,3 +318,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('MARCAuthorityControlField008', '|| aca||aabn | a|a d', NULL, NULL, 'Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('uploadPath','','Sets the upload path for the upload.pl plugin','',''); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('uploadWebPath','','Set the upload path starting from document root for the upload.pl plugin','',''); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6b88c29..a903e07 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4446,6 +4446,20 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do(" + INSERT IGNORE INTO `systempreferences` (variable,value,explanation,options,type) VALUES('uploadPath','','Sets the upload path for the upload.pl plugin','',''); + "); + + $dbh->do(" + INSERT IGNORE INTO `systempreferences` (variable,value,explanation,options,type) VALUES('uploadWebPath','','Set the upload path starting from document root for the upload.pl plugin','',''); + "); + print "Upgrade to $DBversion done (Adding upload plugin sysprefs)\n"; + SetVersion($DBversion); +} + +=item DropAllForeignKeys($table) =head1 FUNCTIONS diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt index 3fac577..61892d2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt @@ -109,7 +109,13 @@ function Changefwk(FwkList) {   [% UNLESS ( subfiel.hide_marc ) %][% subfiel.marc_subfield %][% END %] [% subfiel.short_desc %] - [% IF ( subfiel.is_url ) %][% subfiel.marc_value |html %][% ELSE %][% subfiel.marc_value |html %][% END %] + [% IF ( subfiel.is_url ) %] + [% subfiel.marc_value |html %] + [% ELSIF ( subfiel.is_file ) %] + [% subfiel.marc_value %] + [% ELSE %] + [% subfiel.marc_value |html %] + [% END %] [% IF ( subfiel.link ) %] Search on [% subfiel.marc_value |html %] @@ -139,7 +145,13 @@ function Changefwk(FwkList) {   [% UNLESS ( subfiel.hide_marc ) %][% subfiel.marc_subfield %][% END %] [% subfiel.short_desc %] - [% IF ( subfiel.is_url ) %][% subfiel.marc_value |html %][% ELSE %][% subfiel.marc_value |html %][% END %] + [% IF ( subfiel.is_url ) %] + [% subfiel.marc_value |html %] + [% ELSIF ( subfiel.is_file ) %] + [% subfiel.marc_value %] + [% ELSE %] + [% subfiel.marc_value |html %] + [% END %] [% IF ( subfiel.link ) %] Search on [% subfiel.marc_value |html %] @@ -169,7 +181,13 @@ function Changefwk(FwkList) {   [% UNLESS ( subfiel.hide_marc ) %][% subfiel.marc_subfield %][% END %] [% subfiel.short_desc %] - [% IF ( subfiel.is_url ) %][% subfiel.marc_value |html %][% ELSE %][% subfiel.marc_value |html %][% END %] + [% IF ( subfiel.is_url ) %] + [% subfiel.marc_value |html %] + [% ELSIF ( subfiel.is_file ) %] + [% subfiel.marc_value %] + [% ELSE %] + [% subfiel.marc_value |html %] + [% END %] [% IF ( subfiel.link ) %] Search on [% subfiel.marc_value |html %] @@ -199,7 +217,13 @@ function Changefwk(FwkList) {   [% UNLESS ( subfiel.hide_marc ) %][% subfiel.marc_subfield %][% END %] [% subfiel.short_desc %] - [% IF ( subfiel.is_url ) %][% subfiel.marc_value |html %][% ELSE %][% subfiel.marc_value |html %][% END %] + [% IF ( subfiel.is_url ) %] + [% subfiel.marc_value |html %] + [% ELSIF ( subfiel.is_file ) %] + [% subfiel.marc_value %] + [% ELSE %] + [% subfiel.marc_value |html %] + [% END %] [% IF ( subfiel.link ) %] Search on [% subfiel.marc_value |html %] @@ -229,7 +253,13 @@ function Changefwk(FwkList) {   [% UNLESS ( subfiel.hide_marc ) %][% subfiel.marc_subfield %][% END %] [% subfiel.short_desc %] - [% IF ( subfiel.is_url ) %][% subfiel.marc_value |html %][% ELSE %][% subfiel.marc_value |html %][% END %] + [% IF ( subfiel.is_url ) %] + [% subfiel.marc_value |html %] + [% ELSIF (subfiel.is_file ) %] + [% subfiel.marc_value %] + [% ELSE %] + [% subfiel.marc_value |html %] + [% END %] [% IF ( subfiel.link ) %] Search on [% subfiel.marc_value |html %] @@ -259,7 +289,13 @@ function Changefwk(FwkList) {   [% UNLESS ( subfiel.hide_marc ) %][% subfiel.marc_subfield %][% END %] [% subfiel.short_desc %] - [% IF ( subfiel.is_url ) %][% subfiel.marc_value |html %][% ELSE %][% subfiel.marc_value |html %][% END %] + [% IF ( subfiel.is_url ) %] + [% subfiel.marc_value |html %] + [% ELSIF (subfiel.is_file ) %] + [% subfiel.marc_value %] + [% ELSE %] + [% subfiel.marc_value |html %] + [% END %] [% IF ( subfiel.link ) %] Search on [% subfiel.marc_value |html %] @@ -289,7 +325,13 @@ function Changefwk(FwkList) {   [% UNLESS ( subfiel.hide_marc ) %][% subfiel.marc_subfield %][% END %] [% subfiel.short_desc %] - [% IF ( subfiel.is_url ) %][% subfiel.marc_value |html %][% ELSE %][% subfiel.marc_value |html %][% END %] + [% IF ( subfiel.is_url ) %] + [% subfiel.marc_value |html %] + [% ELSIF (subfiel.is_file ) %] + [% subfiel.marc_value %] + [% ELSE %] + [% subfiel.marc_value |html %] + [% END %] [% IF ( subfiel.link ) %] Search on [% subfiel.marc_value |html %] @@ -319,7 +361,13 @@ function Changefwk(FwkList) {   [% UNLESS ( subfiel.hide_marc ) %][% subfiel.marc_subfield %][% END %] [% subfiel.short_desc %] - [% IF ( subfiel.is_url ) %][% subfiel.marc_value |html %][% ELSE %][% subfiel.marc_value |html %][% END %] + [% IF ( subfiel.is_url ) %] + [% subfiel.marc_value |html %] + [% ELSIF (subfiel.is_file ) %] + [% subfiel.marc_value %] + [% ELSE %] + [% subfiel.marc_value |html %] + [% END %] [% IF ( subfiel.link ) %] Search on [% subfiel.marc_value |html %] @@ -349,7 +397,13 @@ function Changefwk(FwkList) {   [% UNLESS ( subfiel.hide_marc ) %][% subfiel.marc_subfield %][% END %] [% subfiel.short_desc %] - [% IF ( subfiel.is_url ) %][% subfiel.marc_value |html %][% ELSE %][% subfiel.marc_value |html %][% END %] + [% IF ( subfiel.is_url ) %] + [% subfiel.marc_value |html %] + [% ELSIF (subfiel.is_file ) %] + [% subfiel.marc_value %] + [% ELSE %] + [% subfiel.marc_value |html %] + [% END %] [% IF ( subfiel.link ) %] Search on [% subfiel.marc_value |html %] @@ -379,7 +433,13 @@ function Changefwk(FwkList) {   [% UNLESS ( subfiel.hide_marc ) %][% subfiel.marc_subfield %][% END %] [% subfiel.short_desc %] - [% IF ( subfiel.is_url ) %][% subfiel.marc_value |html %][% ELSE %][% subfiel.marc_value |html %][% END %] + [% IF ( subfiel.is_url ) %] + [% subfiel.marc_value |html %] + [% ELSIF (subfiel.is_file ) %] + [% subfiel.marc_value %] + [% ELSE %] + [% subfiel.marc_value |html %] + [% END %] [% IF ( subfiel.link ) %] Search on [% subfiel.marc_value |html %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/upload.tt new file mode 100644 index 0000000..0a8235e --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/upload.tt @@ -0,0 +1,50 @@ + + + + Upload plugin + + + + + + +[% IF ( success ) %] + + + + + The file [% uploaded_file %] has been successfully added. +

      + +[% ELSE %] + + [% IF ( error ) %] + Error: [% error %] +

      + [% ELSE %] + + [% IF ( uploaded_file ) %] + uploaded file: [% uploaded_file %] + [% ELSE %] +

      Please select the file to upload :

      +
      + [% filefield %] + + + +
      + [% END %] + [% END %] +[% END %] + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/upload_delete_file.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/upload_delete_file.tt new file mode 100644 index 0000000..cf0dc66 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/upload_delete_file.tt @@ -0,0 +1,52 @@ + + + + Upload plugin + + + + + + +[% IF ( success ) %] + + + + The file has been successfully deleted. +

      + +[% ELSE %] + + [% IF ( error ) %] + Error: Unable to delete the file. +

      + [% ELSE %] + + [% IF ( uploaded_file ) %] + uploaded file: [% uploaded_file %] + [% ELSE %] +

      File deletion

      +

      A file has already been uploaded for this field. Do you want to delete it?

      +
      + + + + + + +
      + [% END %] + [% END %] +[% END %] + + + diff --git a/kohaversion.pl b/kohaversion.pl index f864378..aa2eac2 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.05.00.011'; + our $VERSION = 'XXX'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install diff --git a/misc/strip_value_from_tag.pl b/misc/strip_value_from_tag.pl new file mode 100644 index 0000000..807e7b5 --- /dev/null +++ b/misc/strip_value_from_tag.pl @@ -0,0 +1,60 @@ +#!/usr/bin/perl + +# This script takes every biblio record in the database, +# looks for a value beginning with $find in $fieldtag$$subfieldtag +# and strips $find from this value. +# This was originally made for the file upload plugin, but might +# be used for other purposes. + +use strict; + +use Getopt::Long; +use C4::Context; +use C4::Biblio; + +my $debug = 0; + +# Which field are we processing? +my $fieldtag = "857"; +my $subfieldtag = "u"; + +# Whichi beginning pattern are we looking to delete? +my $find = "http://myurl.tld/"; +my $length = length($find); +my $pattern = qr|^$find|; + +print "Field $fieldtag\$$subfieldtag\n"; + +# Getting db connection +my $dbh = C4::Context->dbh; + +# Getting max bibnumber +my $query = "SELECT MAX(biblionumber) from biblio"; +my $sth = $dbh->prepare($query); +$sth->execute(); +my $bibliocount = $sth->fetchrow; + +warn "unable to get biblio count" and exit -1 unless $bibliocount; + +print "Biblio count : $bibliocount\n"; + +# Foreach each biblio +foreach (1..$bibliocount) { + my $found = 0; + my $record = GetMarcBiblio($_); + $debug and warn "unable to get marc for record $_" unless $record; + next unless $record; + foreach my $field ($record->field($fieldtag)) { + my $newfield = $field->clone(); + my $subfield = $newfield->subfield($subfieldtag); + if ($subfield and $subfield =~ $pattern) { + my $newsubfield = substr $subfield, $length; + $newsubfield =~ s/\s+$//; + $newfield->update($subfieldtag, $newsubfield); + $field->replace_with($newfield); + $found = 1; + } + } + print "processing $_\n" if ($found == 1); + ModBiblioMarc($record, $_, GetFrameworkCode($_)) if ($found == 1); +} diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl index ffa0a6d..4005ee4 100755 --- a/opac/opac-MARCdetail.pl +++ b/opac/opac-MARCdetail.pl @@ -90,6 +90,11 @@ if (C4::Context->preference("RequestOnOpac")) { $RequestOnOpac = 1; } +my $uploadWebPath; +if (C4::Context->preference('uploadWebPath')) { + $uploadWebPath = C4::Context->preference('uploadWebPath'); +} + # fill arrays my @loop_data = (); my $tag; @@ -161,6 +166,11 @@ for ( my $tabloop = 0 ; $tabloop <= 10 ; $tabloop++ ) { } $subfield_data{marc_value} = GetAuthorisedValueDesc( $fields[$x_i]->tag(), $subf[$i][0], $subf[$i][1], '', $tagslib, '', 'opac' ); + if ($tagslib->{ $fields[$x_i]->tag() }->{ $subf[$i][0] }->{value_builder} eq "upload.pl" and $uploadWebPath) { + my $file_uri = qq($uploadWebPath/$subf[$i][1]); + $subfield_data{marc_value} = qq/
      $subfield_data{marc_value}<\/a>/; + } + } $subfield_data{marc_subfield} = $subf[$i][0]; $subfield_data{marc_tag} = $fields[$x_i]->tag(); diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl index 5e92d15..8f31ba8 100755 --- a/opac/opac-basket.pl +++ b/opac/opac-basket.pl @@ -67,7 +67,7 @@ foreach my $biblionumber ( @bibs ) { my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); my $marcseriesarray = GetMarcSeries ($record,$marcflavour); - my $marcurlsarray = GetMarcUrls ($record,$marcflavour); + my $marcurlsarray = GetMarcUrls ($record, $marcflavour, GetFrameworkCode($biblionumber)); my @items = &GetItemsLocationInfo( $biblionumber ); my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber)); diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index e18e046..5a830b6 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -223,7 +223,7 @@ my $marcisbnsarray = GetMarcISBN ($record,$marcflavour); my $marcauthorsarray = GetMarcAuthors ($record,$marcflavour); my $marcsubjctsarray = GetMarcSubjects($record,$marcflavour); my $marcseriesarray = GetMarcSeries ($record,$marcflavour); -my $marcurlsarray = GetMarcUrls ($record,$marcflavour); +my $marcurlsarray = GetMarcUrls ($record, $marcflavour, $dat->{'frameworkcode'}); my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber)); $template->param( -- 1.7.6.3 From magnus at enger.priv.no Fri Oct 7 13:52:15 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Fri, 7 Oct 2011 13:52:15 +0200 Subject: [Koha-patches] [PATCH] Bug 6982 - Don't show MARC tag documentation links for NORMARC Message-ID: <1317988335-10600-1-git-send-email-magnus@enger.priv.no> Links to UNIMARC documentation were being shown when marcflavour = NORMARC. This patch hides the doc link functionality for NORMARC by hiding: 1. The checkbox for turning doc links on/off 2. The hyperlinked questionmarks This patch does not hide e.g. the JavaScript functions related to the doc link functionality, in order to make it easy to add doc links for NORMARC in the future (hopefully). The doc link functionality was passing a variable called MARC21 (based on the contents of the marcflavour syspref) to the template and testing the value of this to decide if MARC21 or UNIMARC doc links were to be shown. I have replaced this variable with he standard/full marcflavour syspref, in order to make it possible to test for more then two MARC dialects. To test: - Set the marcflavour syspref to MARC21, NORMARC and UNIMARC, one after the other. - Check that correct doc links are shown for MARC21 and UNIMARC on the cataloguing screen, and that no checkbox and no doc links are displayed for NORMARC. --- cataloguing/addbiblio.pl | 8 ++------ .../prog/en/modules/cataloguing/addbiblio.tt | 13 +++++++------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index ba10332..eb6fcb4 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -1062,16 +1062,12 @@ elsif ( $op eq "delete" ) { } $template->param( title => $record->title() ) if ( $record ne "-1" ); -if (C4::Context->preference("marcflavour") eq "MARC21"){ - $template->param(MARC21 => 1); -} - - $template->param( popup => $mode, frameworkcode => $frameworkcode, itemtype => $frameworkcode, - borrowernumber => $loggedinuser + borrowernumber => $loggedinuser, + marcflavour => C4::Context->preference("marcflavour"), ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index 91d926e..10603a5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -78,9 +78,9 @@ function PopupZ3950() { } function PopupMARCFieldDoc(field, blocknumber) { - [% IF ( MARC21 ) %] + [% IF ( marcflavour == 'MARC21' ) %] _MARC21FieldDoc(field); - [% ELSE %] + [% ELSIF ( marcflavour == 'UNIMARC' ) %] _UNIMARCFieldDoc(field, blocknumber); [% END %] } @@ -664,10 +664,10 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
      - -

      [% IF ( biblionumber ) %]Editing [% title |html %] (Record Number [% biblionumber %])

      [% ELSE %]Add MARC Record[% END %] +[% IF marcflavour != 'NORMARC' %]
      Show MARC tag documentation links
      +[% END %] [% UNLESS ( number ) %] @@ -825,8 +825,9 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ? [% IF advancedMARCEditor %]
      [% innerloo.tag %] [% ELSE %] - [% innerloo.tag %] ? + [% innerloo.tag %] + [% IF marcflavour != 'NORMARC' %] ?[% END %] + [% END %] [% IF ( innerloo.fixedfield ) %] -- 1.7.4.1 From amit.gupta at osslabs.biz Fri Oct 7 08:39:02 2011 From: amit.gupta at osslabs.biz (Amit Gupta) Date: Fri, 7 Oct 2011 12:09:02 +0530 Subject: [Koha-patches] [PATCH] Bug 6776 - Add Checkin tab to patron search tool Message-ID: <1317969542-10241-1-git-send-email-amit.gupta@osslabs.biz> The change from tab to 4 spaces. --- .../prog/en/includes/patron-search.inc | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index 0be014a..5376e87 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -106,9 +106,19 @@ YAHOO.util.Event.onContentReady("header_search", function() {
      [% END %] + [% IF ( CAN_user_circulate ) %] + + [% END %]
      -- 1.6.4.2 From colin.campbell at ptfs-europe.com Fri Oct 7 14:25:44 2011 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Fri, 7 Oct 2011 13:25:44 +0100 Subject: [Koha-patches] [PATCH] Bug 6987 Make return from Overdues::GetFine consistent Message-ID: <1317990344-3784-1-git-send-email-colin.campbell@ptfs-europe.com> If there is not a fine amount return zero not undefined or other undefined behaviour Use more meaningful var names for readability --- C4/Overdues.pm | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/C4/Overdues.pm b/C4/Overdues.pm index 9f4b22f..898d538 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -644,13 +644,16 @@ C<$borrowernumber> is the borrowernumber sub GetFine { my ( $itemnum, $borrowernumber ) = @_; my $dbh = C4::Context->dbh(); - my $query = "SELECT sum(amountoutstanding) FROM accountlines - where accounttype like 'F%' - AND amountoutstanding > 0 AND itemnumber = ? AND borrowernumber=?"; + my $query = q|SELECT sum(amountoutstanding) as fineamount FROM accountlines + where accounttype like 'F%' + AND amountoutstanding > 0 AND itemnumber = ? AND borrowernumber=?|; my $sth = $dbh->prepare($query); $sth->execute( $itemnum, $borrowernumber ); - my $data = $sth->fetchrow_hashref(); - return ( $data->{'sum(amountoutstanding)'} ); + my $fine = $sth->fetchrow_hashref(); + if ($fine->{fineamount}) { + return $fine->{fineamount}; + } + return 0; } -- 1.7.6.4 From nengard at bywatersolutions.com Fri Oct 7 02:08:54 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Thu, 6 Oct 2011 20:08:54 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6970 - logout not redirecting to login page Message-ID: <1317946134-13758-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard For some reason the latest version of Firefox doesn't like the javascript which empties the cart on logout. As Ian points out, there is code which tries to redirect to "about:blank" and close the window (since the main context of the function is the Cart's popup window. This patch adds a parameter to the delBasket function so that we can pass a "popup" context to the function and choose whether or not we want to ask JS to close the window. Signed-off-by: Nicole C. Engard --- .../intranet-tmpl/prog/en/includes/header.inc | 2 +- koha-tmpl/intranet-tmpl/prog/en/js/basket.js | 15 ++++++++++----- .../intranet-tmpl/prog/en/modules/basket/basket.tt | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc index 1faf0ca..333748a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc @@ -65,7 +65,7 @@ [% loggedinusername %] [% IF ( intranetbookbag ) %] - (Log Out) | + (Log Out) | [% ELSE %] (Log Out) | [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js index 9946cf7..3a09f64 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js @@ -299,15 +299,20 @@ function delRecord (n, s) { } -function delBasket(rep) { +function delBasket(context,rep) { if (rep == undefined){ rep = confirm(MSG_CONFIRM_DEL_BASKET); } if (rep) { - delCookie(nameCookie); - document.location = "about:blank"; - updateBasket(0,top.opener); - window.close(); + if(context == "popup"){ + delCookie(nameCookie); + document.location = "about:blank"; + updateBasket(0,top.opener); + window.close(); + } else { + delCookie(nameCookie); + updateBasket(0,top.opener); + } } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt index 38b25e2..0896075 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt @@ -103,7 +103,7 @@ function placeHold () {
    • - Empty and Close + Empty and Close
    • -- 1.7.2.3 From julian.maurice at biblibre.com Fri Oct 7 15:46:11 2011 From: julian.maurice at biblibre.com (Julian Maurice) Date: Fri, 7 Oct 2011 15:46:11 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6970 - logout not redirecting to login page Message-ID: <1317995172-10281-1-git-send-email-julian.maurice@biblibre.com> From: Owen Leonard For some reason the latest version of Firefox doesn't like the javascript which empties the cart on logout. As Ian points out, there is code which tries to redirect to "about:blank" and close the window (since the main context of the function is the Cart's popup window. This patch adds a parameter to the delBasket function so that we can pass a "popup" context to the function and choose whether or not we want to ask JS to close the window. Signed-off-by: Nicole C. Engard Signed-off-by: Julian Maurice --- .../intranet-tmpl/prog/en/includes/header.inc | 2 +- koha-tmpl/intranet-tmpl/prog/en/js/basket.js | 15 ++++++++++----- .../intranet-tmpl/prog/en/modules/basket/basket.tt | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc index 1faf0ca..333748a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc @@ -65,7 +65,7 @@ [% loggedinusername %] [% IF ( intranetbookbag ) %] - (Log Out) | + (Log Out) | [% ELSE %] (Log Out) | [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js index 9946cf7..3a09f64 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js @@ -299,15 +299,20 @@ function delRecord (n, s) { } -function delBasket(rep) { +function delBasket(context,rep) { if (rep == undefined){ rep = confirm(MSG_CONFIRM_DEL_BASKET); } if (rep) { - delCookie(nameCookie); - document.location = "about:blank"; - updateBasket(0,top.opener); - window.close(); + if(context == "popup"){ + delCookie(nameCookie); + document.location = "about:blank"; + updateBasket(0,top.opener); + window.close(); + } else { + delCookie(nameCookie); + updateBasket(0,top.opener); + } } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt index 38b25e2..0896075 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt @@ -103,7 +103,7 @@ function placeHold () {
    • - Empty and Close + Empty and Close
    • -- 1.7.6.3 From julian.maurice at biblibre.com Fri Oct 7 16:28:50 2011 From: julian.maurice at biblibre.com (Julian Maurice) Date: Fri, 7 Oct 2011 16:28:50 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6983 - Item type filter on overdues report does not respect item-level_itypes Message-ID: <1317997730-22105-1-git-send-email-julian.maurice@biblibre.com> From: Owen Leonard This patch adds a check for the item-level_itypes preference when building the SQL for the overdues report. Signed-off-by: Julian Maurice --- circ/overdue.pl | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/circ/overdue.pl b/circ/overdue.pl index 2bdafe1..7467874 100755 --- a/circ/overdue.pl +++ b/circ/overdue.pl @@ -265,7 +265,13 @@ if ($noreport) { $strsth.=" AND date_due < '" . $todaysdate . "' " unless ($showall); $strsth.=" AND (borrowers.firstname like '".$bornamefilter."%' or borrowers.surname like '".$bornamefilter."%' or borrowers.cardnumber like '".$bornamefilter."%')" if($bornamefilter) ; $strsth.=" AND borrowers.categorycode = '" . $borcatfilter . "' " if $borcatfilter; - $strsth.=" AND biblioitems.itemtype = '" . $itemtypefilter . "' " if $itemtypefilter; + if( $itemtypefilter ){ + if( C4::Context->preference('item-level_itypes') ){ + $strsth.=" AND items.itype = '" . $itemtypefilter . "' "; + } else { + $strsth.=" AND biblioitems.itemtype = '" . $itemtypefilter . "' "; + } + } $strsth.=" AND borrowers.flags = '" . $borflagsfilter . "' " if $borflagsfilter; $strsth.=" AND borrowers.branchcode = '" . $branchfilter . "' " if $branchfilter; $strsth.=" AND date_due < '" . $datedueto . "' " if $datedueto; -- 1.7.6.3 From julian.maurice at biblibre.com Fri Oct 7 17:19:25 2011 From: julian.maurice at biblibre.com (Julian Maurice) Date: Fri, 7 Oct 2011 17:19:25 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] bug 6919 - implements XSLTResultsDisplay and adding both unimarc and marc21 xslt Message-ID: <1318000765-30504-1-git-send-email-julian.maurice@biblibre.com> From: Alex Arnaud Signed-off-by: Julian Maurice --- C4/Search.pm | 10 +- .../prog/en/modules/catalogue/results.tt | 4 + .../prog/en/xslt/MARC21slim2intranetResults.xsl | 1021 ++++++++++++++++++++ .../prog/en/xslt/UNIMARCslim2intranetResults.xsl | 69 ++ 4 files changed, 1098 insertions(+), 6 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl diff --git a/C4/Search.pm b/C4/Search.pm index b9069f5..c1b1ca4 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1743,13 +1743,11 @@ sub searchResults { use C4::Charset; SetUTF8Flag($marcrecord); $debug && warn $marcrecord->as_formatted; - if (!$scan && $search_context eq 'opac' && C4::Context->preference("OPACXSLTResultsDisplay")) { - # FIXME note that XSLTResultsDisplay (use of XSLT to format staff interface bib search results) - # is not implemented yet - $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, 'Results', + my $interface = $search_context eq 'opac' ? 'OPAC' : ''; + if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) { + $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, 'Results', $search_context, 1); - # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs - + # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs } # if biblio level itypes are used and itemtype is notforloan, it can't be reserved either diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index 7a1039d..1e5fbc5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -439,6 +439,9 @@ YAHOO.util.Event.onContentReady("searchheader", function () { + [% IF ( SEARCH_RESULT.XSLTResultsRecord ) %] + [% SEARCH_RESULT.XSLTResultsRecord %] + [% ELSE %]

      [% SEARCH_RESULT.result_number %]. [% biblionumber = SEARCH_RESULT.biblionumber %] @@ -495,6 +498,7 @@ YAHOO.util.Event.onContentReady("searchheader", function () { [% END %] [% END %] + [% END %]

      [% IF ( SEARCH_RESULT.norequests ) %] No holds allowed [% ELSE %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl new file mode 100644 index 0000000..38565bc --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl @@ -0,0 +1,1021 @@ + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ST + + + BK + CR + + + BK + MX + CF + MP + VM + MU + PR + + + + + + + + + + + + + + + reformatted digital + + + digitized microfilm + + + digitized other analog + + + + + + + + + + + + + + + braille + + + print + + + electronic + + + microfiche + + + microfilm + + + + + chip cartridge + + + magnetic disc + + + magneto-optical disc + + + available online + + + tape cartridge + + + tape cassette + + + tape reel + + + + kit + + + + atlas + + + diagram + + + map + + + model + + + profile + + + remote-sensing image + + + section + + + view + + + + aperture card + + + microfiche + + + microfiche cassette + + + microfilm cartridge + + + microfilm cassette + + + microfilm reel + + + microopaque + + + film cartridge + + + film cassette + + + film reel + + + collage + + + photomechanical print + + + photonegative + + + photoprint + + + print + + + technical drawing + + + filmslip + + + filmstrip cartridge + + + filmstrip roll + + + other filmstrip type + + + transparency + + + remote-sensing image + + + cylinder + + + roll + + + sound cartridge + + + sound cassette + + + sound-tape reel + + + sound-track film + + + wire recording + + + braille + + + combination + + + moon + + + tactile, with no writing system + + + braille + + + regular print + + + text in looseleaf binder + + + videocartridge + + + videocassette + + + videoreel + + + + + + + + 245 + abhfgknps + + + + + /cgi-bin/koha/catalogue/detail.pl?biblionumber=title + + + + + + a + + + + + b + + + + + + h + + + + + fgknps + + + + + + + + + + + + + +

      + + + + + 100,110,111,700,710,711 + abc + + + + + + + by + + + + . + + + ; + + + + + + + + -- + + + + + + + + ; + + + + + + + + -- + + + + + + + n + + + + + + + . + + + ; + + + + + + +

      + + + + Edition: + + + ab + + + + + + + + Type: + + Set + + + Book + Continuing Resource + Article + + + Book + Kit + Mixed Materials + Computer File + Map + Visual Material + Score + Sound + Music + + + + ; Format: + + + + + + + ; Type of continuing resource: + + + + loose-leaf + + + series + + + newspaper + + + periodical + + + + + + ; Nature of contents: + + + + abstract or summary + + + bibliography + + + catalog + + + dictionary + + + encyclopedia + + + handbook + + + legal article + + + index + + + discography + + + legislation + + + theses + + + survey of literature + + + review + + + programmed text + + + filmography + + + directory + + + statistics + + + legal case and case notes + + + law report or digest + + + treaty + + + + + conference publication + + + + + + ; Type of computer file: + + + + numeric data + + + + + + ; Nature of contents: + + + patent + + + festschrift + + + + ; Literary form: + + + + not fiction + + + fiction + + + essay + + + drama + + + comic strip + + + fiction + + + humor, satire + + + letter + + + novel + + + short story + + + speech + + + + + ; Literary form: + + biography + + + conference publication + + + drama + + + essay + + + fiction + + + folktale + + + history + + + humor, satire + + + memoir + + + poetry + + + rehearsal + + + reporting + + + sound + + + speech + + + + ; Type of visual material: + + + art original + + + kit + + + art reproduction + + + diorama + + + filmstrip + + + legal article + + + picture + + + graphic + + + technical drawing + + + motion picture + + + chart + + + flash card + + + microscope slide + + + model + + + realia + + + slide + + + transparency + + + videorecording + + + toy + + + + + + + ; Audience: + + + Preschool; + + + Primary; + + + Pre-adolescent; + + + Adolescent; + + + Adult; + + + General; + + + Juvenile; + + + Specialized; + + + + + + + + + + 260 + abcg + results_summary + Publisher: + + + + + + Publisher: + + + abcg + + + + + + + + + 246 + ab + results_summary + Other Title: + + + + + + Other title: + + + ab + + .; + + + + + + Online Access: + + + + + + 100 + + + + y3z + + + + + + + + + Click here to access online + + + + + + + + | + + + + + + Availability: + + + + + + + + + + + + () + + No copies available + + + + + Copies available for loan: + + + + [] + ( + + ) +. , + + + + + + + +
      +
      +
      + + + + + Copies available for reference: + + + + [] + ( + + ) + . , + + + + + + + + Checked out ( + + ). + + + + + Withdrawn ( + + ). + + + + Lost ( + + ). + + + + Damaged ( + + ). + + + + On order ( + + ). + + + + In transit ( + + ). + + + + On hold ( + + ). + +
      + + + + + + + aq + + + + :,;/ + + + + + + + + + + + + + + + + + cdn + + + + + + + acdeq + + + + + + + + + bc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl new file mode 100644 index 0000000..88c9026 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + /cgi-bin/koha/catalogue/detail.pl?biblionumber= + + + + + + + : + + + + [ + + ] + + + : + + + + : + + + + / + + + + ; + + + + + + + + + + + + + + -- 1.7.6.3 From oleonard at myacpl.org Fri Oct 7 17:21:11 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 7 Oct 2011 11:21:11 -0400 Subject: [Koha-patches] =?utf-8?q?=5BPATCH_1/2=5D_Enh_6902=3A_Novelist_Sel?= =?utf-8?q?ect_enhanced_content?= Message-ID: <1318000871-9173-1-git-send-email-oleonard@myacpl.org> From: Ian Walls Adds support for EBSCO's NoveList Select service. The library provides their user profile and password, as well as where they'd like the content to appear on the OPAC page (options are: in a tab (default), above holdings table, below holdings table, and under Save Record on the right) Sponsored by Los Gatos Public Library and EBSCO Signed-off-by: Owen Leonard --- .../admin/preferences/enhanced_content.pref | 23 +++++++++++ koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 42 +++++++++++++++++++- opac/opac-detail.pl | 8 ++++ 3 files changed, 72 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref index 8709181..171b5f4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref @@ -123,6 +123,29 @@ Enhanced Content: - pref: BakerTaylorPassword class: password - . + Novelist Select: + - + - pref: NovelistSelectEnabled + choices: + yes: Add + no: "Don't add" + - Novelist Select content to the OPAC (requires that you have entered in a user profile and password, which can be seen in image links). + - + - Display Novelist Select content + - pref: NovelistSelectView + choices: + tab: in an OPAC tab + above: above the holdings table + below: below the holdings table + right: under the Save Record dropdown, on the right + - . + - + - Access Novelist Select using user profile + - pref: NovelistSelectProfile + - and password + - pref: NovelistSelectPassword + class: password + - . Google: - - pref: GoogleJackets diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt index 3e8586d..a42ceea 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -28,6 +28,9 @@ [% IF OpenLibraryCovers %] KOHA.OpenLibrary.GetCoverFromIsbn(); [% END %] + [% IF ( NovelistSelectProfile ) %] + novSelect.loadContentForISBN('[% normalized_isbn %]','[% NovelistSelectProfile %]', '[% NovelistSelectPassword %]', function(d){}); + [% END %] [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %] $(".tagbutton").click(KOHA.Tags.add_tag_button);[% END %][% END %][% END %] @@ -314,9 +317,18 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% IF ( BakerTaylorContentURL ) %] Enhanced Content: - [% IF ( OPACurlOpenInNewWindow ) %]Content Cafe[% ELSE %]Content Cafe[% END %] + [% IF ( OPACurlOpenInNewWindow ) %]Content Cafe[% ELSE %]Content Cafe[% END %] + + [% END %] + [% IF ( NovelistSelectProfile ) %] + [% IF ( NovelistSelectView == 'above') %] + + Novelist Select: +
      + [% END %] [% END %] +
      @@ -360,6 +372,12 @@ YAHOO.util.Event.onContentReady("furtherm", function () { ( [% IF reviews.defined %][% reviews.size %][% ELSE %]0[% END %] )
    • [% END %] +[% IF ( NovelistSelectProfile ) %] +[% IF ( NovelistSelectView == 'tab') %] +
    • Novelist Select
    • +[% END %] +[% END %] + [% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonSimilarItems ) %][% IF ( AMAZON_SIMILAR_PRODUCTS ) %]
    • Related
    • [% END %][% END %][% END %] [% IF ( OPACFRBRizeEditions ) %][% IF ( XISBNS ) %]
    • Editions
    • [% END %][% END %] @@ -591,6 +609,12 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% END %][% END %] [% END %] +[% IF ( NovelistSelectProfile ) %] [% IF ( NovelistSelectView == 'tab') %] +
      +
      +
      +[% END %] [% END %] + [% IF ( subscriptionsnumber ) %]

      This is a serial

      @@ -802,6 +826,12 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% END %]
      +[% IF ( NovelistSelectProfile ) %][% IF ( NovelistSelectView == 'below' ) %] +
      +

      Novelist Select

      +
      +
      +[% END %][% END %] @@ -863,6 +893,13 @@ YAHOO.util.Event.onContentReady("furtherm", function () { + [% IF ( NovelistSelectProfile ) %] [% IF ( NovelistSelectView == 'right') %] +
      +

      Novelist Select

      +
      +
      + [% END %] [% END %] + @@ -883,4 +920,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% LibraryThingForLibrariesID %]&accessibility=1">here. [% END %] [% END %] +[% IF ( NovelistSelectProfile ) %] + +[% END %] [% INCLUDE 'opac-bottom.inc' %] diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index e18e046..ebb2d1c 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -494,6 +494,14 @@ $template->param(LibraryThingForLibrariesTabbedView => C4::Context->preference('LibraryThingForLibrariesTabbedView') ); } +# Novelist Select +if( C4::Context->preference('NovelistSelectEnabled') ) +{ +$template->param(NovelistSelectProfile => C4::Context->preference('NovelistSelectProfile') ); +$template->param(NovelistSelectPassword => C4::Context->preference('NovelistSelectPassword') ); +$template->param(NovelistSelectView => C4::Context->preference('NovelistSelectView') ); +} + # Babelth?que if ( C4::Context->preference("Babeltheque") ) { -- 1.7.3 From oleonard at myacpl.org Fri Oct 7 17:22:05 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 7 Oct 2011 11:22:05 -0400 Subject: [Koha-patches] [PATCH 2/2] [SIGNED-OFF] Enh 6902: Novelist Select enhanced content Message-ID: <1318000925-9214-1-git-send-email-oleonard@myacpl.org> From: Ian Walls Adds support for EBSCO's NoveList Select service. The library provides their user profile and password, as well as where they'd like the content to appear on the OPAC page (options are: in a tab (default), above holdings table, below holdings table, and under Save Record on the right) Sponsored by Los Gatos Public Library and EBSCO Signed-off-by: Owen Leonard --- installer/data/mysql/sysprefs.sql | 4 ++++ installer/data/mysql/updatedatabase.pl | 10 ++++++++++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 79d4893..e5ff44a 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -245,6 +245,10 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsAwards', '0', 'Display Awards on OPAC from Syndetics','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsSeries', '0', 'Display Series information on OPAC from Syndetics','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImageSize', 'MC', 'Choose the size of the Syndetics Cover Image to display on the OPAC detail page, MC is Medium, LC is Large','MC|LC','Choice'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectEnabled',0,'Enable Novelist Select content. Requires Novelist Profile and Password',NULL,'YesNo'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectProfile',NULL,'Novelist Select user Password',NULL,'free'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectPassword',NULL,'Enable Novelist user Profile',NULL,'free'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectView','tab','Where to display Novelist Select content','tab|above|below|right','Choice'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAmazonCoverImages', '0', 'Display cover images on OPAC from Amazon Web Services','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAmazonReviews', '0', 'Display Amazon readers reviews on OPAC','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AmazonCoverImages', '0', 'Display Cover Images in Staff Client from Amazon Web Services','','YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6b88c29..0126854 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4446,6 +4446,16 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectEnabled',0,'Enable Novelist Select content. Requires Novelist Profile and Password',NULL,'YesNo')"); + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectProfile',NULL,'Novelist Select user Password',NULL,'free')"); + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectPassword',NULL,'Enable Novelist user Profile',NULL,'free')"); + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectView','tab','Where to display Novelist Select content','tab|above|below|right','Choice')"); + print "Upgrade to $DBversion done (Add support for EBSCO's NoveList Select (enh 6902))\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS -- 1.7.3 From henridamien.laurent at biblibre.com Fri Oct 7 17:44:11 2011 From: henridamien.laurent at biblibre.com (LAURENT Henri-Damien) Date: Fri, 07 Oct 2011 17:44:11 +0200 Subject: [Koha-patches] [PATCH 2/2] [SIGNED-OFF] Enh 6902: Novelist Select enhanced content In-Reply-To: <1318000925-9214-1-git-send-email-oleonard@myacpl.org> References: <1318000925-9214-1-git-send-email-oleonard@myacpl.org> Message-ID: <4E8F1E4B.30402@biblibre.com> My 2cts the .pref yaml file is missing as far as I can read. Le 07/10/2011 17:22, Owen Leonard a ?crit : > From: Ian Walls > > Adds support for EBSCO's NoveList Select service. The library provides their user profile > and password, as well as where they'd like the content to appear on the OPAC page (options are: > in a tab (default), above holdings table, below holdings table, and under Save Record on the right) > > Sponsored by Los Gatos Public Library and EBSCO > > Signed-off-by: Owen Leonard > --- > installer/data/mysql/sysprefs.sql | 4 ++++ > installer/data/mysql/updatedatabase.pl | 10 ++++++++++ > 2 files changed, 14 insertions(+), 0 deletions(-) > > diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql > index 79d4893..e5ff44a 100755 > --- a/installer/data/mysql/sysprefs.sql > +++ b/installer/data/mysql/sysprefs.sql > @@ -245,6 +245,10 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsAwards', '0', 'Display Awards on OPAC from Syndetics','','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsSeries', '0', 'Display Series information on OPAC from Syndetics','','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImageSize', 'MC', 'Choose the size of the Syndetics Cover Image to display on the OPAC detail page, MC is Medium, LC is Large','MC|LC','Choice'); > +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectEnabled',0,'Enable Novelist Select content. Requires Novelist Profile and Password',NULL,'YesNo'); > +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectProfile',NULL,'Novelist Select user Password',NULL,'free'); > +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectPassword',NULL,'Enable Novelist user Profile',NULL,'free'); > +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectView','tab','Where to display Novelist Select content','tab|above|below|right','Choice'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAmazonCoverImages', '0', 'Display cover images on OPAC from Amazon Web Services','','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAmazonReviews', '0', 'Display Amazon readers reviews on OPAC','','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AmazonCoverImages', '0', 'Display Cover Images in Staff Client from Amazon Web Services','','YesNo'); > diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl > index 6b88c29..0126854 100755 > --- a/installer/data/mysql/updatedatabase.pl > +++ b/installer/data/mysql/updatedatabase.pl > @@ -4446,6 +4446,16 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion($DBversion); > } > > +$DBversion = "3.05.00.XXX"; > +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectEnabled',0,'Enable Novelist Select content. Requires Novelist Profile and Password',NULL,'YesNo')"); > + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectProfile',NULL,'Novelist Select user Password',NULL,'free')"); > + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectPassword',NULL,'Enable Novelist user Profile',NULL,'free')"); > + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectView','tab','Where to display Novelist Select content','tab|above|below|right','Choice')"); > + print "Upgrade to $DBversion done (Add support for EBSCO's NoveList Select (enh 6902))\n"; > + SetVersion($DBversion); > +} > + > > =head1 FUNCTIONS > From oleonard at myacpl.org Fri Oct 7 17:46:51 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 7 Oct 2011 11:46:51 -0400 Subject: [Koha-patches] [PATCH 2/2] [SIGNED-OFF] Enh 6902: Novelist Select enhanced content In-Reply-To: <4E8F1E4B.30402@biblibre.com> References: <1318000925-9214-1-git-send-email-oleonard@myacpl.org> <4E8F1E4B.30402@biblibre.com> Message-ID: > the .pref yaml file is missing as far as I can read. It's in the other patch. -- Owen -- Web Developer Athens County Public Libraries http://www.myacpl.org From nengard at bywatersolutions.com Fri Oct 7 17:50:56 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Fri, 7 Oct 2011 11:50:56 -0400 Subject: [Koha-patches] [PATCH] Bug 6966 Patron Card Help Files Message-ID: <1318002656-1658-1-git-send-email-nengard@bywatersolutions.com> This patch adds links to the manual to files in the patroncards folder. --- .../prog/en/modules/help/patroncards/edit-batch.tt | 2 ++ .../en/modules/help/patroncards/edit-layout.tt | 2 ++ .../en/modules/help/patroncards/edit-profile.tt | 2 ++ .../en/modules/help/patroncards/edit-template.tt | 2 ++ .../prog/en/modules/help/patroncards/home.tt | 2 ++ .../en/modules/help/patroncards/image-manage.tt | 2 ++ .../prog/en/modules/help/patroncards/manage.tt | 2 ++ 7 files changed, 14 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-batch.tt index 9f982b3..00da73f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-batch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-batch.tt @@ -8,4 +8,6 @@

      To add a new batch, you want to click on the 'Batches' button at the top of your page and choose 'New Batch'

      +

      See the full documentation for the Patron Card Batches in the manual (online).

      + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-layout.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-layout.tt index 40993ca..434f981 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-layout.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-layout.tt @@ -31,4 +31,6 @@

      After saving, your layouts will appear on the 'Manage Layouts' page.

      +

      See the full documentation for the Patron Card Layouts in the manual (online).

      + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-profile.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-profile.tt index 933b755..ef53d87 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-profile.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-profile.tt @@ -28,4 +28,6 @@

      Once you have saved your new profile, you can return to the list of templates and choose to edit the template that this profile is for.

      +

      See the full documentation for the Patron Card Profiles in the manual (online).

      + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-template.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-template.tt index 0ef025e..55585a2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-template.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/edit-template.tt @@ -25,4 +25,6 @@ After saving, your templates will appear on the 'Manage Templates' page.
    +

    See the full documentation for the Patron Card Templates in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/home.tt index 3cabee2..a50aba3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/home.tt @@ -17,4 +17,6 @@

    The developers of the Patron Card Creator module hope you will find this an extremely useful tool. You are encouraged to submit any enhancement requests as well as any bugs via Koha Project Bugzilla.

    +

    See the full documentation for the Patron Card Creator in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/image-manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/image-manage.tt index b3a0e43..ca043ff 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/image-manage.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/image-manage.tt @@ -16,4 +16,6 @@

    To delete one or multiple of these images, click the checkbox to the right of each image you want to delete and click the 'Delete' button.

    +

    See the full documentation for Managing Images in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/manage.tt index 0629270..130487b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/manage.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/manage.tt @@ -16,4 +16,6 @@

    A batch is a collection of patrons for whom you want to generate cards.

    +

    See the full documentation for the Patron Card Creator in the manual (online).

    + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From oleonard at myacpl.org Fri Oct 7 18:43:29 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 7 Oct 2011 12:43:29 -0400 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_=5BSIGNED-OFF=5D_Bug_6811_-_?= =?utf-8?q?Send_renewal_notice_with_=24DBversion_=3D_=223=2E05=2E00?= =?utf-8?b?LlhYWCI7?= Message-ID: <1318005809-10015-1-git-send-email-oleonard@myacpl.org> From: Amit Gupta Similar to checkin, checkout notices already present. Renewal notices can be set in messaging preferences at borrower and membership category level. Contents will be picked up from a notice template. Signed-off-by: Owen Leonard --- C4/Circulation.pm | 17 +++++++++++++++++ .../data/mysql/de-DE/mandatory/sample_notices.sql | 1 + .../optional/sample_notices_message_attributes.sql | 3 ++- .../optional/sample_notices_message_transports.sql | 4 +++- .../data/mysql/en/mandatory/sample_notices.sql | 1 + .../optional/sample_notices_message_attributes.sql | 4 +++- .../optional/sample_notices_message_transports.sql | 5 ++++- .../data/mysql/es-ES/mandatory/sample_notices.sql | 1 + .../optional/sample_notices_message_attributes.sql | 4 ++-- .../optional/sample_notices_message_transports.sql | 4 +++- .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 1 + .../sample_notices_message_attributes.sql | 3 ++- .../sample_notices_message_transports.sql | 4 +++- installer/data/mysql/it-IT/necessari/notices.sql | 1 + .../sample_notices_message_attributes.sql | 3 ++- .../sample_notices_message_transports.sql | 5 +++-- .../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 1 + .../sample_notices_message_attributes.sql | 3 ++- .../sample_notices_message_transports.sql | 4 +++- .../data/mysql/pl-PL/mandatory/sample_notices.sql | 1 + .../optional/sample_notices_message_attributes.sql | 3 ++- .../optional/sample_notices_message_transports.sql | 4 +++- .../data/mysql/ru-RU/mandatory/sample_notices.sql | 1 + .../optional/sample_notices_message_attributes.sql | 3 ++- .../optional/sample_notices_message_transports.sql | 4 +++- .../data/mysql/uk-UA/mandatory/sample_notices.sql | 1 + .../optional/sample_notices_message_attributes.sql | 3 ++- .../optional/sample_notices_message_transports.sql | 4 +++- installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++ .../prog/en/includes/messaging-preference-form.inc | 1 + .../prog/en/modules/admin/categorie.tt | 1 + .../opac-tmpl/prog/en/modules/opac-messaging.tt | 1 + 32 files changed, 90 insertions(+), 20 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 520c116..b051a63 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2298,6 +2298,22 @@ sub AddRenewal { } # Log the renewal UpdateStats( $branch, 'renew', $charge, '', $itemnumber, $item->{itype}, $borrowernumber); + my $borrower = GetMemberDetails( $borrowernumber); + my $circulation_alert = 'C4::ItemCirculationAlertPreference'; + my %conditions = ( + branchcode => $branch, + categorycode => $borrower->{categorycode}, + item_type => $item->{itype}, + notification => 'ITEMRENEW', + ); + if ($circulation_alert->is_enabled_for(\%conditions)) { + SendCirculationAlert({ + type => 'ITEMRENEW', + item => $item, + borrower => $borrower, + branch => $branch, + }); + } return $datedue; } @@ -2617,6 +2633,7 @@ sub SendCirculationAlert { my %message_name = ( CHECKIN => 'Item_Check_in', CHECKOUT => 'Item_Checkout', + ITEMRENEW => 'Item_Renew', ); my $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences({ borrowernumber => $borrower->{borrowernumber}, diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql index 166c36d..721e8b3 100644 --- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql +++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql @@ -11,6 +11,7 @@ VALUES ('circulation','ODUE','Mahnung','Mahnung','Liebe/r < ('reserves', 'HOLD_PRINT', 'Vormerkbenachrichtigung (Print)', 'Vormerkbenachrichtigung (Print)', '<>\r\n<>\r\n<>\r\n<>\r\n<> <>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<> <>\r\n<>\r\n<>\r\n<> <>\r\n<>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nLiebe(r) <> <>,\r\n\r\nF?r Sie liegt seit dem <> eine Vormerkung zur Abholung bereit:\r\n\r\nTitel: <>\r\nVerfasser: <>\r\nSignatur: <>\r\n'), ('circulation','CHECKIN','R?ckgabequittung (Zusammenfassung)','R?ckgabequittung','Die folgenden Medien wurden zur?ckgegeben:\r\n----\r\n<>\r\n----\r\nVielen Dank.'), ('circulation','CHECKOUT','Ausleihquittung (Zusammenfassung)','Ausleihquittung','Die folgenden Medien wurden entliehen:\r\n----\r\n<>\r\n----\r\nVielen Dank f?r Ihren Besuch in <>.'), +('circulation','ITEMRENEW','Item_Renew','ItemRenew','The following items have been renewed:\r\n----\r\n<>\r\n----\r\nThank you for visiting <>.'), ('reserves', 'HOLDPLACED', 'Neue Vormerkung', 'Neue Vormerkung','Folgender Titel wurde vorgemerkt: <> (<<biblionumber>>) durch den Benutzer <<firstname>> <<surname>> (<<cardnumber>>).'), ('suggestions','ACCEPTED','Anschaffungsvorschlag wurde angenommen', 'Ihr Anschaffungsvorschlag wurde angenommen','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> by <<suggestions.author>>.\n\nDie Bibliothek hat diesen Titel heute recherchiert und wird Ihn sobald wie m?glich im Buchhandel bestellen. Sie erhalten Nachricht, sobald die Bestellung abgeschlossen ist und sobald der Titel in der Bibliotek verf?gbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Vorgeschlagenes Medium verf?gbar', 'Das vorgeschlagene Medium ist jetzt verf?gbar','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu k?nnen, dass dieser Titel jetzt im Bestand der Bibliothek verf?gbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/de-DE/optional/sample_notices_message_attributes.sql b/installer/data/mysql/de-DE/optional/sample_notices_message_attributes.sql index b505486..367bf24 100644 --- a/installer/data/mysql/de-DE/optional/sample_notices_message_attributes.sql +++ b/installer/data/mysql/de-DE/optional/sample_notices_message_attributes.sql @@ -5,4 +5,5 @@ values (2, 'Advance_Notice', 1), (4, 'Hold_Filled', 0), (5, 'Item_Check_in', 0), -(6, 'Item_Checkout', 0); \ No newline at end of file +(6, 'Item_Checkout', 0), +(7, 'Item_Renew', 0); diff --git a/installer/data/mysql/de-DE/optional/sample_notices_message_transports.sql b/installer/data/mysql/de-DE/optional/sample_notices_message_transports.sql index ae68378..60ddd52 100644 --- a/installer/data/mysql/de-DE/optional/sample_notices_message_transports.sql +++ b/installer/data/mysql/de-DE/optional/sample_notices_message_transports.sql @@ -14,4 +14,6 @@ values (5, 'email', 0, 'circulation', 'CHECKIN'), (5, 'sms', 0, 'circulation', 'CHECKIN'), (6, 'email', 0, 'circulation', 'CHECKOUT'), -(6, 'sms', 0, 'circulation', 'CHECKOUT'); +(6, 'sms', 0, 'circulation', 'CHECKOUT'), +(7, 'email', 0, 'circulation', 'ITEMRENEW'), +(7, 'sms', 0, 'circulation', 'ITEMRENEW'); diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql index 689fa0f..4bb8d4f 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.sql +++ b/installer/data/mysql/en/mandatory/sample_notices.sql @@ -11,6 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), +('circulation','ITEMRENEW','Item_Renew','ItemRenew','The following items have been renewed:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), ('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/en/optional/sample_notices_message_attributes.sql b/installer/data/mysql/en/optional/sample_notices_message_attributes.sql index a7a6032..ae68f2b 100644 --- a/installer/data/mysql/en/optional/sample_notices_message_attributes.sql +++ b/installer/data/mysql/en/optional/sample_notices_message_attributes.sql @@ -5,5 +5,7 @@ values (2, 'Advance_Notice', 1), (4, 'Hold_Filled', 0), (5, 'Item_Check_in', 0), -(6, 'Item_Checkout', 0); +(6, 'Item_Checkout', 0), +(7, 'Item_Renew', 0); + diff --git a/installer/data/mysql/en/optional/sample_notices_message_transports.sql b/installer/data/mysql/en/optional/sample_notices_message_transports.sql index ae68378..5b8e2c3 100644 --- a/installer/data/mysql/en/optional/sample_notices_message_transports.sql +++ b/installer/data/mysql/en/optional/sample_notices_message_transports.sql @@ -14,4 +14,7 @@ values (5, 'email', 0, 'circulation', 'CHECKIN'), (5, 'sms', 0, 'circulation', 'CHECKIN'), (6, 'email', 0, 'circulation', 'CHECKOUT'), -(6, 'sms', 0, 'circulation', 'CHECKOUT'); +(6, 'sms', 0, 'circulation', 'CHECKOUT'), +(7, 'email', 0, 'circulation', 'ITEMRENEW'), +(7, 'sms', 0, 'circulation', 'ITEMRENEW'); + diff --git a/installer/data/mysql/es-ES/mandatory/sample_notices.sql b/installer/data/mysql/es-ES/mandatory/sample_notices.sql index 689fa0f..4bb8d4f 100644 --- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql +++ b/installer/data/mysql/es-ES/mandatory/sample_notices.sql @@ -11,6 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), +('circulation','ITEMRENEW','Item_Renew','ItemRenew','The following items have been renewed:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), ('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/es-ES/optional/sample_notices_message_attributes.sql b/installer/data/mysql/es-ES/optional/sample_notices_message_attributes.sql index a7a6032..4f2f6ef 100644 --- a/installer/data/mysql/es-ES/optional/sample_notices_message_attributes.sql +++ b/installer/data/mysql/es-ES/optional/sample_notices_message_attributes.sql @@ -5,5 +5,5 @@ values (2, 'Advance_Notice', 1), (4, 'Hold_Filled', 0), (5, 'Item_Check_in', 0), -(6, 'Item_Checkout', 0); - +(6, 'Item_Checkout', 0), +(7, 'Item_Renew', 0); diff --git a/installer/data/mysql/es-ES/optional/sample_notices_message_transports.sql b/installer/data/mysql/es-ES/optional/sample_notices_message_transports.sql index ae68378..60ddd52 100644 --- a/installer/data/mysql/es-ES/optional/sample_notices_message_transports.sql +++ b/installer/data/mysql/es-ES/optional/sample_notices_message_transports.sql @@ -14,4 +14,6 @@ values (5, 'email', 0, 'circulation', 'CHECKIN'), (5, 'sms', 0, 'circulation', 'CHECKIN'), (6, 'email', 0, 'circulation', 'CHECKOUT'), -(6, 'sms', 0, 'circulation', 'CHECKOUT'); +(6, 'sms', 0, 'circulation', 'CHECKOUT'), +(7, 'email', 0, 'circulation', 'ITEMRENEW'), +(7, 'sms', 0, 'circulation', 'ITEMRENEW'); diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql index 977e59d..8fcb471 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -13,6 +13,7 @@ VALUES ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup at <<branches.branchname>>', '<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n\n\nChange Service Requested\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>>\n<<borrowers.address>>\n<<borrowers.city>> <<borrowers.zipcode>>\n\n\n\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\n\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), +('circulation','ITEMRENEW','Item_Renew','ItemRenew','The following items have been renewed:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), ('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/fr-FR/2-Optionel/sample_notices_message_attributes.sql b/installer/data/mysql/fr-FR/2-Optionel/sample_notices_message_attributes.sql index 8e919e9..debe7d5 100644 --- a/installer/data/mysql/fr-FR/2-Optionel/sample_notices_message_attributes.sql +++ b/installer/data/mysql/fr-FR/2-Optionel/sample_notices_message_attributes.sql @@ -5,5 +5,6 @@ values (2, 'Advance_Notice', 1), (4, 'Hold_Filled', 0), (5, 'Item_Check_in', 0), -(6, 'Item_Checkout', 0); +(6, 'Item_Checkout', 0), +(7, 'Item_Renew', 0); diff --git a/installer/data/mysql/fr-FR/2-Optionel/sample_notices_message_transports.sql b/installer/data/mysql/fr-FR/2-Optionel/sample_notices_message_transports.sql index ae68378..60ddd52 100644 --- a/installer/data/mysql/fr-FR/2-Optionel/sample_notices_message_transports.sql +++ b/installer/data/mysql/fr-FR/2-Optionel/sample_notices_message_transports.sql @@ -14,4 +14,6 @@ values (5, 'email', 0, 'circulation', 'CHECKIN'), (5, 'sms', 0, 'circulation', 'CHECKIN'), (6, 'email', 0, 'circulation', 'CHECKOUT'), -(6, 'sms', 0, 'circulation', 'CHECKOUT'); +(6, 'sms', 0, 'circulation', 'CHECKOUT'), +(7, 'email', 0, 'circulation', 'ITEMRENEW'), +(7, 'sms', 0, 'circulation', 'ITEMRENEW'); diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql index 689fa0f..4bb8d4f 100644 --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ b/installer/data/mysql/it-IT/necessari/notices.sql @@ -11,6 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), +('circulation','ITEMRENEW','Item_Renew','ItemRenew','The following items have been renewed:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), ('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/it-IT/necessari/sample_notices_message_attributes.sql b/installer/data/mysql/it-IT/necessari/sample_notices_message_attributes.sql index 63d07fd..672d6da 100644 --- a/installer/data/mysql/it-IT/necessari/sample_notices_message_attributes.sql +++ b/installer/data/mysql/it-IT/necessari/sample_notices_message_attributes.sql @@ -7,5 +7,6 @@ values (2, 'Advance_Notice', 1), (4, 'Hold_Filled', 0), (5, 'Item_Check_in', 0), -(6, 'Item_Checkout', 0); +(6, 'Item_Checkout', 0), +(7, 'Item_Renew', 0); SET FOREIGN_KEY_CHECKS=1; diff --git a/installer/data/mysql/it-IT/necessari/sample_notices_message_transports.sql b/installer/data/mysql/it-IT/necessari/sample_notices_message_transports.sql index c1b1f29..1961d85 100644 --- a/installer/data/mysql/it-IT/necessari/sample_notices_message_transports.sql +++ b/installer/data/mysql/it-IT/necessari/sample_notices_message_transports.sql @@ -18,6 +18,7 @@ values (5, 'email', 0, 'circulation', 'CHECKIN'), (5, 'sms', 0, 'circulation', 'CHECKIN'), (6, 'email', 0, 'circulation', 'CHECKOUT'), -(6, 'sms', 0, 'circulation', 'CHECKOUT'); - +(6, 'sms', 0, 'circulation', 'CHECKOUT'), +(7, 'email', 0, 'circulation', 'ITEMRENEW'), +(7, 'sms', 0, 'circulation', 'ITEMRENEW'); SET FOREIGN_KEY_CHECKS=1; diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql index cdb5529..45d0e67 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql @@ -32,6 +32,7 @@ VALUES ('circulation','ODUE','Purring','Purring p? dokument','<<borrowers.first ('reserves', 'HOLD_PRINT', 'Hentemelding (p? papir)', 'Hentemelding', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nDu har et reservert dokument som kan hentes fra <<reserves.waitingdate>>:\r\n\r\nTittel: <<biblio.title>>\r\nForfatter: <<biblio.author>>\r\nEksemplar: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Innlevering','Melding om innlevering','F?lgende dokument har blitt innlevert:\r\n----\r\n<<biblio.title>>\r\n----\r\nVennlig hilsen\r\nBiblioteket'), ('circulation','CHECKOUT','Utl?n','Melding om utl?n','F?lgende dokument har blitt l?nt ut:\r\n----\r\n<<biblio.title>>\r\n----\r\nVennlig hilsen\r\nBiblioteket'), +('circulation','ITEMRENEW','Item_Renew','ItemRenew','The following items have been renewed:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), ('reserves', 'HOLDPLACED', 'Melding om reservasjon', 'Melding om reservasjon','F?lgende dokument har blitt reservert : <<title>> (<<biblionumber>>) av <<firstname>> <<surname>> (<<cardnumber>>).'), ('suggestions','ACCEPTED','Forslag godtatt', 'Innkj?psforslag godtatt','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foresl?tt at biblioteket kj?per inn <<suggestions.title>> av <<suggestions.author>>.\n\nBiblioteket har vurdert forslaget i dag. Dokumentet vil bli bestilt s? fort det lar seg gj?re. Du vil f? en ny melding n?r bestillingen er gjort, og n?r dokumentet ankommer biblioteket.\n\nEr det noe du lurer p?, vennligst kontakt oss p? <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Foresl?tt dokument tilgjengelig', 'Foresl?tt dokument tilgjengelig','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foresl?tt at biblioteket kj?per inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av ? informere deg om at dokumentet n? er innlemmet i samlingen.\n\nEr det noe du lurer p?, vennligst kontakt oss p? <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/nb-NO/2-Valgfritt/sample_notices_message_attributes.sql b/installer/data/mysql/nb-NO/2-Valgfritt/sample_notices_message_attributes.sql index a7a6032..459b913 100644 --- a/installer/data/mysql/nb-NO/2-Valgfritt/sample_notices_message_attributes.sql +++ b/installer/data/mysql/nb-NO/2-Valgfritt/sample_notices_message_attributes.sql @@ -5,5 +5,6 @@ values (2, 'Advance_Notice', 1), (4, 'Hold_Filled', 0), (5, 'Item_Check_in', 0), -(6, 'Item_Checkout', 0); +(6, 'Item_Checkout', 0), +(7, 'Item_Renew', 0); diff --git a/installer/data/mysql/nb-NO/2-Valgfritt/sample_notices_message_transports.sql b/installer/data/mysql/nb-NO/2-Valgfritt/sample_notices_message_transports.sql index ae68378..60ddd52 100644 --- a/installer/data/mysql/nb-NO/2-Valgfritt/sample_notices_message_transports.sql +++ b/installer/data/mysql/nb-NO/2-Valgfritt/sample_notices_message_transports.sql @@ -14,4 +14,6 @@ values (5, 'email', 0, 'circulation', 'CHECKIN'), (5, 'sms', 0, 'circulation', 'CHECKIN'), (6, 'email', 0, 'circulation', 'CHECKOUT'), -(6, 'sms', 0, 'circulation', 'CHECKOUT'); +(6, 'sms', 0, 'circulation', 'CHECKOUT'), +(7, 'email', 0, 'circulation', 'ITEMRENEW'), +(7, 'sms', 0, 'circulation', 'ITEMRENEW'); diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql index 6be2eb8..916f05d 100644 --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -13,6 +13,7 @@ VALUES ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), +('circulation','ITEMRENEW','Item_Renew','ItemRenew','The following items have been renewed:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), ('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/pl-PL/optional/sample_notices_message_attributes.sql b/installer/data/mysql/pl-PL/optional/sample_notices_message_attributes.sql index 8e919e9..debe7d5 100644 --- a/installer/data/mysql/pl-PL/optional/sample_notices_message_attributes.sql +++ b/installer/data/mysql/pl-PL/optional/sample_notices_message_attributes.sql @@ -5,5 +5,6 @@ values (2, 'Advance_Notice', 1), (4, 'Hold_Filled', 0), (5, 'Item_Check_in', 0), -(6, 'Item_Checkout', 0); +(6, 'Item_Checkout', 0), +(7, 'Item_Renew', 0); diff --git a/installer/data/mysql/pl-PL/optional/sample_notices_message_transports.sql b/installer/data/mysql/pl-PL/optional/sample_notices_message_transports.sql index ae68378..60ddd52 100644 --- a/installer/data/mysql/pl-PL/optional/sample_notices_message_transports.sql +++ b/installer/data/mysql/pl-PL/optional/sample_notices_message_transports.sql @@ -14,4 +14,6 @@ values (5, 'email', 0, 'circulation', 'CHECKIN'), (5, 'sms', 0, 'circulation', 'CHECKIN'), (6, 'email', 0, 'circulation', 'CHECKOUT'), -(6, 'sms', 0, 'circulation', 'CHECKOUT'); +(6, 'sms', 0, 'circulation', 'CHECKOUT'), +(7, 'email', 0, 'circulation', 'ITEMRENEW'), +(7, 'sms', 0, 'circulation', 'ITEMRENEW'); diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql index 689fa0f..4bb8d4f 100644 --- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql +++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql @@ -11,6 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), +('circulation','ITEMRENEW','Item_Renew','ItemRenew','The following items have been renewed:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), ('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/ru-RU/optional/sample_notices_message_attributes.sql b/installer/data/mysql/ru-RU/optional/sample_notices_message_attributes.sql index c9d9bd1..af73e8b 100644 --- a/installer/data/mysql/ru-RU/optional/sample_notices_message_attributes.sql +++ b/installer/data/mysql/ru-RU/optional/sample_notices_message_attributes.sql @@ -7,5 +7,6 @@ values (2, 'Advance_Notice', 1), (4, 'Hold_Filled', 0), (5, 'Item_Check_in', 0), -(6, 'Item_Checkout', 0); +(6, 'Item_Checkout', 0), +(7, 'Item_Renew', 0); diff --git a/installer/data/mysql/ru-RU/optional/sample_notices_message_transports.sql b/installer/data/mysql/ru-RU/optional/sample_notices_message_transports.sql index ade4d03..6433ab5 100644 --- a/installer/data/mysql/ru-RU/optional/sample_notices_message_transports.sql +++ b/installer/data/mysql/ru-RU/optional/sample_notices_message_transports.sql @@ -15,4 +15,6 @@ values (5, 'email', 0, 'circulation', 'CHECKIN'), (5, 'sms', 0, 'circulation', 'CHECKIN'), (6, 'email', 0, 'circulation', 'CHECKOUT'), -(6, 'sms', 0, 'circulation', 'CHECKOUT'); +(6, 'sms', 0, 'circulation', 'CHECKOUT'), +(7, 'email', 0, 'circulation', 'ITEMRENEW'), +(7, 'sms', 0, 'circulation', 'ITEMRENEW'); diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql index 358205b..e081454 100644 --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -10,6 +10,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD', 'Hold Available for Pickup', 'Hold Available for Pickup at <<branches.branchname>>', 'Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\nLocation: <<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress3>>\r\n<<branches.branchcity>> <<branches.branchzip>>'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), +('circulation','ITEMRENEW','Item_Renew','ItemRenew','The following items have been renewed:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), ('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/uk-UA/optional/sample_notices_message_attributes.sql b/installer/data/mysql/uk-UA/optional/sample_notices_message_attributes.sql index 75e2793..9156b78 100644 --- a/installer/data/mysql/uk-UA/optional/sample_notices_message_attributes.sql +++ b/installer/data/mysql/uk-UA/optional/sample_notices_message_attributes.sql @@ -7,5 +7,6 @@ values (2, 'Advance_Notice' , 1), (4, 'Hold_Filled' , 0), (5, 'Item_Check_in' , 0), -(6, 'Item_Checkout' , 0); +(6, 'Item_Checkout' , 0), +(7, 'Item_Renew' , 0); diff --git a/installer/data/mysql/uk-UA/optional/sample_notices_message_transports.sql b/installer/data/mysql/uk-UA/optional/sample_notices_message_transports.sql index ade4d03..6433ab5 100644 --- a/installer/data/mysql/uk-UA/optional/sample_notices_message_transports.sql +++ b/installer/data/mysql/uk-UA/optional/sample_notices_message_transports.sql @@ -15,4 +15,6 @@ values (5, 'email', 0, 'circulation', 'CHECKIN'), (5, 'sms', 0, 'circulation', 'CHECKIN'), (6, 'email', 0, 'circulation', 'CHECKOUT'), -(6, 'sms', 0, 'circulation', 'CHECKOUT'); +(6, 'sms', 0, 'circulation', 'CHECKOUT'), +(7, 'email', 0, 'circulation', 'ITEMRENEW'), +(7, 'sms', 0, 'circulation', 'ITEMRENEW'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6b88c29..dde4ff4 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4446,6 +4446,20 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { +$dbh->do(q{ + INSERT INTO `letter` (`module`, `code`, `name`, `title`, `content`) VALUES + ('circulation','ITEMRENEW','Item_Renew','ItemRenew','The following items have been renewed:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'); + }); + $dbh->do(q{INSERT INTO message_attributes (message_attribute_id, message_name, takes_days) VALUES (7, 'Item_Renew', 0);}); + $dbh->do(q{INSERT INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES (7, 'email', 0, 'circulation', 'ITEMRENEW');}); + $dbh->do(q{INSERT INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES (7, 'sms', 0, 'circulation', 'ITEMRENEW');}); + print "Upgrade to $DBversion done (Add letter for Item Renew notifications)\n"; + SetVersion ($DBversion); +} + + =head1 FUNCTIONS diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc index 577f19a..87e1bcd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc @@ -33,6 +33,7 @@ [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold Filled [% ELSIF ( messaging_preference.Item_Check_in ) %]Item Check-in [% ELSIF ( messaging_preference.Item_Checkout ) %]Item Checkout + [% ELSIF ( messaging_preference.Item_Renew ) %]Item Renew [% ELSE %]Unknown [% END %]</td> [% IF ( messaging_preference.takes_days ) %] <td> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt index b50012f..f9a5e70 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt @@ -349,6 +349,7 @@ Confirm Deletion of Category [% categorycode |html %][% END %]</legend> [% ELSIF ( prefs.Hold_Filled ) %]Hold Filled [% ELSIF ( prefs.Item_Check_in ) %]Item Check-in [% ELSIF ( prefs.Item_Checkout ) %]Item Checkout + [% ELSIF ( prefs.Item_Renew ) %]Item Renew [% ELSE %]Unknown [% END %]: <strong>[% transport.transport %]</strong><br /> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tt index 4c51f48..07327cb 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tt @@ -45,6 +45,7 @@ [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold Filled [% ELSIF ( messaging_preference.Item_Check_in ) %]Item Check-in [% ELSIF ( messaging_preference.Item_Checkout ) %]Item Checkout + [% ELSIF ( messaging_preference.Item_Renew ) %]Item Renew [% ELSE %]Unknown [% END %]</td> [% IF ( messaging_preference.takes_days ) %] <td><select name="[% messaging_preference.message_attribute_id %]-DAYS"> -- 1.7.3 From nengard at bywatersolutions.com Fri Oct 7 19:14:33 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Fri, 7 Oct 2011 13:14:33 -0400 Subject: [Koha-patches] [PATCH] Bug 6966 Reports Help Message-ID: <1318007673-1931-1-git-send-email-nengard@bywatersolutions.com> This patch updates all the help files in the reports folder and adds links to the manual pages. --- .../en/modules/help/reports/acquisitions_stats.tt | 22 ++++--- .../prog/en/modules/help/reports/bor_issues_top.tt | 23 +++---- .../prog/en/modules/help/reports/borrowers_out.tt | 20 ++++--- .../en/modules/help/reports/borrowers_stats.tt | 30 ++------- .../prog/en/modules/help/reports/cat_issues_top.tt | 22 +++---- .../prog/en/modules/help/reports/catalogue_out.tt | 24 ++++---- .../en/modules/help/reports/catalogue_stats.tt | 27 ++------- .../prog/en/modules/help/reports/dictionary.tt | 61 +++---------------- .../prog/en/modules/help/reports/guided_reports.tt | 30 +++++++--- .../en/modules/help/reports/issues_avg_stats.tt | 17 +++--- .../prog/en/modules/help/reports/issues_stats.tt | 43 +++++++------- .../prog/en/modules/help/reports/itemslost.tt | 6 ++- .../prog/en/modules/help/reports/manager.tt | 17 +++--- .../prog/en/modules/help/reports/reports-home.tt | 26 ++++++--- .../prog/en/modules/help/reports/serials_stats.tt | 22 ++----- 15 files changed, 165 insertions(+), 225 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/acquisitions_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/acquisitions_stats.tt index 3740326..63a2f53 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/acquisitions_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/acquisitions_stats.tt @@ -2,12 +2,16 @@ <h1>Acquisitions Statistics</h1> -<p style="color: #990000">IMPORTANT: The Acquisitions 'Wizard' is designed to be a simple statistical snapshot,  In each wizard, you will choose a single category to represent 'row' and another to represent 'column'.</p> - <ul> - <li>Go to the 'Reports' module (usually under 'More' in your Global Nav)</li> - <li>Choose 'Acquisitions' under 'Statistics Wizards'</li> - <li>Enter in the information you'd like to see in your repor</li> - <li>Click 'Submit'</li> - <li>By changing the report from 'Count items' to 'Amount' you will see the total spent</li> - </ul> - </div> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +<p>Using the form provided, choose which value you would like to appear in the Column and which will appear in the Row.</p> + +<p>If you choose to output to the browser your results will print to the screen.</p> + +<p>You can also choose to export to a file that you can manipulate to your needs.</p> + +<p>When generating your report, note that you get to choose between counting or summing the values.</p> + +<p>Choosing amount will change your results to appear as the sum of the amounts spent.</p> + +<p><strong>See the full documentation for Acquisitions Statistics in the <a href="http://manual.koha-community.org/3.6/en/statsreports.html#acqstats">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/bor_issues_top.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/bor_issues_top.tt index a4e24f4..384844c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/bor_issues_top.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/bor_issues_top.tt @@ -1,16 +1,13 @@ [% INCLUDE 'help-top.inc' %] -<h1>Patrons with the most checkouts</h1> +<h1>Patrons With The Most Checkouts</h1> -<p>This guided report will show you which patrons have checked out the most items.</p> - <ul> - <li>Go to the 'Reports' module (usually under 'More' in your Global Nav)</li> - <li>Choose 'Patrons with the most checkouts' under 'Top Lists'</li> - <li>Choose any filters from the top section - <ul> - <li> - IMPORTANT: Choose something other than 'None' from the 'By' field to see results</li> - </ul></li> - <li>Once you have your fields fill in, click 'Submit'</li> - </ul> - </div> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +<p>This report will simply list the patrons who have the most checkouts.</p> + +<p>If you choose to output to the browser your results will print to the screen.</p> + +<p>You can also choose to export to a file that you can manipulate to your needs.</p> + +<p><strong>See the full documentation for the Patrons with the most Checkouts report in the <a href="http://manual.koha-community.org/3.6/en/statsreports.html#mostcheckouts">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/borrowers_out.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/borrowers_out.tt index 2bebbb9..13d88ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/borrowers_out.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/borrowers_out.tt @@ -1,11 +1,13 @@ [% INCLUDE 'help-top.inc' %] -<h1>Patrons who haven't checked out</h1> - -<p>This guided report will give you a snapshot of which (OR HOW MANY?) items have not been checked out at all. You can limit these items by branch</p> - <ul> - <li>Go to the 'Reports' module (usually under 'More' in your Global Nav)</li> - <li>Choose 'Patrons who haven't checked out' under 'Inactive'</li> - <li>If you do not choose any filters or limits, you will see all patrons who have not checked anything out of your library</li> - </ul> - </div> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +<h1>Patrons With No Checkouts</h1> + +<p>This report will list for you the patrons in your system who haven't checked any items out.</p> + +<p>If you choose to output to the browser your results will print to the screen.</p> + +<p>You can also choose to export to a file that you can manipulate to your needs.</p> + +<p><strong>See the full documentation for the Patrons with no Checkouts report in the <a href="http://manual.koha-community.org/3.6/en/statsreports.html#patnocheckouts">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/borrowers_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/borrowers_stats.tt index 460661b..eeeeca3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/borrowers_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/borrowers_stats.tt @@ -2,29 +2,13 @@ <h1>Patron Statistics</h1> -<p style="color: #990000">IMPORTANT: The Patron 'Wizard' is designed to be a simple statistical snapshot, In each wizard, you will choose a single category to represent 'row' and another to represent 'column'.</p> - <ul> - <li>Go to the 'Reports' module (usually under 'More' in your Global Nav)</li> - <li>Choose 'Patrons' under 'Statistics Wizards'</li> - <li>Use the radio button to choose a category for 'row' (In the case above, we've selected 'patron category' for the row - <ul> - <li>Use dropdowns to apply filters to this category</li> - </ul></li> - <li>Use the radio button to choose a category for 'column' (In the case above, we've selected 'branch' for the column) - <ul> - <li> - <ul> - <li>Use dropdowns to apply filters to this category</li> - </ul></li> - </ul></li> - <li>Options without radio buttons such as 'Patron status', 'Patron activity', and 'Date of Birth' are limits you can place on the report.</li> - <li style="background-color: #ffe599"> -TIP: To place no limits for a category, choose the blank field. When blank field is chosen all categories will be included in the statistical count.</li> - <li>Choose a method for 'outputting' (viewing) the report: Options are 'browser' or saving as a file viewable in a program like Excel.</li> - <li>Click 'Submit'</li> - <li>For each patron category (rows), there is a count given by branch. Each row and columns are also totaled</li> - </ul> - </div> +<p>Using the form provided, choose which value you would like to appear in the Column and which will appear in the Row.</p> + +<p>If you choose to output to the browser your results will print to the screen.</p> + +<p>Based on your selections, you may see some query information above your results table. You can also choose to export to a file that you can manipulate to your needs.</p> + +<p><strong>See the full documentation for Patron Statistics in the <a href="http://manual.koha-community.org/3.6/en/statsreports.html#patstats">manual</a> (online).</strong></p> [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/cat_issues_top.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/cat_issues_top.tt index f786c3e..90e956e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/cat_issues_top.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/cat_issues_top.tt @@ -1,17 +1,13 @@ [% INCLUDE 'help-top.inc' %] -<h1>Most -Circulated Items</h1> +<h1>Most Circulated Items</h1> -<p>This guided report will show you which patrons</p> +<p>This report will simply list the items that have the been checked out the most.</p> - <ul> - <li>Go to the 'Reports' module (usually under 'More' in your Global Nav)</li> - <li>Choose 'Most-Circulated Items' under 'Top Lists'</li> - <li>Choose any filters from the top section<br/> - <ul> - <li> - IMPORTANT: Choose something other than 'None' from the 'By' field to see results</li> - </ul></li> - <li>Once you have your fields filled in, click 'Submit'</li> - </ul> - </div> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +<p>If you choose to output to the browser your results will print to the screen.</p> + +<p>You can also choose to export to a file that you can manipulate to your needs.</p> + +<p><strong>See the full documentation for the Most Circulation Items report in the <a href="http://manual.koha-community.org/3.6/en/statsreports.html#mostcirculated">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/catalogue_out.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/catalogue_out.tt index 168d0c2..5152371 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/catalogue_out.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/catalogue_out.tt @@ -1,15 +1,13 @@ [% INCLUDE 'help-top.inc' %] -<h1>Items not checked out</h1> - -<p>This guided report will give you a snapshot of items have not been checked out at all. You can limit these items by branch</p> - - <ul> - <li>Go to the 'Reports' module (usually under 'More' in your Global Nav)</li> - <li>Choose 'Items not checked out' under 'Inactive'</li> - <li>If you do not choose any filters or limits, you will see all items that have not been checked out of your library</li> - <li>By choosing a limit you will change the output</li> - <li>Choose a limit of 'Library'</li> - <li>And your results will be sorted by Library code</li> - </ul> - </div> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +<h1>Items With No Checkouts</h1> + +<p>This report will list items in your collection that have never been checked out.</p> + +<p>If you choose to output to the browser your results will print to the screen.</p> + +<p>You can also choose to export to a file that you can manipulate to your needs.</p> + +<p><strong>See the full documentation for the Issues with no Checkouts report in the <a href="http://manual.koha-community.org/3.6/en/statsreports.html#itemnocheckouts">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/catalogue_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/catalogue_stats.tt index f2f14f6..946b23c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/catalogue_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/catalogue_stats.tt @@ -1,27 +1,14 @@ [% INCLUDE 'help-top.inc' %] -<h1> Catalog Statistics</h1> +<h1>Catalog Statistics</h1> -<p style="color: #990000">IMPORTANT: The Catalog 'Wizard' is designed to be a simple statistical snapshot. You will choose a single category to represent 'row' and another to represent 'column'.</p> +<p>Using the form provided, choose which value you would like to appear in the Column and which will appear in the Row.</p> - <ul> - <li>Go to the 'Reports' module (usually under 'More' in your Global Nav)</li> - <li>Choose 'Catalog' under 'Statistics Wizards'</li> - <li>Use the radio button to choose a category for 'row' (In the case above, we've selected 'patron category' for the row - <ul> - <li>Use dropdowns to apply filters to this category</li> - </ul></li> - </ul> - <ul> - <li>Use the radio button to choose a category for 'column' (In the case above, we've selected 'branch' for the column) - <ul> - <li>Use dropdowns to apply filters to this category</li> - </ul></li> - </ul> - <ul> - <li>Choose a method for 'outputting' (viewing) the report: Options are 'browser' or saving as a file viewable in a program like Excel.</li> - <li>Click 'Submit'</li> - </ul> +<p>If you choose to output to the browser your results will print to the screen.</p> + +<p>You can also choose to export to a file that you can manipulate to your needs.</p> + +<p><strong>See the full documentation for Catalog Statistics in the <a href="http://manual.koha-community.org/3.6/en/statsreports.html#catstats">manual</a> (online).</strong></p> [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/dictionary.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/dictionary.tt index efed210..137883c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/dictionary.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/dictionary.tt @@ -1,64 +1,23 @@ [% INCLUDE 'help-top.inc' %] -<h1>Reports Dictionary Help</h1> +<h1>Reports Dictionary</h1> -The dictionary provides a way that you can define custom criteria for reporting by combining existing criteria. +<p>The report dictionary is a way to pre-define common filters you'd like to apply to your reports. This is a good way to add in filters that the report wizard doesn't include by default. To add a new definition, or filter, click 'New Definition' on the Reports Dictionary page and follow the 4 step process.</p> -<h2>Adding A New Definition</h2> +<p>Step 1: Name the definition and provide a description if necessary</p> -<p><strong>Step 1: Name</strong></p> +<p>Step 2: Choose the module that the will be queried.</p> -<p>At this step you will need to fill out the following details:</p> +<p>Step 3: Choose columns to query from the tables presented.</p> -<ul> -<li>Definition Name: Short name that is used for display and selection</li> -<li>Definition Description: Used within the dictionary only to provide further detail about the definition</li> -</ul> +<p>Step 4: Choose the value(s) from the field(s). These will be automatically populated with options available in your database.</p> -<p><strong>Step 2: Area</strong></p> +<p>Confirm your selections to save the definition.</p> -<p>Now you will need to select the area that you are binding the definition to. </p> +<p>Your definitions will all appear on the Reports Dictionary page</p> -<p style="color: #990000">IMPORTANT: Definitions can only be bound to one area.</p> +<p>Then when generating reports on the module you created the value for you will see an option to limit by the definition at the bottom of the usual filters.</p> -<p style="background-color: #ffe599">TIP: If you wish to use a similar definition in say, Circulation and Patrons, you will need to create two definitions - one for each area</p> +<p><strong>See the full documentation for the Reports Dictionary in the <a href="http://manual.koha-community.org/3.6/en/reportdic.html">manual</a> (online).</strong></p> -<p><strong>Step 3: Columns</strong></p> - -<p>Now select the criteria that you wish to use to build your definition. </p> - -<ul> -<li>Click on the database column name and then press the 'add' button.</li> -<li>Once you have selected all your desired columns, press Next.</li> -</ul> - -<p style="background-color: #ffe599">TIP: Definitions can be deleted easily, and if you are still learning the structure of the Koha data, it may take a little while to sort out which fields you require. Some trial and error may be required</p> - -<p><strong>Step 4: Values</strong></p> - -<p>Now you need to select the values for each column that will make up your new criteria. There are different ways to define the values, based on the type of data in the column you have selected</p> - -<ul> -<li>Search String Matches For free text fields in that database, enter a string/phrase for the criteria to match on</li> -<li>Date For date fields you can either select:</li> -<ol><li>Date Range: enter values in both date fields</li> - <li>All Data Before A Given Date: enter a value in the XXX field only</li> - <li>All Data After A Given Date: enter a value in the XXX field only</li> -</ol> -<li>Select From Database Value For data that is given an authorized value in the Koha database, you the drop down list to select one value</li> -</ul> - -<p><strong>Step 5: Confirmation</strong></p> - -<p>You will be presented with a confirmation once you have finished step 4</p> - -<p>Click 'Save'</p> - -<h2>Using A Definition</h2> - -<p>Once you have created your new definition and it shows on in the Dictionary, you can use the definition for reporting.</p> - -<ul> -<li>When you go to create a new report, the criteria for the area you are reporting on will automatically show as limits in the Guided Reports wizard</li> -</ul> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/guided_reports.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/guided_reports.tt index 240a05a..f89e887 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/guided_reports.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/guided_reports.tt @@ -4,7 +4,6 @@ <p>If the report you need is not already available, the 'Guided Reports' Wizard will walk you through creating a custom report.</p> - <ul> <li>Go to the 'Reports' module (usually under 'More' in your Global Nav)</li> <li>Choose 'Guided Reports' under 'Guided Reports Wizard'</li> @@ -13,19 +12,28 @@ <p>Answer the 6 questions presented in order to create your report.</p> <p><strong>Step 1: Choose a Module to Report on</strong></p> + <ul> <li>Choose a Koha module to build a report on (patrons, circ, cataloging, etc)</li> <li>Click 'Next'</li> </ul> <p><strong>Step 2: Pick a Report Type</strong></p> + <ul><li style="color: #990000">IMPORTANT: Only Tabular should be chosen with this option</li></ul> + <p><strong>Step 3: Select Columns for Display</strong></p> + <p><strong>Step 4: Select Criteria to Limit</strong></p> + <ul><li>This is optional, if you don't want to limit results by any one field, just leave this section blank.</li></ul> + <p><strong>Step 5: Pick which columns to perform mathmatical functions on</strong></p> + <ul><li>This is optional, if you don't want to do any math on the results, just leave this section blank.</li></ul> + <p><strong>Step 6: Choose how you want the report ordered</strong></p> + <ul><li>This is optional, if you want the results to come out as they are in the table, just leave this section blank.</li></ul> <h1>Edit Reports</h1> @@ -34,18 +42,13 @@ <ul><li><em>Get there:</em> More > Reports > Guided Reports > Use Saved</li></ul> -<ul><li>To edit a report click 'Edit SQL' beside the report</li> -<li>A page with editable fields will open so that you can change the title, notes and SQL related to the report</li></ul> - +<ul> +<li>To edit a report click 'Edit SQL' beside the report</li> +<li>A page with editable fields will open so that you can change the title, notes and SQL related to the report</li> +</ul> <h1>Questions</h1> -<p><strong>Can I have reports run on a schedule?</strong></p> - -<p>Yes, you can use the Task Scheduler tool.</p> - -<ul><li><em>Get there:</em> More > Tools > Task Scheduler</li></ul> - <p><strong>Is there a repository for reports?</strong></p> <p>There is a page on the Koha Wiki: <a href="http://wiki.koha-community.org/wiki/SQL_Reports_Library" target="_new">http://wiki.koha-community.org/wiki/SQL_Reports_Library</a> with reports written by Koha libraries around the world.</p> @@ -55,14 +58,21 @@ <p><strong>Can I have run-time defined parameters?</strong></p> <p>Yes, you can: there is a specific syntax that Koha will understand as 'ask for values when running the report'. The syntax is <<Question to ask|authorised_value>>.</p> + <ul> <li>The << and >> are just delimiters. You must put << at the beginning and >> at the end of your parameter</li> <li>The <strong>Question to ask</strong> will be displayed on the left of the string to enter. <li>The <strong>authorised_value</strong> can be omitted if not applicable. If it contains an authorised value category, or <strong>branches</strong> or <strong>itemtype</strong> or <strong>categorycode</strong>, a list with the Koha authorised values will be displayed instead of a free field</li> </ul> + <p>Note that you can have more than one parameter in a given SQL</p> + <p>Note that entering nothing at run time won't probably work as you expect. It will be considered as "value empty" not as "ignore this parameter". For example entering nothing for : "title=<<Enter title>>" will display results with title='' (no title). If you want to have to have something not mandatory, use "title like <<Enter title>>" and enter a % at run time instead of nothing</p> + <p>Sample :</p> + <ul><li>SELECT surname,firstname FROM borrowers WHERE branchcode=<<Enter patrons library|branches>> AND surname like <<Enter filter for patron surname (% if none)>></li></ul> +<p><strong>See the full documentation for Custom Reports in the <a href="http://manual.koha-community.org/3.6/en/reports.html#customreports">manual</a> (online).</strong></p> + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/issues_avg_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/issues_avg_stats.tt index 03b126e..5b83f72 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/issues_avg_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/issues_avg_stats.tt @@ -1,12 +1,13 @@ [% INCLUDE 'help-top.inc' %] -<h1>Average loan time</h1> +<h1>Average Loan Time</h1> -<p>This report will show you how many items were checked out, by borrower (or 'patron') category</p> +<p>This report will list the average time items are out on loan based on the criteria you enter</p> - <ul> - <li>Go to the 'Reports' module (usually under 'More' in your Global Nav)</li> - <li>Choose 'Average loan time' under 'Other'</li> - <li>Choose one field to appear in the rows and another to appear in the column. If you choose either of the date fields remember to choose to show data by 'Day', 'Month', or 'Year'</li> - </ul> - </div> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +<p>If you choose to output to the browser your results will print to the screen.</p> + +<p>You can also choose to export to a file that you can manipulate to your needs.</p> + +<p><strong>See the full documentation for the Average Loan Time report in the <a href="http://manual.koha-community.org/3.6/en/statsreports.html#avloantime">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/issues_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/issues_stats.tt index b54f6f3..9a36808 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/issues_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/issues_stats.tt @@ -1,25 +1,24 @@ [% INCLUDE 'help-top.inc' %] -<h1> Circulation Statistics</h1> - -<p style="color: #990000">IMPORTANT: The Circulation 'Wizard' is designed to be a simple statistical snapshot. You will choose a single category to represent 'row' and another to represent 'column'.</p> - <ul> - <li>Go to the 'Reports' module (usually under 'More' in your Global Navigation)</li> - <li>Choose 'Circulation' under 'Statistics Wizards'</li> - <li>Select the information you want to display in rows by setting the 'Row' radio button next to that category</li> - <li>Select the information you want to display in columns by setting the 'Column' radio button next to that category.</li> - <li>You can limit, or Filter, your results by selecting a value from the pull down menu. For example, you could select a specific library or branch and set a time 'Period,' without needing to select those radio buttons.</li> - </ul> -<strong>Tips:</strong> - <ul> - <li>To get a complete picture of your monthly or daily circulation, you can run the report twice, once for 'Type' of 'Checkout' and again for 'Renewal.'</li> - <li>This report uses 'Period,' or date, filtering that allows you to limit to a month by simply selecting the first day of the first month through the first day of the next month. For example, 10/1 to 11/1 to find statistics for the month of October.</li> - <ul> - <li>To find daily statistics, set your date range.</br> Example: "I want circulation data starting with date XXX up to, but not including, date XXX."</li> - <li>For a whole month, an example range would be: 11/01/2009 to 12/01/2009</li> - <li>For a whole year, an example range would be: 01/01/2009 to 01/01/2010</li> - <li>For a single day, an example would be: 11/15/2009 to 11/16/2009 to find what circulated on the 15th</li> - </ul> - </ul> - </div> +<h1>Circulation Statistics</h1> + +<p>Using the form provided, choose which value you would like to appear in the Column and which will appear in the Row.</p> + +<p>If you choose to output to the browser your results will print to the screen.</p> + +<p>You can also choose to export to a file that you can manipulate to your needs.</p> + +<p style="background-color: #ffe599">Tip: To get a complete picture of your monthly or daily circulation, you can run the report twice, once for 'Type' of 'Checkout' and again for 'Renewal.'</p> + +<p>This report uses 'Period,' or date, filtering that allows you to limit to a month by simply selecting the first day of the first month through the first day of the next month. For example, 10/1 to 11/1 to find statistics for the month of October. + +<ul> + <li>To find daily statistics, set your date range.Example: "I want circulation data starting with date XXX up to, but not including, date XXX."</li> + <li>For a whole month, an example range would be: 11/01/2009 to 12/01/2009</li> + <li>For a whole year, an example range would be: 01/01/2009 to 01/01/2010</li> + <li>For a single day, an example would be: 11/15/2009 to 11/16/2009 to find what circulated on the 15th</li> +</ul> + +<p><strong>See the full documentation for Circulation Statistics in the <a href="http://manual.koha-community.org/3.6/en/statsreports.html#circstats">manual</a> (online).</strong></p> + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/itemslost.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/itemslost.tt index b632a45..425a31d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/itemslost.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/itemslost.tt @@ -14,4 +14,8 @@ <li>Choose a 'Lost Status' to search only for items that are assumed lost (long overdue), missing, or lost (or, leave this set to 'All' to see all lost items)</li> <li>Click 'Submit'</li> </ul> - </div> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file + </div> + +<p><strong>See the full documentation for the Lost Items report in the <a href="http://manual.koha-community.org/3.6/en/statsreports.html#lostreport">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/manager.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/manager.tt index e2e9e6d..37d686c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/manager.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/manager.tt @@ -2,11 +2,12 @@ <h1>Catalog by Item Type</h1> -<p>This one-step report will show you how many items of each item type are currently in your branch library or libraries.</p> - - <ul> - <li>Go to the 'Reports' module (usually under 'More' in your Global Nav)</li> - <li>Choose 'Catalog by Item Type' under 'Other'</li> - <li>Choose a branch (or choose the blank field at the top of the dropdown menu to choose all branches)</li> - <li>Click 'Submit'</li> - </ul>[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +<p>This report will list the total number of items of each item type per branch.</p> + +<p>If you choose to output to the browser your results will print to the screen.</p> + +<p>You can also choose to export to a file that you can manipulate to your needs.</p> + +<p><strong>See the full documentation for the Catalog by Item Type report in the <a href="http://manual.koha-community.org/3.6/en/statsreports.html#catbyitem">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/reports-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/reports-home.tt index 7ebc985..a20a122 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/reports-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/reports-home.tt @@ -2,13 +2,21 @@ <h1>Reports</h1> -<h2>What Reports are there in Koha?</h2> - -<p>Koha comes with a number of predefined (or "canned") reports, along with two report builder engines.</p> -<p><strong>Pre-defined Reports</strong></p> -<p>There are number of predefined reports in Koha. Check the Circulation module for additional Circulation specific reports.</p> -<p><strong>Statistics Wizards</strong></p> -<p>The statistics wizards provide a way to build simple reports for each module. The reports produced can either be viewed on screen or downloaded for opening in a spreadsheet program or text editor.</p> -<p><strong>Guided Reports Wizard</strong></p> -<p>The Guided Reports Wizard helps you build reports using all the fields in the database for each module. The reports can then be saved and run using the scheduler. </p>[% INCLUDE 'help-bottom.inc' %] +<p>Koha's reporting module allows you to gather data from your system. There are two main types of reports: +<ul> + <li>Custom Reports +<ul> + <li>Koha's data is stored in a MySQL database which means that librarians can generate nearly any report they would like by either using the Guided Reports Wizard or writing their own SQL query.</li> +</ul> +</li> + <li>Statistical Reports +<ul> + <li>Statistic reports will show you counts and sums. These reports are all about numbers and statistics, for reports that return more detailed data, use the Guided Report Wizard.</li> +</ul> +</li> +</ul> + +<p><strong>See the full documentation for Reports in the <a href="http://manual.koha-community.org/3.6/en/reports.html">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/serials_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/serials_stats.tt index 79a941d..cba7247 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/serials_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/serials_stats.tt @@ -2,22 +2,12 @@ <h1>Serials Statistics</h1> -<p style="color: #990000">IMPORTANT: The Serials 'Wizard' is designed to be a simple -statistical snapshot. -</p> -<ul> - <li> - Go to the 'Reports' module (usually under 'More' in your Global Nav) - </li> - <li> - Choose 'Serials' under 'Statistics Wizards'</li> - <li>Choose - your vendor and branch (or leave them both set to 'Any' to get - information on all subscriptions) and whether to include expired - subscriptions</li> - <li>Your results will appear as a list of subscriptions - </li> -</ul> +<p>Using the form provided, choose how you would like to list the serials in your system.</p> +<p>If you choose to output to the browser your results will print to the screen.</p> + +<p>You can also choose to export to a file that you can manipulate to your needs.</p> + +<p><strong>See the full documentation for Serials Statistics in the <a href="http://manual.koha-community.org/3.6/en/statsreports.html#serialstats">manual</a> (online).</strong></p> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From nengard at bywatersolutions.com Fri Oct 7 19:32:19 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Fri, 7 Oct 2011 13:32:19 -0400 Subject: [Koha-patches] [PATCH] Bug 6966 Holds Help Message-ID: <1318008739-2051-1-git-send-email-nengard@bywatersolutions.com> Update file in the reserve folder. --- .../prog/en/modules/help/reserve/request.tt | 106 +++++++++++++------ 1 files changed, 72 insertions(+), 34 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt index a6cc1ff..3d7381b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt @@ -1,37 +1,75 @@ [% INCLUDE 'help-top.inc' %] <h1>Holds</h1> - <ul> - <li>Enter the barcode or partial name for the patron you'd like to hold the book for.</li> - <li>You will be brought to a page where you can alter (if necessary) and/or confirm the hold - <ul> - <li> - <span style="background-color: #ffe599"> -TIP: Note that in this case an error message appears notifying the circulation librarians that the patron might want to pick the book up at his/her home branch.</span></li> - <li>From here you can pick to either hold the next available item or a particular item - <ul> - <li>Item level holds are available by checking the box next to a particular item</li> - <li>An item is available for an item level hold if<br/> - <ul> - <li>it is not lost AND,</li> - <li>it is not marked not for loan AND,</li> - <li>it is not withdrawn AND,</li> - <li>it is not damaged (unless the AllowHoldsOnDamagedItems system preference is ON), AND</li> - <li>it is not on loan (unless the AllowOnShelfHolds system preference is ON)</li> - </ul></li> - <li> - <span style="background-color: #ffe599"> -TIP: If independent branches is on and the canreservefromotherbranches system preference is OFF, a staff operator is prevented from placing an item-level hold request on an item from a different branch</span></li> - </ul></li> - <li>To confirm the hold, click 'Place Hold'</li> - </ul></li> - </ul> - - -<h3>Reordering holds</h3> - - <ul> - <li>Hold priority can be altered by viewing the holds for the title</li> - <li>To view holds on a title, click the 'Holds' tab on the left</li> - <li>By changing the priority number a patron can be moved up or down on the list of holds</li> - </ul>[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file + +<h2>Placing Holds in Staff Client</h2> + +<p>There are several ways to place holds from the staff client. The most obvious is using the 'Place Hold' button at the top of any bibliographic record.</p> + +<p>You can also click the smaller 'Place Hold' link found at the top of your catalog search results, or the 'Holds' link found below each result.</p> + +<p>You will be asked to search for a patron by barcode or any part of their name to start the hold process.</p> + +<p>If you'd like to search for the patron first and then the bib record for the hold, you can open the patron record and click on the 'Search to Hold' button at the top of the patron record.</p> + +<p>After clicking the button you will be brought to the catalog search page where you can find the book(s) you want to place a hold on. Under each title on the results you'll see an option to 'Hold for Patron Name.'</p> + +<p>If you want to place a hold on multiple items, simply check the boxes to the left of them and click the arrow to the right of the 'Place Hold' button.</p> + +<p>Depending on how many items you choose to place a hold on at once you will be see a different place hold form. If you are placing a hold on one bibliographic record you will see a list of all of the items you can place a hold on.</p> + +<ul> + <li>Enter any notes that might apply to this hold</li> + <li>Choose the library where the patron will pick up the item</li> + <li>If the patron wants the hold to start on a date other than today, enter that in the 'Hold starts on date' field +<ul> + <li>This option will only appear if the AllowHoldDateInFuture system preference is set to 'Allow'</li> +</ul> +</li> + <li>If the patron has specified that they don't want the item after a certain date, or if you have limits on hold lengths, you can enter an expiration date for the hold in the 'Hold expires on date' +<ul> + <li>To have expired holds canceled automatically you will need to have the Expired Holds cron job set to run on a regular basis.</li> +</ul> +</li> + <li>Next choose if you want to place a hold on the next available item or a specific item by clicking the radio button next to an individual item.</li> +</ul> + +<p>If you're placing a hold on multiple items you will be presented with the next available option for all titles. If no items are available for hold it will say so on the confirmation screen.</p> + +<h2>Managing Holds</h2> + +<p>Holds can be altered and canceled from the Holds tab found on the left of the bibliographic record.</p> + +<p>From the list of holds you can change the order of the holds, the pickup location and/or cancel the hold.</p> + +<p>Note: Depending on how you have your HidePatronName system preference set the list may show patron names instead of card numbers in the Patron column like in the image above.</p> + +<p>To rearrange or delete holds, simply make a selection from the 'Priority' pull down or click the arrows to the right of the priority pull down.</p> + +<p>To delete or cancel a hold, choose 'del' from the menu or click the red 'X' to the right of the hold line.</p> + +<p>Clicking the down arrow to the right of the hold will stick the hold at the bottom of the list even if more requests are made.</p> + +<p>For example, your library has home-bound patrons that are allowed to keep books out for months at a time. It would not be fair to other patrons if a home-bound patron were able to check out a brand new book and keep it for months. For this reason, the home-bound patron's hold request would stay at the bottom of the queue until everyone else who wanted to read that book has already done so.</p> + +<p>Once you have made your changes, click the 'Update hold(s)' button and your changes will be saved.</p> + +<h2>Receiving Holds</h2> + +<p>When items that are on hold are checked in or out the system will remind the circulation librarian that the item is on hold and offer them options for managing the hold.</p> + +<p>When you check in an item that has a hold on it the system will ask you to either confirm and transfer the item or just confirm the hold</p> + +<p>Clicking the Confirm button will mark the item as on hold for the patron. If the item needs to be transferred the item will also be marked as in transit to the proper branch. Clicking 'Ignore' will retain the hold, but allow you to check the item out to another patron. Choosing to confirm and print will present you with a printable page that you can slip inside the book with the necessary hold and/or transfer information.</p> + +<p>Once confirmed the hold will show on the patron record and on the checkout screen under the 'Hold' tab.</p> + +<p>The item record will also show that the item is on hold.</p> + +<p>In some cases a patron may come in to pick up a hold for their partner (or someone else in their household). In this case you want to make sure that the hold is cancelled when you check the item out to someone else. When trying to check out an item that is already waiting for someone else you will be presented with a warning message.</p> + +<p>From here you can check the item out to the patron at the desk and cancel the hold for the patron.</p> + +<p><strong>See the full documentation for Holds in the <a href="http://manual.koha-community.org/3.6/en/holds.html">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From nengard at bywatersolutions.com Fri Oct 7 19:35:18 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Fri, 7 Oct 2011 13:35:18 -0400 Subject: [Koha-patches] [PATCH] Bug 6966 Comments Help Message-ID: <1318008918-2116-1-git-send-email-nengard@bywatersolutions.com> Updates the help file in the reviews folder. --- .../prog/en/modules/help/reviews/reviewswaiting.tt | 27 ++++--------------- 1 files changed, 6 insertions(+), 21 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reviews/reviewswaiting.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reviews/reviewswaiting.tt index 2f1bcd4..36a09d8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reviews/reviewswaiting.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reviews/reviewswaiting.tt @@ -1,26 +1,11 @@ [% INCLUDE 'help-top.inc' %] -<h1>Comments/Reviews</h1> - <ul> - <li>Go to the 'Tools' module (usually under 'More' in your Global Nav)</li> - <li>Choose 'Comments'</li> - <li>From this menu you will see all comments/reviews awaiting approval. <br/> - <ul> - <li>If there are no comments, the page will inform you of such</li> - </ul></li> - <li>To approve a comment click 'Approve'</li> - <li>To delete a comment click 'Delete'</li> - <li>Once a comment has been approved, it will appear in the OPAC under the 'Comments' tab</li> - </ul> +<h1>Comments</h1> -<h2>Can I turn off comment moderation?</h2> -<p>At this time, this is not a feature of Koha. All comments go through moderation.</p> -<h2>How do I turn on/off Comments in my OPAC?</h2> -<p>This feature is under Global System Preferences:</p> - <ul> - <li>Go to the 'Administration' module (usually under 'More' in your Global Nav)</li> - <li>Click on 'Global System preferences' and then choose the 'OPAC Features' tab</li> - <li>From here you can toggle the 'reviewson' feature which controls comments within your OPAC</li> - </ul> +<p>All comments added by patrons via the OPAC to bibliographic records require moderation by the librarians. To moderate comments simply click 'Approve' or 'Delete' to the right of the comments awaiting moderation.</p> + +<p>If there are no comments to moderate you will see a message saying just that</p> + +<p><strong>See the full documentation for Comments in the <a href="http://manual.koha-community.org/3.6/en/comments.html">manual</a> (online).</strong></p> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From nengard at bywatersolutions.com Fri Oct 7 20:01:38 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Fri, 7 Oct 2011 14:01:38 -0400 Subject: [Koha-patches] [PATCH] Bug 6966 Update Serials Help Message-ID: <1318010498-2242-1-git-send-email-nengard@bywatersolutions.com> This patch updates the serials help files. --- .../en/modules/help/serials/checkexpiration.tt | 24 +-- .../prog/en/modules/help/serials/claims.tt | 27 ++-- .../en/modules/help/serials/serials-collection.tt | 2 + .../prog/en/modules/help/serials/serials-edit.tt | 18 ++- .../prog/en/modules/help/serials/serials-home.tt | 4 +- .../en/modules/help/serials/subscription-add.tt | 187 ++++++++------------ .../en/modules/help/serials/subscription-detail.tt | 2 + 7 files changed, 113 insertions(+), 151 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/checkexpiration.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/checkexpiration.tt index d521711..ba9704d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/checkexpiration.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/checkexpiration.tt @@ -1,19 +1,13 @@ [% INCLUDE 'help-top.inc' %] -<h1>Check Expiration</h1> +<h1>Check Serial Expiration</h1> -<p>This tool will let you search for all serials that will expire before a specific date. This is a handy tool when it comes time to budget for new serials.</p> - -<h3>Searching</h3> +<p>When adding serials you enter a subscription length, using the check expiration tool you can see when your subscriptions are about to expire. To use the tool click the link to 'Check expiration' on the serials menu.</p> - <ul> - <li>Enter in your search criteria - <ul> - <li> - <span style="background-color: #ffe599"> -TIP: Only expiration date is required</span></li> - </ul></li> - <li>Your results will appear below the search boxes</li> - <li>From here you can click on the serial title and edit the record with new subscription information</li> - </ul> - </div> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +<p>In the form that appears you need to enter at least a date to search by.</p> + +<p>In your results you will see all subscriptions that will expire before the date you entered. From there you can choose to view the subscription further or renew it in one click.</P> + +<p><strong>See the full documentation for Checking Serial Expiration in the <a href="http://manual.koha-community.org/3.6/en/serialexpiration.html">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/claims.tt index 615a170..b27f9b4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/claims.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/claims.tt @@ -2,16 +2,17 @@ <h1>Serials Claims</h1> -<h2>What are Claims?</h2> -<p>Claims are notices that you send when an issue that was expected has not been received by the library.</p> - -<h2>How to lodge a Claim?</h2> -<p>Make a selection from the drop down list. The "All Vendors" count gives you a count of the total number of current item claims across all vendors.</p> -<p>There are two ways to lodge a claim with the vendor:</p> - <ol> - <li>Using a Letter defined in Notices. Note that you will need to set up the notice.</li> - <li>Exporting the claims information. This downloads a CSV file to your local machine with all the claim data ready for additional formatting before sending to the vendor.</li> - </ol> - -<h2>How to resolve a Claim?</h2> -<p>The claim will be resolved once received status has changed. Search for the Subscription and then click "Serial receive" to locate the issue and change it's status.</p>[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +<p>Koha can send email messages to your serial vendors if you have late issues. To the left of the main serials page there is a link to 'Claims'</p> + +<p>The links to claims also appears to the left of the subscription detail page</p> + +<p>If you don't have a claim notice defined yet you will see a warning message that you need to first define a notice.</p> + +<p>Clicking 'Claims' will open a report that will ask you to choose from your various serial vendors to generate claims for late issues.</p> + +<p>From the list of late issues you can choose which ones you want to send a claim email to by clicking the checkbox to the left of late issue, choosing the notice template to use and clicking the 'Send notification' button.</p> + +<p><strong>See the full documentation for Serial Claims in the <a href="http://manual.koha-community.org/3.6/en/serialclaims.html">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/serials-collection.tt index de22c6b..2160325 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/serials-collection.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/serials-collection.tt @@ -10,4 +10,6 @@ <p>If you are adding multiple issues at once or if the latest expected issue is late, you can click the 'Generate Next' button to generate the next issue based on the subscription pattern.</p> +<p><strong>See the full documentation for Serials in the <a href="http://manual.koha-community.org/3.6/en/serials.html">manual</a> (online).</strong></p> + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/serials-edit.tt index aef069f..f2d3464 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/serials-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/serials-edit.tt @@ -2,7 +2,7 @@ <h1>Recieving Serials</h1> -<p>Issues can be marked as received from several locations. To find a subscription, use the search box at the top of the Serials page to search for the serial you'd like to receive issues for.</p> +<p>Issues can be marked as received from several locations. To find a subscription, use the search box at the top of the Serials page to search for the serial you'd like to receive issues for</p> <p>From the search results you can click the 'Serial Receive' link or you can click on the subscription title and then click the 'Receive' button.</p> @@ -13,11 +13,17 @@ <p>All three of these options will open up the issue receive form:</p> <ul> -<li>Choose 'Arrived' from the status pull down to mark a serial as received.</li> -<li>If you have decided to have an item record created for each issue an item add form will appear</li> -<li>If your issue has a supplemental issue with it, fill in the Supplemental Issue information.</li> -<li>If you have decided to have an item record created for each issue an item add form will appear for your supplement and for the issue itself</li> -<li>Once you have entered your info you can click 'Save'</li> + <li>Choose 'Arrived' from the status pull down to mark a serial as received.</li> + <li>If you have decided to have an item record created for each issue an item add form will appear</li> + <li>If your issue has a supplemental issue with it, fill in the Supplemental Issue information.</li> + <li>If you have decided to have an item record created for each issue an item add form will appear for your supplement and for the issue itself</li> + <li>Once you have entered your info you can click 'Save'</li> </ul> +<p>If you are receiving multiple issues at once, or have marked an issue as 'Late' or 'Missing' there you can click the 'Generate Next' button below the list of issues.</p> + +<p>Clicking this button will generate the next issue for you and mark the previously expected issue as 'Late' automatically. You can then check the 'Edit' box to the right of each issue and edit the status on multiple issues at once.</p> + +<p><strong>See the full documentation for Receiving a Serial in the <a href="http://manual.koha-community.org/3.6/en/receiveissues.html">manual</a> (online).</strong></p> + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/serials-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/serials-home.tt index f36da21..c5a794d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/serials-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/serials-home.tt @@ -4,7 +4,9 @@ <p>The serials module assists in managing your serial subscriptions (journals, magazines, and newspapers).</p> -<p>You can search for existing subscriptions by using the search box at the top of the page. You can search for any part of the serial title or ISSN. </p> +<p>You can search for existing subscriptions by using the search box at the top of the page. You can search for any part of the serial title or ISSN.</p> + +<p><strong>See the full documentation for Serials in the <a href="http://manual.koha-community.org/3.6/en/serials.html">manual</a> (online).</strong></p> [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/subscription-add.tt index dfa1547a..ac3d337 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/subscription-add.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/subscription-add.tt @@ -2,133 +2,88 @@ <h1>Add A New Serial Subscription</h1> -<p>Before you can set up a new subscription, you will need to have set up:</p> - <ul> - <li>a Vendor in Acquisitions who supplies the subscription</li> - <li>a Biblio with no items to which you can add the subscription to.</li> - </ul> . -<h2>How do I set up a new subscription?</h2> -<p>There are two sections to this form:</p> +<p>Subscriptions can be added by clicking the 'New' button on any bibliographic record or by visiting the Serials module and clicking 'New Subscription'</p> -<h3>1 ) General informations (subscription details)</h3> -<h4>Step 1: Search for a Supplier</h4> +<p>If you are entering a new subscription from the Serials module you will be presented with a blank form (if creating new from a bibliographic record the form will include the bib info).</p> -<p>If you want to claim any issues then you need to elect a supplier at this point.</p> -<h4>Step 2: Search for Biblio</h4> - -<p>It should find the item that was just set up in Acquisitions. Note If you have not yet set this up in Acquisitions, click Create Biblio. It will take you back to Acquisitions Order Form.</p> -<h4>Step 3: Fill out other details in the Subscription Information box.</h4> -<p>You have to choose whether you will create an item record when receiving the issue. Be careful, default choice is DO NO CREATE</p> -<p>Other details include the Location, Call Number, Home branch for the Serial and any notes.</p> -<p>Grace period : number of days before a late issue has status from expected to late automatically set and the next expected issue is generated.</p> -<p>Select the Patron Alert: you will need to choose a Notice that can be sent to patrons when a new issue arrives. To edit this notice, go to Tools > Notices.</p> -<p>Number of issues to display : in opac in Subscription (normal view), in staff in normal view</p> - -<h3>2) Serials planning</h3> -<p>This is a critical component of managing serials. In order to make the system predict the next issue the user must fill out each of these fields. Once completed it will populate the Numbering Calculation box below.</p> - -<p>Manual history : check this box if you want to fill receive history information manually in subscription summary</p> - -<h4>Step 1: First Issue publication date</h4> -<p>Displays a calendar – choose the expected date of arrival in the library. It is the publication date of the first issue you will receive with Koha. It is not necessarily the publication date of the first issue of your collection.</p> -<h4>Step 2: Frequency</h4> - -<p>Use the drop down list to select the main frequency patterns.</p> -<h4>Step 3: Numbering Pattern</h4> - -<p>Drop down list of the main numbering patterns:</p> <ul> - <li>Number</li> - <li>Volume, Number, Issue</li> - <li>Volume, Number</li> - <li>Volume, Issue</li> - <li>Number, Issue</li> - <li>Seasonal only</li> - <li>Year/Number<li> - <li>None of the above</li> - </ul> -<p>Depending on your choice, a box appears to enter more information on numbering :</p> + <li>'Librarian' field will show the logged in librarian's username</li> + <li>'Vendor' can be found by either searching vendors entered via the Acquisitions module or entering the vendor ID number <ul> - <li>Starting with : the volume, number, season... of the first issue to arrive</li> - <li>Issues expected (only for Number pattern) : total number of issues expected</li> - <li>Rollover at : the number of issues received before the numbering returns to beginning ; set empty for no rollover</li> + <li>Vendor information is not required</li> + <li>In order to claim missing and late issues you need to enter vendor information</li> </ul> - <p>Example for "Rollover at" for "Volume, Number" pattern </p> +</li> + <li>'Biblio' is the MARC record you'd like to link this subscription to <ul> - <li>Volume : starting with : 45, no rollover : volume increases continuously</li> - <li>Number : starting with 1, rollover at 12 : when 12 issues are received, Number returns to 1</li> + <li>This can be done by searching for an existing record by clicking on the 'Search for Biblio' link below the boxes or by entering the bib number for a record in the first box. Only if you search with the field between the parenthesis.</li> </ul> - - -<p>If you choose “none of the above” this will bring up a Numbering Calculation formula at the bottom of the screen.</p> - - -<h4>Step 4: Fill out the Subscription length box</h4> -<p>Indicate the expected length of time that this serial will be subscribed to.</p> - -<p> You have to indicate the subscription start date. It may be different from the First issue publication date entered above.<p> -<p> Example : for periodicity 1/3 months, you may have subscription start date 2009-01-01 and First issue publication date 2009-03-15<p> - -<p>Subscription length : this sets up the expiry date in the system and also sets up an Alert a month before expected expiry.</p> -<p>Subscription end date : calculated from subscription start date and length. But you can add / modify subscription end date, for instance if subscription stops before the expiry planned date</p> - -<h4>Step 5: Numbering formula</h4> - -<p>If a choice has been made in the Numbering Pattern section then the Numbering Calculation will automatically be filled out and presented in this section. It is possible to modify text in it, but don't modify {X}, {Y}, {Z}. However, if the Numbering Pattern is “None of the above” then a formula will be presented and the user must fill this out.</p> -<p>The "numbering formula" can be filled with any text and/or numbers. Three special tokens {X}, {Y} and {Z} can be used to define the calculation formula. This allows you to define patterns not possible with the Numbering Pattern drop downs.</p> -<p>Example : Number {X}, {Y} quarter, {Z}, where {Z} means year</p> - -<p>See below Advanced pattern</p> - -<h3>3) Test prediction pattern</h3> -<p>Choosing Test prediction pattern allows you to see exceptions found by the system (e.g Item arrives monthly but only 10 issues in the year). Set the rollover to the max number of issues expected in the year. </p> -<p> When irregularities are detected, you can choose date(s) when you won't receive an issue. (use Shift + click, or CTRL + click to select several dates)</p> - - -<h3>4) Add Subscription</h3> - -<p>Once that is filled out then you see the completed details page. If there is a mistake you can go back and Edit the details.</p> -<p>Next step - Receive issues (see online help on Receive Issues page)</p> - -<h2>Advanced Pattern : how does planning work</h2> - - - <ul> - <li>Add : how much add to number or volume..., (usually =1)</li> - <li>once every : every x received issues (ex : 12 for a volume number that increases every 12 issues ; 1 for number increasing for each issue)</li> - <li>When more than : value after which the number returns to a certain value A ; set 9999999 for continuous numbering</li> - <li>inner counter : number of issues that Koha must take into account to calculate when value changes. If you begin with first issue of the year write nothing or 0</li> - <li>Set back to : A</li> - <li>Begins with : initial value of number, volume, ...</li> - </ul> - <p>Example : monthly subscription, start date april 2009, lenght 12 months, first publication date <b>april 2009</b>, numbering formula vol {X} no {Y} year {Z}</p> - <p>numbering for {X}</p> +</li> + <li>Next you can choose whether a new item is created when receiving an issue</li> + <li>'Location' is for the shelving location</li> + <li>'Call Number' is for your item's call number prefix</li> + <li>'Library' is the branch that owns this subscription. +<ul> + <li>If more than one library subscribes to this serial you will need to create a subscription for each library</li> + <li>This can be done easily by using the 'Edit as New (Duplicate)' option found on the subscription information page and changing only the 'Library' field</li> +</ul> +</li> + <li>The 'Grace Period' is the number of days before an issue is automatically moved from 'expected' status to 'waiting' and how many days before an issue is automatically moved from 'waiting' status to 'late'</li> + <li>Use the 'Public Note' for any notes you would like to appear in the OPAC for the patrons</li> + <li>'Nonpublic Note' should be used for notes that are only visible to the librarians via the staff client</li> + <li>To set up a routing list for serials, choose 'Routing List' from the 'Patron notification' field. +<ul> + <li>For this option to appear you need to make sure that you have a Routing List notice set up in the Notices Tool</li> + <li>Learn more about Routing Lists later in this manual</li> +</ul> +</li> + <li>The Staff and OPAC Display options allow you to control how many issues appear by default on bibliographic records in the Staff Client and the OPAC +<ul> + <li>If no values are entered in these fields, they will use the OPACSerialIssueDisplayCount and StaffSerialIssueDisplayCount system preference values</li> +</ul> +</li> + <li>In 'First issue publication date' you want to enter the date of the issue you have in your hand, the date from which the prediction pattern will start</li> + <li>There are several pre-defined options for the 'Frequency' of publication +<ul> + <li>Without periodicy: some very specific (usually high level science journals) don't have a true periodicity. When you subscribe to the title, you subscribe for 6 issues, which can arrive in 1 year... or 2... There is no regularity or known schedule.</li> + <li>Unknown select this if none of the other choices are relevant</li> + <li>Irregular: The journal is not "regular" but has a periodicity. You know that it comes out on January, then in October and December, it is irregular, but you know when it's going to arrive.</li> + <li>2/day: Twice daily</li> + <li>1/day: Daily</li> + <li>3/week: Three times a week</li> + <li>1/week: Weekly</li> + <li>1/ 2 weeks: Twice monthly (fortnightly)</li> + <li>1/ 3 weeks: Tri-weekly</li> + <li>1/month: Monthly</li> + <li>1/ 2 months (6/year): Bi-monthly</li> + <li>1/ 3 months (1/quarter): Quarterly</li> + <li>1/quarter (seasonal) : Quarterly related to seasons (ie. Summer, Autumn, Winter, Spring)</li> + <li>2/year: Half yearly</li> + <li>1/year: Annual</li> + <li>1/ 2 years: Bi-annual</li> +</ul> +</li> + <li>Checking the 'Manual history' box will allow you to enter serials outside the prediction pattern.</li> + <li>'Numbering pattern' will help you determine how the numbers are printed for each issue <ul> - <li>Add : 1</li> - <li>once every : 12</li> - <li>When more than : 9999999 (value increases continuously)</li> - <li>Set back to : </li> - <li>inner counter : 3 (you must take into account the three first months of the year, otherwise volume value will increase after 12 received issues from april 2009, e.g. in april 2010 instead of january 2010)</li> - <li>Begins with : 45</li> - </ul> - <p>numbering for {Y}</p> + <li>Start with the numbering on the issue you have in hand, the numbering that matches the date you entered in the 'First issue publication' field</li> + <li>If you have chosen any 'Numbering Format' other than 'Number' in the 'Rollover at' field, enter the last issue number before the volume number changes <ul> - <li>Add : 1</li> - <li>once every : 1</li> - <li>When more than : 12 (the number after no 12 will be no 1)</li> - <li>Set back to : 1</li> - <li>inner counter : 3 </li> - <li>Begins with : 4</li> + <li>If you chose the 'Number' Numbering Format you will see 'issues expected' in which you will enter the total number of issues you expect to receive.</li> +</ul> +</li> + <li>You can choose to create your own numbering pattern by choosing 'None of the above' and clicking the 'Show/Hide Advanced Pattern' button at the bottom of the form</li> </ul> - <p>numbering for {Z}</p> - <ul> - <li>Add : 1</li> - <li>once every : 12</li> - <li>When more than : 99999999</li> - <li>Set back to : </li> - <li>inner counter : 3 (you must take into account the three first months of the year, otherwise year will change after 12 received issues from april 2009, e.g. in april instead of january 2010)</li> - <li>Begins with : 2009</li> +</li> + <li>'Subscription start date' is the date at which the subscription begins. This is used for setting up renewal alerts</li> + <li>'Subscription length' is the number of issues or months in the subscription. This is also used for setting up renewal alerts</li> + <li>'Subscription end date' should only be entered for subscriptions that have ended (if you're entering in a backlog of serials)</li> + <li>The 'Numbering formula' is editable to match the way you'd like your numbering to print on the item record and subscription information pages</li> </ul> +<p>Click 'Save Subscription' to save the information you have entered.</p> + +<p><strong>See the full documentation for Adding a Subscription in the <a href="http://manual.koha-community.org/3.6/en/serials.html#newsubscription">manual</a> (online).</strong></p> + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/subscription-detail.tt index 4540add..7d23d60 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/subscription-detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/subscription-detail.tt @@ -6,4 +6,6 @@ <p>From here you can edit your subscription, renew it and/or recieve issues.</p> +<p><strong>See the full documentation for Serials in the <a href="http://manual.koha-community.org/3.6/en/serials.html">manual</a> (online).</strong></p> + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From nengard at bywatersolutions.com Fri Oct 7 20:05:19 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Fri, 7 Oct 2011 14:05:19 -0400 Subject: [Koha-patches] [PATCH] Bug 6966 add missing routing lists help Message-ID: <1318010719-2311-1-git-send-email-nengard@bywatersolutions.com> This patch adds the missing routing list help file to the serials folder. --- .../prog/en/modules/help/serials/routing.tt | 21 ++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/routing.tt diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/routing.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/routing.tt new file mode 100644 index 0000000..7faf405 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/serials/routing.tt @@ -0,0 +1,21 @@ +[% INCLUDE 'help-top.inc' %] + +<h1>Routing Lists</h1> + +<p>A routing list is a list of people who receive the serial before it goes to the shelf. When setting up your serial subscription you want to be sure to pick 'Routing List' from the 'Patron Notification' pull down.</p> + +<p>When on the subscription page you will see a link to the left that reads 'Create Routing List.'</p> + +<p>Clicking that link will bring you to the menu to add a new routing list.</p> + +<p>From here you want to click 'Add recipients' in order to add people to the routing list. In the menu that appears you can filter patrons by part of their name, their library and/or patron category.</p> + +<p>Clicking 'Add' to the right of each name will add them to the routing list. When you have chosen all of the people for the list, click the 'Close' link to be redirected to the routing list.</p> + +<p>If the list looks the way you expect it to, then click 'Save'. Next you will be brought to a preview of the routing list. To print the list click 'Save and preview routing slip.' This will open a printable version of the list.</p> + +<p>If RoutingListAddReserves is set to on then patrons listed in the routing list will automatically be added to the holds list for the issue.</p> + +<p><strong>See the full documentation for Routing Lists in the <a href="http://manual.koha-community.org/3.6/en/routinglist.html">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From nengard at bywatersolutions.com Fri Oct 7 20:12:22 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Fri, 7 Oct 2011 14:12:22 -0400 Subject: [Koha-patches] [PATCH] Bug 6966 Suggestion Help Files Message-ID: <1318011142-2378-1-git-send-email-nengard@bywatersolutions.com> This patch updates the suggestion help file. --- .../prog/en/modules/help/suggestion/suggestion.tt | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/suggestion/suggestion.tt index c4ea16e..346ee2b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/suggestion/suggestion.tt @@ -14,11 +14,21 @@ <p>When reviewing 'Pending' suggestions you can choose to check the box next to the item(s) you want to approve/reject and then choose the status and reason for your selection. You can also choose to completely delete the suggestion by checking the 'Delete selected' box.</p> +<p>Another option for libraries with long lists of suggestions is to approve or reject suggestions one by one by clicking on the title of the suggestion to open a suggestion editing page.</p> + +<p>From this form you can make edits to the suggestion (adding more details or updating incorrect information provided by the patron). You can also choose to accept or reject the suggestion on an individual basis.</p> + +<ul> + <li>Choosing to mark a request as 'Asked' will move the request back to the 'Pending' tab.</li> +</ul> + <p>Reasons for accepting and rejecting suggestions are defined by the SUGGEST authorized value.</p> <p>If you choose 'Others...' as your reason you will be prompted to enter your reason in a text box. Clicking 'Cancel' to the right of the box will bring back the pull down menu with authorized reasons.</p> <p>Once you have clicked 'Submit' the suggestion will be moved to the matching tab. The status will also be updated on the patron's account in the OPAC and an email notice will be sent to the patron using the template that matches the status you have chosen.</p> +<p><strong>See the full documentation for Purchase Suggestions in the <a href="http://manual.koha-community.org/3.6/en/managesuggest.html">manual</a> (online).</strong></p> + [% INCLUDE 'help-bottom.inc' %] -- 1.7.2.3 From nengard at bywatersolutions.com Fri Oct 7 20:15:17 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Fri, 7 Oct 2011 14:15:17 -0400 Subject: [Koha-patches] [PATCH] Bug 6966 Tag help file Message-ID: <1318011317-2451-1-git-send-email-nengard@bywatersolutions.com> This patch updates the tag moderation help file. --- .../prog/en/modules/help/tags/review.tt | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tags/review.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tags/review.tt index 3e84b84..653c262 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tags/review.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tags/review.tt @@ -6,14 +6,18 @@ <p>When first visiting the tool, you will be presented with a list of tags that are pending approval or rejection by a librarian</p> -<ul><li>To approve a tag, you can either click the 'Approve' button inline with the term, or check all terms you want to approve and click 'Approve' below the table.</li> -<li>To reject a tag, you can either click the 'Reject' button inline with the term, or check all terms you want to approve and click 'Reject' below the table.</li> +<ul> + <li>To approve a tag, you can either click the 'Approve' button inline with the term, or check all terms you want to approve and click 'Approve' below the table.</li> + + <li>To reject a tag, you can either click the 'Reject' button inline with the term, or check all terms you want to approve and click 'Reject' below the table.</li> </ul> <p>Once a tag has been approved or rejected it will be moved to the appropriate list of tags. A summary of all tags will appear on the right of the screen.</p> -<p>Even though a tag is approved or rejected, it can still be moved to another list. When viewing approved tags each tag has the option to reject.</p> +<p>Even though a tag is approved or rejected, it can still be moved to another list. When viewing approved tags each tag has the option to reject</p> <p>To check terms against the approved and rejected lists (and possibly against the dictionary you have assigned for tag moderation) simply enter the term into the search box on the bottom right of the screen to see the status of the term</p> - + +<p><strong>See the full documentation for Tag Moderation in the <a href="http://manual.koha-community.org/3.6/en/tagsmoderation.html">manual</a> (online).</strong></p> + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From nengard at bywatersolutions.com Fri Oct 7 21:31:12 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Fri, 7 Oct 2011 15:31:12 -0400 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_Bug_6966_Update_tools_help_f?= =?utf-8?q?iles?= Message-ID: <1318015872-2732-1-git-send-email-nengard@bywatersolutions.com> This updates the tools help files. --- .../prog/en/modules/help/tools/batchMod.tt | 10 ++- .../prog/en/modules/help/tools/cleanborrowers.tt | 28 +++--- .../prog/en/modules/help/tools/csv-profiles.tt | 45 ++++++++-- .../prog/en/modules/help/tools/export.tt | 42 ++++++--- .../prog/en/modules/help/tools/holidays.tt | 95 +++++++++----------- .../prog/en/modules/help/tools/import_borrowers.tt | 83 ++++++++++++------ .../prog/en/modules/help/tools/inventory.tt | 3 + .../prog/en/modules/help/tools/koha-news.tt | 33 +++++--- .../prog/en/modules/help/tools/letter.tt | 53 +++++++---- .../en/modules/help/tools/manage-marc-import.tt | 49 +++++++--- .../prog/en/modules/help/tools/overduerules.tt | 25 +++--- .../prog/en/modules/help/tools/picture-upload.tt | 68 +++++---------- .../prog/en/modules/help/tools/scheduler.tt | 44 +++++---- .../en/modules/help/tools/stage-marc-import.tt | 38 ++++++--- .../prog/en/modules/help/tools/tools-home.tt | 11 ++- .../prog/en/modules/help/tools/viewlog.tt | 27 +++---- 16 files changed, 380 insertions(+), 274 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/batchMod.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/batchMod.tt index 103769e..09563fe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/batchMod.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/batchMod.tt @@ -3,15 +3,15 @@ <h1>Batch Modify Items</h1> -<p>This tool will allow you to modify a batch of item records from Koha.</p> +<p>This tool will allow you to modify a batch of item records in Koha.</p> <p>From the tool you can choose to upload a file of barcodes or item ids, or you can scan items one by one into the box below the upload tool. Once you have your file uploaded or the barcodes listed you can click 'Continue.'</p> -<p>You will be presented with a confirmation screen. From here you can uncheck the items you don't want to modify.</p> +<p>You will be presented with a summary of the items you want to modify. From here you can uncheck the items you don't want to modify before making changes in the form below. You can also hide columns you don't need to see to prevent having to scroll from left to right to see the entire item form.</p> -<p>Below the list of items there will be an item editor. Using this form you can choose which fields you want to edit on all of the records (like applying a note to all of them, or moving them from one library to another).</P> +<p>Using the edit form you can choose which fields to make edits to. By checking the checkbox to the right of each field you can clear the values in that field for the records you are modifying.</p> -<p>Once you have made your changes, you can click the 'Go' button and your items will be updated.</p> +<p>Once you have made you changes you will be presented with the resulting items.</p> <h1>Batch Delete Items</h1> @@ -23,4 +23,6 @@ <p>If the items can be deleted they will be and you will be presented with a confirmation of your deletion.</p> +<p><strong>See the full documentation for <a href="http://manual.koha-community.org/3.6/en/batchmodifyitems.html">Batch Item Modifications</a> and <a href="http://manual.koha-community.org/3.6/en/batchdeleteitems.html">Batch Item Deletions</a> in the manual (online).</strong></p> + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/cleanborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/cleanborrowers.tt index d2273bf..df1a6c7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/cleanborrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/cleanborrowers.tt @@ -2,20 +2,20 @@ <h1>Patrons (anonymize, bulk-delete)</h1> -<p>This tool allows you to bulk anonymize circulation histories or bulk delete patron records. This means that the system keeps a link between old loans and their items but severs the link to the borrower.</p> +<p>This tool allows you to bulk anonymize circulation histories (this means that you keep records of how many times items were checked out - but not the patrons who checked the items out) or bulk delete patrons (remove them from the system completely).</p> - <ul> - <li>Once in the tool, you have two options</li> - <li>Check the box next to the action(s) you'd like to perform - <ul> - <li>To delete borrowers, enter the date since the last time they borrowed</li> - <li>To anonymize circulation history enter the date before which you'd like that data deleted</li> - </ul></li> - </ul> - -<h2>Is there a way to run this tool automatically?</h2> -<p>Not at this time.</p> -<h2>Will running this report sever the connection between patrons and items that are checked out to them currently?</h2> -<p>No, this report will only remove connections between patrons and items they have checked out in the past but have returned to the library.</p> +<p style="color: #990000;">Important: Patrons with outstanding fines or items checked out are not saved. They are not completely removed from the system (moved to the delete_borrowers table), but this tool does not provide as many checks as one may desire.</p + +<p>To either delete or anonymize patrons</p> + +<ul> + <li>Check the task you would like to perform (Delete or Anonymize)</li> + <li>Enter a date before which you want to alter the data</li> + <li>Click 'Next'</li> + <li>A confirmation will appear asking if you're sure this is what you want to happen</li> + <li>Clicking 'Finish' will delete or anonymize your data</li> +</ul> + +<p><strong>See the full documentation for Anonymizing Patrons in the <a href="http://manual.koha-community.org/3.6/en/anonpatrons.html">manual</a> (online).</strong></p> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/csv-profiles.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/csv-profiles.tt index 9542af2..86cb391 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/csv-profiles.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/csv-profiles.tt @@ -4,21 +4,50 @@ <p>CSV Profiles are created to define how you would like your cart or list to export.</p> -<p>To add a CSV Profile enter the following info:</p> +<h2>Add CSV Profiles</h2> + +<p>To add a CSV Profile</p> + +<ul> + <li>Click 'CSV Profiles' from the Tools menu +<ul> + <li>The 'Profile name' will appear on the export pull down list when choosing 'Download' from your cart or list</li> + <li>The 'Profile description' is for your own benefit</li> + <li>The 'CSV separator' is the character used to separate values and value groups</li> + <li>The 'Field separator' is the character used to separate duplicate fields +<ul> + <li>Example: You may have multiple 650 fields</li> +</ul> +</li> + <li>The 'Subfield separator' is the character used to separate duplicate subfields +<ul> + <li>Example: You may have multiple $a subfields in a field</li> +</ul> +</li> + <li>The 'Encoding' field lets you define the encoding used when saving the file</li> + <li>Finally format your CSV file using the 'Profile marcfields' fields <ul> -<li>The 'Profile name' will appear on the export pull down list when choosing 'Download' from your cart or list</li> -<li>The 'Profile description' is for your own benefit</li> -<li>Finally format your CSV file using the 'Profile marcfields' fields -<ul><li>Define which fields or subfields you want to export, separated by pipes. Example : 200|210$a|301</li></ul> + <li>Define which fields or subfields you want to export, separated by pipes. Example : 200|210$a|301</li> + <li style="background-color: #ffe599;">Tip: You can also use your own headers (instead of the ones from Koha) by prefixing the field number with an header, followed by the equal sign. Example : Personal name=200|Entry element=210$a|300|009</li> +</ul> </li> </ul> +</li> +</ul> + +<h2>Modify CSV Profiles</h2> -<p>Once you have created at least one CSV Profile an option to 'Modify CSV Profiles' will appear below the Add form -<ul><li>Choose the profile you would like to edit and alter the necessary fields.</li> -<li>To delete a profile, check the 'Delete selelcted profile' option before clicking 'Submit Query'</li></ul> +<p>Once you have created at least one CSV Profile an 'Edit profile' tab will appear next to the 'New profile' button.</p> + +<ul> + <li>Choose the profile you would like to edit and alter the necessary fields.</li> + <li>To delete a profile, check the 'Delete selected profile' option before clicking 'Submit Query'</li> +</ul> <h2>Using CSV Profiles</h2> + <p>Your CSV Profiles will appear on the export list or cart menu under the 'Download' button</p> +<p><strong>See the full documentation for CSV Profiles in the <a href="http://manual.koha-community.org/3.6/en/csvprofiles.html">manual</a> (online).</strong></p> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/export.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/export.tt index d3a53c0..df3425a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/export.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/export.tt @@ -4,20 +4,32 @@ <p>Koha comes with a tool that will allow you to export your bibliographic and/or holdings data in bulk. This can be used to send your records to fellow libraries, organizations or services; or simply for backup purposes.</p> -<ul><li>Fill in the form in order to limit your export to a specific range (all fields are optional)</li> -<ul><li>Choose to limit your export by any one or more of the following options</li> -<ul><li>Limit to a bib number range</li> -<li>Limit to a specific item type</li> -<li>Limit to a specific library</li> -<li>Limit to a call number range</li> -<li>Limit to an acquisition date range</li></ul> -<li>Next choose what to skip when exporting</li> -<ul><li>By default items will be exported, if you would like to only export bibliographic data, check the 'Don't export items' box</li> -<li>To limit your export only to items from the library you're logged in as (if you leave the 'Library' field set to 'All') or to the library you selected above check the 'Remove non-local items' box</li> -<li>You can also choose what fields you don't want to export. This can be handy if you're sharing your data, you can remove all local fields before sending your data to another library</li></ul> -<li>Finally choose the file type and file name</li> -<ul><li>Choose to export your data in marc or marcxml format</li> -<li>Choose the name you want your file to save as</li></ul> -<li>Click 'Export'</li></ul></ul> +<ul> + <li>Fill in the form in order to limit your export to a specific range (all fields are optional)</li> +<ul> + <li>Choose to limit your export by any one or more of the following options</li> +<ul> + <li>Limit to a bib number range</li> + <li>Limit to a specific item type</li> + <li>Limit to a specific library</li> + <li>Limit to a call number range</li> + <li>Limit to an acquisition date range</li> +</ul> + <li>Next choose what to skip when exporting</li> +<ul> + <li>By default items will be exported, if you would like to only export bibliographic data, check the 'Don't export items' box</li> + <li>To limit your export only to items from the library you're logged in as (if you leave the 'Library' field set to 'All') or to the library you selected above check the 'Remove non-local items' box</li> + <li>You can also choose what fields you don't want to export. This can be handy if you're sharing your data, you can remove all local fields before sending your data to another library</li> +</ul> + <li>Finally choose the file type and file name</li> +<ul> + <li>Choose to export your data in marc or marcxml format</li> + <li>Choose the name you want your file to save as</li> +</ul> + <li>Click 'Export'</li> +</ul> +</ul> + +<p><strong>See the full documentation for Exporting MARC Records in the <a href="http://manual.koha-community.org/3.6/en/exportbibs.html">manual</a> (online).</strong></p> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/holidays.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/holidays.tt index 505661c..5ff99ed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/holidays.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/holidays.tt @@ -2,65 +2,58 @@ <h1>Holidays Calendar</h1> -<p>Libraries can define library closings and holidays to be used when - calculating due dates. You can make use of the Calendar by turning on - the proper system preferences:</p><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Get there: </em></span>More > Administration > - Global System Preferences > Circulation > useDaysMode</p><ul class="itemizedlist" type="circle"><li class="listitem"><p>Choose the method for calculating due date - either - include days the library is closed in the calculation or don't - include them.</p></li></ul></li><li class="listitem"><p><span class="emphasis"><em>Get there:</em></span> More > Administration > - Global System Preferences > Circulation > finescalendar</p><ul class="itemizedlist" type="circle"><li class="listitem"><p>This will check the holiday calendar before charging - fines</p></li></ul></li></ul> - <h3>Adding Events</h3> - <p>Before adding events, choose the library you would like to apply - the closings to. When adding events you will be asked if you would - like to apply the event to one branch or all branches. To add events, - simply</p><ul class="itemizedlist" type="disc"><li class="listitem"><p>Click on the date on the calendar that you would like to - apply the closing to</p></li><li class="listitem"><p>In the form that appears above the calendar, enter the - closing information</p><ul class="itemizedlist" type="circle"><li class="listitem"><p>Library will be filled in automatically based on the - library you chose from the pull down at the top of the - page</p></li><li class="listitem"><p>The day information will also be filled in automatically - based on the date you clicked on the calendar</p></li><li class="listitem"><p>In the description enter the reason the library is - closed</p></li><li class="listitem"><p>Next you can choose if this event is a one time event or - if it is repeatable.</p></li><li class="listitem"><p>Finally decide if this event should be applied to all - libraries or just the one you have originally selected</p></li></ul></div></li><li class="listitem"><p>After saving you will see the event listed in the summary - below the calendar</p></li></ul> - <h3>Editing Events</h3><p>To edit events</p><ul class="itemizedlist" type="disc"><li class="listitem"><p>Click on the event on the calendar that you want to change - (do this by clicking on the date on the calendar, not the event - listed in the summary)</p></li><li class="listitem"><p>From this form you can make edits to the holiday or delete - the holiday completely. Both actions require that you click 'Save' - before the change will be made.</p></li><li class="listitem"><p>Clicking on repeatable events will offer slightly different - options</p> - <ul class="itemizedlist" type="circle"><li class="listitem"><p>In the form above you will note that there is now an - option to 'Generate an exception for this repeated holiday,' - choosing this option will allow you to make it so that this - date is not closed even though the library is usually closed - on this date.</p></li></ul></li></ul> - <h3 class="title">Additional Help</h3><p>When adding or editing events you can get additional help by - clicking on the blue plus sign next to various different options on - the form</p> - -<h2>Questions</h2> +<p>Libraries can define library closings and holidays to be used when calculating due dates. You can make use of the Calendar by turning on the proper system preferences:</p> -<p><strong>Why do I want to add holidays for my branch?</strong></p> +<ul> + <li>Get there: More > Administration > Global System Preferences > Circulation > useDaysMode +<ul> + <li>Choose the method for calculating due date - either include days the library is closed in the calculation or don't include them.</li> +</ul> +</li> + <li>Get there: More > Administration > Global System Preferences > Circulation > finescalendar +<ul> + <li>This will check the holiday calendar before charging fines</li> +</ul> +</li> +</ul> + +<h2>Adding Events</h2> + +<p>Before adding events, choose the library you would like to apply the closings to. When adding events you will be asked if you would like to apply the event to one branch or all branches. To add events, simply</p> -After holidays are entered on the calendar, circulation rules are then recalculated to taken in to account that library is closed and there will be no one present to return items. +<ul> + <li>Click on the date on the calendar that you would like to apply the closing to</li> + <li>In the form that appears above the calendar, enter the closing information +<ul> + <li>Library will be filled in automatically based on the library you chose from the pull down at the top of the page</li> + <li>The day information will also be filled in automatically based on the date you clicked on the calendar</li> + <li>In the description enter the reason the library is closed</li> + <li>Next you can choose if this event is a one time event or if it is repeatable.</li> + <li>Finally decide if this event should be applied to all libraries or just the one you have originally selected</li> +</ul> +</li> + <li>After saving you will see the event listed in the summary to the right the calendar</li> +</ul> - -<p><strong>How do I enable the Holiday Calendar?</strong></p> +<h2>Editing Events</h2> -You can make use of the Holidays Calendar by turning on the proper system preferences +<p>To edit events</p> + +<ul> + <li>Click on the event on the calendar that you want to change (do this by clicking on the date on the calendar, not the event listed in the summary)</li> + <li>From this form you can make edits to the holiday or delete the holiday completely. Both actions require that you click 'Save' before the change will be made.</li> + <li>Clicking on repeatable events will offer slightly different options <ul> -<li><em>Get there:</em> More > Administration > Global System Preferences > Circulation > useDaysMode</li> - <ul> <li>Choose the method for calculating due date: select Calendar to use the holidays module, and Days to ignore the holidays module</li></ul> -<li><em>Get there:</em> More > Administration > Global System Preferences > Circulation > finescalendar</li> - <ul> <li>This will use the check the holiday calendar before charging fines</li></ul> + <li>In the form above you will note that there is now an option to 'Generate an exception for this repeated holiday,' choosing this option will allow you to make it so that this date is not closed even though the library is usually closed on this date.</li> </ul> - -<p><strong>How is the dropbox date determined?</strong></p> +</li> +</ul> + +<h2>Additional Help</h2> -<p>Is it the last open date for the checkout branch? Is it today's date minus one? Can the dropbox checkin date be set? If the library is closed for four days for repairs, for example, there would be more than one day needed for the dropbox date.</p> +<p>When adding or editing events you can get additional help by clicking on the question mark next to various different options on the form</p> -<p>You will only have one dropbox date and that will be the last day that the library open (determined by the holiday calendar) because there is no real way to know what day the books were dropped into the box during the 4 closed days. The only way to change the effective checkin date in dropbox mode is to modify the calendar.</p> +<p><strong>See the full documentation for the Calendar in the <a href="http://manual.koha-community.org/3.6/en/calholidays.html">manual</a> (online).</strong></p> [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/import_borrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/import_borrowers.tt index 23f7d0f..6f8a0bb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/import_borrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/import_borrowers.tt @@ -2,30 +2,59 @@ <h1>Patron Import</h1> - <ul> - <li>Create a CSV file for your patron data<br/> - <ul> - <li>Format your file with the following fields - <ul> - <li>'surname', 'firstname', 'title', 'othernames', 'initials', 'streetnumber', 'streettype', 'address', 'address2', 'city', 'state', 'zipcode', 'country', 'email', 'phone', 'mobile', 'fax', 'emailpro', 'phonepro', 'B_streetnumber', 'B_streettype', 'B_address', 'B_address2', 'B_city', 'B_state', 'B_zipcode', 'B_country', 'B_email', 'B_phone', 'dateofbirth', 'branchcode', 'categorycode', 'dateenrolled', 'dateexpiry', 'gonenoaddress', 'lost', 'debarred', 'contactname', 'contactfirstname', 'contacttitle', 'guarantorid', 'borrowernotes', 'relationship', 'ethnicity', 'ethnotes', 'sex', 'password', 'flags', 'userid', 'opacnote', 'contactnote', 'sort1', 'sort2', 'altcontactfirstname', 'altcontactsurname', 'altcontactaddress1', 'altcontactaddress2', 'altcontactaddress3', 'altcontactstate', 'altcontactzipcode', 'altcontactcountry', 'altcontactphone', 'smsalertnumber', 'patron_attributes' - <ul> - <li> - <span style="background-color: #ffe599"> -TIP: Consult your system administrator if you are unsure of how to fill in the above fields.</span></li> - <li> - IMPORTANT: Make sure the 'branchcode' and 'categorycode' are valid entries in your database.</li> - <li>Passwords should be stored in plain text, and will be encrypted as they're imported - <ul> - <li> - <span style="background-color: #ffe599"> -TIP: If your passwords are already encrypted, talk to your systems administrator about options.</span></li> - </ul></li> - </ul></li> - </ul></li> - </ul></li> - <li>Select a file to import into the borrowers table</li> - <li>If a cardnumber exists in the table, you can choose whether to ignore the new one or overwrite the old one.</li> - <li>Click 'Import'</li> - <li>You will be brought to a confirmation screen.</li> - </ul> - </div> [% INCLUDE 'help-bottom.inc' %] +<p>The patron import tool can be used at any time to add patrons in bulk. It is commonly used in universities and schools when a new batch of students registers.</p> + +<h2>Creating Patron File</h2> + +<p>Your Koha installation comes with a blank CSV file that you can use as a template for your patron records. If you would like to create the file yourself, make sure that your file has the following fields in this order as the header row:</p> + +<blockquote>borrowernumber, cardnumber, surname, firstname, title, othernames, initials, streetnumber, streettype, address, address2, city, zipcode, country, email, phone, mobile, fax, emailpro, phonepro, B_streetnumber, B_streettype, B_address, B_address2, B_city, B_zipcode, B_country, B_email, B_phone, dateofbirth, branchcode, categorycode, dateenrolled, dateexpiry, gonenoaddress, lost, debarred, contactname, contactfirstname, contacttitle, guarantorid, borrowernotes, relationship, ethnicity, ethnotes, sex, password, flags, userid, opacnote, contactnote, sort1, sort2, altcontactfirstname, altcontactsurname, altcontactaddress1, altcontactaddress2, altcontactaddress3, altcontactzipcode, altcontactcountry, altcontactphone, smsalertnumber, patron_attributes</blockquote> + +<p style="color: #990000;">Important: The 'password' value should be stored in plain text, and will be converted to a md5 hash (which is an encrypted version of the password).</p> + +<ul> + <li>If your passwords are already encrypted, talk to your systems administrator about options</li> +</ul> + +<p style="color: #990000;">Important: Date formats should match your system preference, and must be zero-padded, e.g. '01/02/2008'.</p> + +<p style="color: #990000;">Important: The fields 'branchcode' and 'categorycode' are required and must match valid entries in your database.</p> + +<p style="background-color: #ffe599">Tip: If loading patron attributes, the 'patron_attributes' field should contain a comma-separated list of attribute types and values.</p> + +<ul> + <li>The attribute type code and a colon should precede each value. +<ul> + <li>For example: INSTID:12345,LANG:fr or STARTDATE:January 1 2010,TRACK:Day</li> + <li>If an input record has more than one attribute, the fields should either be entered as an unquoted string (previous examples), or with each field wrapped in separate double quotes and delimited by a comma: +<ul> + <li>"STARTDATE:January 1, 2010","TRACK:Day"</li> + <li>This syntax would be required if the data might have a comma in it, like a date string.</li> +</ul> +</li> +</ul> +</li> +</ul> + +<h2>Importing Patrons</h2> + +<p>Once you have created your file, you can use the Patron Import Tool to bring the data into Koha.</p> + +<ul> + <li>Choose your CSV file and choose to match on 'Cardnumber' to prevent adding of duplicate card numbers to the system</li> + <li>Next you can choose default values to apply to all patrons you are importing +<ul> + <li>ex. If you're importing patrons specific to one branch you can use the field on the Import form to apply the branch code to all those you are importing.</li> +</ul> +</li> + <li>Finally you need to decide on what data you want to replace if there are duplicates. +<ul> + <li>A matching record is found using the field you chose for matching criteria to prevent duplication</li> + <li>If you included patron attributes in your file you can decide whether to add your values to existing values or erase existing values and enter only your new values.</li> +</ul> +</li> +</ul> + +<p><strong>See the full documentation for Patron Import in the <a href="http://manual.koha-community.org/3.6/en/patronimport.html">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/inventory.tt index 55f4ad9..070de90 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/inventory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/inventory.tt @@ -15,4 +15,7 @@ <p>If you have a portable scanner (or a laptop and USB scanner) you can walk through the library with the scanner in hand and scan barcodes as you come across them. Once finished you can then upload the text file generated by the scanner to Koha</p> <p>Choose the text file and the date you want to mark all times as seen and click 'Submit.'</p> + +<p><strong>See the full documentation for Inventory in the <a href="http://manual.koha-community.org/3.6/en/inventory.html">manual</a> (online).</strong></p> + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/koha-news.tt index 9c5a374..95916f3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/koha-news.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/koha-news.tt @@ -2,15 +2,26 @@ <h1>News</h1> -<p>Koha's news module allows librarians to post news to the OPAC and the staff interface. +<p>Koha's news module allows librarians to post news to the OPAC, staff interface and circulation receipts.</p> -<p>To add news to either the OPAC or the Staff Client:</li> -<ul><li>Click 'New Entry'</li> -<ul><li>Under 'Display Location' choose whether to put the news on the OPAC or the Librarian (Staff) Interface.</li> -<li>Choose a title for your entry</li> -<li>Using the publication and expiration date fields you can control how long your item appears</li> -<li>'Appear in position' lets you decide what order your news items appear in</li> -<li>The 'News' box allows for the use of html for formatting of your news item</li></ul> -<i>After filling in all of the fields, click 'Submit'</li> -<li>News in the OPAC will appear above the OpacMainUserBlock</li> -<li>News in the Staff Client will appear on the far left of the screen</li></ul> \ No newline at end of file +<p>To add news to either the OPAC, the Staff Client or a Circulation receipt:</p> + +<ul> + <li>Click 'New Entry' +<ul> + <li>Under 'Display Location' choose whether to put the news on the OPAC, Slip (circulation receipt) or the Librarian (Staff) Interface.</li> + <li>Choose a title for your entry</li> + <li>Using the publication and expiration date fields you can control how long your item appears</li> + <li>'Appear in position' lets you decide what order your news items appear in</li> + <li>The 'News' box allows for the use of HTML for formatting of your news item</li> +</ul> +</li> + <li>After filling in all of the fields, click 'Submit'</li> + <li>News in the OPAC will appear above the OpacMainUserBlock</li> + <li>News in the Staff Client will appear on the far left of the screen</li> + <li>News on the circulation receipts will appear below the items that are checked out</li> +</ul> + +<p><strong>See the full documentation for News in the <a href="http://manual.koha-community.org/3.6/en/tools.html#newstool">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/letter.tt index 85f731b..b44cdbd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/letter.tt @@ -1,12 +1,15 @@ [% INCLUDE 'help-top.inc' %] <h1>Notices</h1> -All notices sent by Koha can be customized using the Notices Tool. The system comes with several predefined templates that will appear when you first visit the Notices Tool -Each notice can be edited, but only a few can be deleted, this is to prevent system errors should a message try to send without a template. +<p>All notices sent by Koha can be customized using the Notices Tool. The system comes with several predefined templates that will appear when you first visit the Notices Tool</p> + +<p>Each notice can be edited, but only a few can be deleted, this is to prevent system errors should a message try to send without a template.</p> + <h2>Adding Notices</h2> -<ul> - <li>To add a new notice + +<p>To add a new notice</p> + <ul> <li>Click 'New Notice'</li> <li>Choose the module this notice is related to</li> @@ -15,16 +18,17 @@ Each notice can be edited, but only a few can be deleted, this is to prevent sys <li>Message Subject is what will appear in the subject line of the email</li> <li>In the message body feel free to type whatever message you feel is best, use the fields on the left hand side to enter individualized data from the from database. <ul> - <li style="color: #ff0000;">Important: On overdue notices make sure to use <<items.content>> to print out the data related to all items that are overdue. The other option is to use the <item></item> tags to span the line so that it will print out multiple lines</li> - <li style="color: #ff0000;">Important: Only the overdue notices take advantage of the <item></item> tags, all other notices referencing items need to use <<items.content>></li> -</ul> -</li> + <li style="color: #990000;">Important: On overdue notices make sure to use <<items.content>> to print out the data related to all items that are overdue. The other option is to use the <item></item> tags to span the line so that it will print out multiple lines</li> + <li style="color: #990000;">Important: Only the overdue notices take advantage of the <item></item> tags, all other notices referencing items need to use <<items.content>></li> </ul> </li> </ul> + <h3>Notice Markup</h3> -When creating your overdue notices there are two tags in addition to the various database fields that you can use in your notices. -<p style="color: #ff0000;">Important: These new tags only work on the overdue notices, not other circulation related notices at this time.</p> + +<p>When creating your overdue notices there are two tags in addition to the various database fields that you can use in your notices.</p> + +<p style="color: #990000;">Important: These new tags only work on the overdue notices, not other circulation related notices at this time.</p> <ul> <li><item></item> which should enclose all fields from the biblio, biblioitems, and items tables.</li> @@ -34,17 +38,26 @@ When creating your overdue notices there are two tags in addition to the various </ul> </li> </ul> -An example of using these two tags in a notice template might be like: -<pre>The following item(s) is/are currently overdue: +<p>An example of using these two tags in a notice template might be like: + +<blockquote> +<pre>The following item(s) is/are currently overdue: <item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <fine>GBP</fine></item></pre> -Which, assuming two items were overdue, would result in a notice like: +</blockquote> + +<p>Which, assuming two items were overdue, would result in a notice like:</p> + +<blockquote> <pre>The following item(s) is/are currently overdue: +"A Short History of Western Civilization" by Harrison, John B, 909.09821 H2451, Barcode: 08030003 Fine: ?3.50 +"History of Western Civilization" by Hayes, Carlton Joseph Huntley, 909.09821 H3261 v.1, Barcode: 08030004 Fine: ?3.50</pre> +</blockquote> - "A Short History of Western Civilization" by Harrison, John B, 909.09821 H2451, Barcode: 08030003 Fine: ?3.50 - "History of Western Civilization" by Hayes, Carlton Joseph Huntley, 909.09821 H3261 v.1, Barcode: 08030004 Fine: ?3.50</pre> <h2>Existing Notices</h2> -Among the default notices are notices for several common actions within Koha, here are some of what those notices do + +<p>Among the default notices are notices for several common actions within Koha, here are some of what those notices do</p> + <ul> <li>ACCTDETAILS <ul> @@ -65,7 +78,7 @@ Among the default notices are notices for several common actions within Koha, he <li>The patron has requested to receive this notice <ul> <li>Get there: OPAC > Login > my messaging</li> - <li>Get there: Staff Client > Patron Record > Messaging</li> + <li>Get there: Staff Client > Patron Record > Notices</li> </ul> </li> </ul> @@ -85,7 +98,6 @@ Among the default notices are notices for several common actions within Koha, he <li>ODUE (Overdue Notice) <ul> <li>This notice is used to send Overdue Notices to Patrons</li> - <li>See a Sample Overdue Notice</li> <li>Requires that you set Overdue Notice/Status Triggers</li> </ul> </li> @@ -97,8 +109,11 @@ Among the default notices are notices for several common actions within Koha, he </ul> </li> <li>You have the option to select the 'Routing List' notice when creating a new subscription (Choose from the 'Patron notification' drop down).</li> - <li style="background-color: #ffe599;">Tip: Notice also that if you'd like to notify patrons of new serial issues, you can click on 'define a notice' which will take you to the 'Notices' tool</li> + <li style="background-color: #ffe599">Tip: Notice also that if you'd like to notify patrons of new serial issues, you can click on 'define a notice' which will take you to the 'Notices' tool</li> </ul> </li> </ul> + +<p><strong>See the full documentation for Notices in the <a href="http://manual.koha-community.org/3.6/en/notices.html">manual</a> (online).</strong></p> + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/manage-marc-import.tt index e2fa546..54bd3f7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/manage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/manage-marc-import.tt @@ -4,24 +4,43 @@ <p>Once you have staged your records for import you can complete the import using this tool.</p> -<ul><li>From the list of staged records, click on the file name that you want to finish importing</li> -<ul><li>You will note that records that have already been imported will say so under 'Status'</li></ul> -<li>A summary of your import will appear along with the option to change your matching rules</li> -<li>Below the summary there will be a list of the records that will be imported</li> -<ul><li>Review your summary before completing your import to make sure that your matching rule worked and that the records appear as you expect them to</li></ul> -<li>Click 'Import into catalog' to complete the import</li> -<li>Once your import is complete a link to the new bib records will appear to the right of each title that was imported</li> -<li>You can also undo your import by clicking the 'Undo import into catalog' button</li> -<li>Records imported using this tool remain in the 'reservoir' until they are cleaned. These items will appear when searching the catalog from the Cataloging tool.</li></ul> +<ul> + <li>From the list of staged records, click on the file name that you want to finish importing +<ul> + <li>You will note that records that have already been imported will say so under 'Status'</li> +</ul> +</li> + <li>A summary of your import will appear along with the option to change your matching rules</li> + <li>Below the summary is the option to import the batch of bib records using a specific framework +<ul> + <li>Choosing a framework other than 'Default' isn't necessary, but it's helpful for running reports and having the right bib level item type selected on import.</li> +</ul> +</li> + <li>Below the framework selection there will be a list of the records that will be imported +<ul> + <li>Review your summary before completing your import to make sure that your matching rule worked and that the records appear as you expect them to</li> +</ul> +</li> + <li>Click 'Import into catalog' to complete the import</li> + <li>Once your import is complete a link to the new bib records will appear to the right of each title that was imported</li> + <li>You can also undo your import by clicking the 'Undo import into catalog' button</li> +</ul> + +<p>Records imported using this tool remain in the 'reservoir' until they are cleaned. These items will appear when searching the catalog from the Cataloging tool:</p> <p>To clean items out of the 'reservoir':</p> -<ul><li>Visit the main screen of the Manage Staged MARC Records tool</li> -<li>To clean a batch, click the 'Clean' button to the right</li> -<li>You will be presented with a confirmation message</li> -<ul><li>Accept the deletion and the records will be removed from the reservoir and the status will be changed to 'cleaned'</li></ul> -<li>This action cannot be undone, so make sure you confirm that you are cleaning the correct import</li></ul> +<ul> + <li>Visit the main screen of the Manage Staged MARC Records tool</li> + <li>To clean a batch, click the 'Clean' button to the right</li> + <li>You will be presented with a confirmation message +<ul> + <li>Accept the deletion and the records will be removed from the reservoir and the status will be changed to 'cleaned'</li> +</ul> +</li> +</ul> + +<p><strong>See the full documentation for the the Managing Staged MARC Records in the <a href="http://manual.koha-community.org/3.6/en/managestaged.html">manual</a> (online).</strong></p> - [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/overduerules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/overduerules.tt index 7b7704b..65e5a85 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/overduerules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/overduerules.tt @@ -1,22 +1,23 @@ [% INCLUDE 'help-top.inc' %] -<h1>Overdue 'Notice/Status Triggers'</h1> - -<p>This tool lets you define triggers for overdue notices. You can send a borrower up to three reminder emails (depending on your library workflow)</p> +<h1>Overdue Notice/Status Triggers</h1> <p>In order to send the overdue notices that you defined using the Notices tool, you need to first set the triggers to have these messages.</p> -<p>In order to have overdue notices sent to your patrons, you need to set that patron category to require overdue notices.</p> +<p style="color: #990000;">Important: In order to have overdue notices sent to your patrons, you need to set that patron category to require overdue notices.</p> <p>The Overdue Notice/Status Triggers tool gives the librarian the power to send up to three notices to each patron type notifying them of overdue items</p> -<ul><li>Delay is the number of days after an issue is due before an action is triggered.</li> -<ul><li style="color:#990000;"><strong>Important: These rules should not be used for Advanced Notices. Advanced Notices should be set using the Enhanched Messaging Preferences on the Patron Profile.</strong></li> -<li style="color:#990000;"><strong>Important: If you want Koha to trigger an action (send a letter or restrict a member), a delay value is required.</strong></li></ul> -<li>To send additional notices, click on the tabs for 'Second' and 'Third' notice</li> -<li>If you would like to prevent a patron from checking items out because of their overdue items, check the 'Restrict' box, this will put a notice on the patron's record at checkout informing the librarian that the patron cannot check out due to overdue items.</li></ul> - -<p>If the numbers you've entered in a give row beneath the 'delay' columns are logically inconsistent, Koha will give you an alert, and explain the inconsistency.</p> +<ul> + <li>Delay is the number of days after an issue is due before an action is triggered. +<ul> + <li style="color: #990000;">Important: If you want Koha to trigger an action (send a letter or restrict member), a delay value is required.</li> +</ul> +</li> + <li>To send additional notices, click on the tabs for 'Second' and 'Third' notice</li> + <li>If you would like to prevent a patron from checking items out because of their overdue items, check the 'Restrict' box, this will put a notice on the patron's record at checkout informing the librarian that the patron cannot check out due to overdue items.</li> + <li>See a Sample Overdue Notice</li> +</ul> <h3>Sample Overdue Notice</h3> @@ -40,5 +41,7 @@ <p>Sincerely, Library Staff</p> +<p><strong>See the full documentation for the the Overdue Notice/Status Triggers in the <a href="http://manual.koha-community.org/3.6/en/noticetriggers.html">manual</a> (online).</strong></p> + [% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/picture-upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/picture-upload.tt index 10f1604..a1e70de 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/picture-upload.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/picture-upload.tt @@ -1,51 +1,25 @@ [% INCLUDE 'help-top.inc' %] -<h1> - Upload Patron Images</h1><p>This tool allows you to upload multiple patron images as a batch.</p> - - <p style="color: #990000;">IMPORTANT: Requires that the 'patronimages' system preference is set to 'ON' to use this feature.</p> - <ul> - <li><em>Get there: </em>More > Administration > Global System Preferences > Patrons > patronimages</li> - </ul><h2>Upload images in bulk</h2> - <ul> - <li>Go to the 'Tools' module (usually under 'More' in your Global Nav)</li> - <li>Choose 'Upload patron images'</li> - <li>You can choose to upload images in bulk by making a zip file with the images and a text file entitled "DATALINK.TXT" or "IDLINK.TXT"</li> - <li>For each group of pictures that has the cardnumber of the patron and the file containing that patrons picture. One patron per line separated by either commas or tabs.<br/> - <ul> - <li style="color: #990000;"> - IMPORTANT: Make sure that your TXT file is a plain text document, not RTF.</li> - <li style="color: #990000;"> -IMPORTANT: Make sure that you use either a comma or a tab to separate IDs from image names</li> - </ul></li> - <li>Add the images and the TXT file to a .ZIP file</li> - <li>Browse for the file from the Koha interface</li> - <li>Click 'Unpack' and you will receive a confirmation screen</li> - <li>To see the image(s) you imported search for the patron(s) and view their profile</li> - <li>If you'd like to change the image, just upload a new image</li> - <li>If you'd like to delete the patron image, click the 'Delete' button under 'Manage Patron Image'</li> - </ul> - <p><strong>Uploading Single Images</strong> -If you only have one patron image you might want to upload it via the patron information page instead of using this bulk tool.</p> +<h1>Upload Patron Images</h1> + +<p>Patron images can be uploaded in bulk if you are allowing patron images to be attached to patron records. These images can also be used when creating patron cards.</p> + +<ul> + <li>Create a txt file and title it "DATALINK.TXT" or "IDLINK.TXT"</li> + <li>On each line in the text file enter the patron's card number followed by comma (or tab) and then the image file name +<ul> + <li>Make sure that your TXT file is a plain text document, not RTF.</li> +</ul> +</li> + <li>Zip up the text file and the image files</li> + <li>Go to the Upload Patron Images Tool</li> + <li>For a single image, simply point to the image file and enter the patron card number</li> + <li>For multiple images, choose to upload a zip file</li> + <li>After uploading you will be presented with a confirmation</li> +</ul> + +<p style="color:#990000;">Important: There is a limit of 520K on the size of the picture uploaded and it is recommended that the image be 200x300 pixels, but smaller images will work as well.</p> + +<p><strong>See the full documentation for the the Patron Image Uploader in the <a href="http://manual.koha-community.org/3.6/en/uploadpatronimages.html">manual</a> (online).</strong></p> - <ul> - <li>Go to the Patrons menu at the top of the staff client</li> - <li>Search for the patron you have the image for</li> - <li>If there is more than one result, click on the name of the patron you'd like to add an image to</li> - <li>Scroll down to the image upload form</li> - <li>Browse for the image on your computer and click 'Upload'</li> - <li>If you'd like to change the image, just upload a new image</li> - <li>If you'd like to delete the patron image, click the 'Delete' button under 'Manage Patron Image'</li> - </ul><h3>Why can't I upload patron images?</h3> -<p>First you will need - <span class="ex"> -a patronimages/</span>directory. If you do not have this directory you will see an error.</p> - <ul> - <li>Contact your system administrator to create this directory and you'll be set to go.</li> - </ul> -<h3>What size should my images be?</h3> -<p>There is a limit of 520K on the size of the picture uploaded and it is recommended that the image be 200x300 pixels, but smaller images will work as well.</p> -<h3>What image formats are supported?</h3> -<p>Only PNG, GIF, JPEG, XPM formats are supported.</p> - [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/scheduler.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/scheduler.tt index af36018..55537b4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/scheduler.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/scheduler.tt @@ -1,22 +1,28 @@ [% INCLUDE 'help-top.inc' %] + <h1>Task Scheduler</h1> -<p>The task scheduler is a way to schedule reports to run whenever - you want.</p><p>To schedule a task, visit the Task Scheduler and fill in the - form</p> - <ul class="itemizedlist" type="disc"><li class="listitem"><p>Current Server Time shows the time on your server (schedule - all of your reports to run based on that time - not on your local - time)</p></li><li class="listitem"><p>Time should be entered as hh:mm (2 digit hour, 2 digit - minute)</p></li><li class="listitem"><p>Date should be entered using the calendar pop up</p></li><li class="listitem"><p>From Report choose the report you want to schedule</p></li><li class="listitem"><p>Choose whether to receive the text of or a link to the - results</p></li><li class="listitem"><p>In the Email filed enter the email of the person you want to - receive your report</p></li></ul><p>Below the task scheduler form, there is a list of scheduled - reports</p> - <p>You can also schedule reports directly from the list of saved - reports by clicking the 'Schedule' link</p> - <h3>Troubleshooting</h3><p>Task scheduler will not work if the user the webserver runs as - doesn't have the permission to use it. To find out if the right user - has the permissions necessary, check /etc/at.allow to see what users - are in it. If you don't have that file, check etc/at.deny. If at.deny - exists but is blank, then every user can use it. Talk to your system - admin about adding the user to the right place to make the task - scheduler work.</p> + +<p>The task scheduler is a way to schedule reports to run whenever you want.</p> + +<p>To schedule a task, visit the Task Scheduler and fill in the form</p> + +<ul> + <li>Current Server Time shows the time on your server (schedule all of your reports to run based on that time - not on your local time)</li> + <li>Time should be entered as hh:mm (2 digit hour, 2 digit minute)</li> + <li>Date should be entered using the calendar pop up</li> + <li>From Report choose the report you want to schedule</li> + <li>Choose whether to receive the text of or a link to the results</li> + <li>In the Email filed enter the email of the person you want to receive your report</li> +</ul> + +<p>Below the task scheduler form, there is a list of scheduled reports</p> + +<p>You can also schedule reports directly from the list of saved reports by clicking the 'Schedule' link</p> + +<h2>Troubleshooting</h2> + +<p>Task scheduler will not work if the user the web server runs as doesn't have the permission to use it. To find out if the right user has the permissions necessary, check /etc/at.allow to see what users are in it. If you don't have that file, check etc/at.deny. If at.deny exists but is blank, then every user can use it. Talk to your system admin about adding the user to the right place to make the task scheduler work.</p> + +<p><strong>See the full documentation for the the Task Scheduler in the <a href="http://manual.koha-community.org/3.6/en/taskscheduler.html">manual</a> (online).</strong></p> + [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/stage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/stage-marc-import.tt index 34ca8a7..fbee311 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/stage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/stage-marc-import.tt @@ -4,17 +4,31 @@ <p>Importing records into Koha includes two steps. The first is to stage records for import.</p> -<ul><li>First find the MARC file on your computer</li> -<li>Next you will be presented with options for record matching and item imports</li> -<ul><li>Enter 'Comments about this file' to identify your upload when going to the 'Manage Staged MARC Records' tool</li> -<li>Choose the character encoding</li> -<li>Choose whether or not you want to look for matching records</li> -<ul><li>You can set up record matching rules through the administration area</li></ul> -<li>Next choose what to do with matching records if they are found</li> -<li>Finally choose what to do with records that are unique</li> -<li>Next you can choose whether or not to import the item data found in the MARC records</li></ul> -<li>Click 'Stage for import'</li> -<li>You will be presented with a confirmation of your MARC import</li> -<li>To complete the process continue to the Managed Staged MARC Records Tool</li></ul> +<ul> + <li>First find the MARC file on your computer</li> + <li>Next you will be presented with options for record matching and item imports +<ul> + <li>Enter 'Comments about this file' to identify your upload when going to the 'Manage Staged MARC Records' tool</li> + <li>Choose the character encoding +<ul> + <li>If you leave this set to Default Koha will try to guess the encoding, but it should be noted that this is almost always wrong for non-UTF8 records with non-ASCII characters. Specifying a character set is much more reliable if you're not using UTF-8.</li> +</ul> +</li> + <li>Choose whether or not you want to look for matching records +<ul> + <li>You can set up record matching rules through the administration area</li> +</ul> +</li> + <li>Next choose what to do with matching records if they are found</li> + <li>Finally choose what to do with records that are unique</li> + <li>Next you can choose whether or not to import the item data found in the MARC records</li> +</ul> +</li> + <li>Click 'Stage for import'</li> + <li>You will be presented with a confirmation of your MARC import</li> + <li>To complete the process continue to the Managed Staged MARC Records Tool</li> +</ul> + +<p><strong>See the full documentation for the MARC Import in the <a href="http://manual.koha-community.org/3.6/en/stagemarc.html">manual</a> (online).</strong></p> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/tools-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/tools-home.tt index c4b6f88..6823273 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/tools-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/tools-home.tt @@ -1,8 +1,9 @@ [% INCLUDE 'help-top.inc' %] + <h1>Tools</h1> - <p>Many of the subsidiary modules can be found under Tools.</p> - - <p>To move forward, select the task you would like to complete.</p> - - <p>Specialized help will be available after that point.</p> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +<p>Tools in Koha all perform some sort of action. Often many of the items listed under Tools in Koha are referred to as 'Reports' in other library management systems.</p> + +<p><strong>See the full documentation for Tools in the <a href="http://manual.koha-community.org/3.6/en/tools.html">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/viewlog.tt index 31048b1..6bf9cb1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/viewlog.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/viewlog.tt @@ -1,18 +1,13 @@ [% INCLUDE 'help-top.inc' %] -<h1>Log View</h1> - <ul> - <li>The log viewer will show you what actions are being taking in your ILS during a set time period</li> - <li>Choose the start and end date you'd like to see and click 'Go' to see the results on your screen</li> - <li>You also have the option of exporting this data to use in a different format just by choosing to export to an application. - <ul> - <li>This will result in a comma separated value (csv) file.</li> - </ul></li> - <li>You can also choose to filter what you see by any of the fields visible.</li> - </ul> -<p><strong>Why aren't my cataloging actions being logged?</strong> -You may not have the 'Logs' system preference turned on</p> - <ul> - <li><em>Get there:</em> More > Administration > Global System Preferences > Logs</li> - </ul> - </div> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +<h1>Log Viewer</h1> + +<p>Actions within the Koha system are tracked in log files. Your system preferences can be changed to prevent the logging of different actions. These logs can be viewed using the Log Viewer Tool.</p> + +<p>Choosing different combinations of menu options will produce the log file for that query.</p> + +<p>You will note that real names do not appear on the log, only identifying numbers. You need to use the identifying numbers when searching the logs as well.</p> + +<p><strong>See the full documentation for the Log Viewer in the <a href="http://manual.koha-community.org/3.6/en/logviewer.html">manual</a> (online).</strong></p> + +[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From nengard at bywatersolutions.com Fri Oct 7 21:36:30 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Fri, 7 Oct 2011 15:36:30 -0400 Subject: [Koha-patches] [PATCH] Bug 6966 Lists help file Message-ID: <1318016190-2801-1-git-send-email-nengard@bywatersolutions.com> This updates the lists help file. --- .../prog/en/modules/help/virtualshelves/shelves.tt | 92 +++++++------------- 1 files changed, 30 insertions(+), 62 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/virtualshelves/shelves.tt index 6f2d68b..0bd79ab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/virtualshelves/shelves.tt @@ -2,87 +2,55 @@ <h1>Lists</h1> -<p>Lists are permanent lists of items, similar to 'favorites'. Lists can be used to keep track of 'favorites' or to create reading lists as a readers' advisory tool. Items in a list link directly to your catalog.</p> +<p>A list can be created by visiting the Lists page and clicking 'New List'</p> -<p>There are three kinds of 'lists'</p> +<p>The new list form offers several options for creating your list:</p> -<ul><li>'private': private lists can only be viewed and edited by the user who created the list.</li> - <ul><li style="background-color: #ffe599">TIP: Any logged in patron can create a private list</li></ul> -<li>'public': public lists can be viewed by the public (anyone) but only edited by the user who created the list.</li> - <ul><li style="background-color: #ffe599">TIP: Any logged in patron can create a public list</li></ul> -<li>'free': free lists can be viewed or edited by any user</li> - <ul><li style="background-color: #ffe599">TIP: Only staff can create free lists, but any patron can edit them via the OPAC once created</li> - <li style="color: #990000">IMPORTANT: Keep in mind that any visitors to your OPAC can alter this list.</li></ul> -</ul> - -<p style="color: #990000">IMPORTANT: To use lists this function must be enabled in your system preferences</p> <ul> -<li><em>Get there:</em> Administration > System Preferences > OPAC > virtualshelves</li></ul> - -<h2>To add (create) a new list</h2> + <li>The name is what will appear on the list of Lists</li> + <li>You can also choose how to sort the list</li> + <li>Finally there are three types of lists you can choose from <ul> -<li>Click on 'New List'</li> -<li>Enter a 'Name' for your list in the field provided</li> -<li>The 'Owner' should automatically be the individual logged into the Koha staff interface</li> -<li>Choose a 'Category' for your new list (options are 'private', 'public' or 'free' as explained above)</li> -<li>Click 'Save'</li> + <li>A Private List is managed by you and can be seen only by you</li> + <li>A Public List can be seen by everybody, but managed only by you</li> + <li>A Open List can be seen and managed by everybody</li> </ul> - -<h2>Edit Lists</h2> -<ul> -<li>Click on 'edit' next to the list you wish to edit OR click on the name of the list and then click 'Edit List'</li> -<li>Edit details</li> -<li>Click 'Save'</li> +</li> </ul> -<p style="background-color: #ffe599">TIP: For instance, let's say you were putting together a reading list. You could make that list 'private' until items had been added, then 'edit' the list to change the 'category' to public when you were ready for the list to be seen by other users.</p> - -<h2>Placing Holds from Lists</h2> +<p>A list can also be created from the catalog search results</p> -<p>You can easily place a hold on multiple items from a list simply by clicking the checkboxes and then the 'Place Hold' button</p> - -<h2>Deleting a List</h2> <ul> -<li>Click on 'Delete' next to the list you wish to delete OR click on the name of the list and then click 'Delete List'</li> -<li>You will be asked "Are you sure you want to delete this List?"</li> -<li>If yes, click 'OK'. If no, click 'Cancel'</li> -<li>If your list is populated, you will be prompted one more time to confirm whether you want to delete the list</li> -<li>Click 'Confirm' next to the list you want to delete to delete it permanently</li> -</ul> -<h2>Questions</h2> - -<p><strong>Can I add items to a staff list right from the 'Lists' module?</strong></p> - -<p>Yes! To add an item to a list from the 'Lists' management module...</p> - + <li>Check the box to the left of the titles you want to add to the new list</li> + <li>Choose [New List] from the 'Add to:' pull down menu +<ul> + <li>Name the list and choose what type of list this is <ul> -<li>Click on the name of the list you wish to add items to</li> -<li>Scan or paste the barcode/s of the item you wish to add</li> -<li>Click 'Add'</li> + <li>A Private List is managed by you and can be seen only by you</li> + <li>A Public List can be seen by everybody, but managed only by you</li> + <li>A Open List can be seen and managed by everybody</li> +</ul> +</li> +</ul> +</li> </ul> -<p><strong>Can I add items to the list from the detail page?</strong></p> +<p>Once the list is saved it will accessible from the Lists page and from the 'Add to' menu at the top of the search results.</p> -<ul> -<li>Click on 'Search the catalog' in your search bar'</li> -<li>Perform a search</li> -<li>Click on the title of the item you wish to add to a list</li> -<li>From the details page, click 'Add to List'</li> -</ul> +<h2>Add to a List</h2> -<p><strong>Why can I add items to other users' 'private' lists when I'm logged in as staff?</strong></p> +<p>To add titles to an existing list click on the list name from the page of lists</p> -<p>No, private lists will remain private. You can see your own private lists from the staff client by clicking on the 'Your Lists' tab.</p> +<p>From the List page you can add titles by scanning barcodes into the box at the bottom of the page</p> -<p><strong>Can I see what lists a bib record is in?</strong></p> +<p>A title can also be added to a list by selecting titles on the search results page and choosing the list from the 'Add to' menu</p> -<p>Yes, on the detail page you will see a list of the lists that the title is in on the right hand side of the page</p> +<h2>Viewing Lists</h2> -<p><strong>As a staff member, what can I do with public lists created by patrons?</strong></p> +<p>To see the contents of a list, visit the Lists page on the staff client</p> -<p>Anyone with superlibrarian permission to edit/delete public patron lists. Editing is limited to editing the title or sorting order. -I have the 'virtualshelves' setting 'disabled' why can I still see the 'lists' menu in my staff client</p> +<p>Clicking on the 'List Name' will show the contents of the list</p> -<p>Even if lists are 'disabled' for the OPAC, staff users still have access to them from the staff side. The 'virtualshelves' preference only affects whether or not the feature is available from the OPAC.</p> +<p><strong>See the full documentation for Lists in the <a href="http://manual.koha-community.org/3.6/en/stafflists.html#lists">manual</a> (online).</strong></p> [% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.2.3 From mtj at kohaaloha.com Sat Oct 8 12:55:40 2011 From: mtj at kohaaloha.com (Mason James) Date: Sat, 08 Oct 2011 23:55:40 +1300 Subject: [Koha-patches] [PATCH] Bug 5668 - Star ratings in the opac Message-ID: <1318071341-31700-1-git-send-email-mtj@kohaaloha.com> --- C4/Auth.pm | 1 + C4/Output.pm | 34 ++- C4/Ratings.pm | 163 +++++++++ installer/data/mysql/kohastructure.sql | 14 + installer/data/mysql/updatedatabase.pl | 18 + .../prog/en/modules/admin/preferences/opac.pref | 12 + koha-tmpl/opac-tmpl/prog/en/css/jquery.rating.css | 12 + .../prog/en/lib/jquery/plugins/jquery.rating.js | 344 ++++++++++++++++++++ koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 63 ++++- .../opac-tmpl/prog/en/modules/opac-results.tt | 26 ++- koha-tmpl/opac-tmpl/prog/images/delete.gif | Bin 0 -> 752 bytes koha-tmpl/opac-tmpl/prog/images/star.gif | Bin 0 -> 815 bytes opac/opac-detail.pl | 28 ++ opac/opac-ratings-ajax.pl | 134 ++++++++ opac/opac-ratings.pl | 65 ++++ opac/opac-search.pl | 35 ++- t/db_dependent/Ratings.t | 53 +++ t/db_dependent/lib/KohaTest.pm | 1 + t/test-config.txt | 53 +++ 19 files changed, 1040 insertions(+), 16 deletions(-) create mode 100644 C4/Ratings.pm create mode 100644 koha-tmpl/opac-tmpl/prog/en/css/jquery.rating.css create mode 100644 koha-tmpl/opac-tmpl/prog/en/lib/jquery/plugins/jquery.rating.js create mode 100755 koha-tmpl/opac-tmpl/prog/images/delete.gif create mode 100644 koha-tmpl/opac-tmpl/prog/images/star.gif create mode 100755 opac/opac-ratings-ajax.pl create mode 100755 opac/opac-ratings.pl create mode 100755 t/db_dependent/Ratings.t create mode 100644 t/test-config.txt diff --git a/C4/Auth.pm b/C4/Auth.pm index 7211769..a8b3a55 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -344,6 +344,7 @@ sub get_template_and_user { LoginFirstname => (C4::Context->userenv?C4::Context->userenv->{"firstname"}:"Bel"), LoginSurname => C4::Context->userenv?C4::Context->userenv->{"surname"}:"Inconnu", TagsEnabled => C4::Context->preference("TagsEnabled"), + OpacStarRatings => C4::Context->preference("OpacStarRatings"), hide_marc => C4::Context->preference("hide_marc"), item_level_itypes => C4::Context->preference('item-level_itypes'), patronimages => C4::Context->preference("patronimages"), diff --git a/C4/Output.pm b/C4/Output.pm index 41a0a28..2c2aca2 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -40,18 +40,22 @@ BEGIN { # set the version for version checking $VERSION = 3.03; require Exporter; - @ISA = qw(Exporter); - @EXPORT_OK = qw(&is_ajax ajax_fail); # More stuff should go here instead - %EXPORT_TAGS = ( all =>[qw(&pagination_bar - &output_with_http_headers &output_html_with_http_headers)], - ajax =>[qw(&output_with_http_headers is_ajax)], - html =>[qw(&output_with_http_headers &output_html_with_http_headers)] - ); + + @ISA = qw(Exporter); + @EXPORT_OK = qw(&is_ajax ajax_fail); # More stuff should go here instead + %EXPORT_TAGS = ( all =>[qw(&themelanguage &gettemplate setlanguagecookie pagination_bar + &output_with_http_headers &output_ajax_with_http_headers &output_html_with_http_headers)], + ajax =>[qw(&output_with_http_headers &output_ajax_with_http_headers is_ajax)], + html =>[qw(&output_with_http_headers &output_html_with_http_headers)] + ); push @EXPORT, qw( - &output_html_with_http_headers &output_with_http_headers FormatData FormatNumber pagination_bar + &themelanguage &gettemplate setlanguagecookie getlanguagecookie pagination_bar + ); + push @EXPORT, qw( + &output_html_with_http_headers &output_ajax_with_http_headers &output_with_http_headers FormatData FormatNumber ); -} +} =head1 NAME @@ -310,6 +314,18 @@ sub output_html_with_http_headers ($$$;$) { output_with_http_headers( $query, $cookie, $data, 'html', $status ); } + +sub output_ajax_with_http_headers ($$) { + my ( $query, $js ) = @_; + print $query->header( + -type => 'text/javascript', + -charset => 'UTF-8', + -Pragma => 'no-cache', + -'Cache-Control' => 'no-cache', + -expires => '-1d', + ), $js; +} + sub is_ajax () { my $x_req = $ENV{HTTP_X_REQUESTED_WITH}; return ( $x_req and $x_req =~ /XMLHttpRequest/i ) ? 1 : 0; diff --git a/C4/Ratings.pm b/C4/Ratings.pm new file mode 100644 index 0000000..fac0af7 --- /dev/null +++ b/C4/Ratings.pm @@ -0,0 +1,163 @@ +package C4::Ratings; + +# Copyright 2011 KohaAloha, NZ +# +# 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 Exporter; +use POSIX; +use C4::Debug; +use C4::Context; + +#use Smart::Comments '####'; + +use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); + +BEGIN { + $VERSION = 3.00; + @ISA = qw(Exporter); + + @EXPORT = qw( + &get_rating + &add_rating + &mod_rating + &del_rating + ); +} + +sub get_rating { + my ( $biblionumber, $borrowernumber ) = @_; + my $query = qq| SELECT COUNT(*) AS total, SUM(value) AS sum +FROM ratings WHERE biblionumber = ? |; + + my $sth = C4::Context->dbh->prepare($query); + $sth->execute($biblionumber); + my $res = $sth->fetchrow_hashref(); + + my ( $avg, $avg_int ) = 0; + + if ( $res->{sum} and $res->{total} ) { + eval { $avg = $res->{sum} / $res->{total} }; + } + + $avg_int = sprintf( "%.1f", $avg ); + $avg = sprintf( "%.0f", $avg ); + + my %rating_hash; + $rating_hash{total} = $res->{total}; + $rating_hash{avg} = $avg; + $rating_hash{avg_int} = $avg_int; + + if ($borrowernumber) { + my $q2 = qq| SELECT value FROM ratings +WHERE biblionumber = ? AND borrowernumber = ?|; + my $sth1 = C4::Context->dbh->prepare($q2); + $sth1->execute( $biblionumber, $borrowernumber ); + my $res1 = $sth1->fetchrow_hashref(); + $rating_hash{'my_rating'} = $res1->{"value"}; + } + return \%rating_hash; +} + +sub add_rating { + my ( $biblionumber, $borrowernumber, $value ) = @_; + my $query = qq| INSERT INTO ratings (borrowernumber,biblionumber,value) + VALUES (?,?,?)|; + my $sth = C4::Context->dbh->prepare($query); + $sth->execute( $borrowernumber, $biblionumber, $value ); + my $rating = get_rating( $biblionumber, $borrowernumber ); + return $rating; +} + +sub mod_rating { +#### mod_rating + my ( $biblionumber, $borrowernumber, $value ) = @_; + my $query = +qq|UPDATE ratings SET value = ? WHERE borrowernumber = ? AND biblionumber = ?|; + my $sth = C4::Context->dbh->prepare($query); + $sth->execute( $value, $borrowernumber, $biblionumber ); + my $rating = get_rating( $biblionumber, $borrowernumber ); + return $rating; +} + +# del_rating is currently only used for passing the Ratings.t test +sub del_rating { + my ( $biblionumber, $borrowernumber ) = @_; + my $dbh = C4::Context->dbh; + my $query = + "delete from ratings where borrowernumber = ? and biblionumber = ?"; + my $sth = C4::Context->dbh->prepare($query); + my $rv = $sth->execute( $borrowernumber, $biblionumber ); + my $rating = get_rating( $biblionumber, undef ); + return $rating; +} + +1; +__END__ + +=head1 NAME + +C4::Ratings - creates, updates and fetches Koha ratings + +=head1 SYNOPSIS + +# get a rating for a bib + my $rating = get_rating( $biblionumber, undef ); + my $rating = get_rating( $biblionumber, $borrowernumber ); + +# add a rating for a bib + my $rating = add_rating( $biblionumber, $borrowernumber, $my_rating ); + +# mod a rating for a bib + my $rating = mod_rating( $biblionumber, $borrowernumber, $my_rating ); + +# delete a rating for a bib + my $rv = del_rating( $biblionumber, $borrowernumber ); + +=head1 DESCRIPTION + +This module provides simple functionality for a user to 'rate' a biblio, and to return a biblio's rating infor + +=head1 BUGS + +Please use bugs.koha-community.org for tracking bugs. + +=head1 SOURCE AVAILABILITY + +The source is available from the koha-community.org git server +L<http://git.koha-community.org> + +=head1 AUTHOR + +Original code: Mason James <mtj at kohaaloha.com> + +=head1 COPYRIGHT + +Copyright (c) 2011 Mason James <mtj at kohaaloha.com> + +=head1 LICENSE + +C4::Ratings is free software. You can redistribute it and/or +modify it under the same terms as Koha itself. + +=head1 CREDITS + + Mason James <mtj at kohaaloha.com> + +=cut diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3a51df5..e073e0f 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2654,6 +2654,20 @@ CREATE TABLE `fieldmapping` ( -- koha to keyword mapping PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +--- +--- 'Ratings' table. This tracks the star ratings set by borrowers. +--- + +DROP TABLE IF EXISTS `ratings`; +CREATE TABLE `ratings` ( + `borrowernumber` int(11) NOT NULL, --- the borrower this rating is for + `biblionumber` int(11) NOT NULL, --- the biblio it's for + `value` tinyint(1) NOT NULL, --- the rating, from 1-5 + `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, + PRIMARY KEY (`borrowernumber`,`biblionumber`), + KEY `ratings_borrowers_fk_1` (`borrowernumber`), + KEY `ratings_biblionumber_fk_1` (`biblionumber`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6b88c29..adaac54 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4447,6 +4447,24 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { } +$DBversion = '3.05.00.XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do( qq | + CREATE TABLE `ratings` ( + `borrowernumber` int(11) NOT NULL, + `biblionumber` int(11) NOT NULL, + `value` tinyint(1) NOT NULL, + `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, + PRIMARY KEY (`rating_id`), + KEY `ratings_borrowers_fk_1` (`borrowernumber`), + KEY `ratings_biblionumber_fk_1` (`biblionumber`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 |); + + $dbh->do(qq|INSERT INTO `systempreferences` VALUES ('OpacStarRatings','0',NULL,NULL,NULL)|); + print "Upgrade to $DBversion done (Add 'ratings' table and 'OpacStarRatings' syspref)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) 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 8bbf692..4b12691 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 @@ -6,6 +6,10 @@ OPAC: choices: opac-templates - theme on the OPAC. - + + + + - "The OPAC is located at http://" - pref: OPACBaseURL class: url @@ -22,6 +26,14 @@ OPAC: no: Disable - "Koha OPAC as public. Private OPAC requires authentification before accessing the OPAC." - + - "Show star-ratings on" + - pref: OpacStarRatings + choices: + yes: "results and details" + no: "no" + details: "only details" + - "pages." + - - pref: OpacMaintenance choices: yes: Show diff --git a/koha-tmpl/opac-tmpl/prog/en/css/jquery.rating.css b/koha-tmpl/opac-tmpl/prog/en/css/jquery.rating.css new file mode 100644 index 0000000..18c0f3e --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/css/jquery.rating.css @@ -0,0 +1,12 @@ +/* jQuery.Rating Plugin CSS - http://www.fyneworks.com/jquery/star-rating/ */ +div.rating-cancel,div.star-rating{float:left;width:15px;height:15px;text-indent:-999em;cursor:pointer;display:block;background:transparent;overflow:hidden} +div.rating-cancel,div.rating-cancel a{background:url(../../images/delete.gif) no-repeat 0 -16px} +div.star-rating,div.star-rating a{background:url(../../images/star.gif) no-repeat 0 0px} +div.rating-cancel a,div.star-rating a{display:block;width:16px;height:100%;background-position:0 0px;border:0} +div.star-rating-on a{background-position:0 -32px!important} +div.star-rating-hover a{background-position:0 -16px} +/* Read Only CSS */ +div.star-rating-readonly a{cursor:default !important} +/* Partial Star CSS */ +div.star-rating{background:transparent!important;overflow:hidden!important} +/* END jQuery.Rating Plugin CSS */ diff --git a/koha-tmpl/opac-tmpl/prog/en/lib/jquery/plugins/jquery.rating.js b/koha-tmpl/opac-tmpl/prog/en/lib/jquery/plugins/jquery.rating.js new file mode 100644 index 0000000..57a1c2a --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/lib/jquery/plugins/jquery.rating.js @@ -0,0 +1,344 @@ +/* + ### jQuery Star Rating Plugin v3.10 - 2009-03-23 ### + * Home: http://www.fyneworks.com/jquery/star-rating/ + * Code: http://code.google.com/p/jquery-star-rating-plugin/ + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + ### +*/ + +/*# AVOID COLLISIONS #*/ +;if(window.jQuery) (function($){ +/*# AVOID COLLISIONS #*/ + + // IE6 Background Image Fix + if ($.browser.msie) try { document.execCommand("BackgroundImageCache", false, true)} catch(e) { } + // Thanks to http://www.visualjquery.com/rating/rating_redux.html + + // plugin initialization + $.fn.rating = function(options){ + if(this.length==0) return this; // quick fail + + // Handle API methods + if(typeof arguments[0]=='string'){ + // Perform API methods on individual elements + if(this.length>1){ + var args = arguments; + return this.each(function(){ + $.fn.rating.apply($(this), args); + }); + }; + // Invoke API method handler + $.fn.rating[arguments[0]].apply(this, $.makeArray(arguments).slice(1) || []); + // Quick exit... + return this; + }; + + // Initialize options for this call + var options = $.extend( + {}/* new object */, + $.fn.rating.options/* default options */, + options || {} /* just-in-time options */ + ); + + // loop through each matched element + this + .not('.star-rating-applied') + .addClass('star-rating-applied') + .each(function(){ + + // Load control parameters / find context / etc + var eid = (this.name || 'unnamed-rating').replace(/\[|\]+/g, "_"); + var context = $(this.form || document.body); + var input = $(this); + var raters = context.data('rating') || { count:0 }; + var rater = raters[eid]; + var control; + + // if rater is available, verify that the control still exists + if(rater) control = rater.data('rating'); + + if(rater && control){ + // add star to control if rater is available and the same control still exists + control.count++; + + } + else{ + // create new control if first star or control element was removed/replaced + + // Initialize options for this raters + control = $.extend( + {}/* new object */, + options || {} /* current call options */, + ($.metadata? input.metadata(): ($.meta?input.data():null)) || {}, /* metadata options */ + { count:0, stars: [], inputs: [] } + ); + + // increment number of rating controls + control.serial = raters.count++; + + // create rating element + rater = $('<span class="star-rating-control"/>'); + input.before(rater); + + // Mark element for initialization (once all stars are ready) + rater.addClass('rating-to-be-drawn'); + + // Accept readOnly setting from 'disabled' property + if(input.attr('disabled')) control.readOnly = true; + + // Create 'cancel' button + rater.append( + control.cancel = $('<div class="rating-cancel"><a title="' + control.cancel + '">' + control.cancelValue + '</a></div>') + .mouseover(function(){ + $(this).rating('drain'); + $(this).addClass('star-rating-hover'); + //$(this).rating('focus'); + }) + .mouseout(function(){ + $(this).rating('draw'); + $(this).removeClass('star-rating-hover'); + //$(this).rating('blur'); + }) + .click(function(){ + $(this).rating('select'); + }) + .data('rating', control) + ); + + }; // first element of group + + // insert rating star + var star = $('<div class="star-rating rater-'+ control.serial +'"><a title="' + (this.title || this.value) + '">' + this.value + '</a></div>'); + rater.append(star); + + // inherit attributes from input element + if(this.id) star.attr('id', this.id); + if(this.className) star.addClass(this.className); + + // Half-stars? + if(control.half) control.split = 2; + + // Prepare division control + if(typeof control.split=='number' && control.split>0){ + var stw = ($.fn.width ? star.width() : 0) || control.starWidth; + var spi = (control.count % control.split), spw = Math.floor(stw/control.split); + star + // restrict star's width and hide overflow (already in CSS) + .width(spw) + // move the star left by using a negative margin + // this is work-around to IE's stupid box model (position:relative doesn't work) + .find('a').css({ 'margin-left':'-'+ (spi*spw) +'px' }) + }; + + // readOnly? + if(control.readOnly)//{ //save a byte! + // Mark star as readOnly so user can customize display + star.addClass('star-rating-readonly'); + //} //save a byte! + else//{ //save a byte! + // Enable hover css effects + star.addClass('star-rating-live') + // Attach mouse events + .mouseover(function(){ + $(this).rating('fill'); + $(this).rating('focus'); + }) + .mouseout(function(){ + $(this).rating('draw'); + $(this).rating('blur'); + }) + .click(function(){ + $(this).rating('select'); + }) + ; + //}; //save a byte! + + // set current selection + if(this.checked) control.current = star; + + // hide input element + input.hide(); + + // backward compatibility, form element to plugin + input.change(function(){ + $(this).rating('select'); + }); + + // attach reference to star to input element and vice-versa + star.data('rating.input', input.data('rating.star', star)); + + // store control information in form (or body when form not available) + control.stars[control.stars.length] = star[0]; + control.inputs[control.inputs.length] = input[0]; + control.rater = raters[eid] = rater; + control.context = context; + + input.data('rating', control); + rater.data('rating', control); + star.data('rating', control); + context.data('rating', raters); + }); // each element + + // Initialize ratings (first draw) + $('.rating-to-be-drawn').rating('draw').removeClass('rating-to-be-drawn'); + + return this; // don't break the chain... + }; + + /*--------------------------------------------------------*/ + + /* + ### Core functionality and API ### + */ + $.extend($.fn.rating, { + + focus: function(){ + var control = this.data('rating'); if(!control) return this; + if(!control.focus) return this; // quick fail if not required + // find data for event + var input = $(this).data('rating.input') || $( this.tagName=='INPUT' ? this : null ); + // focus handler, as requested by focusdigital.co.uk + if(control.focus) control.focus.apply(input[0], [input.val(), $('a', input.data('rating.star'))[0]]); + }, // $.fn.rating.focus + + blur: function(){ + var control = this.data('rating'); if(!control) return this; + if(!control.blur) return this; // quick fail if not required + // find data for event + var input = $(this).data('rating.input') || $( this.tagName=='INPUT' ? this : null ); + // blur handler, as requested by focusdigital.co.uk + if(control.blur) control.blur.apply(input[0], [input.val(), $('a', input.data('rating.star'))[0]]); + }, // $.fn.rating.blur + + fill: function(){ // fill to the current mouse position. + var control = this.data('rating'); if(!control) return this; + // do not execute when control is in read-only mode + if(control.readOnly) return; + // Reset all stars and highlight them up to this element + this.rating('drain'); + this.prevAll().andSelf().filter('.rater-'+ control.serial).addClass('star-rating-hover'); + },// $.fn.rating.fill + + drain: function() { // drain all the stars. + var control = this.data('rating'); if(!control) return this; + // do not execute when control is in read-only mode + if(control.readOnly) return; + // Reset all stars + control.rater.children().filter('.rater-'+ control.serial).removeClass('star-rating-on').removeClass('star-rating-hover'); + },// $.fn.rating.drain + + draw: function(){ // set value and stars to reflect current selection + var control = this.data('rating'); if(!control) return this; + // Clear all stars + this.rating('drain'); + // Set control value + if(control.current){ + control.current.data('rating.input').attr('checked','checked'); + control.current.prevAll().andSelf().filter('.rater-'+ control.serial).addClass('star-rating-on'); + } + else + $(control.inputs).removeAttr('checked'); + // Show/hide 'cancel' button + control.cancel[control.readOnly || control.required?'hide':'show'](); + // Add/remove read-only classes to remove hand pointer + this.siblings()[control.readOnly?'addClass':'removeClass']('star-rating-readonly'); + },// $.fn.rating.draw + + select: function(value){ // select a value + var control = this.data('rating'); if(!control) return this; + // do not execute when control is in read-only mode + if(control.readOnly) return; + // clear selection + control.current = null; + // programmatically (based on user input) + if(typeof value!='undefined'){ + // select by index (0 based) + if(typeof value=='number') + return $(control.stars[value]).rating('select'); + // select by literal value (must be passed as a string + if(typeof value=='string') + //return + $.each(control.stars, function(){ + if($(this).data('rating.input').val()==value) $(this).rating('select'); + }); + } + else + control.current = this[0].tagName=='INPUT' ? + this.data('rating.star') : + (this.is('.rater-'+ control.serial) ? this : null); + + // Update rating control state + this.data('rating', control); + // Update display + this.rating('draw'); + // find data for event + var input = $( control.current ? control.current.data('rating.input') : null ); + // click callback, as requested here: http://plugins.jquery.com/node/1655 + if(control.callback) control.callback.apply(input[0], [input.val(), $('a', control.current)[0]]);// callback event + },// $.fn.rating.select + + readOnly: function(toggle, disable){ // make the control read-only (still submits value) + var control = this.data('rating'); if(!control) return this; + // setread-only status + control.readOnly = toggle || toggle==undefined ? true : false; + // enable/disable control value submission + if(disable) $(control.inputs).attr("disabled", "disabled"); + else $(control.inputs).removeAttr("disabled"); + // Update rating control state + this.data('rating', control); + // Update display + this.rating('draw'); + },// $.fn.rating.readOnly + + disable: function(){ // make read-only and never submit value + this.rating('readOnly', true, true); + },// $.fn.rating.disable + + enable: function(){ // make read/write and submit value + this.rating('readOnly', false, false); + }// $.fn.rating.select + + }); + + /*--------------------------------------------------------*/ + + /* + ### Default Settings ### + eg.: You can override default control like this: + $.fn.rating.options.cancel = 'Clear'; + */ + $.fn.rating.options = { //$.extend($.fn.rating, { options: { + cancel: 'Cancel Rating', // advisory title for the 'cancel' link + cancelValue: '', // value to submit when user click the 'cancel' link + split: 0, // split the star into how many parts? + + // Width of star image in case the plugin can't work it out. This can happen if + // the jQuery.dimensions plugin is not available OR the image is hidden at installation + starWidth: 16//, + + //NB.: These don't need to be pre-defined (can be undefined/null) so let's save some code! + //half: false, // just a shortcut to control.split = 2 + //required: false, // disables the 'cancel' button so user can only select one of the specified values + //readOnly: false, // disable rating plugin interaction/ values cannot be changed + //focus: function(){}, // executed when stars are focused + //blur: function(){}, // executed when stars are focused + //callback: function(){}, // executed when a star is clicked + }; //} }); + + /*--------------------------------------------------------*/ + + /* + ### Default implementation ### + The plugin will attach itself to file inputs + with the class 'multi' when the page loads + */ + $(function(){ $('input[type=radio].star').rating(); }); + + + +/*# AVOID COLLISIONS #*/ +})(jQuery); +/*# AVOID COLLISIONS #*/ diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt index 3e8586d..9f86faa 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -1,6 +1,9 @@ [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield %][% END %] [% INCLUDE 'doc-head-close.inc' %] <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> +<script type="text/javascript" src="/opac-tmpl/prog/en/lib/jquery/plugins/jquery.rating.js"></script> +<link rel="stylesheet" type="text/css" href="/opac-tmpl/prog/en/css/jquery.rating.css" /> + <script type="text/JavaScript" language="JavaScript"> //<![CDATA[ $(document).ready(function() { @@ -31,6 +34,42 @@ [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %] $(".tagbutton").click(KOHA.Tags.add_tag_button);[% END %][% END %][% END %] + // ratings code + // hide 'rate' button + $('input[name="rate_button"]').remove(); + + +$(".auto-submit-star").rating({ + callback: function (value, link) { + $.post("/cgi-bin/koha/opac-ratings-ajax.pl", { + my_rating: $("#my_rating").attr("value"), + borrowernumber: "[% borrowernumber %]", + biblionumber: "[% biblionumber %]", + value: value, + }, function (data) { + + if (data.no_op == 1) { + //no-op + } else { + $("#rating_avg_text").text('average ' + data.avg_int); + + if (data.my_rating == null) { //delete + $("#my_rating_text").text('your rating: none, '); + $("#my_rating").val(data.my_rating); + + } else { // an add or mod + $("#my_rating_text").text('your rating: ' + data.my_rating + ', '); + $("#my_rating").val(data.my_rating); + } + + $("#rating_avg").text('average: ' + data.avg_int); + $("#rating_total").text(' (' + data.rating_total + ' votes)'); + } + }, "json"); + } +}); + + }); YAHOO.util.Event.onContentReady("furtherm", function () { @@ -47,7 +86,6 @@ YAHOO.util.Event.onContentReady("furtherm", function () { YAHOO.util.Event.addListener("furthersearches", "click", furthersearchesMenu.show, null, furthersearchesMenu); YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionfurthersearchesMenu); }); - //]]> </script> [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]<style type="text/css"> @@ -311,7 +349,28 @@ YAHOO.util.Event.onContentReady("furtherm", function () { </span> [% END %][% END %][% END %] - [% IF ( BakerTaylorContentURL ) %] + [% IF ( OpacStarRatings ) %] + <form method="post" action="/cgi-bin/koha/opac-ratings.pl"> + <div class="results_summary"> +<input class="auto-submit-star" type="radio" name="rating" value="1"[% IF rating_avg == 1 %]checked="1"[% END %][% UNLESS borrowernumber %]disabled="disabled"[% END %]/> +<input class="auto-submit-star" type="radio" name="rating" value="2"[% IF rating_avg == 2 %]checked="1"[% END %][% UNLESS borrowernumber %]disabled="disabled"[% END %]/> +<input class="auto-submit-star" type="radio" name="rating" value="3"[% IF rating_avg == 3 %]checked="1"[% END %][% UNLESS borrowernumber %]disabled="disabled"[% END %]/> +<input class="auto-submit-star" type="radio" name="rating" value="4"[% IF rating_avg == 4 %]checked="1"[% END %][% UNLESS borrowernumber %]disabled="disabled"[% END %]/> +<input class="auto-submit-star" type="radio" name="rating" value="5"[% IF rating_avg == 5 %]checked="1"[% END %][% UNLESS borrowernumber %]disabled="disabled"[% END %]/> + <input type="hidden" name='biblionumber' value="[% biblionumber %]" /> + <input type="hidden" name='borrowernumber' value="[% borrowernumber %]" /> + <input type="hidden" name='my_rating' id='my_rating' value="[% my_rating %]" /> + + [% UNLESS ( rating_readonly ) %]  <INPUT name="rate_button" type="submit" value="Rate me">[% END %]  + + <span id="my_rating_text">your rating: [% IF my_rating %][% my_rating %][% ELSE %]none[% END %],</span> + <span id="rating_avg">average: [% rating_avg_int %]</span><span id="rating_total"> ([% rating_total %] votes)</span> + + </div> + </FORM> + [% END %] + + [% IF ( BakerTaylorContenturl ) %] <span class="results_summary"> <span class="label">Enhanced Content: </span> [% IF ( OPACurlOpenInNewWindow ) %]<a href="[% BakerTaylorContentURL |html %]" target="_blank">Content Cafe</a>[% ELSE %]<a href="[% BakerTaylorContentURL |html %]">Content Cafe</a>[% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt index b7fbcb3..e5c70bf 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -6,8 +6,10 @@ You did not specify any search criteria. [% END %] [% INCLUDE 'doc-head-close.inc' %] -<link rel="alternate" type="application/rss+xml" title="[% LibraryName |html %] Search RSS Feed" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&count=[% countrss |html %]&sort_by=acqdate_dsc&format=rss2" /> - +<link rel="alternate" type="application/rss+xml" title="[% LibraryName |html %] Search RSS Feed" href="[% OPACBaseurl %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&count=[% countrss |html %]&sort_by=acqdate_dsc&format=rss2" /> +<script type="text/javascript" src="/opac-tmpl/prog/en/lib/jquery/jquery.js"></script> +<script type="text/javascript" src="/opac-tmpl/prog/en/lib/jquery/plugins/jquery.rating.js"></script> +<link rel="stylesheet" type="text/css" href="/opac-tmpl/prog/en/css/jquery.rating.css" /> <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> [% IF ( OpacHighlightedWords ) %]<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.highlight-3.js"></script> @@ -231,6 +233,7 @@ $(document).ready(function(){ [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %] [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %] }); + //]]> </script> </head> @@ -478,6 +481,25 @@ $(document).ready(function(){ [% END %] [% IF ( LibraryThingForLibrariesID ) %]<div class="ltfl_reviews"></div>[% END %] + + [% IF ( OpacStarRatings == '1' ) %] + <div class="results_summary"> + <form name="moo" method="post" action="/cgi-bin/koha/opac-ratings.pl"> +<input class="star" type="radio" name="rating-[% SEARCH_RESULT.biblionumber %]" value="1" [% IF ( SEARCH_RESULT.rating_avg == 1 ) %]checked="checked"[% END %] disabled="disabled" /> +<input class="star" type="radio" name="rating-[% SEARCH_RESULT.biblionumber %]" value="2" [% IF ( SEARCH_RESULT.rating_avg == 2 ) %]checked="checked"[% END %] disabled="disabled" /> +<input class="star" type="radio" name="rating-[% SEARCH_RESULT.biblionumber %]" value="3" [% IF ( SEARCH_RESULT.rating_avg == 3 ) %]checked="checked"[% END %] disabled="disabled" /> +<input class="star" type="radio" name="rating-[% SEARCH_RESULT.biblionumber %]" value="4" [% IF ( SEARCH_RESULT.rating_avg == 4 ) %]checked="checked"[% END %] disabled="disabled" /> +<input class="star" type="radio" name="rating-[% SEARCH_RESULT.biblionumber %]" value="5" [% IF ( SEARCH_RESULT.rating_avg == 5 ) %]checked="checked"[% END %] disabled="disabled" /> + <input type="hidden" name='biblionumber' value="[% SEARCH_RESULT.biblionumber %]" /> + <input type="hidden" name='loggedinuser' value="[% loggedinuser %]" /> + + <span id="rating_total_[% SEARCH_RESULT.biblionumber %]">  ([% SEARCH_RESULT.rating_total %] votes)</span> + + + </form> + </div> + [% END %] + [% IF ( opacuserlogin ) %][% IF ( TagsEnabled ) %] [% IF ( TagsShowOnList ) %] [% IF ( SEARCH_RESULT.TagLoop.size ) %] diff --git a/koha-tmpl/opac-tmpl/prog/images/delete.gif b/koha-tmpl/opac-tmpl/prog/images/delete.gif new file mode 100755 index 0000000000000000000000000000000000000000..43c6ca8763d79bde87bcf437e497af00c8be562d GIT binary patch literal 752 zcmZ?wbhEHb6kt$bc*el6GthYN-n}zt&b)vB{*)<GZZDnssVwQ*wQJ8pz3-M6ef|3N zTw?I^BRjWl-THaiqIb<TR|-<zzkh%9=+U)n*M2*H{@2X5mq}6Aa+CK)+kfaTd)M9Y zW&YeVXU=?m_V93u_p1$S-kmu7EY$ycOu&bh{H05m9`-kWR9EwH&eRVR>i+-#|NQy$ zABXln&Q1FL`t{#CH*SY|{oJwc*Qz;h;)0))7aYq9ewP~fc2e)_P3vAY)$9wl{IzJp zy{ydlr;a^HiGHwZ{*SH8FZkJhE{gei`OM?;ir*_{?@ji478&@mD*tSH_`A&5 at 6Vqe z at G<&xeCOwiq-WvY-<q?(PpbX8Zpp{q%CC#&{pc>eS5f?;vgCP8#IHGBw=+^cY}xvy zx8c*8mDl2ff1W;kCeZrNm9vlQYJg5<pbb#`$->Caki?(^G9DBs4DA0KlA4-ZT3fl8 z8F_gb*}2-1v>0WWwY1oIg_&Emc-aM+Wn|bpRc1GF^$N-etzA1qr9X*XNNWw_j-BjG zGEKc(x)1gUF{(82E at ad^eMXp9hUxg0Q)f<}lVRDncBb&%dq*yAR+(|<o-jL$(28?2 zo;??45^QExc`no~#IC}^-ui`UvIUER!h-n=LseJ=rYP`FI@~V6z4by;((yhm^C*W! z21kx at DaO@p*l}R7K&xy_%z+DytsIk;xgB`2439K+b7?GbXmoN_5mIg1 at _?b4)vHb2 zW4=iz(~<TC27yT_6CAg$YSazO;JC%ee5xbs^c)q-iOvDjBs>l-D at bZwvw%g)cL7VG z)An_f*+XqOetkIP*eg{wS7K(+qJ{-x0ue3?v&y~1d1To>MqD_2keNGNE=Pc|!BJ7b fV_(F^#N=Z_Jo9)pKRPly^YODPxtB<AFjxZs(@{iI literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/star.gif b/koha-tmpl/opac-tmpl/prog/images/star.gif new file mode 100644 index 0000000000000000000000000000000000000000..d0948a70843bf01952d1f81dcfcdadc92976a04a GIT binary patch literal 815 zcmZ?wbhEHb6ksr5c*el6(A at m!(W5UnOP^`reSRqFN=wUy;^KSv?mbz*{y;*);~mc5 z-|RUW6m;#{wMW}bp6pHg_U+rN({8s`u6+0I-Q5+MAMeb%w`<p%^ObAe+`hkj`DTyO z+d~E~k2$_RJM(N#&bNn2U+&-kax?1Vx!~u|pC6Bkx;a<%e0BBpNt3?6-n!q(>5!M# z{q=^=j}*N*e*EQepZ7;K-(U6l^W*)qy-uI5Mx04YJ9FmD at 2@w0e|`3BzvYV!svmDJ zy1UBt<DL4wUS5~`l~&o?KiTc|?y&dMwH9wLt^WW2|BarW%QZD$t~tCq+4%9S{-+DB zU+=}f+^q2P-MdfMLf>A9dUx3IVz=bW<9TmSpMHPB|LHc1x92?H at 6~*NPV?1P?R#4d zPbMV1-s|#ytJ9}D;U7+0e!n;8#jahi&$Zv4GUd&Fk1akv*Jf&ey1!wEi_7<GUO*ce zC<BT=Ss2+FvKVwg#(?64f&G6&R#S79fN)Dk2QP1DuW+|=Z&!EEq$XuvcJ`T_!n3+( zPg$TWFniYgMJuxwEHYhZ+HLC6v}WVFjRGxe*Yle0Y?-ll&zz2hYr8v-tu*bNVmfR6 znT~Z6o0Ux&=T2&$rVu=>gU#eYv#yB=$CE4*Ha3+f942mV(XO4k$!yUkYI4!<crrvB zCM=xaSm|bCkl=8r*<OezWJO^_0~=?DVCaekf*U&*6uTK@`5X*vJ?{A5Yn6wikt>^v z(7()>%8M?Gl%7kx>Gn`^RAQF96>H<Z$Y)U-PmqX3BO7nCe5XmDq6#B(gG-`HBtv>~ zqm`q-QcY~aQ7_g~!8sNO9r=2u3Mlqi#CWtc9T(=ypIRf>c$iT@(<;xV at nLFbqN;ve z&H|wp at 2R5NS2`L#KJ=KR(rKEJaLDyUmqb%cL}by=)-=YHmH-A at k7GPXma%d?aC*qL zh)X7I#x;cnUQ^jS^;|kOFmg at Nv0U}W!=<5%L(6DYL1B*CL?*3JjSUV#i&`dVbSiW! SUO9NY!6jXVS5kz7!5RQ<r+B^q literal 0 HcmV?d00001 diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index e18e046..3a57101 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -2,6 +2,7 @@ # Copyright 2000-2002 Katipo Communications # Copyright 2010 BibLibre +# Copyright 2011 KohaAloha, NZ # # This file is part of Koha. # @@ -37,6 +38,8 @@ use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn); use C4::External::Amazon; use C4::External::Syndetics qw(get_syndetics_index get_syndetics_summary get_syndetics_toc get_syndetics_excerpt get_syndetics_reviews get_syndetics_anotes ); use C4::Review; +use C4::Ratings; +use C4::Serials; use C4::Members; use C4::VirtualShelves; use C4::XSLT; @@ -46,6 +49,8 @@ use MARC::Record; use MARC::Field; use List::MoreUtils qw/any none/; +use Smart::Comments '####'; + BEGIN { if (C4::Context->preference('BakerTaylorEnabled')) { require C4::External::BakerTaylor; @@ -64,6 +69,12 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( } ); + + +#### $borrowernumber + + + my $biblionumber = $query->param('biblionumber') || $query->param('bib'); $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); @@ -306,6 +317,10 @@ if (!$@ and C4::Context->preference('ShowReviewer') and C4::Context->preference( my $reviews = getreviews( $biblionumber, 1 ); my $loggedincommenter; + + + + foreach ( @$reviews ) { my $borrowerData = GetMember('borrowernumber' => $_->{borrowernumber}); # setting some borrower info into this hash @@ -318,6 +333,7 @@ foreach ( @$reviews ) { $_->{userid} = $borrowerData->{'userid'}; $_->{cardnumber} = $borrowerData->{'cardnumber'}; $_->{datereviewed} = format_date($_->{datereviewed}); + if ($borrowerData->{'borrowernumber'} eq $borrowernumber) { $_->{your_comment} = 1; $loggedincommenter = 1; @@ -564,6 +580,18 @@ if (C4::Context->preference("OPACURLOpenInNewWindow")) { $template->param(covernewwindow => 'false'); } + +if ( C4::Context->preference('OpacStarRatings') =~ /1|details/ ) { + my $rating = get_rating( $biblionumber, $borrowernumber ); + $template->param( + my_rating => $rating->{'my_rating'}, + rating_total => $rating->{'total'}, + rating_avg => $rating->{'avg'}, + rating_avg_int => $rating->{'avg_int'}, + borrowernumber => $borrowernumber + ); +} + #Search for title in links my $marccontrolnumber = GetMarcControlnumber ($record, $marcflavour); diff --git a/opac/opac-ratings-ajax.pl b/opac/opac-ratings-ajax.pl new file mode 100755 index 0000000..3d37029 --- /dev/null +++ b/opac/opac-ratings-ajax.pl @@ -0,0 +1,134 @@ +#!/usr/bin/perl + +# Copyright 2011 KohaAloha, NZ +# +# 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. + +=head1 DESCRIPTION + +A script that takes an ajax json query, and then inserts or modifies a star-rating. + +=cut + +use strict; + +#use warnings; +use CGI; +use + CGI::Cookie; # need to check cookies before having CGI parse the POST request + +#use JSON; + +use C4::Auth qw(:DEFAULT check_cookie_auth); +use C4::Context; +use C4::Debug; +use C4::Output 3.02 qw(:html :ajax pagination_bar); +use C4::Dates qw(format_date); +use C4::Ratings; +use Data::Dumper; + +#use Smart::Comments '####'; + +my $is_ajax = is_ajax(); +my $query = ($is_ajax) ? &ajax_auth_cgi( {} ) : CGI->new(); +my $biblionumber = $query->param('biblionumber'); +my $my_rating = $query->param('value'); +my $my_old_rating = $query->param('my_rating'); + +my ( $template, $loggedinuser, $cookie ); +if ($is_ajax) { + $loggedinuser = C4::Context->userenv->{'number'}; +} +else { + ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "opac-detail.tmpl", + query => $query, + type => "opac", + authnotrequired => 0, # auth required to add tags + debug => 1, + } + ); +} + +my $rating; +my $no_op; + +undef $my_old_rating if $my_old_rating eq ''; +undef $my_rating if $my_rating eq ''; + +if ( !$my_rating ) { +#### delete + $rating = del_rating( $biblionumber, $loggedinuser ); +} + +elsif ( $my_rating and !$my_old_rating ) { +#### insert + $rating = add_rating( $biblionumber, $loggedinuser, $my_rating ); +} + +elsif ( $my_rating ne $my_old_rating ) { +#### mod + $rating = mod_rating( $biblionumber, $loggedinuser, $my_rating ); +} +else { +#### noop + $no_op = 1; +} + +my %js_reply = ( + rating_total => $rating->{'total'}, + avg => $rating->{'avg'}, + avg_int => $rating->{'avg_int'}, + my_rating => $rating->{'my_rating'}, + no_op => $no_op + +); + +use JSON; +my $json_reply = JSON->new->encode( \%js_reply ); + +#### $rating +#### %js_reply +#### $json_reply + +output_ajax_with_http_headers( $query, $json_reply ); +exit; + +# TODO: move this sub() to C4:Auth... +sub ajax_auth_cgi ($) { # returns CGI object + my $needed_flags = shift; + my %cookies = fetch CGI::Cookie; + my $input = CGI->new; + my $sessid = $cookies{'CGISESSID'}->value || $input->param('CGISESSID'); + my ( $auth_status, $auth_sessid ) = + check_cookie_auth( $sessid, $needed_flags ); + $debug + and print STDERR + "($auth_status, $auth_sessid) = check_cookie_auth($sessid," + . Dumper($needed_flags) . ")\n"; + if ( $auth_status ne "ok" ) { + output_ajax_with_http_headers $input, + "window.alert('Your CGI session cookie ($sessid) is not current. " + . "Please refresh the page and try again.');\n"; + exit 0; + } + $debug + and print STDERR "AJAX request: " . Dumper($input), + "\n(\$auth_status,\$auth_sessid) = ($auth_status,$auth_sessid)\n"; + return $input; +} + diff --git a/opac/opac-ratings.pl b/opac/opac-ratings.pl new file mode 100755 index 0000000..9c720de --- /dev/null +++ b/opac/opac-ratings.pl @@ -0,0 +1,65 @@ +#!/usr/bin/perl + +# Copyright 2011 KohaAloha, NZ +# +# 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. + +=head1 + +A script to add a rating for a bib, and return rating information. + +=cut + +use strict; +use warnings; +use CGI; +use CGI::Cookie; +use C4::Auth qw(:DEFAULT check_cookie_auth); +use C4::Context; +use C4::Output 3.02 qw(:html :ajax pagination_bar); +use C4::Dates qw(format_date); +use C4::Biblio; +use C4::Ratings; +#use C4::Debug; +#use Data::Dumper; +#use Smart::Comments '####'; + +my $query = CGI->new(); +#### $query +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { template_name => "", + query => $query, + type => "opac", + authnotrequired => 0, # auth required to add tags + debug => 1, + } +); + +my $biblionumber = $query->param('biblionumber'); +my $my_rating = $query->param('my_rating'); +my $my_new_rating = $query->param('rating'); +my $rating; + +#### $loggedinuser +if ( $my_rating == '' ) { +####insert + $rating = add_rating( $biblionumber, $loggedinuser, $my_new_rating ); +#### do nothing. +} elsif ( $my_new_rating ne $my_rating ) { +#### update + $rating = mod_rating( $biblionumber, $loggedinuser, $my_new_rating ); +} +print $query->redirect("/cgi-bin/koha/opac-detail.pl?biblionumber=$biblionumber"); diff --git a/opac/opac-search.pl b/opac/opac-search.pl index ff437da..2dcd81e 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -1,7 +1,8 @@ #!/usr/bin/perl -# Copyright 2008 Garry Collum and the Koha Koha Development team +# Copyright 2008 Garry Collum and the Koha Development team # Copyright 2010 BibLibre +# Copyright 2011 KohaAloha, NZ # # This file is part of Koha. # @@ -36,6 +37,13 @@ use C4::Biblio; # GetBiblioData use C4::Koha; use C4::Tags qw(get_tags); use C4::Branch; # GetBranches + + +use Smart::Comments '####'; + + +use C4::Ratings; + use POSIX qw(ceil floor strftime); use URI::Escape; use Storable qw(thaw freeze); @@ -359,6 +367,10 @@ if ($params->{'limit-yr'}) { # Params that can only have one value my $scan = $params->{'scan'}; my $count = C4::Context->preference('OPACnumSearchResults') || 20; +my $count = 3; + + + my $countRSS = C4::Context->preference('numSearchRSSResults') || 50; my $results_per_page = $params->{'count'} || $count; my $offset = $params->{'offset'} || 0; @@ -485,11 +497,27 @@ for (my $i=0;$i<@servers;$i++) { limit=>$tag_quantity }); } } - if (C4::Context->preference('COinSinOPACResults')) { + if (C4::Context->preference('COinSinOPACResults')) { foreach (@newresults) { $_->{coins} = GetCOinSBiblio($_->{'biblionumber'}); } - } + } + + if ( C4::Context->preference('OpacStarRatings') == 1 ) { + foreach (@newresults) { + my $rating = get_rating( $_->{'biblionumber'}, $borrowernumber ); + #### $rating + + + $_->{'my_rating'} = $rating->{'my_rating'}; + $_->{'rating_total'} = $rating->{'total'}; + $_->{'rating_avg'} = $rating->{'avg'}; + $_->{'rating_avgint'} = $rating->{'avg_int'}; + +#### $_ + } + } + if ($results_hashref->{$server}->{"hits"}){ $total = $total + $results_hashref->{$server}->{"hits"}; @@ -698,4 +726,5 @@ if (C4::Context->preference('GoogleIndicTransliteration')) { $template->param('GoogleIndicTransliteration' => 1); } + $template->param( borrowernumber => $borrowernumber); output_with_http_headers $cgi, $cookie, $template->output, $content_type; diff --git a/t/db_dependent/Ratings.t b/t/db_dependent/Ratings.t new file mode 100755 index 0000000..4bce698 --- /dev/null +++ b/t/db_dependent/Ratings.t @@ -0,0 +1,53 @@ +#!/usr/bin/perl +# +use strict; +use warnings; +use Test::More tests => 12; + +# use Smart::Comments '####'; + +BEGIN { + + use FindBin; + use C4::Ratings; + use_ok('C4::Ratings'); + + my $rating1 = add_rating( 1, 1, 3 ); + my $rating2 = add_rating( 1, 2, 4 ); + my $rating3 = mod_rating( 1, 1, 5 ); + my $rating4 = get_rating( 1, 1 ); + my $rating5 = get_rating( 1, undef ); + my $rating6 = del_rating( 1, 1 ); + my $rating7 = del_rating( 1, 2 ); + + ok( defined $rating1, 'add a rating' ); + ok( defined $rating2, 'add another rating' ); + ok( defined $rating3, 'update a rating' ); + ok( defined $rating4, 'get a rating' ); + ok( defined $rating5, 'get a rating, passing no userid' ); + ok( $rating3->{'avg'} == '4', "get a bib's average(float) rating" ); + ok( $rating3->{'avg_int'} == 4.5, "get a bib's average(int) rating" ); + ok( $rating3->{'total'} == 2, "get a bib's total number of ratings" ); + ok( $rating3->{'my_rating'} == 5, "get a users rating for a bib" ); + ok( defined $rating6, 'delete a rating' ); + ok( defined $rating7, 'delete another rating' ); +} + +=c + +$ perl ./t/db_dependent/Ratings.t +1..12 +ok 1 - use C4::Ratings; +ok 2 - add a rating +ok 3 - add another rating +ok 4 - update a rating +ok 5 - get a rating +ok 6 - get a rating, passing no userid +ok 7 - get a bib's average(float) rating +ok 8 - get a bib's average(int) rating +ok 9 - get a bib's total number of ratings +ok 10 - get a users rating for a bib +ok 11 - delete a rating +ok 12 - delete another rating + +=cut diff --git a/t/db_dependent/lib/KohaTest.pm b/t/db_dependent/lib/KohaTest.pm index 70c963d..369d6b5 100644 --- a/t/db_dependent/lib/KohaTest.pm +++ b/t/db_dependent/lib/KohaTest.pm @@ -228,6 +228,7 @@ sub startup_15_truncate_tables : Test( startup => 1 ) { subscriptionroutinglist suggestions tags + ratings virtualshelfcontents ); diff --git a/t/test-config.txt b/t/test-config.txt new file mode 100644 index 0000000..fb61d63 --- /dev/null +++ b/t/test-config.txt @@ -0,0 +1,53 @@ +# This configuration file lets the t/Makefile prepare a test koha-conf.xml file. +# It is generated by the top-level Makefile.PL. +# It is separate from the standard koha-conf.xml so that you can edit this by hand and test with different configurations. +ZEBRA_DATA_DIR = /home/mason/git.xen1/head/t/run/var/lib/zebradb +INTRANET_WWW_DIR = /home/mason/git.xen1/head/koha-tmpl +OPAC_CGI_DIR = /home/mason/git.xen1/head +PERL_MODULE_DIR = /home/mason/git.xen1/head +ZEBRA_LOCK_DIR = /home/mason/git.xen1/head/t/run/var/lock/zebradb +INTRANET_CGI_DIR = /home/mason/git.xen1/head +OPAC_TMPL_DIR = /home/mason/git.xen1/head/koha-tmpl/opac-tmpl +SCRIPT_NONDEV_DIR = /home/mason/koha-dev/bin +ZEBRA_RUN_DIR = /home/mason/git.xen1/head/t/run/var/run/zebradb +MAN_DIR = /home/mason/koha-dev/man +LOG_DIR = /home/mason/git.xen1/head/t/run/var/log +PAZPAR2_CONF_DIR = /home/mason/koha-dev/etc/pazpar2 +KOHA_CONF_DIR = /home/mason/git.xen1/head/t/run/etc +OPAC_WWW_DIR = /home/mason/git.xen1/head/koha-tmpl +SCRIPT_DIR = /home/mason/git.xen1/head/t/run/bin +DOC_DIR = /home/mason/koha-dev/doc +INTRANET_TMPL_DIR = /home/mason/git.xen1/head/koha-tmpl/intranet-tmpl +MISC_DIR = /home/mason/koha-dev/misc +ZEBRA_CONF_DIR = /home/mason/git.xen1/head/t/run/etc/zebradb + +TEST_DB_PASS = kohakoha +AUTH_INDEX_MODE = dom +DB_PASS = kohakoha +INSTALL_PAZPAR2 = no +PATH_TO_ZEBRA = /usr/bin +INSTALL_ZEBRA = yes +USE_MEMCACHED = no +DB_NAME = koha +ZEBRA_USER = kohauser +ZEBRA_SRU_BIBLIOS_PORT = 9998 +INSTALL_SRU = yes +RUN_DATABASE_TESTS = yes +DB_USER = kohaadmin +TEST_DB_NAME = kohatest +DB_HOST = localhost +ZEBRA_MARC_FORMAT = marc21 +ZEBRA_PASS = zebrastripes +DB_PORT = 3306 +TEST_DB_TYPE = mysql +TEST_DB_HOST = localhost +KOHA_INSTALLED_VERSION = 3.05.00.004 +ZEBRA_SRU_HOST = localhost +ZEBRA_SRU_AUTHORITIES_PORT = 9999 +DB_TYPE = mysql +ZEBRA_LANGUAGE = en +TEST_DB_USER = kohaadmin +AUTH_RETRIEVAL_CFG = retrieval-info-auth-dom.xml +ZEBRA_AUTH_CFG = zebra-authorities-dom.cfg +INSTALL_BASE = /home/mason/koha-dev +INSTALL_MODE = dev -- 1.7.1 From mtj at kohaaloha.com Sat Oct 8 14:44:54 2011 From: mtj at kohaaloha.com (Mason James) Date: Sun, 09 Oct 2011 01:44:54 +1300 Subject: [Koha-patches] [PATCH] Bug 6428 - refered column 'items.coded_location_qualifier' does not exist Message-ID: <1318077894-21537-1-git-send-email-mtj@kohaaloha.com> --- .../marc21/mandatory/marc21_framework_DEFAULT.sql | 2 +- .../marc21/optional/marc21_fastadd_framework.sql | 2 +- .../optional/marc21_simple_bib_frameworks.sql | 16 ++++++++-------- .../marc21/mandatory/marc21_framework_DEFAULT.sql | 2 +- .../marc21/optional/marc21_fastadd_framework.sql | 2 +- .../optional/marc21_simple_bib_frameworks.sql | 16 ++++++++-------- .../Obligatoire/marc21_framework_DEFAULT.sql | 2 +- .../Optionnel/marc21_simple_bib_frameworks.sql | 16 ++++++++-------- .../marc21/mandatory/marc21_framework_DEFAULT.sql | 2 +- .../marc21/optional/marc21_fastadd_framework.sql | 2 +- .../optional/marc21_simple_bib_frameworks.sql | 16 ++++++++-------- .../marc21/mandatory/marc21_framework_DEFAULT.sql | 2 +- .../marc21/optional/marc21_fastadd_framework.sql | 2 +- .../optional/marc21_simple_bib_frameworks.sql | 16 ++++++++-------- .../marcflavour/normarc/Obligatorisk/normarc.sql | 2 +- .../marc21/mandatory/marc21_framework_DEFAULT.sql | 2 +- .../marc21/optional/marc21_fastadd_framework.sql | 2 +- .../optional/marc21_simple_bib_frameworks.sql | 16 ++++++++-------- .../mandatory/unimarc_bibliographic_[DEFAULT].sql | 2 +- .../mandatory/unimarc_bibliographic_[DEFAULT].sql | 2 +- .../optional/unimarc_bibliographic_[AN].sql | 2 +- installer/data/mysql/updatedatabase.pl | 6 ++++++ 22 files changed, 69 insertions(+), 63 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 aa5390f..f5341aa 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 @@ -118,7 +118,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Aufstellungsort', 'Aufstellungsort', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, '', '', '', NULL), ('952', 'd', 'Erwerbungsdatum', 'Erwerbungsdatum', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, '', '', '', NULL), ('952', 'e', 'Lieferant', 'Lieferant', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, '', '', '', NULL), - ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, '', '', '', NULL), + ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, '', 10, '', '', '', NULL, 0, '', '', '', NULL), ('952', 'g', 'Kaufpreis', 'Kaufpreis', 0, 0, 'items.price', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'h', 'Heft/Jahrgang','Jahrgang/Heft', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'i', 'Inventarnummer','Inventarnummer', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, '', '', '', NULL), diff --git a/installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_fastadd_framework.sql b/installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_fastadd_framework.sql index d1e6944..e157958 100644 --- a/installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_fastadd_framework.sql +++ b/installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_fastadd_framework.sql @@ -115,7 +115,7 @@ INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblib ('952','c','Aufstellungsort','Aufstellungsort',0,0,'items.location',10,'LOC','','',NULL,0,'FA','',NULL,NULL), ('952','d','Erwerbungsdatum','Erwerbungsdatum',0,0,'items.dateaccessioned',10,'','','dateaccessioned.pl',NULL,0,'FA','',NULL,NULL), ('952','e','Lieferant','Lieferant',0,0,'items.booksellerid',10,'','','',NULL,0,'FA','',NULL,NULL), - ('952','f','Kodierter Standort-Qualifier','Kodierter Standort-Qualifier',0,0,'items.coded_location_qualifier',10,'','','',NULL,-5,'FA','',NULL,NULL), + ('952','f','Kodierter Standort-Qualifier','Kodierter Standort-Qualifier',0,0,'',10,'','','',NULL,-5,'FA','',NULL,NULL), ('952','g','Kaufpreis','Kaufpreis',0,0,'items.price',10,'','','',NULL,0,'FA','',NULL,NULL), ('952','h','Jahrgang/Heft','Jahrgang/Heft',0,0,'items.enumchron',10,'','','',NULL,0,'FA','',NULL,NULL), ('952','i','Inventarnummer','Inventarnummer', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'FA', '', NULL, NULL), diff --git a/installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql b/installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql index ffefd75..3f8475d 100644 --- a/installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql +++ b/installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql @@ -177,7 +177,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Aufstellungsort', 'Aufstellungsort', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'd', 'Erwerbungsdatum', 'Erwerbungsdatum', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'BKS', '', '', NULL), ('952', 'e', 'Lieferant', 'Lieferant', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), - ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'BKS', '', '', NULL), + ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'BKS', '', '', NULL), ('952', 'g', 'Kaufpreis', 'Kaufpreis', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'h', 'Jahrgang/Heft','Jahrgang/Heft', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'i', 'Inventarnummer','Inventarnummer', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), @@ -4102,7 +4102,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Aufstellungsort', 'Aufstellungsort', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'd', 'Erwerbungsdatum', 'Erwerbungsdatum', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'CF', '', '', NULL), ('952', 'e', 'Lieferant', 'Lieferant', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'CF', '', '', NULL), - ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'CF', '', '', NULL), + ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'CF', '', '', NULL), ('952', 'g', 'Kaufpreis', 'Kaufpreis', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'h', 'Jahrgang/Heft','Jahrgang/Heft', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'i', 'Inventarnummer', 'Inventarnummer', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'CF', '', '', NULL), @@ -8028,7 +8028,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Aufstellungsort', 'Aufstellungsort', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'd', 'Erwerbungsdatum', 'Erwerbungsdatum', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'SR', '', '', NULL), ('952', 'e', 'Lieferant', 'Lieferant', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'SR', '', '', NULL), - ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SR', '', '', NULL), + ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'SR', '', '', NULL), ('952', 'g', 'Kaufpreis', 'Kaufpreis', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'h', 'Jahrgang/Heft','Jahrgang/Heft', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'i', 'Inventarnummer', 'Inventarnummer', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'SR', '', '', NULL), @@ -11953,7 +11953,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Aufstellungsort', 'Aufstellungsort', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'd', 'Erwerbungsdatum', 'Erwerbungsdatum', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'VR', '', '', NULL), ('952', 'e', 'Lieferant', 'Lieferant', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'VR', '', '', NULL), - ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'VR', '', '', NULL), + ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'VR', '', '', NULL), ('952', 'g', 'Kaufpreis', 'Kaufpreis', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'h', 'Jahrgang/Heft','Jahrgang/Heft', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'i', 'Inventarnummer', 'Inventarnummer', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'VR', '', '', NULL), @@ -15877,7 +15877,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Aufstellungsort', 'Aufstellungsort', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'd', 'Erwerbungsdatum', 'Erwerbungsdatum', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'AR', '', '', NULL), ('952', 'e', 'Lieferant', 'Lieferant', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'AR', '', '', NULL), - ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'AR', '', '', NULL), + ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'AR', '', '', NULL), ('952', 'g', 'Kaufpreis', 'Kaufpreis', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'h', 'Jahrgang/Heft','Jahrgang/Heft', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'i', 'Inventarnummer', 'Inventarnummer', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'AR', '', '', NULL), @@ -19800,7 +19800,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Aufstellungsort', 'Aufstellungsort', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'd', 'Erwerbungsdatum', 'Erwerbungsdatum', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'KT', '', '', NULL), ('952', 'e', 'Lieferant', 'Lieferant', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'KT', '', '', NULL), - ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'KT', '', '', NULL), + ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'KT', '', '', NULL), ('952', 'g', 'Kaufpreis', 'Kaufpreis', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'h', 'Jahrgang/Heft','Jahrgang/Heft', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'i', 'Inventarnummer', 'Inventarnummer', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'KT', '', '', NULL), @@ -23724,7 +23724,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Aufstellungsort', 'Aufstellungsort', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'd', 'Erwerbungsdatum', 'Erwerbungsdatum', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'IR', '', '', NULL), ('952', 'e', 'Lieferant', 'Lieferant', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'IR', '', '', NULL), - ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'IR', '', '', NULL), + ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'IR', '', '', NULL), ('952', 'g', 'Kaufpreis', 'Kaufpreis', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'h', 'Jahrgang/Heft','Jahrgang/Heft', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'i', 'Inventarnummer', 'Inventarnummer', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'IR', '', '', NULL), @@ -27646,7 +27646,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Aufstellungsort', 'Aufstellungsort', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'd', 'Erwerbungsdatum', 'Erwerbungsdatum', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'SER', '', '', NULL), ('952', 'e', 'Lieferant', 'Lieferant', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'SER', '', '', NULL), - ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SER', '', '', NULL), + ('952', 'f', 'Kodierter Standort-Qualifier', 'Kodierter Standort-Qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'SER', '', '', NULL), ('952', 'g', 'Kaufpreis', 'Kaufpreis', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'h', 'Jahrgang/Heft','Jahrgang/Heft', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'i', 'Inventarnummer', 'Inventarnummer', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'SER', '', '', 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 383a9d9..72663e5 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 @@ -118,7 +118,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, '', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, '', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, '', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, '', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, '', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, '', '', '', NULL), diff --git a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_fastadd_framework.sql b/installer/data/mysql/en/marcflavour/marc21/optional/marc21_fastadd_framework.sql index 0ba4025..12c0367 100644 --- a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_fastadd_framework.sql +++ b/installer/data/mysql/en/marcflavour/marc21/optional/marc21_fastadd_framework.sql @@ -115,7 +115,7 @@ INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblib ('952','c','Shelving location','Shelving location',0,0,'items.location',10,'LOC','','',NULL,0,'FA','',NULL,NULL), ('952','d','Date acquired','Date acquired',0,0,'items.dateaccessioned',10,'','','dateaccessioned.pl',NULL,0,'FA','',NULL,NULL), ('952','e','Source of acquisition','Source of acquisition',0,0,'items.booksellerid',10,'','','',NULL,0,'FA','',NULL,NULL), - ('952','f','Coded location qualifier','Coded location qualifier',0,0,'items.coded_location_qualifier',10,'','','',NULL,0,'FA','',NULL,NULL), + ('952','f','Coded location qualifier','Coded location qualifier',0,0,'',10,'','','',NULL,0,'FA','',NULL,NULL), ('952','g','Cost, normal purchase price','Cost, normal purchase price',0,0,'items.price',10,'','','',NULL,0,'FA','',NULL,NULL), ('952','h','Serial Enumeration / chronology','Serial Enumeration / chronology',0,0,'items.enumchron',10,'','','',NULL,0,'FA','',NULL,NULL), ('952','i','Inventory number','Inventory number',0,0,'items.stocknumber',10,'','','',0,0,'FA','',NULL,NULL), diff --git a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql b/installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql index 701b1b9..e3034f1 100644 --- a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql +++ b/installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql @@ -177,7 +177,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'BKS', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'BKS', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'BKS', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), @@ -4102,7 +4102,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'CF', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'CF', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'CF', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'CF', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'CF', '', '', NULL), @@ -8028,7 +8028,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'SR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'SR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'SR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'SR', '', '', NULL), @@ -11953,7 +11953,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'VR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'VR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'VR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'VR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'VR', '', '', NULL), @@ -15877,7 +15877,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'AR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'AR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'AR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'AR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'AR', '', '', NULL), @@ -19800,7 +19800,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'KT', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'KT', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'KT', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'KT', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'KT', '', '', NULL), @@ -23724,7 +23724,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'IR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'IR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'IR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'IR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'IR', '', '', NULL), @@ -27646,7 +27646,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'SER', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'SER', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SER', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'SER', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'SER', '', '', 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 bda6735..abe5dc6 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 @@ -118,7 +118,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, '', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, '', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, '', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, '', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, '', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, '', '', '', NULL), diff --git a/installer/data/mysql/fr-FR/marcflavour/marc21/Optionnel/marc21_simple_bib_frameworks.sql b/installer/data/mysql/fr-FR/marcflavour/marc21/Optionnel/marc21_simple_bib_frameworks.sql index a70abc6..8926432 100644 --- a/installer/data/mysql/fr-FR/marcflavour/marc21/Optionnel/marc21_simple_bib_frameworks.sql +++ b/installer/data/mysql/fr-FR/marcflavour/marc21/Optionnel/marc21_simple_bib_frameworks.sql @@ -177,7 +177,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'BKS', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'BKS', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'BKS', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), @@ -4102,7 +4102,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'CF', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'CF', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'CF', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'CF', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'CF', '', '', NULL), @@ -8028,7 +8028,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'SR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'SR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'SR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'SR', '', '', NULL), @@ -11953,7 +11953,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'VR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'VR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'VR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'VR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'VR', '', '', NULL), @@ -15877,7 +15877,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'AR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'AR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'AR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'AR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'AR', '', '', NULL), @@ -19800,7 +19800,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'KT', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'KT', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'KT', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'KT', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'KT', '', '', NULL), @@ -23724,7 +23724,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'IR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'IR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'IR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'IR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'IR', '', '', NULL), @@ -27646,7 +27646,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'SER', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'SER', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SER', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'SER', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'SER', '', '', NULL), diff --git a/installer/data/mysql/it-IT/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/it-IT/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql index aeba01b..23874b7 100644 --- a/installer/data/mysql/it-IT/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/it-IT/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql @@ -118,7 +118,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, '', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, '', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, '', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, '', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, '', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, '', '', '', NULL), diff --git a/installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_fastadd_framework.sql b/installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_fastadd_framework.sql index 0ba4025..12c0367 100644 --- a/installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_fastadd_framework.sql +++ b/installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_fastadd_framework.sql @@ -115,7 +115,7 @@ INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblib ('952','c','Shelving location','Shelving location',0,0,'items.location',10,'LOC','','',NULL,0,'FA','',NULL,NULL), ('952','d','Date acquired','Date acquired',0,0,'items.dateaccessioned',10,'','','dateaccessioned.pl',NULL,0,'FA','',NULL,NULL), ('952','e','Source of acquisition','Source of acquisition',0,0,'items.booksellerid',10,'','','',NULL,0,'FA','',NULL,NULL), - ('952','f','Coded location qualifier','Coded location qualifier',0,0,'items.coded_location_qualifier',10,'','','',NULL,0,'FA','',NULL,NULL), + ('952','f','Coded location qualifier','Coded location qualifier',0,0,'',10,'','','',NULL,0,'FA','',NULL,NULL), ('952','g','Cost, normal purchase price','Cost, normal purchase price',0,0,'items.price',10,'','','',NULL,0,'FA','',NULL,NULL), ('952','h','Serial Enumeration / chronology','Serial Enumeration / chronology',0,0,'items.enumchron',10,'','','',NULL,0,'FA','',NULL,NULL), ('952','i','Inventory number','Inventory number',0,0,'items.stocknumber',10,'','','',0,0,'FA','',NULL,NULL), diff --git a/installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql b/installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql index 6916217..5bfa38b 100644 --- a/installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql +++ b/installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql @@ -177,7 +177,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'BKS', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'BKS', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'BKS', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), @@ -4098,7 +4098,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'CF', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'CF', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'CF', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'CF', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'CF', '', '', NULL), @@ -8020,7 +8020,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'SR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'SR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'SR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'SR', '', '', NULL), @@ -11941,7 +11941,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'VR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'VR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'VR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'VR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'VR', '', '', NULL), @@ -15861,7 +15861,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'AR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'AR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'AR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'AR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'AR', '', '', NULL), @@ -19780,7 +19780,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'KT', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'KT', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'KT', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'KT', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'KT', '', '', NULL), @@ -23700,7 +23700,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'IR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'IR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'IR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'IR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'IR', '', '', NULL), @@ -27618,7 +27618,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'SER', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'SER', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SER', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'SER', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'SER', '', '', NULL), diff --git a/installer/data/mysql/nb-NO/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/nb-NO/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql index 8ab9400..f93b738 100644 --- a/installer/data/mysql/nb-NO/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/nb-NO/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql @@ -118,7 +118,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, '', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, '', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, '', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, '', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, '', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, '', '', '', NULL), diff --git a/installer/data/mysql/nb-NO/marcflavour/marc21/optional/marc21_fastadd_framework.sql b/installer/data/mysql/nb-NO/marcflavour/marc21/optional/marc21_fastadd_framework.sql index 45c2fda..58e960b 100644 --- a/installer/data/mysql/nb-NO/marcflavour/marc21/optional/marc21_fastadd_framework.sql +++ b/installer/data/mysql/nb-NO/marcflavour/marc21/optional/marc21_fastadd_framework.sql @@ -115,7 +115,7 @@ INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblib ('952','c','Shelving location','Shelving location',0,0,'items.location',10,'LOC','','',NULL,0,'FA','',NULL,NULL), ('952','d','Date acquired','Date acquired',0,0,'items.dateaccessioned',10,'','','dateaccessioned.pl',NULL,0,'FA','',NULL,NULL), ('952','e','Source of acquisition','Source of acquisition',0,0,'items.booksellerid',10,'','','',NULL,0,'FA','',NULL,NULL), - ('952','f','Coded location qualifier','Coded location qualifier',0,0,'items.coded_location_qualifier',10,'','','',NULL,0,'FA','',NULL,NULL), + ('952','f','Coded location qualifier','Coded location qualifier',0,0,'',10,'','','',NULL,0,'FA','',NULL,NULL), ('952','g','Cost, normal purchase price','Cost, normal purchase price',0,0,'items.price',10,'','','',NULL,0,'FA','',NULL,NULL), ('952','h','Serial Enumeration / chronology','Serial Enumeration / chronology',0,0,'items.enumchron',10,'','','',NULL,0,'FA','',NULL,NULL), ('952','j','Shelving control number','Shelving control number',0,0,'items.stack',10,'STACK','','',NULL,0,'FA','',NULL,NULL), diff --git a/installer/data/mysql/nb-NO/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql b/installer/data/mysql/nb-NO/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql index 2586f51..4803dec 100644 --- a/installer/data/mysql/nb-NO/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql +++ b/installer/data/mysql/nb-NO/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql @@ -177,7 +177,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'BKS', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'BKS', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'BKS', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'j', 'Shelving control number', 'Shelving control number', 0, 0, 'items.stack', 10, 'STACK', '', '', NULL, -1, 'BKS', '', '', NULL), @@ -4101,7 +4101,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'CF', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'CF', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'CF', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'CF', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'j', 'Shelving control number', 'Shelving control number', 0, 0, 'items.stack', 10, 'STACK', '', '', NULL, -1, 'CF', '', '', NULL), @@ -8026,7 +8026,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'SR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'SR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'SR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'j', 'Shelving control number', 'Shelving control number', 0, 0, 'items.stack', 10, 'STACK', '', '', NULL, -1, 'SR', '', '', NULL), @@ -11950,7 +11950,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'VR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'VR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'VR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'VR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'j', 'Shelving control number', 'Shelving control number', 0, 0, 'items.stack', 10, 'STACK', '', '', NULL, -1, 'VR', '', '', NULL), @@ -15873,7 +15873,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'AR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'AR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'AR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'AR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'j', 'Shelving control number', 'Shelving control number', 0, 0, 'items.stack', 10, 'STACK', '', '', NULL, -1, 'AR', '', '', NULL), @@ -19795,7 +19795,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'KT', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'KT', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'KT', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'KT', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'j', 'Shelving control number', 'Shelving control number', 0, 0, 'items.stack', 10, 'STACK', '', '', NULL, -1, 'KT', '', '', NULL), @@ -23718,7 +23718,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'IR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'IR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'IR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'IR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'j', 'Shelving control number', 'Shelving control number', 0, 0, 'items.stack', 10, 'STACK', '', '', NULL, -1, 'IR', '', '', NULL), @@ -27639,7 +27639,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'SER', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'SER', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SER', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'SER', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'j', 'Shelving control number', 'Shelving control number', 0, 0, 'items.stack', 10, 'STACK', '', '', NULL, -1, 'SER', '', '', NULL), diff --git a/installer/data/mysql/nb-NO/marcflavour/normarc/Obligatorisk/normarc.sql b/installer/data/mysql/nb-NO/marcflavour/normarc/Obligatorisk/normarc.sql index bc7a7b5..b16ea86 100644 --- a/installer/data/mysql/nb-NO/marcflavour/normarc/Obligatorisk/normarc.sql +++ b/installer/data/mysql/nb-NO/marcflavour/normarc/Obligatorisk/normarc.sql @@ -968,7 +968,7 @@ INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,r INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','c','Hylleplassering','Hylleplassering','0','0','items.location','10','LOC','','','0','-1','','','',NULL); INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','d','Anskaffelsesdato','Anskaffelsesdato','0','0','items.dateaccessioned','10','','','dateaccessioned.pl','0','-1','','','',NULL); INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','e','Kilde for anskaffelse','Kilde for anskaffelse','0','0','items.booksellerid','10','','','','0','-1','','','',NULL); -INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','f','Kodet plasseringskvalifikator','Kodet plasseringskvalifikator','0','0','items.coded_location_qualifier','10','','','',NULL,'-1','','','',NULL); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','f','Kodet plasseringskvalifikator','Kodet plasseringskvalifikator','0','0','','10','','','',NULL,'-1','','','',NULL); INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','g','Pris (normal innkj?pspris)','Pris (normal innkj?pspris)','0','0','items.price','10','','','','0','-1','','','',NULL); INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','h','Serienummerering / kronologi','Serienummerering / kronologi','0','0','items.enumchron','10','','','','0','-1','','','',NULL); INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','j','Samling','Samling','0','0','items.stack','10','STACK','','',NULL,'-1','','','',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 e79cb33..faf923d 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 @@ -118,7 +118,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, '', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, '', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, '', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, '', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, '', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, '', '', '', NULL), diff --git a/installer/data/mysql/pl-PL/marcflavour/marc21/optional/marc21_fastadd_framework.sql b/installer/data/mysql/pl-PL/marcflavour/marc21/optional/marc21_fastadd_framework.sql index 36a435c..9e51f5d 100644 --- a/installer/data/mysql/pl-PL/marcflavour/marc21/optional/marc21_fastadd_framework.sql +++ b/installer/data/mysql/pl-PL/marcflavour/marc21/optional/marc21_fastadd_framework.sql @@ -115,7 +115,7 @@ INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblib ('952','c','Shelving location','Shelving location',0,0,'items.location',10,'LOC','','',NULL,0,'FA','',NULL,NULL), ('952','d','Date acquired','Date acquired',0,0,'items.dateaccessioned',10,'','','dateaccessioned.pl',NULL,0,'FA','',NULL,NULL), ('952','e','Source of acquisition','Source of acquisition',0,0,'items.booksellerid',10,'','','',NULL,0,'FA','',NULL,NULL), - ('952','f','Coded location qualifier','Coded location qualifier',0,0,'items.coded_location_qualifier',10,'','','',NULL,0,'FA','',NULL,NULL), + ('952','f','Coded location qualifier','Coded location qualifier',0,0,'',10,'','','',NULL,0,'FA','',NULL,NULL), ('952','g','Cost, normal purchase price','Cost, normal purchase price',0,0,'items.price',10,'','','',NULL,0,'FA','',NULL,NULL), ('952','h','Serial Enumeration / chronology','Serial Enumeration / chronology',0,0,'items.enumchron',10,'','','',NULL,0,'FA','',NULL,NULL), ('952','i','Inventory number','Inventory number',0,0,'items.stocknumber',10,'','','',0,0,'CF','',NULL,NULL), diff --git a/installer/data/mysql/pl-PL/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql b/installer/data/mysql/pl-PL/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql index 1f5d38e..ec58ad1 100644 --- a/installer/data/mysql/pl-PL/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql +++ b/installer/data/mysql/pl-PL/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql @@ -177,7 +177,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'BKS', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'BKS', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'BKS', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'BKS', '', '', NULL), @@ -4102,7 +4102,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'CF', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'CF', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'CF', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'CF', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'CF', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'CF', '', '', NULL), @@ -8028,7 +8028,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'SR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'SR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'SR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'SR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'SR', '', '', NULL), @@ -11953,7 +11953,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'VR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'VR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'VR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'VR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'VR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'VR', '', '', NULL), @@ -15877,7 +15877,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'AR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'AR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'AR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'AR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'AR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'AR', '', '', NULL), @@ -19800,7 +19800,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'KT', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'KT', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'KT', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'KT', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'KT', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'KT', '', '', NULL), @@ -23724,7 +23724,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'IR', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'IR', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'IR', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'IR', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'IR', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'IR', '', '', NULL), @@ -27646,7 +27646,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'd', 'Date acquired', 'Date acquired', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'SER', '', '', NULL), ('952', 'e', 'Source of acquisition', 'Source of acquisition', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'SER', '', '', NULL), - ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SER', '', '', NULL), + ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'SER', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'SER', '', '', NULL), ('952', 'i', 'Inventory number','Inventory number', 0, 0, 'items.stocknumber', 10, '', '', '', 0, 0, 'SER', '', '', NULL), diff --git a/installer/data/mysql/ru-RU/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql b/installer/data/mysql/ru-RU/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql index 0030c93..9b0cb84 100644 --- a/installer/data/mysql/ru-RU/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql +++ b/installer/data/mysql/ru-RU/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql @@ -108,7 +108,7 @@ INSERT INTO marc_subfield_structure ('952', 'c', '????? ???????????? ?????', '', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, '', '', '', NULL), ('952', 'd', '???? ?????????', '', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, '', '', '', NULL), ('952', 'e', '???????? ???????????', '', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, '', '', '', NULL), -('952', 'f', '???????????? ???????????? ??????????????', '', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, '', '', '', NULL), +('952', 'f', '???????????? ???????????? ??????????????', '', 0, 0, '', 10, '', '', '', NULL, 0, '', '', '', NULL), ('952', 'g', '?????????, ??????? ?????????? ????', '', 0, 0, 'items.price', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'j', '???????? ??????????? ?????', '', 0, 0, 'items.stack', 10, 'STACK', '', '', NULL, -1, '', '', '', NULL), diff --git a/installer/data/mysql/uk-UA/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql b/installer/data/mysql/uk-UA/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql index f03b31b..554b1e0 100644 --- a/installer/data/mysql/uk-UA/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql +++ b/installer/data/mysql/uk-UA/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql @@ -140,7 +140,7 @@ INSERT INTO marc_subfield_structure ('952', 'c', '???????? ???????????? ??????', '', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, '', '', '', NULL), ('952', 'd', '???? ?????????', '', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, '', '', '', NULL), ('952', 'e', '??????? ???????????', '', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, '', '', '', NULL), -('952', 'f', '????????? ????????? ????????????', '', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, '', '', '', NULL), +('952', 'f', '????????? ????????? ????????????', '', 0, 0, '', 10, '', '', '', NULL, 0, '', '', '', NULL), ('952', 'g', '????????, ???????? ???????????? ????', '', 0, 0, 'items.price', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, '', '', '', NULL), ('952', 'j', '???????? ??????????? ?????', '', 0, 0, 'items.stack', 10, 'STACK', '', '', NULL, -1, '', '', '', NULL), diff --git a/installer/data/mysql/uk-UA/marcflavour/unimarc/optional/unimarc_bibliographic_[AN].sql b/installer/data/mysql/uk-UA/marcflavour/unimarc/optional/unimarc_bibliographic_[AN].sql index 037efb7..43b5ca2 100644 --- a/installer/data/mysql/uk-UA/marcflavour/unimarc/optional/unimarc_bibliographic_[AN].sql +++ b/installer/data/mysql/uk-UA/marcflavour/unimarc/optional/unimarc_bibliographic_[AN].sql @@ -91,7 +91,7 @@ INSERT INTO marc_subfield_structure ('952', 'c', 'Shelving location', '', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, 'AN', '', '', NULL), ('952', 'd', '???? ?????????', '', 0, 0, 'items.dateaccessioned', 10, '', '', 'dateaccessioned.pl', 0, 0, 'AN', '', '', NULL), ('952', 'e', 'Source of acquisition', '', 0, 0, 'items.booksellerid', 10, '', '', '', 0, 0, 'AN', '', '', NULL), -('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'AN', '', '', NULL), +('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', '', NULL, 0, 'AN', '', '', NULL), ('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, 'AN', '', '', NULL), ('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, 'AN', '', '', NULL), ('952', 'j', 'Shelving control number', 'Shelving control number', 0, 0, 'items.stack', 10, 'STACK', '', '', NULL, -1, 'AN', '', '', NULL), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6b88c29..eadd5cc 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4446,6 +4446,12 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("UPDATE marc_subfield_structure SET kohafield = NULL WHERE tagfield = 952 AND tagsubfield = 'f' AND kohafield = 'items.coded_location_qualifier'"); + print "Upgrade to $DBversion done (remove non-existant 'items.coded_location_qualifier' column)\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS -- 1.7.1 From f.demians at tamil.fr Sat Oct 8 15:33:50 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Sat, 8 Oct 2011 15:33:50 +0200 Subject: [Koha-patches] [PATCH] Bug 6989 Patron categories not properly displayed if not pure ASCII Message-ID: <1318080830-10324-1-git-send-email-f.demians@tamil.fr> C4::Category module returns badly encoded patron categories when they are containing non pure-ASCII characters. To reproduce this bug: - Go in Administration > Patron Categories - Add a new category. Give it this code for example: Caf? - Click on Patrons link on top menu - Click on New button => You get 'Caf?' displayed without accent --- C4/Category.pm | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/C4/Category.pm b/C4/Category.pm index b81e88f..8536128 100644 --- a/C4/Category.pm +++ b/C4/Category.pm @@ -71,13 +71,12 @@ C<description>. =cut sub all { - my ($class) = @_; - my $dbh = C4::Context->dbh; - return map { $class->new($_) } @{$dbh->selectall_arrayref( - # The categories table is small enough for - # `SELECT *` to be harmless. - "SELECT * FROM categories ORDER BY description", - { Slice => {} }, + my $class = shift; + map { + utf8::encode($_->{description}); + $class->new($_); + } @{C4::Context->dbh->selectall_arrayref( + "SELECT * FROM categories ORDER BY description", { Slice => {} } )}; } -- 1.7.6.1 From f.demians at tamil.fr Sat Oct 8 17:06:11 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Sat, 8 Oct 2011 17:06:11 +0200 Subject: [Koha-patches] [PATCH] Bug 6990 TransformKohaToMarc enhancement Message-ID: <1318086371-2475-1-git-send-email-f.demians@tamil.fr> TransformKohaToMarc function is called for each biblio and item that has to be build. This function execute a DB statement for each Koha field that has to be mapped to a MARC tag/letter. This impact deeply performances for script like rebuild_zebra, especially since items are not anymore in bilio records and have to be rebuild on the fly. I'm proposing a patch which read Koha field to MARC field mapping just one time and cache it. My test show a 30% execution time improvement on rebuild_zebra.pl script. --- C4/Biblio.pm | 65 ++++++++++++++++++++++++++++----------------------------- 1 files changed, 32 insertions(+), 33 deletions(-) mode change 100644 => 100755 Makefile.PL diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 915139e..823b4f2 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1782,17 +1782,44 @@ sub GetFrameworkCode { This function builds partial MARC::Record from a hash Hash entries can be from biblio or biblioitems. -This function is called in acquisition module, to create a basic catalogue entry from user entry +This function is called in acquisition module, to create a basic catalogue +entry from user entry =cut + +# A hashref giving for each Koha field its MARC tag/letter +my $db_to_marc; + sub TransformKohaToMarc { - my ($hash) = @_; - my $sth = C4::Context->dbh->prepare( "SELECT tagfield,tagsubfield FROM marc_subfield_structure WHERE frameworkcode=? AND kohafield=?" ); + my $hash = shift; my $record = MARC::Record->new(); SetMarcUnicodeFlag( $record, C4::Context->preference("marcflavour") ); - foreach ( keys %{$hash} ) { - &TransformKohaToMarcOneField( $sth, $record, $_, $hash->{$_}, '' ); + unless ($db_to_marc) { + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare( + "SELECT kohafield, tagfield, tagsubfield + FROM marc_subfield_structure + WHERE kohafield <> '' AND frameworkcode = ''" ); + $sth->execute(); + $db_to_marc = {}; + while ( my ($name, $tag, $letter) = $sth->fetchrow ) { + $db_to_marc->{$name} = [$tag, $letter]; + } + } + while ( my ($name, $value) = each %$hash ) { + next unless my $dtm = $db_to_marc->{$name}; + my ($tag, $letter) = @$dtm; + foreach my $value ( split(/\s?\|\s?/, $value, -1) ) { + if ( my $field = $record->field($tag) ) { + $field->add_subfields( $letter => $value ); + } + else { + $record->insert_fields_ordered( MARC::Field->new( + $tag, " ", " ", $letter => $value ) ); + } + } + } return $record; } @@ -1803,34 +1830,6 @@ sub TransformKohaToMarc { =cut -sub TransformKohaToMarcOneField { - my ( $sth, $record, $kohafieldname, $value, $frameworkcode ) = @_; - $frameworkcode = '' unless $frameworkcode; - my $tagfield; - my $tagsubfield; - - if ( !defined $sth ) { - my $dbh = C4::Context->dbh; - $sth = $dbh->prepare( "SELECT tagfield,tagsubfield FROM marc_subfield_structure WHERE frameworkcode=? AND kohafield=?" ); - } - $sth->execute( $frameworkcode, $kohafieldname ); - if ( ( $tagfield, $tagsubfield ) = $sth->fetchrow ) { - my @values = split(/\s?\|\s?/, $value, -1); - - foreach my $itemvalue (@values){ - my $tag = $record->field($tagfield); - if ($tag) { - $tag->add_subfields( $tagsubfield => $itemvalue ); - $record->delete_field($tag); - $record->insert_fields_ordered($tag); - } - else { - $record->add_fields( $tagfield, " ", " ", $tagsubfield => $itemvalue ); - } - } - } - return $record; -} =head2 TransformHtmlToXml diff --git a/Makefile.PL b/Makefile.PL old mode 100644 new mode 100755 -- 1.7.6.1 From jcamins at cpbibliography.com Sat Oct 8 21:49:05 2011 From: jcamins at cpbibliography.com (Jared Camins-Esakov) Date: Sat, 8 Oct 2011 15:49:05 -0400 Subject: [Koha-patches] [PATCH] Bug 6913: More options for koha-create and koha-remove Message-ID: <1318103345-6188-1-git-send-email-jcamins@cpbibliography.com> This commit makes koha-create more flexible by adding a number of command-line and configuration options. The biggest change is to add support for pre-determined MySQL credentials using a file in /etc/koha/passwd (for security reasons, if you use this feature, make sure the file is not world-readable). The configuration file has the following format: instance:user:password:database The database is optional, but the other two are both required if you want to specify MySQL credentials. If no credentials are specified for a given instance, the standard koha_instance username and an auto-generated password are used. The following additional command line options are now available: * --use-db - use a pre-existing database, see also --database * --database - specify the name of the mysql database (still defaults to koha_instance) * --passwdfile - specify a custom (Koha) passwd file for MySQL credentials The following additional variables are now available (for use in koha-sites.conf or a custom config file): * OPACPORT (previously added but not documented) - port on which the OPAC should be served * OPACPREFIX - prefix for the OPAC's virtual host * OPACSUFFIX - suffix for the OPAC's virtual host This commit also adds the --keep-mysql option to koha-remove, which, if specified, will prevent koha-remove from deleting the database or MySQL user when removing an instance. --- debian/docs/koha-create.xml | 57 +++++++++++++++++++++++++++++++++++-- debian/docs/koha-remove.xml | 12 ++++++++ debian/scripts/koha-create | 66 +++++++++++++++++++++++++++++++++++------- debian/scripts/koha-remove | 16 ++++++++++- 4 files changed, 136 insertions(+), 15 deletions(-) diff --git a/debian/docs/koha-create.xml b/debian/docs/koha-create.xml index a3e1520..50a3189 100644 --- a/debian/docs/koha-create.xml +++ b/debian/docs/koha-create.xml @@ -24,11 +24,13 @@ <refsynopsisdiv> <cmdsynopsis> <command>koha-create</command> - <arg choice="req"><option>--create-db</option>|<option>--request-db</option>|<option>--populate-db</option></arg> + <arg choice="req"><option>--create-db</option>|<option>--request-db</option>|<option>--populate-db</option>|<option>--use-db</option></arg> <arg><option>--marcflavor</option> marc21|normarc|unimarc</arg> <arg><option>--zebralang</option> en|nb|fr</arg> <arg><option>--defaultsql</option> /path/to/some.sql</arg> <arg><option>--configfile</option> /path/to/config</arg> + <arg><option>--passwdfile</option> /path/to/passwd</arg> + <arg><option>--database</option> database</arg> <arg><option>--adminuser</option> n</arg> <arg choice="req" rep="norepeat"><replaceable>instancename</replaceable></arg> </cmdsynopsis> @@ -40,7 +42,7 @@ <varlistentry> <term><option>--create-db</option></term> <listitem> - <para>Create a new datbase on localhost. If the database you want to use does not reside on localhost, you can use <option>--request-db</option> and <option>--populate-db</option>, see below.</para> + <para>Create a new database on localhost. If the database you want to use does not reside on localhost, you can use <option>--request-db</option> and <option>--populate-db</option>, see below. If the database already exists, you can use <option>--use-db</option>, see below.</para> </listitem> </varlistentry> @@ -54,7 +56,14 @@ <varlistentry> <term><option>--populate-db</option></term> <listitem> - <para>When you have run koha-create with the <option>--request-db</option> option, and a database has been set up, you can finnish your installation by running <command>koha-create</command> with this option.</para> + <para>When you have run koha-create with the <option>--request-db</option> option, and a database has been set up, you can finish your installation by running <command>koha-create</command> with this option.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>--use-db</option></term> + <listitem> + <para>When the database you want to use has already been populated, you can run <command>koha-create</command> with this option to take care of all the other set-up configuration.</para> </listitem> </varlistentry> @@ -66,6 +75,13 @@ </varlistentry> <varlistentry> + <term><option>--database</option></term> + <listitem> + <para>MySQL database to use.</para> + </listitem> + </varlistentry> + + <varlistentry> <term><option>--defaultsql</option></term> <listitem> <para>Path to an SQL-file other than the one pointed to in the default or alternative config file. Corresponds to the DEFAULTSQL config file variable.</para> @@ -80,6 +96,13 @@ </varlistentry> <varlistentry> + <term><option>--passwdfile</option></term> + <listitem> + <para>Path to an alternative passwd file. This file is in the same format as the default (Koha) passwd file, see below for details.</para> + </listitem> + </varlistentry> + + <varlistentry> <term><option>--zebralang</option></term> <listitem> <para>Primary language for Zebra indexing. Corresponds to the ZEBRA_LANGUAGE config file variable.</para> @@ -107,6 +130,27 @@ </varlistentry> <varlistentry> + <term><option>OPACPORT</option></term> + <listitem> + <para>The port for the OPAC.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>OPACPREFIX</option></term> + <listitem> + <para>This is inserted before the instance name when forming Apache ServerName. For subdomains, make sure it ends with a period.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>OPACSUFFIX</option></term> + <listitem> + <para>This is inserted after the instance name, but before the domain name, when forming Apache ServerName.</para> + </listitem> + </varlistentry> + + <varlistentry> <term><option>INTRAPORT</option></term> <listitem> <para>The port for the intranet. If you set this to empty or 80, then you must also define INTRAPREFIX or INTRASUFFIX.</para> @@ -169,6 +213,13 @@ <para>Configuration variables are read from this file, if it exists.</para> </listitem> </varlistentry> + + <varlistentry> + <term><option><filename>/etc/koha/passwd</filename></option></term> + <listitem> + <para>Pre-selected database credentials are read from this file, if it exists. The format for this file is instancename:username:passwd:database. Database is optional, but the other three are required if you want to use pre-determined database user credentials.</para> + </listitem> + </varlistentry> </variablelist> </refsect1> diff --git a/debian/docs/koha-remove.xml b/debian/docs/koha-remove.xml index 5d5767f..7acc7fb 100644 --- a/debian/docs/koha-remove.xml +++ b/debian/docs/koha-remove.xml @@ -24,10 +24,22 @@ <refsynopsisdiv> <cmdsynopsis> <command>koha-remove</command> + <arg><option>--keep-mysql</option></arg> <arg choice="req" rep="repeat">instancename</arg> </cmdsynopsis> </refsynopsisdiv> + <refsect1><title>Options + + + + + Leave the MySQL database and user when removing the Koha instance. + + + + + Description Remove one or more Koha instance(s). This removes all files associated with a Koha instance. diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index b52cf90..b7b0963 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -19,11 +19,12 @@ set -e -usage="Usage: $0 [--create-db|--request-db|--populate-db] \ +usage="Usage: $0 [--create-db|--request-db|--populate-db|--use-db] \ [--marcflavor marc21|normarc|unimarc] \ [--zebralang en|nb|fr] \ [--defaultsql /path/to/some.sql] \ - [--configfile /path/to/config] [--adminuser n] instancename" + [--configfile /path/to/config] [--passwdfile /path/to/passwd] \ + [--database database] [--adminuser n] instancename" die() { echo "$@" 1>&2 @@ -76,6 +77,8 @@ getinstancemysqldatabase() { # Set defaults and read config file, if it exists. DOMAIN="" OPACPORT="80" +OPACPREFIX="" +OPACSUFFIX="" INTRAPORT="8080" INTRAPREFIX="" INTRASUFFIX="" @@ -83,14 +86,15 @@ DEFAULTSQL="" ZEBRA_MARC_FORMAT="marc21" ZEBRA_LANGUAGE="en" ADMINUSER="1" +PASSWDFILE="/etc/koha/passwd" if [ -e /etc/koha/koha-sites.conf ] then . /etc/koha/koha-sites.conf fi -[ $# -ge 2 ] && [ $# -le 12 ] || die $usage +[ $# -ge 2 ] && [ $# -le 16 ] || die $usage -TEMP=`getopt -o crpm:l:d:f:a: -l create-db,request-db,populate-db,marcflavor:,zebralang:,defaultsql:,configfile:,adminuser: \ +TEMP=`getopt -o crpm:l:d:f:a: -l create-db,request-db,populate-db,use-db,marcflavor:,zebralang:,defaultsql:,configfile:,passwdfile:,adminuser: \ -n "$0" -- "$@"` # Note the quotes around `$TEMP': they are essential! @@ -107,10 +111,13 @@ while true ; do -c|--create-db) op=create ; shift ;; -r|--request-db) op=request ; shift ;; -p|--populate-db) op=populate ; shift ;; + -u|--use-db) op=use ; shift ;; -m|--marcflavor) CLO_ZEBRA_MARC_FORMAT="$2" ; shift 2 ;; -l|--zebralang) CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;; -d|--defaultsql) CLO_DEFAULTSQL="$2" ; shift 2 ;; -f|--configfile) configfile="$2" ; shift 2 ;; + -s|--passwdfile) CLO_PASSWDFILE="$2" ; shift 2 ;; + -b|--database) CLO_DATABASE="$2" ; shift 2 ;; -a|--adminuser) CLO_ADMINUSER="$2" ; shift 2 ;; --) shift ; break ;; *) die "Internal error processing command line arguments" ;; @@ -145,26 +152,54 @@ if [ "$CLO_ADMINUSER" != "" ] then ADMINUSER="$CLO_ADMINUSER" fi +if [ "$CLO_PASSWDFILE" != "" ] +then + PASSWDFILE="$CLO_PASSWDFILE" +fi name="$1" -opacdomain="$name$DOMAIN" +opacdomain="$OPACPREFIX$name$OPACSUFFIX$DOMAIN" intradomain="$INTRAPREFIX$name$INTRASUFFIX$DOMAIN" -mysqldb="koha_$name" +if [ `cat $PASSWDFILE | grep "^$name:"` ] +then + passwdline=`cat $PASSWDFILE | grep "^$name:"` + mysqluser=`echo $passwdline | cut -d ":" -f 2` + mysqlpwd=`echo $passwdline | cut -d ":" -f 3` + mysqldb=`echo $passwdline | cut -d ":" -f 4` +fi + +# The order of precedence for MySQL database name is: +# default < passwd file < command line +if [ "$mysqldb" = "" ] +then + mysqldb="koha_$name" +fi +if [ "$CLO_DATABASE" != "" ] +then + mysqldb="$CLO_DATABASE" +fi + +if [ "$mysqluser" = "" ] +then + mysqluser="koha_$name" +fi mysqlhost="$(getmysqlhost)" -mysqluser="koha_$name" -if [ "$op" = create ] || [ "$op" = request ] +if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ] then - mysqlpwd="$(pwgen -1)" + if [ "$mysqlpwd" = "" ] + then + mysqlpwd="$(pwgen -1)" + fi else mysqlpwd="$(getinstancemysqlpassword $name)" fi -if [ "$op" = create ] || [ "$op" = request ] +if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ] then # Create new user and group. username="$name-koha" @@ -197,6 +232,15 @@ FLUSH PRIVILEGES; eof fi #` + if [ "$op" = use ] + then + mysql --force --defaults-extra-file=/etc/mysql/koha-common.cnf < From: Robin Sheat When viewing an item's details, selecting the accession date for it now takes you to the invoice for that item. Signed-off-by: Katrin Fischer This works as advertised. 1) Order and receive an item in acquisition 2) Search for it in staff and go to the 'items' tab 3) Click on the 'receive date' link --- catalogue/moredetail.pl | 5 ++++- .../prog/en/modules/catalogue/moredetail.tt | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index d285a49..69d4663 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -121,10 +121,13 @@ foreach my $item (@items){ $item->{'datelastseen'} = format_date( $item->{'datelastseen'} ); $item->{'copyvol'} = $item->{'copynumber'}; - my $order = GetOrderFromItemnumber( $item->{'itemnumber'} ); + my $order = GetOrderFromItemnumber( $item->{'itemnumber'} ); + my $basket = GetBasket( $order->{'basketno'} ); + $item->{'booksellerid'} = $basket->{'booksellerid'}; $item->{'ordernumber'} = $order->{'ordernumber'}; $item->{'basketno'} = $order->{'basketno'}; $item->{'booksellerinvoicenumber'} = $order->{'booksellerinvoicenumber'}; + $item->{'datereceived'} = $order->{'datereceived'}; if ($item->{notforloantext} or $item->{itemlost} or $item->{damaged} or $item->{wthdrawn}) { $item->{status_advisory} = 1; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt index 86c8a3f..36e7149 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -156,7 +156,7 @@ Accession Date: [% IF ( ITEM_DAT.basketno ) %] - [% ITEM_DAT.dateaccessioned %] + [% ITEM_DAT.dateaccessioned %] [% ELSE %] [% ITEM_DAT.dateaccessioned %] [% END %] -- 1.7.4.1 From Katrin.Fischer.83 at web.de Sat Oct 8 22:22:25 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sat, 8 Oct 2011 22:22:25 +0200 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_=5BSIGNED-OFF=5D_Corrects_a_?= =?utf-8?q?problem_when_a_new_order_is_created_with_a_duplicate_bar?= =?utf-8?q?code=2E?= Message-ID: <1318105345-22357-1-git-send-email-Katrin.Fischer.83@web.de> From: Fr?d?rick Capovilla If the AcqCreateItem preference is set to "ordering" and the barcode for the new item is already in use, no error is returned, but an invalid itemnumber is saved in the aqorders_items table and the item is never created. This patch adds a duplicate barcode verification in neworderempty.pl _koha_add_item is also modified so it won't return an invalid ID when an item can't be added. http://bugs.koha-community.org/show_bug.cgi?id=6963 Signed-off-by: Katrin Fischer 1) Set AcqCreateItem on 'on order' 2) Make sure barcode was available in my ACQ framework 3) Create a new basket, first order, barcode 'barc' 4) create a second order in that basket, tried again with 'barc' -> Alert message informs about the duplicate barcode 5) Change the barcode to be something else and saved New record with item should be correctly created --- C4/Items.pm | 7 ++- acqui/check_duplicate_barcode_ajax.pl | 55 ++++++++++++++++++++ .../prog/en/modules/acqui/neworderempty.tt | 46 +++++++++++++++- 3 files changed, 104 insertions(+), 4 deletions(-) create mode 100755 acqui/check_duplicate_barcode_ajax.pl diff --git a/C4/Items.pm b/C4/Items.pm index 2e85130..2ec96de 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2042,10 +2042,15 @@ sub _koha_new_item { $item->{'copynumber'}, $item->{'stocknumber'}, ); - my $itemnumber = $dbh->{'mysql_insertid'}; + + my $itemnumber; if ( defined $sth->errstr ) { $error.="ERROR in _koha_new_item $query".$sth->errstr; } + else { + $itemnumber = $dbh->{'mysql_insertid'}; + } + return ( $itemnumber, $error ); } diff --git a/acqui/check_duplicate_barcode_ajax.pl b/acqui/check_duplicate_barcode_ajax.pl new file mode 100755 index 0000000..fe50b6d --- /dev/null +++ b/acqui/check_duplicate_barcode_ajax.pl @@ -0,0 +1,55 @@ +#!/usr/bin/perl + +# Fr?d?rick Capovilla, 2011 - Lib?o +# +# 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 CGI::Cookie; +use JSON; +use C4::Auth; +use C4::Items; +use C4::Context; + +my $input = new CGI; +print $input->header('application/json'); + +# Check the user's permissions +my %cookies = fetch CGI::Cookie; +my $sessid = $cookies{'CGISESSID'}->value || $input->param('CGISESSID'); +my ($auth_status, $auth_sessid) = C4::Auth::check_cookie_auth($sessid, {acquisition => 'order_manage'}); +if ($auth_status ne "ok") { + print to_json({status => 'UNAUTHORIZED'}); + exit 0; +} + +my $json; + +#Check if the barcodes already exist. +my @barcodes = $input->param('barcodes'); +foreach my $barcode (@barcodes) { + my $existing_itemnumber = GetItemnumberFromBarcode($barcode); + if ($existing_itemnumber) { + $json->{status} = "DUPLICATES"; + push @{$json->{barcodes}}, $barcode; + } +} + +$json->{status} = 'OK' unless defined $json->{status}; +print to_json($json); + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index 39e9ca2..09a211b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -46,26 +46,66 @@ function Check(ff) { } if ( ff.field_value ) { + var barcodes = []; var empty_item_mandatory = 0; for (i = 0; i < ff.field_value.length; i++) { //alert("i = " + i + " => " + ff.kohafield[i] ); if (ff.field_value[i].value.length == 0 && ff.mandatory[i].value == 1) { empty_item_mandatory++; } + if(ff.subfield[i].value == 'p') { + barcodes.push(ff.field_value[i].value); + } } if (empty_item_mandatory > 0) { ok = 1; _alertString += "\n- " + empty_item_mandatory + _(" item mandatory fields empty"); } + + // Check for duplicate barcodes in the form + barcodes = barcodes.sort(); + for(var i=0; i --- docs/history.txt | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/history.txt b/docs/history.txt index 1723f77..7277654 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -438,26 +438,26 @@ June 8 2009 Koha passed 10,000 commits in the master branch (since December 2000 June 26 2009 Koha 3.0.3 released releases 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 +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-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-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 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-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-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 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 Ian Walls (NYUHSL) becomes the 99th committer to have a patch accepted developer +December 20 2009 Ian Walls (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-community.org/wiki/General_IRC_Meeting,_13_January_2010 @@ -505,7 +505,7 @@ October 6 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_I 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 +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 a patch accepted November 10 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_10_November_2010 November 17 2010 Tom?s Cohen Arazi becomes the 120th committer to have a patch accepted @@ -543,7 +543,7 @@ April 8 2011 Mark Gavillet becomes the 139th developer to have a patch pushed April 9 2011 Frederic Durand becomes the 140th developer to have a patch pushed April 9 2011 Jonathan Druart becomes the 141st developer to have a patch pushed April 16 2011 Koha 3.2.7 released releases -April 20 2011 Fernando Canizo becomes the 142nd developer to have a patch pushed +April 20 2011 Fernando Canizo becomes the 142nd developer to have a patch pushed April 22 2011 Koha 3.4.0 released releases May 11 2011 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_11_May_2011 May 15 2011 Koha 3.2.8 released releases @@ -566,13 +566,13 @@ August 2 2011 General IRC meeting http://wiki.koha-community.org/wiki/General_IR August 3 2011 Spanish speaking community meeting http://wiki.koha-community.org/wiki/Spanish_speaking_community_Mail_List_IRC_Meeting,_3_August_2011 August 11 2011 Juan Romay Sieira becomes the 148th developer to have a patch pushed August 11 2011 Nu?o L?pez Ans?tegui becomes the 149th developer to have a patch pushed -August 22 2011 Koha 3.4.4 released -August 26 2011 Ward van Wanrooij becomes the 150th developer to have a patch pushed -August 27 2011 Ulrich Kleiber becomes the 151st developer to have a patch pushed -September 1 2011 Maxime Pelletier becomes the 152nd developer to have a patch pushed -September 2 2011 Steven Callender becomes the 153rd developer to have a patch pushed -September 6 2011 Brett Wilkins becomes the 154th developer to have a patch pushed -September 11 2011 Meenakshi.R becomes the 155th developer to have a patch pushed -September 23 2011 Joy Nelson becomes the 156th developer to have a patch pushed -September 24 2011 Larry Baerveldt becomes the 157th developer to have a patch pushed -September 28 2011 Thatcher Rea becomes the 158th developer to have a patch pushed +August 22 2011 Koha 3.4.4 released +August 26 2011 Ward van Wanrooij becomes the 150th developer to have a patch pushed +August 27 2011 Ulrich Kleiber becomes the 151st developer to have a patch pushed +September 1 2011 Maxime Pelletier becomes the 152nd developer to have a patch pushed +September 2 2011 Steven Callender becomes the 153rd developer to have a patch pushed +September 6 2011 Brett Wilkins becomes the 154th developer to have a patch pushed +September 11 2011 Meenakshi.R becomes the 155th developer to have a patch pushed +September 23 2011 Joy Nelson becomes the 156th developer to have a patch pushed +September 24 2011 Larry Baerveldt becomes the 157th developer to have a patch pushed +September 28 2011 Thatcher Rea becomes the 158th developer to have a patch pushed -- 1.7.1 From christophe.croullebois at biblibre.com Sun Oct 9 20:12:01 2011 From: christophe.croullebois at biblibre.com (Christophe Croullebois) Date: Sun, 9 Oct 2011 20:12:01 +0200 Subject: [Koha-patches] [PATCH 1/1] Bug 5680: Order cancelling improvement : delete attached items & biblio if avalaible Message-ID: <1318183921-13245-1-git-send-email-christophe.croullebois@biblibre.com> - all items attached to the order are deleted - if there is no more items, and if the biblio is not in other orders and no subscriptions and no holds then the biblio is proposed to deletion Now whe have 2 links : "delete order" and "delete order and catalog record", the second one appears only if the deletion is possible. Note that if an hold is related to the item or if the item is unique for the biblio the link "Delete order" is canceled due to hold remaining. On mouse over explanations are shown with count. More lines of warnings with count are shown depending of the case. --- C4/Acquisition.pm | 5 ++ C4/Biblio.pm | 74 +++++++++++++++++++- C4/Items.pm | 29 +++++++- acqui/addorder.pl | 4 + acqui/basket.pl | 43 +++++++++--- .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 33 ++++++++- 6 files changed, 171 insertions(+), 17 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index f682256..4f0daf7 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1221,6 +1221,11 @@ sub DelOrder { my $sth = $dbh->prepare($query); $sth->execute( $bibnum, $ordernumber ); $sth->finish; + my @itemnumbers = GetItemnumbersFromOrder( $ordernumber ); + foreach my $itemnumber (@itemnumbers){ + C4::Items::DelItem( $dbh, $bibnum, $itemnumber ); + } + } =head2 FUNCTIONS ABOUT PARCELS diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 915139e..7c8e027 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -90,8 +90,10 @@ BEGIN { &GetMarcFromKohaField &GetFrameworkCode &TransformKohaToMarc - &CountItemsIssued + &CountBiblioInOrders + &GetSubscriptionsId + &GetHolds ); # To modify something @@ -3681,6 +3683,76 @@ sub get_biblio_authorised_values { return $authorised_values; } +=head2 CountBiblioInOrders + +=over 4 +$count = &CountBiblioInOrders( $biblionumber); + +=back + +This function return count of biblios in orders with $biblionumber + +=cut + +sub CountBiblioInOrders { + my ($biblionumber) = @_; + my $dbh = C4::Context->dbh; + my $query = "SELECT count(*) + FROM aqorders + WHERE biblionumber=? AND (datecancellationprinted IS NULL OR datecancellationprinted='0000-00-00')"; + my $sth = $dbh->prepare($query); + $sth->execute($biblionumber); + my $count = $sth->fetchrow; + return ($count); +} + +=head2 GetSubscriptionsId + +=over 4 +$subscriptions = &GetSubscriptionsId($biblionumber); + +=back + +This function return an array of subscriptionid with $biblionumber + +=cut + +sub GetSubscriptionsId { + my ($biblionumber) = @_; + my $dbh = C4::Context->dbh; + my $query = "SELECT subscriptionid + FROM subscription + WHERE biblionumber=?"; + my $sth = $dbh->prepare($query); + $sth->execute($biblionumber); + my @subscriptions = $sth->fetchrow_array; + return (@subscriptions); +} + +=head2 GetHolds + +=over 4 +$holds = &GetHolds($biblionumber); + +=back + +This function return the count of holds with $biblionumber + +=cut + +sub GetHolds { + my ($biblionumber) = @_; + my $dbh = C4::Context->dbh; + my $query = "SELECT count(*) + FROM reserves + WHERE biblionumber=?"; + my $sth = $dbh->prepare($query); + $sth->execute($biblionumber); + my $holds = $sth->fetchrow; + return ($holds); +} + + 1; __END__ diff --git a/C4/Items.pm b/C4/Items.pm index 2e85130..9469d44 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -68,16 +68,16 @@ BEGIN { GetItemInfosOf GetItemsByBiblioitemnumber GetItemsInfo - GetItemsLocationInfo + GetItemsLocationInfo get_itemnumbers_of GetItemnumberFromBarcode GetBarcodeFromItemnumber - GetHiddenItemnumbers - + GetHiddenItemnumbers DelItemCheck MoveItemFromBiblio GetLatestAcquisitions CartToShelf + GetItemHolds ); } @@ -2339,4 +2339,27 @@ sub _parse_unlinked_item_subfields_from_xml { return $unlinked_subfields; } +=head2 GetItemHolds + +=over 4 +$holds = &GetItemHolds($biblionumber, $itemnumber); + +=back + +This function return the count of holds with $biblionumber and $itemnumber + +=cut + +sub GetItemHolds { + my ($biblionumber, $itemnumber) = @_; + my $holds; + my $dbh = C4::Context->dbh; + my $query = "SELECT count(*) + FROM reserves + WHERE biblionumber=? AND itemnumber=?"; + my $sth = $dbh->prepare($query); + $sth->execute($biblionumber, $itemnumber); + $holds = $sth->fetchrow; + return $holds; +} 1; diff --git a/acqui/addorder.pl b/acqui/addorder.pl index e321d2c..d7f7e96 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -190,6 +190,7 @@ my $user = $input->remote_user; # create if $quantity>=0 and $existing='no' # modify if $quantity>=0 and $existing='yes' # delete if $quantity has been set to 0 by the librarian +# delete biblio if delbiblio has been set to 1 by the librarian my $bibitemnum; if ( $orderinfo->{quantity} ne '0' ) { #TODO:check to see if biblio exists @@ -271,6 +272,9 @@ if ( $orderinfo->{quantity} ne '0' ) { else { # qty=0, delete the line my $biblionumber = $input->param('biblionumber'); DelOrder( $biblionumber, $$orderinfo{ordernumber} ); + if ($orderinfo->{delbiblio} == 1){ + DelBiblio($biblionumber); + } } my $basketno=$$orderinfo{basketno}; my $booksellerid=$$orderinfo{booksellerid}; diff --git a/acqui/basket.pl b/acqui/basket.pl index 9377a43..b836280 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -28,12 +28,12 @@ use C4::Output; use CGI; use C4::Acquisition; use C4::Budgets; - use C4::Bookseller qw( GetBookSellerFromId); use C4::Dates qw/format_date/; use C4::Debug; - +use C4::Biblio; use C4::Members qw/GetMember/; #needed for permissions checking for changing basketgroup of a basket +use C4::Items; =head1 NAME basket.pl @@ -259,13 +259,38 @@ if ( $op eq 'delete_confirm' ) { # FIXME: what about the "actual cost" field? $qty_total += $qty; my %line = %{ $order }; - - $line{order_received} = ( $qty == $order->{'quantityreceived'} ); - $line{basketno} = $basketno; - $line{budget_name} = $budget->{budget_name}; - $line{rrp} = sprintf( "%.2f", $line{'rrp'} ); - $line{ecost} = sprintf( "%.2f", $line{'ecost'} ); - $line{line_total} = sprintf( "%.2f", $line_total ); + my $biblionumber = $order->{'biblionumber'}; + my $countbiblio = CountBiblioInOrders($biblionumber); + my $ordernumber = $order->{'ordernumber'}; + my @subscriptions = GetSubscriptionsId ($biblionumber); + my $itemcount = GetItemsCount($biblionumber); + my $holds = GetHolds ($biblionumber); + my @items = GetItemnumbersFromOrder( $ordernumber ); + my $itemholds; + foreach my $item (@items){ + my $nb = GetItemHolds($biblionumber, $item); + if ($nb){ + $itemholds += $nb; + } + } + # if the biblio is not in other orders and if there is no items elsewhere and no subscriptions and no holds we can then show the link "Delete order and Biblio" see bug 5680 + $line{can_del_bib} = 1 if $countbiblio <= 1 && $itemcount == scalar @items && !(@subscriptions) && !($holds); + $line{items} = ($itemcount) - (scalar @items); + $line{left_item} = 1 if $line{items} >= 1; + $line{left_biblio} = 1 if $countbiblio > 1; + $line{biblios} = $countbiblio - 1; + $line{left_subscription} = 1 if scalar @subscriptions >= 1; + $line{subscriptions} = scalar @subscriptions; + $line{left_holds} = 1 if $holds >= 1; + $line{left_holds_on_order} = 1 if $line{left_holds}==1 && ($line{items} == 0 || $itemholds ); + $line{holds} = $holds; + $line{holds_on_order} = $itemholds?$itemholds:$holds if $line{left_holds_on_order}; + $line{order_received} = ( $qty == $order->{'quantityreceived'} ); + $line{basketno} = $basketno; + $line{budget_name} = $budget->{budget_name}; + $line{rrp} = sprintf( "%.2f", $line{'rrp'} ); + $line{ecost} = sprintf( "%.2f", $line{'ecost'} ); + $line{line_total} = sprintf( "%.2f", $line_total ); if ($line{uncertainprice}) { $template->param( uncertainprices => 1 ); $line{rrp} .= ' (Uncertain)'; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 2654303..1a48920 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -39,6 +39,13 @@ window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber; } } + + function confirm_delete_biblio(ordernumber, biblionumber) { + var is_confirmed = confirm(_('Are you sure you want to delete this catalog record and order ?')); + if (is_confirmed) { + window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber+"&delbiblio=1"; + } + } //]]> @@ -277,7 +284,28 @@ Modify - Delete + [% IF ( books_loo.left_holds_on_order ) %] + Can't delete order
    + [% ELSE %] + Delete order
    + [% END %] + [% IF ( books_loo.can_del_bib ) %] + Delete order and Catalog record
    + [% ELSE %] + Can't delete order and Catalog record
    + [% END %] + [% IF ( books_loo.left_item ) %] + **Left ([% books_loo.items %]) Items**
    + [% END %] + [% IF ( books_loo.left_biblio ) %] + **Left ([% books_loo.biblios %]) orders**
    + [% END %] + [% IF ( books_loo.left_subscription ) %] + **Left ([% books_loo.subscriptions %]) subscriptions**
    + [% END %] + [% IF ( books_loo.left_holds ) %] + **Left ([% books_loo.holds %]) holds** + [% END %] [% END %] [% END %] @@ -320,9 +348,6 @@ [% END %] - - -
    -- 1.7.4.1 From srdjan at catalyst.net.nz Mon Oct 10 02:14:53 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Mon, 10 Oct 2011 13:14:53 +1300 Subject: [Koha-patches] [PATCH] bug_6190: BorrowerUnwantedField syspref and removing fields from the patron entry In-Reply-To: References: Message-ID: <1318205693-25634-1-git-send-email-srdjan@catalyst.net.nz> --- admin/systempreferences.pl | 1 + installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 + .../prog/en/modules/admin/preferences/patrons.pref | 5 + .../prog/en/modules/help/members/memberentry.tt | 1 + .../prog/en/modules/members/memberentrygen.tt | 124 +++++++++++++++++++- members/memberentry.pl | 7 + 7 files changed, 142 insertions(+), 4 deletions(-) diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 87ecac4..39a81e6 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -223,6 +223,7 @@ $tabsysprefs{intranetreadinghistory} = "Patrons"; $tabsysprefs{NotifyBorrowerDeparture} = "Patrons"; $tabsysprefs{memberofinstitution} = "Patrons"; $tabsysprefs{BorrowerMandatoryField} = "Patrons"; +$tabsysprefs{BorrowerUnwantedField} = "Patrons"; $tabsysprefs{borrowerRelationship} = "Patrons"; $tabsysprefs{BorrowersTitles} = "Patrons"; $tabsysprefs{patronimages} = "Patrons"; diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 69c79be..14f5e35 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -319,4 +319,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('MARCAuthorityControlField008', '|| aca||aabn | a|a d', NULL, NULL, 'Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowerUnwantedField','','Name the fields you don\'t need to store for a patron\'s account',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 46cfb8d..8b741b7 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4466,6 +4466,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowerUnwantedField','','Name the fields you don\'t need to store for a patron\'s account',NULL,'free')"); + print "Upgrade to $DBversion done (BorrowerUnwantedField syspref)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref index ac3e1d2..6bfa0df 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -32,6 +32,11 @@ Patrons: class: multi - (separate columns with |) - + - "The following database columns will not appear on the patron entry screen:" + - pref: BorrowerUnwantedField + class: multi + - (separate columns with |) + - - "Guarantors can be the following of those they guarantee:" - pref: borrowerRelationship class: multi diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/memberentry.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/memberentry.tt index f61f5c1..fb91651 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/memberentry.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/memberentry.tt @@ -22,6 +22,7 @@
  • Enter the identifying information regarding your patron
    • Required fields are defined in the BorrowerMandatoryField system preference
    • +
    • Unwanted fields are defined in the BorrowerUnwantedField system preference
    • Salutation is populated by the BorrowersTitles system preference
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 47ea6c9..57771b4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -178,10 +178,12 @@ [% END %] [% IF ( step_1 ) %] +[%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
    [% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity
      [% UNLESS ( I ) %] + [% UNLESS notitle %] [% IF ( title_cgipopup ) %]
    1. [% IF ( mandatorytitle ) %] @@ -195,6 +197,8 @@
    2. [% END %] [% END %] + [% END %] + [% UNLESS nosurname %]
    3. [% IF ( mandatorysurname ) %]
    4. + [% END %] [% UNLESS ( I ) %] + [% UNLESS nofirstname %]
    5. [% IF ( mandatoryfirstname ) %]
    6. + [% END %] + [% UNLESS nodateofbirth %]
    7. [% IF ( mandatorydateofbirth ) %]
    8. + [% END %] + [% UNLESS noinitials %]
    9. [% IF ( mandatoryinitials ) %]
    10. [% END %] + [% END %] + [% UNLESS noothernames %]
    11. [% IF ( mandatoryothernames ) %]
    12. + [% END %] [% UNLESS ( I ) %] + [% UNLESS nosex %]
    13. [% IF ( female ) %] @@ -305,9 +319,11 @@ [% END %]
    14. + [% END %] [% END %]
    +[% END # hide fieldset %] [% IF ( showguarantor ) %]
    @@ -343,6 +359,7 @@ [% END %] Patron #: [% IF ( guarantorid ) %] [% guarantorid %][% END %] + [% UNLESS nocontactname %]
  • [% IF ( guarantorid ) %] @@ -356,6 +373,8 @@ [% END %] [% END %]
  • + [% END %] + [% UNLESS nocontactfirstname %]
  • [% IF ( guarantorid ) %] @@ -369,6 +388,7 @@ [% END %] [% END %]
  • + [% END %] [% IF ( relshiploop ) %]
  • @@ -398,8 +418,10 @@
  • [% END %] +[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
    Main address
      + [% UNLESS nostreetnumber %]
    1. [% IF ( mandatorystreetnumber ) %]
    2. + [% END %] + [% UNLESS nostreettype %] [% IF ( road_cgipopup ) %]
    3. [% IF ( mandatorystreettype ) %] @@ -426,6 +450,8 @@ [% IF ( mandatorystreettype ) %]Required[% END %]
    4. [% END %] + [% END %] + [% UNLESS noaddress %]
    5. [% IF ( mandatoryaddress ) %]
    6. + [% END %] + [% UNLESS noaddress2 %]
    7. [% IF ( mandatoryaddress2 ) %]
    8. + [% END %] + [% UNLESS nocity %]
    9. [% IF ( mandatorycity ) %]
    10. + [% END %] + [% UNLESS nostate %]
    11. [% IF ( mandatorystate ) %]
    12. + [% END %] + [% UNLESS nozipcode %]
    13. [% IF ( mandatoryzipcode ) %]
    14. - + [% END %] + [% UNLESS nocountry %]
    15. [% IF ( mandatorycountry ) %]
    16. - + [% END %]
    +[% END # nostreet && nocity etc group%] + +[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
    Contact
      + [% UNLESS nophone %]
    1. [% IF ( mandatoryphone ) %]
    2. + [% END %] + [% UNLESS nophonepro %]
    3. [% IF ( mandatoryphonepro ) %]
    4. + [% END %] + [% UNLESS nomobile %]
    5. [% IF ( mandatorymobile ) %]
    6. + [% END %] + [% UNLESS noemail %]
    7. [% IF ( mandatoryemail ) %]
    8. + [% END %] + [% UNLESS noemailpro %]
    9. [% IF ( mandatoryemailpro ) %]
    10. + [% END %] + [% UNLESS nofax %]
    11. [% IF ( mandatoryfax ) %]
    12. + [% END %]
    - +[%END # hide fieldset %] [% END %] [% IF ( step_6 ) %] + [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
    Alternate address
      + [% UNLESS noB_address %]
    1. [% IF ( mandatoryB_address ) %]
    2. + [% END %] + [% UNLESS noB_address2 %]
    3. [% IF ( mandatoryB_address2 ) %]
    4. + [% END %] + [% UNLESS noB_city %]
    5. [% IF ( mandatoryB_city ) %]
    6. + [% END %] + [% UNLESS noB_state %]
    7. [% IF ( mandatoryB_state ) %]
    8. + [% END %] + [% UNLESS noB_zipcode %]
    9. [% IF ( mandatoryB_zipcode ) %]
    10. + [% END %] + [% UNLESS noB_country %]
    11. [% IF ( mandatoryB_country ) %]
    12. + [% END %] + [% UNLESS noB_phone %]
    13. [% IF ( mandatoryB_phone ) %]
    14. + [% END %] + [% UNLESS noB_email %]
    15. [% IF ( mandatoryB_email ) %]
    16. + [% END %] + [% UNLESS nocontactnote %]
    17. [% IF ( mandatorycontactnote ) %]
    18. + [% END %]
    + [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %] [% END %] [% IF ( step_2 ) %] + [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
    Alternate Contact
      + [% UNLESS noaltcontactsurname %]
    1. [% IF ( mandatoryaltcontactsurname ) %]
    2. + [% END %] + [% UNLESS noaltcontactfirstname %]
    3. [% IF ( mandatoryaltcontactfirstname ) %]
    4. + [% END %] + [% UNLESS noaltcontactaddress1 %]
    5. [% IF ( mandatoryaltcontactaddress1 ) %]
    6. + [% END %] + [% UNLESS noaltcontactaddress2 %]
    7. [% IF ( mandatoryaltcontactaddress2 ) %]
    8. + [% END %] + [% UNLESS noaltcontactaddress3 %]
    9. [% IF ( mandatoryaltcontactaddress3 ) %]
    10. + [% END %] + [% UNLESS noaltcontactstate %]
    11. [% IF ( mandatoryaltcontactstate ) %]
    12. + [% END %] + [% UNLESS noaltcontactzipcode %]
    13. [% IF ( mandatoryaltcontactzipcode ) %]
    14. + [% END %] + [% UNLESS noaltcontactcountry %]
    15. [% IF ( mandatoryaltcontactcountry ) %]
    16. + [% END %] + [% UNLESS noaltcontactphone %]
    17. [% IF ( mandatoryaltcontactphone ) %]
    18. + [% END %]
    + [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %] [% END %] [% IF ( step_3 ) %]
    Library Management
      + [% UNLESS nocardnumber %]
    1. [% IF ( mandatorycardnumber ) %]
    2. + [% END %] + [% UNLESS nobranchcode %]
    3. [% IF ( mandatorybranchcode ) %]
    4. + [% END %]
    5. + [% UNLESS nosort1 %]
    6. [% IF ( mandatorysort1 ) %]
    7. + [% END %] + [% UNLESS nosort2 %]
    8. [% IF ( mandatorysort2 ) %]
    9. + [% END %]
    + [% UNLESS nodateenrolled && nodateexpiry && noopacnote && noborrowernotes %]
    Library set-up
      + [% UNLESS nodateenrolled %]
    1. [% IF ( mandatorydateenrolled ) %]
    2. + [% END %] + [% UNLESS nodateexpiry %]
    3. [% IF ( mandatorydateexpiry ) %]
    4. + [% END %] + [% UNLESS noopacnote %]
    5. [% IF ( mandatoryopacnote ) %]
    6. + [% END %] + [% UNLESS noborrowernotes %]
    7. [% IF ( mandatoryborrowernotes ) %]
    8. + [% END %]
    + [% END # hide fieldset %] + + [% UNLESS nouserid && nopassword %]
    OPAC/Staff Login
      + [% UNLESS nouserid %]
    1. [% IF ( mandatoryuserid ) %]
    2. + [%END %] + [% UNLESS nopassword %]
    3. [% IF ( mandatorypassword ) %]
    + + [% END %] +
    + [% END # hide fieldset %] [% UNLESS ( opadd ) %]
    diff --git a/members/memberentry.pl b/members/memberentry.pl index f01261e..0c8d984 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -100,6 +100,13 @@ my @field_check=split(/\|/,$check_BorrowerMandatoryField); foreach (@field_check) { $template->param( "mandatory$_" => 1); } +# function to designate unwanted fields +my $check_BorrowerUnwantedField=C4::Context->preference("BorrowerUnwantedField"); + at field_check=split(/\|/,$check_BorrowerUnwantedField); +foreach (@field_check) { + next unless m/\w/o; + $template->param( "no$_" => 1); +} $template->param( "add" => 1 ) if ( $op eq 'add' ); $template->param( "duplicate" => 1 ) if ( $op eq 'duplicate' ); $template->param( "checked" => 1 ) if ( defined($nodouble) && $nodouble eq 1 ); -- 1.6.5 From srdjan at catalyst.net.nz Mon Oct 10 03:01:38 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Mon, 10 Oct 2011 14:01:38 +1300 Subject: [Koha-patches] [PATCH] bug_6770: removed doubled override increment when using AllowHoldPolicyOverride In-Reply-To: References: Message-ID: <1318208498-2043-1-git-send-email-srdjan@catalyst.net.nz> --- reserve/request.pl | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-) diff --git a/reserve/request.pl b/reserve/request.pl index 0c952b4..71762f8 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -434,22 +434,18 @@ foreach my $biblionumber (@biblionumbers) { $policy_holdallowed = 0; } - if (IsAvailableForItemLevelRequest($itemnumber) and - not $item->{cantreserve} and - CanItemBeReserved($borrowerinfo->{borrowernumber}, $itemnumber) ) { - if ( $policy_holdallowed ) { + if ( $policy_holdallowed && + !$item->{cantreserve} && + IsAvailableForItemLevelRequest($itemnumber) && + CanItemBeReserved($borrowerinfo->{borrowernumber}, $itemnumber) + ) { $item->{available} = 1; $num_available++; - } } elsif (C4::Context->preference( 'AllowHoldPolicyOverride' ) ) { + # If AllowHoldPolicyOverride is set, it should override EVERY restriction, not just branch item rules $item->{override} = 1; $num_override++; } - # If AllowHoldPolicyOverride is set, it should override EVERY restriction, not just branch item rules - if (C4::Context->preference( 'AllowHoldPolicyOverride' ) && !$item->{available} ) { - $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.6.5 From srdjan at catalyst.net.nz Mon Oct 10 04:26:42 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Mon, 10 Oct 2011 15:26:42 +1300 Subject: [Koha-patches] [PATCH] bug_6303: Display Organisation and Parent Organisation names when viewing a borrower of type organistaion In-Reply-To: References: Message-ID: <1318213602-12804-1-git-send-email-srdjan@catalyst.net.nz> --- C4/Members.pm | 22 ++++++++++--------- circ/circulation.pl | 9 ++++--- .../intranet-tmpl/prog/en/includes/circ-menu.inc | 2 +- .../prog/en/includes/patron-title.inc | 6 +++++ .../prog/en/modules/circ/circulation.tt | 21 ++++++++++--------- .../prog/en/modules/members/boraccount.tt | 4 +- .../prog/en/modules/members/member.tt | 4 ++- .../prog/en/modules/members/moremember.tt | 10 +++++++- .../prog/en/modules/members/notices.tt | 6 ++-- .../prog/en/modules/members/readingrec.tt | 4 +- .../intranet-tmpl/prog/en/modules/tools/viewlog.tt | 17 +++++++++++--- .../opac-tmpl/prog/en/includes/patron-title.inc | 5 ++++ koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 7 ++++- .../opac-tmpl/prog/en/modules/opac-userupdate.tt | 7 ++++- members/boraccount.pl | 3 +- members/moremember.pl | 8 ++---- members/readingrec.pl | 1 + opac/opac-user.pl | 3 ++ tools/viewlog.pl | 3 ++ 19 files changed, 93 insertions(+), 49 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc create mode 100644 koha-tmpl/opac-tmpl/prog/en/includes/patron-title.inc diff --git a/C4/Members.pm b/C4/Members.pm index 1730d6c..08bc65c 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -353,11 +353,11 @@ sub GetMemberDetails { my $query; my $sth; if ($borrowernumber) { - $sth = $dbh->prepare("SELECT borrowers.*,category_type,categories.description,reservefee FROM borrowers LEFT JOIN categories ON borrowers.categorycode=categories.categorycode WHERE borrowernumber=?"); + $sth = $dbh->prepare("SELECT borrowers.*,category_type,categories.description,reservefee,enrolmentperiod FROM borrowers LEFT JOIN categories ON borrowers.categorycode=categories.categorycode WHERE borrowernumber=?"); $sth->execute($borrowernumber); } elsif ($cardnumber) { - $sth = $dbh->prepare("SELECT borrowers.*,category_type,categories.description,reservefee FROM borrowers LEFT JOIN categories ON borrowers.categorycode=categories.categorycode WHERE cardnumber=?"); + $sth = $dbh->prepare("SELECT borrowers.*,category_type,categories.description,reservefee,enrolmentperiod FROM borrowers LEFT JOIN categories ON borrowers.categorycode=categories.categorycode WHERE cardnumber=?"); $sth->execute($cardnumber); } else { @@ -380,14 +380,16 @@ sub GetMemberDetails { $borrower->{'flags'} = $flags; $borrower->{'authflags'} = $accessflagshash; - # find out how long the membership lasts - $sth = - $dbh->prepare( - "select enrolmentperiod from categories where categorycode = ?"); - $sth->execute( $borrower->{'categorycode'} ); - my $enrolment = $sth->fetchrow; - $borrower->{'enrolmentperiod'} = $enrolment; - + # For the purposes of making templates easier, we'll define a + # 'showname' which is the alternate form the user's first name if + # 'other name' is defined. + if ($borrower->{category_type} eq 'I') { + $borrower->{'showname'} = $borrower->{'othernames'}; + $borrower->{'showname'} .= " $borrower->{'firstname'}" if $borrower->{'firstname'}; + } else { + $borrower->{'showname'} = $borrower->{'firstname'}; + } + return ($borrower); #, $flags, $accessflagshash); } diff --git a/circ/circulation.pl b/circ/circulation.pl index 98fee97..bbcef51 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -629,10 +629,9 @@ my (undef, $roadttype_hashref) = &GetRoadTypes(); my $address = $borrower->{'streetnumber'}.' '.$roadttype_hashref->{$borrower->{'streettype'}}.' '.$borrower->{'address'}; my $fast_cataloging = 0; - if (defined getframeworkinfo('FA')) { +if (defined getframeworkinfo('FA')) { $fast_cataloging = 1 - } -my $attributes = GetBorrowerAttributes($borrowernumber); +} $template->param( lib_messages_loop => $lib_messages_loop, @@ -647,6 +646,8 @@ $template->param( printername => $printer, firstname => $borrower->{'firstname'}, surname => $borrower->{'surname'}, + showname => $borrower->{'showname'}, + category_type => $borrower->{'category_type'}, dateexpiry => format_date($newexpiry), expiry => format_date($borrower->{'dateexpiry'}), categorycode => $borrower->{'categorycode'}, @@ -662,6 +663,7 @@ $template->param( country => $borrower->{'country'}, phone => $borrower->{'phone'} || $borrower->{'mobile'}, cardnumber => $borrower->{'cardnumber'}, + othernames => $borrower->{'othernames'}, amountold => $amountold, barcode => $barcode, stickyduedate => $stickyduedate, @@ -682,7 +684,6 @@ $template->param( circview => 1, soundon => C4::Context->preference("SoundOn"), fast_cataloging => $fast_cataloging, - extendedattributes => $attributes, ); # save stickyduedate to session diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index a9fd453..af11b08 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -1,5 +1,5 @@ [% IF ( borrowernumber ) %] -
    [% firstname %] [% surname %] ([% cardnumber %])
    +
    [% INCLUDE 'patron-title.inc' %]
    [% END %] [% IF ( step_6 ) %] + [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
    Alternate address
      + [% UNLESS noB_address %]
    1. [% IF ( mandatoryB_address ) %]
    2. + [% END %] + [% UNLESS noB_address2 %]
    3. [% IF ( mandatoryB_address2 ) %]
    4. + [% END %] + [% UNLESS noB_city %]
    5. [% IF ( mandatoryB_city ) %]
    6. + [% END %] + [% UNLESS noB_state %]
    7. [% IF ( mandatoryB_state ) %]
    8. + [% END %] + [% UNLESS noB_zipcode %]
    9. [% IF ( mandatoryB_zipcode ) %]
    10. + [% END %] + [% UNLESS noB_country %]
    11. [% IF ( mandatoryB_country ) %]
    12. + [% END %] + [% UNLESS noB_phone %]
    13. [% IF ( mandatoryB_phone ) %]
    14. + [% END %] + [% UNLESS noB_email %]
    15. [% IF ( mandatoryB_email ) %]
    16. + [% END %] + [% UNLESS nocontactnote %]
    17. [% IF ( mandatorycontactnote ) %]
    18. + [% END %]
    + [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %] [% END %] [% IF ( step_2 ) %] + [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
    Alternate Contact
      + [% UNLESS noaltcontactsurname %]
    1. [% IF ( mandatoryaltcontactsurname ) %]
    2. + [% END %] + [% UNLESS noaltcontactfirstname %]
    3. [% IF ( mandatoryaltcontactfirstname ) %]
    4. + [% END %] + [% UNLESS noaltcontactaddress1 %]
    5. [% IF ( mandatoryaltcontactaddress1 ) %]
    6. + [% END %] + [% UNLESS noaltcontactaddress2 %]
    7. [% IF ( mandatoryaltcontactaddress2 ) %]
    8. + [% END %] + [% UNLESS noaltcontactaddress3 %]
    9. [% IF ( mandatoryaltcontactaddress3 ) %]
    10. + [% END %] + [% UNLESS noaltcontactstate %]
    11. [% IF ( mandatoryaltcontactstate ) %]
    12. + [% END %] + [% UNLESS noaltcontactzipcode %]
    13. [% IF ( mandatoryaltcontactzipcode ) %]
    14. + [% END %] + [% UNLESS noaltcontactcountry %]
    15. [% IF ( mandatoryaltcontactcountry ) %]
    16. + [% END %] + [% UNLESS noaltcontactphone %]
    17. [% IF ( mandatoryaltcontactphone ) %]
    18. + [% END %]
    + [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %] [% END %] [% IF ( step_3 ) %]
    Library Management
      + [% UNLESS nocardnumber %]
    1. [% IF ( mandatorycardnumber ) %]
    2. + [% END %] + [% UNLESS nobranchcode %]
    3. [% IF ( mandatorybranchcode ) %]
    4. + [% END %]
    5. + [% UNLESS nosort1 %]
    6. [% IF ( mandatorysort1 ) %]
    7. + [% END %] + [% UNLESS nosort2 %]
    8. [% IF ( mandatorysort2 ) %]
    9. + [% END %]
    + [% UNLESS nodateenrolled && nodateexpiry && noopacnote && noborrowernotes %]
    Library set-up
      + [% UNLESS nodateenrolled %]
    1. [% IF ( mandatorydateenrolled ) %]
    2. + [% END %] + [% UNLESS nodateexpiry %]
    3. [% IF ( mandatorydateexpiry ) %]
    4. + [% END %] + [% UNLESS noopacnote %]
    5. [% IF ( mandatoryopacnote ) %]
    6. + [% END %] + [% UNLESS noborrowernotes %]
    7. [% IF ( mandatoryborrowernotes ) %]
    8. + [% END %]
    + [% END # hide fieldset %] + + [% UNLESS nouserid && nopassword %]
    OPAC/Staff Login
      + [% UNLESS nouserid %]
    1. [% IF ( mandatoryuserid ) %]
    2. + [%END %] + [% UNLESS nopassword %]
    3. [% IF ( mandatorypassword ) %]
    + + [% END %] +
    + [% END # hide fieldset %] [% UNLESS ( opadd ) %]
    diff --git a/members/memberentry.pl b/members/memberentry.pl index f01261e..0c8d984 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -100,6 +100,13 @@ my @field_check=split(/\|/,$check_BorrowerMandatoryField); foreach (@field_check) { $template->param( "mandatory$_" => 1); } +# function to designate unwanted fields +my $check_BorrowerUnwantedField=C4::Context->preference("BorrowerUnwantedField"); + at field_check=split(/\|/,$check_BorrowerUnwantedField); +foreach (@field_check) { + next unless m/\w/o; + $template->param( "no$_" => 1); +} $template->param( "add" => 1 ) if ( $op eq 'add' ); $template->param( "duplicate" => 1 ) if ( $op eq 'duplicate' ); $template->param( "checked" => 1 ) if ( defined($nodouble) && $nodouble eq 1 ); -- 1.7.4.1 From oleonard at myacpl.org Tue Oct 11 16:31:49 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 11 Oct 2011 10:31:49 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6885 Allow superlib to delete items from any library Message-ID: <1318343509-14476-1-git-send-email-oleonard@myacpl.org> From: Fr?d?ric Demians When IndependantBranches syspref is enabled, a 'regular' user can only delete items belonging to his/her library. But a superlibrarian should have the permission to delete items from all libraries. He can't for the time being. This is fix by this patch. How to test? - On a multi-libraries Koha, activate IndependantBranches - Log in with a superlibrarian user - Find a biblio with one item from another library than the user home library - Click on Edit > Edit Items - On the list of items, all lines have Delete link - If you try to delete an item from another library than the user home library, deletion will fail. Signed-off-by: Owen Leonard --- C4/Items.pm | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 2e85130..8781c7d 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2103,7 +2103,11 @@ sub DelItemCheck { if ($onloan) { $error = "book_on_loan"; } - elsif (C4::Context->preference("IndependantBranches") and (C4::Context->userenv->{branch} ne $item->{C4::Context->preference("HomeOrHoldingBranch")||'homebranch'})){ + elsif ( C4::Context->userenv->{flags} % 2 != 1 and + C4::Context->preference("IndependantBranches") and + (C4::Context->userenv->{branch} ne + $item->{C4::Context->preference("HomeOrHoldingBranch")||'homebranch'}) ) + { $error = "not_same_branch"; } else { -- 1.7.3 From oleonard at myacpl.org Tue Oct 11 21:16:25 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 11 Oct 2011 15:16:25 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6598 - OPACFineNoRenewals syspreference does not stop user renewing in opac Message-ID: <1318360585-18174-1-git-send-email-oleonard@myacpl.org> This patch standardizes the condition under which renewal controls are displayed at the page (as opposed to item) level. In some places "canrenew" was used, in others "patron_flagged" was used. Now "canrenew" controls renew controls and "patron_flagged" only triggers the display of user warnings. This patch also allows for renewal information to be displayed for each item in situations where OPAC renewals are allowed but disabled for whatever reason. This gives the patron information about used/available renew counts but hides renew controls. --- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 27 ++++++++++----------- opac/opac-user.pl | 6 ++-- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt index 9ba6c05..5a2bb61 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -58,7 +58,6 @@ $.tablesorter.addParser({
    - [% IF ( bor_messages ) %]

    Messages For You

    @@ -80,7 +79,7 @@ $.tablesorter.addParser({ [% IF ( patronupdate ) %]

    Thank you!

    Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.

    [% END %] - [% IF ( BORROWER_INF.flagged ) %] + [% IF ( patron_flagged ) %]
      [% IF ( BORROWER_INF.debarred ) %] @@ -187,7 +186,7 @@ $.tablesorter.addParser({ [% IF ( show_barcode ) %]Barcode[% END %] Call No. [% IF ( OpacRenewalAllowed ) %] - [% UNLESS patron_flagged %]Renew[% END %] + Renew [% END %] [% IF ( OPACFinesTab ) %] Fines @@ -235,12 +234,10 @@ $.tablesorter.addParser({ [% IF ( show_barcode ) %][% ISSUE.barcode %][% END %] [% ISSUE.itemcallnumber %] [% IF ( OpacRenewalAllowed ) %] - [% UNLESS patron_flagged %] - [% IF ( ISSUE.status ) %] Renew ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining) + [% IF ( ISSUE.status ) %][% IF ( canrenew ) %] Renew[% END %] ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining) [% ELSE %] Not renewable[% IF ( ISSUE.too_many ) %] ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)[% ELSE %][% IF ( ISSUE.on_reserve ) %] (On hold)[% END %][% END %] [% END %] - [% END %] [% END %] [% IF ( OPACFinesTab ) %] [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %] @@ -253,8 +250,10 @@ $.tablesorter.addParser({ [% IF ( canrenew ) %] [% IF ( OpacRenewalAllowed ) %] - - [% END %] + [% IF ( canrenew ) %] + + [% END %] + [% END %] [% END %] [% IF ( OpacRenewalAllowed ) %] @@ -265,7 +264,7 @@ $.tablesorter.addParser({ [% FOREACH ISSUE IN ISSUES %] [% END %] - [% UNLESS patron_flagged %][% END %] + [% END %] [% END %] @@ -288,7 +287,8 @@ $.tablesorter.addParser({ Call No. Due [% IF ( OpacRenewalAllowed ) %] - [% UNLESS patron_flagged %]Renew[% END %][% END %] + Renew +[% END %] [% IF ( OPACFinesTab ) %] Fines [% END %] @@ -320,15 +320,14 @@ $.tablesorter.addParser({ [% OVERDUE.itemcallnumber %] [% OVERDUE.date_due %] [% IF ( OpacRenewalAllowed ) %] - [% UNLESS patron_flagged %] [% IF ( OVERDUE.debarred ) %]Account Frozen [% ELSIF ( OVERDUE.status ) %] -Renew ([% OVERDUE.renewsleft %] of [% OVERDUE.renewsallowed %] renewals remaining) -[% ELSIF ( OVERDUE.onreserve ) %]On Reserve +[% IF ( canrenew ) %]Renew[% END %] ([% OVERDUE.renewsleft %] of [% OVERDUE.renewsallowed %] renewals remaining) +[% ELSIF ( OVERDUE.onreserve ) %]On hold [% ELSE %]No renewals left [% END %] -[% END %][% END %] +[% END %] [% IF ( OPACFinesTab ) %] [% IF ( OVERDUE.charges ) %]Yes[% ELSE %]No[% END %] [% END %] diff --git a/opac/opac-user.pl b/opac/opac-user.pl index e99e557..ddfa071 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -60,6 +60,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my $OPACDisplayRequestPriority = (C4::Context->preference("OPACDisplayRequestPriority")) ? 1 : 0; my $patronupdate = $query->param('patronupdate'); +my $canrenew = 1; # get borrower information .... my ( $borr ) = GetMemberDetails( $borrowernumber ); @@ -71,6 +72,7 @@ $borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} ); if ( $borr->{'debarred'} || $borr->{'gonenoaddress'} || $borr->{'lost'} ) { $borr->{'flagged'} = 1; + $canrenew = 0; } if ( $borr->{'amountoutstanding'} > 5 ) { @@ -84,6 +86,7 @@ $no_renewal_amt ||= 0; if ( $borr->{amountoutstanding} > $no_renewal_amt ) { $borr->{'flagged'} = 1; + $canrenew = 0; $template->param( renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ), ); @@ -108,13 +111,11 @@ $template->param( BORROWER_INFO => \@bordat, #get issued items .... my $count = 0; -my $toggle = 0; my $overdues_count = 0; my @overdues; my @issuedat; my $itemtypes = GetItemTypes(); my ($issues) = GetPendingIssues($borrowernumber); -my $canrenew = 0; if ($issues){ foreach my $issue ( sort { $b->{'date_due'} cmp $a->{'date_due'} } @$issues ) { # check for reserves @@ -145,7 +146,6 @@ if ($issues){ ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'}); if($status && C4::Context->preference("OpacRenewalAllowed")){ $issue->{'status'} = $status; - $canrenew = 1; } $issue->{'too_many'} = 1 if $renewerror and $renewerror eq 'too_many'; $issue->{'on_reserve'} = 1 if $renewerror and $renewerror eq 'on_reserve'; -- 1.7.3 From oleonard at myacpl.org Tue Oct 11 21:59:19 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 11 Oct 2011 15:59:19 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 7006, highlight patron changes in email Message-ID: <1318363159-18642-1-git-send-email-oleonard@myacpl.org> This patch eliminates all unchanged fields from the email on the assumption that the information is superfluous. I have also added a link to the patron edit screen which will be displayed if the staffClientBaseURL has been entered. --- opac/opac-userupdate.pl | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl index f8273ce..b6586a6 100755 --- a/opac/opac-userupdate.pl +++ b/opac/opac-userupdate.pl @@ -89,10 +89,9 @@ if ( $query->param('modify') ) { # get all the fields: my $message = <<"EOF"; -Patron $borr->{'cardnumber'} +Patron $borr->{'cardnumber'} has requested to change her/his personal details. +Please check these new details and make the changes to these fields: -has requested to change her/his personal details. -Please check these new details and make the changes: EOF my $streetnumber = $borr->{'streetnumber'} || ''; @@ -113,12 +112,13 @@ EOF $borrowerfield = format_date( $borr->{'dateofbirth'} ) || ''; } - if($borrowerfield eq $newfield) { - $message .= "$field : $borrowerfield --> $newfield\n"; - } else { - $message .= uc($field) . " : $borrowerfield --> $newfield\n"; + if($borrowerfield ne $newfield) { + $message .= $field . " : $borrowerfield --> $newfield\n"; } } + + $message .= "\nEdit this patron's record: http://".C4::Context->preference('staffClientBaseURL ')."/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=".$borr->{'borrowernumber'}."&categorycode=".$borr->{'categorycode'} if C4::Context->preference('staffClientBaseURL '); + $message .= "\n\nThanks,\nKoha\n\n"; my %mail = ( To => $updateemailaddress, -- 1.7.3 From robin at catalyst.net.nz Wed Oct 12 06:42:37 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Wed, 12 Oct 2011 17:42:37 +1300 Subject: [Koha-patches] [PATCH] Bug 6199 - allow bulkmarkimport.pl to remove duplicate barcodes Message-ID: <1318394557-9036-1-git-send-email-robin@catalyst.net.nz> This adds the --dedupbarcode option that allows bulkmarkimport to erase a barcode but keep the item of any items it finds with duplicate barcodes. --- C4/Biblio.pm | 7 ++- C4/Items.pm | 5 ++- misc/migration_tools/bulkmarcimport.pl | 73 ++++++++++++++++++++++++++++---- 3 files changed, 73 insertions(+), 12 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 5f2367d..f8969fa 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -3418,9 +3418,12 @@ Function exported, but should NOT be used, unless you really know what you're do =cut sub ModBiblioMarc { - - # pass the MARC::Record to this function, and it will create the records in the marc field + # pass the MARC::Record to this function, and it will create the records in + # the marc field my ( $record, $biblionumber, $frameworkcode ) = @_; + + # Clone record as it gets modified + $record = $record->clone(); my $dbh = C4::Context->dbh; my @fields = $record->fields(); if ( !$frameworkcode ) { diff --git a/C4/Items.pm b/C4/Items.pm index 2e85130..5adf483 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -303,7 +303,7 @@ Sequence number of original item tag in the MARC record. Item barcode, provide to assist in the construction of useful error messages. -=item error_condition +=item error_code Code representing the error condition. Can be 'duplicate_barcode', 'invalid_homebranch', or 'invalid_holdingbranch'. @@ -323,6 +323,9 @@ sub AddItemBatchFromMarc { my @errors = (); my $dbh = C4::Context->dbh; + # We modify the record, so lets work on a clone so we don't change the + # original. + $record = $record->clone(); # loop through the item tags and start creating items my @bad_item_fields = (); my ($itemtag, $itemsubfield) = &GetMarcFromKohaField("items.itemnumber",''); diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index 4f738e8..64e998b 100755 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -33,8 +33,8 @@ use Pod::Usage; binmode(STDOUT, ":utf8"); my ( $input_marc_file, $number, $offset) = ('',0,0); my ($version, $delete, $test_parameter, $skip_marc8_conversion, $char_encoding, $verbose, $commit, $fk_off,$format,$biblios,$authorities,$keepids,$match, $isbn_check, $logfile); -my ($sourcetag,$sourcesubfield,$idmapfl); my $cleanisbn = 1; +my ($sourcetag,$sourcesubfield,$idmapfl, $dedup_barcode); $|=1; @@ -61,6 +61,7 @@ GetOptions( 'y:s' => \$sourcesubfield, 'idmap:s' => \$idmapfl, 'cleanisbn!' => \$cleanisbn, + 'dedupbarcode' => \$dedup_barcode, ); $biblios=!$authorities||$biblios; @@ -318,21 +319,67 @@ RECORD: while ( ) { printlog({id=>$id||$originalid||$biblionumber, op=>"insert",status=>"ok"}) if ($logfile); } eval { ( $itemnumbers_ref, $errors_ref ) = AddItemBatchFromMarc( $record, $biblionumber, $biblioitemnumber, '' ); }; - if ( $@ ) { - warn "ERROR: Adding items to bib $biblionumber failed: $@\n"; + my $error_adding = $@; + # Work on a clone so that if there are real errors, we can maybe + # fix them up later. + my $clone_record = $record->clone(); + C4::Biblio::_strip_item_fields($clone_record, ''); + # This sets the marc fields if there was an error, and also calls + # defer_marc_save. + ModBiblioMarc( $clone_record, $biblionumber, '' ); + if ( $error_adding ) { + warn "ERROR: Adding items to bib $biblionumber failed: $error_adding"; printlog({id=>$id||$originalid||$biblionumber, op=>"insertitem",status=>"ERROR"}) if ($logfile); # if we failed because of an exception, assume that # the MARC columns in biblioitems were not set. - C4::Biblio::_strip_item_fields($record, ''); - ModBiblioMarc( $record, $biblionumber, '' ); next RECORD; - } + } else{ - C4::Biblio::_strip_item_fields($record, ''); - ModBiblioMarc( $record, $biblionumber, '' ); # need to call because of defer_marc_save printlog({id=>$id||$originalid||$biblionumber, op=>"insert",status=>"ok"}) if ($logfile); } - if ($#{ $errors_ref } > -1) { + if ($dedup_barcode && grep { exists $_->{error_code} && $_->{error_code} eq 'duplicate_barcode' } @$errors_ref) { + # Find the record called 'barcode' + my ($tag, $sub) = C4::Biblio::GetMarcFromKohaField('items.barcode', ''); + # Now remove any items that didn't have a duplicate_barcode error, + # erase the barcodes on items that did, and re-add those items. + my %dupes; + foreach my $i (0 .. $#{$errors_ref}) { + my $ref = $errors_ref->[$i]; + if ($ref && ($ref->{error_code} eq 'duplicate_barcode')) { + $dupes{$ref->{item_sequence}} = 1; + # Delete the error message because we're going to + # retry this one. + delete $errors_ref->[$i]; + } + } + my $seq = 0; + foreach my $field ($record->field($tag)) { + $seq++; + if ($dupes{$seq}) { + # Here we remove the barcode + $field->delete_subfield(code => $sub); + } else { + # otherwise we delete the field because we don't want + # two of them + $record->delete_fields($field); + } + } + # Now re-add the record as before, adding errors to the prev list + my $more_errors; + eval { ( $itemnumbers_ref, $more_errors ) = AddItemBatchFromMarc( $record, $biblionumber, $biblioitemnumber, '' ); }; + if ( $@ ) { + warn "ERROR: Adding items to bib $biblionumber failed: $@\n"; + printlog({id=>$id||$originalid||$biblionumber, op=>"insertitem",status=>"ERROR"}) if ($logfile); + # if we failed because of an exception, assume that + # the MARC columns in biblioitems were not set. + ModBiblioMarc( $record, $biblionumber, '' ); + next RECORD; + } else { + printlog({id=>$id||$originalid||$biblionumber, op=>"insert",status=>"ok"}) if ($logfile); + } + push @$errors_ref, @{ $more_errors }; + } + if ($#{ $errors_ref } > -1) { report_item_errors($biblionumber, $errors_ref); } } @@ -403,6 +450,7 @@ sub report_item_errors { my $errors_ref = shift; foreach my $error (@{ $errors_ref }) { + next if !$error; my $msg = "Item not added (bib $biblionumber, item tag #$error->{'item_sequence'}, barcode $error->{'item_barcode'}): "; my $error_code = $error->{'error_code'}; $error_code =~ s/_/ /g; @@ -539,6 +587,13 @@ Store ids in 009 (usefull for authorities, where 001 contains the authid for Koha, that can contain a very valuable info for authorities coming from LOC or BNF. useless for biblios probably) +=item B<-dedupbarcode> + +If set, whenever a duplicate barcode is detected, it is removed and the attempt +to add the record is retried, thereby giving the record a blank barcode. This +is useful when something has set barcodes to be a biblio ID, or similar +(usually other software.) + =back =cut -- 1.7.4.1 From robin at catalyst.net.nz Wed Oct 12 07:33:26 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Wed, 12 Oct 2011 18:33:26 +1300 Subject: [Koha-patches] [PATCH] Bug 7008 - create tmp dir for zebra Message-ID: <1318397606-9735-1-git-send-email-robin@catalyst.net.nz> Sometimes zebra needs a tmp dir in order to work. This ensures that it is created both by koha-create-dirs in the packages, and by rebuild_zebra when it runs. --- debian/scripts/koha-create-dirs | 5 +++++ misc/migration_tools/rebuild_zebra.pl | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/debian/scripts/koha-create-dirs b/debian/scripts/koha-create-dirs index 7daf57a..06b7bff 100755 --- a/debian/scripts/koha-create-dirs +++ b/debian/scripts/koha-create-dirs @@ -42,10 +42,15 @@ do userdir "$name" "/etc/koha/sites/$name" userdir "$name" "/var/lib/koha/$name" userdir "$name" "/var/lib/koha/$name/authorities" + userdir "$name" "/var/lib/koha/$name/authorities/key" + userdir "$name" "/var/lib/koha/$name/authorities/register" + userdir "$name" "/var/lib/koha/$name/authorities/shadow" + userdir "$name" "/var/lib/koha/$name/authorities/tmp" userdir "$name" "/var/lib/koha/$name/biblios" userdir "$name" "/var/lib/koha/$name/biblios/key" userdir "$name" "/var/lib/koha/$name/biblios/register" userdir "$name" "/var/lib/koha/$name/biblios/shadow" + userdir "$name" "/var/lib/koha/$name/biblios/tmp" userdir "$name" "/var/lock/koha/$name" userdir "$name" "/var/lock/koha/$name/authorities" userdir "$name" "/var/lock/koha/$name/biblios" diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl index dadf43f..71d7cd2 100755 --- a/misc/migration_tools/rebuild_zebra.pl +++ b/misc/migration_tools/rebuild_zebra.pl @@ -175,7 +175,7 @@ if ($keep_export) { sub check_zebra_dirs { my ($base) = shift() . '/'; my $needed_repairing = 0; - my @dirs = ( '', 'key', 'register', 'shadow' ); + my @dirs = ( '', 'key', 'register', 'shadow', 'tmp' ); foreach my $dir (@dirs) { my $bdir = $base . $dir; if (! -d $bdir) { -- 1.7.4.1 From M.de.Rooy at rijksmuseum.nl Wed Oct 12 14:57:39 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Wed, 12 Oct 2011 12:57:39 +0000 Subject: [Koha-patches] [PATCH] 6996 Encoding problem in opac-showmarc Message-ID: <809BE39CD64BFD4EB9036172EBCCFA313424D5@S-MAIL-1B.rijksmuseum.intra> Revised: adding specific statement to force utf8 on output handle. --- opac/opac-showmarc.pl | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/opac/opac-showmarc.pl b/opac/opac-showmarc.pl index 4475512..673069e 100755 --- a/opac/opac-showmarc.pl +++ b/opac/opac-showmarc.pl @@ -27,8 +27,11 @@ use strict; use warnings; +use open OUT=>':utf8', ':std'; + # standard or CPAN modules used use CGI; +use Encode; # Koha modules used use C4::Context; @@ -79,8 +82,8 @@ if ($view eq 'card' || $view eq 'html') { my $stylesheet = $xslt->parse_stylesheet($style_doc); my $results = $stylesheet->transform($source); my $newxmlrecord = $stylesheet->output_string($results); - print $input->header(), $newxmlrecord; - exit; + $newxmlrecord = Encode::decode_utf8($newxmlrecord) unless utf8::is_utf8($newxmlrecord); + print $input->header(-charset => 'UTF-8'), $newxmlrecord; } else { $record =GetMarcBiblio($biblionumber) unless $record; $template->param( MARC_FORMATTED => $record->as_formatted ); -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Wed Oct 12 16:09:53 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Wed, 12 Oct 2011 14:09:53 +0000 Subject: [Koha-patches] [PATCH] [REVISED] 5616 Follow up patch Message-ID: <809BE39CD64BFD4EB9036172EBCCFA31342524@S-MAIL-1B.rijksmuseum.intra> Decode data only if needed. Add instruction to use UTF8 in html header. Force utf8 on output handle. --- catalogue/showmarc.pl | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/catalogue/showmarc.pl b/catalogue/showmarc.pl index bd557e9..10533ec 100755 --- a/catalogue/showmarc.pl +++ b/catalogue/showmarc.pl @@ -25,9 +25,12 @@ use strict; #use warnings; FIXME - Bug 2505 +use open OUT=>':utf8', ':std'; + # standard or CPAN modules used use CGI qw(:standard); use DBI; +use Encode; # Koha modules used use C4::Context; @@ -75,17 +78,19 @@ my $style_doc = $parser->parse_file($xslfile); my $stylesheet = $xslt->parse_stylesheet($style_doc); my $results = $stylesheet->transform($source); my $newxmlrecord = $stylesheet->output_string($results); -#warn $newxmlrecord; -print "Content-type: text/html\n\n"; -utf8::encode($newxmlrecord); -print $newxmlrecord; +$newxmlrecord=Encode::decode_utf8($newxmlrecord) unless utf8::is_utf8($newxmlrecord); #decode only if not in perl internal format +print $input->header(-charset => 'UTF-8'), $newxmlrecord; } else { $record =GetMarcBiblio($biblionumber) unless $record; my $formatted = $record->as_formatted; +#$formatted=Encode::decode_utf8($formatted) unless utf8::is_utf8($formatted); +#seems not to be necessary $template->param( MARC_FORMATTED => $formatted ); -output_html_with_http_headers $input, $cookie, $template->output; +my $output= $template->output; +$output=Encode::decode_utf8($output) unless utf8::is_utf8($output); +output_html_with_http_headers $input, $cookie, $output; } -- 1.6.0.6 From oleonard at myacpl.org Wed Oct 12 16:41:30 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 12 Oct 2011 10:41:30 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Notify the user on his account page when his account is almost expired Message-ID: <1318430490-19808-1-git-send-email-oleonard@myacpl.org> From: Fr?d?rick Capovilla New feature : If the "NotifyBorrowerDeparture" system preference is defined, a notification appears in the user's account page if his subscription is almost expired. http://bugs.koha-community.org/show_bug.cgi?id=6978 Signed-off-by: Owen Leonard --- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 6 ++++++ opac/opac-user.pl | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt index 9ba6c05..4d33bd4 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -79,6 +79,12 @@ $.tablesorter.addParser({ [% IF ( patronupdate ) %]

      Thank you!

      Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.

      [% END %] + [% IF ( BORROWER_INF.warndeparture ) %] +
      + Please note: Your card will expire on [% BORROWER_INF.warndeparture %]. Please contact the library if you wish to renew your subscription. + [% IF ( BORROWER_INF.returnbeforeexpiry ) %] Also note that you must return all checked out items before your card expires.[% END %] +
      + [% END %] [% IF ( BORROWER_INF.flagged ) %]
      diff --git a/opac/opac-user.pl b/opac/opac-user.pl index e99e557..03c9e81 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -38,6 +38,12 @@ use C4::Branch; # GetBranches use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE'; +use Date::Calc qw( + Today + Add_Delta_Days + Date_to_Days +); + my $query = new CGI; BEGIN { @@ -64,6 +70,9 @@ my $patronupdate = $query->param('patronupdate'); # get borrower information .... my ( $borr ) = GetMemberDetails( $borrowernumber ); +my ( $today_year, $today_month, $today_day) = Today(); +my ($warning_year, $warning_month, $warning_day) = split /-/, $borr->{'dateexpiry'}; + for (qw(dateenrolled dateexpiry dateofbirth)) { ($borr->{$_}) and $borr->{$_} = format_date($borr->{$_}); } @@ -99,6 +108,18 @@ $borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'}; my @bordat; $bordat[0] = $borr; +# Warningdate is the date that the warning starts appearing +if ( C4::Context->preference('NotifyBorrowerDeparture') && + Date_to_Days(Add_Delta_Days($warning_year,$warning_month,$warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) < + Date_to_Days( $today_year, $today_month, $today_day ) ) +{ + # borrower card soon to expire, warn the borrower + $borr->{'warndeparture'} = $borr->{dateexpiry}; + if (C4::Context->preference('ReturnBeforeExpiry')){ + $borr->{'returnbeforeexpiry'} = 1; + } +} + $template->param( BORROWER_INFO => \@bordat, borrowernumber => $borrowernumber, patron_flagged => $borr->{flagged}, -- 1.7.3 From Katrin.Fischer.83 at web.de Wed Oct 12 22:55:15 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Wed, 12 Oct 2011 22:55:15 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6996: Encoding problem in opac-showmarc Message-ID: <1318452915-8201-1-git-send-email-Katrin.Fischer.83@web.de> From: Marcel de Rooy Signed-off-by: Katrin Fischer No more encoding problems spotted. --- opac/opac-showmarc.pl | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/opac/opac-showmarc.pl b/opac/opac-showmarc.pl index 4475512..673069e 100755 --- a/opac/opac-showmarc.pl +++ b/opac/opac-showmarc.pl @@ -27,8 +27,11 @@ use strict; use warnings; +use open OUT=>':utf8', ':std'; + # standard or CPAN modules used use CGI; +use Encode; # Koha modules used use C4::Context; @@ -79,8 +82,8 @@ if ($view eq 'card' || $view eq 'html') { my $stylesheet = $xslt->parse_stylesheet($style_doc); my $results = $stylesheet->transform($source); my $newxmlrecord = $stylesheet->output_string($results); - print $input->header(), $newxmlrecord; - exit; + $newxmlrecord = Encode::decode_utf8($newxmlrecord) unless utf8::is_utf8($newxmlrecord); + print $input->header(-charset => 'UTF-8'), $newxmlrecord; } else { $record =GetMarcBiblio($biblionumber) unless $record; $template->param( MARC_FORMATTED => $record->as_formatted ); -- 1.7.4.1 From Katrin.Fischer.83 at web.de Wed Oct 12 23:14:58 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Wed, 12 Oct 2011 23:14:58 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 7007: 490 series statements should appear when not traced Message-ID: <1318454098-9080-1-git-send-email-Katrin.Fischer.83@web.de> From: Jared Camins-Esakov Although the MARC21 standard requires libraries to set the first indicator to '0' when a 490 field is untraced, many libraries leave it blank. Previously, this resulted in a blank line with the label "Series:" but no actual series information. This patch fixes that by showing untraced series headings for 490s whenever the first indicator is not set to '1' Signed-off-by: Katrin Fischer Checked that series shows correctly when first indicator is 0, 1 or not set. --- .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 2 +- .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index 112a809..bc62748 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -166,7 +166,7 @@ - + diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl index 404293f..2fca378 100755 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -224,7 +224,7 @@ - + -- 1.7.4.1 From Katrin.Fischer.83 at web.de Wed Oct 12 23:36:21 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Wed, 12 Oct 2011 23:36:21 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5616: UTF-8 problem in Card View / Follow up Message-ID: <1318455381-9695-1-git-send-email-Katrin.Fischer.83@web.de> From: Marcel de Rooy Decode data only if needed. Add instruction to use UTF8 in html header. Force utf8 on output handle. Signed-off-by: Katrin Fischer Umlauts and other diacritics in card view of z39.50 search are now correctly displayed. --- catalogue/showmarc.pl | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/catalogue/showmarc.pl b/catalogue/showmarc.pl index bd557e9..10533ec 100755 --- a/catalogue/showmarc.pl +++ b/catalogue/showmarc.pl @@ -25,9 +25,12 @@ use strict; #use warnings; FIXME - Bug 2505 +use open OUT=>':utf8', ':std'; + # standard or CPAN modules used use CGI qw(:standard); use DBI; +use Encode; # Koha modules used use C4::Context; @@ -75,17 +78,19 @@ my $style_doc = $parser->parse_file($xslfile); my $stylesheet = $xslt->parse_stylesheet($style_doc); my $results = $stylesheet->transform($source); my $newxmlrecord = $stylesheet->output_string($results); -#warn $newxmlrecord; -print "Content-type: text/html\n\n"; -utf8::encode($newxmlrecord); -print $newxmlrecord; +$newxmlrecord=Encode::decode_utf8($newxmlrecord) unless utf8::is_utf8($newxmlrecord); #decode only if not in perl internal format +print $input->header(-charset => 'UTF-8'), $newxmlrecord; } else { $record =GetMarcBiblio($biblionumber) unless $record; my $formatted = $record->as_formatted; +#$formatted=Encode::decode_utf8($formatted) unless utf8::is_utf8($formatted); +#seems not to be necessary $template->param( MARC_FORMATTED => $formatted ); -output_html_with_http_headers $input, $cookie, $template->output; +my $output= $template->output; +$output=Encode::decode_utf8($output) unless utf8::is_utf8($output); +output_html_with_http_headers $input, $cookie, $output; } -- 1.7.4.1 From Katrin.Fischer.83 at web.de Thu Oct 13 00:08:19 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Thu, 13 Oct 2011 00:08:19 +0200 Subject: [Koha-patches] [PATCH] [SIGEND-OFF] Bug 6972: Hardcoded template paths to en in showmarc Message-ID: <1318457299-13082-1-git-send-email-Katrin.Fischer.83@web.de> From: Maxime Pelletier Couldn't help but reformat the indentation a bit. http://bugs.koha-community.org/show_bug.cgi?id=6972 Signed-off-by: Katrin Fischer Card view works correctly in cataloguing search. Plain view/labelled show correctly in OPAC. --- catalogue/showmarc.pl | 38 +++++++++++++++++++------------------- opac/opac-showmarc.pl | 9 +++++---- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/catalogue/showmarc.pl b/catalogue/showmarc.pl index bd557e9..8c59bb2 100755 --- a/catalogue/showmarc.pl +++ b/catalogue/showmarc.pl @@ -63,29 +63,29 @@ if($importid) { $xmlrecord = $record->as_xml(); } } - + if($view eq 'card') { -$xmlrecord = GetXmlBiblio($biblionumber) unless $xmlrecord; + my $themelang = '/' . C4::Context->preference("opacthemes") . '/' . C4::Templates::_current_language(); -my $xslfile = C4::Context->config('intrahtdocs')."/prog/en/xslt/compact.xsl"; -my $parser = XML::LibXML->new(); -my $xslt = XML::LibXSLT->new(); -my $source = $parser->parse_string($xmlrecord); -my $style_doc = $parser->parse_file($xslfile); -my $stylesheet = $xslt->parse_stylesheet($style_doc); -my $results = $stylesheet->transform($source); -my $newxmlrecord = $stylesheet->output_string($results); -#warn $newxmlrecord; -print "Content-type: text/html\n\n"; -utf8::encode($newxmlrecord); -print $newxmlrecord; + $xmlrecord = GetXmlBiblio($biblionumber) unless $xmlrecord; + my $xslfile = C4::Context->config('intrahtdocs').$themelang."/xslt/compact.xsl"; + my $parser = XML::LibXML->new(); + my $xslt = XML::LibXSLT->new(); + my $source = $parser->parse_string($xmlrecord); + my $style_doc = $parser->parse_file($xslfile); + my $stylesheet = $xslt->parse_stylesheet($style_doc); + my $results = $stylesheet->transform($source); + my $newxmlrecord = $stylesheet->output_string($results); + #warn $newxmlrecord; + print "Content-type: text/html\n\n"; + utf8::encode($newxmlrecord); + print $newxmlrecord; } else { + $record =GetMarcBiblio($biblionumber) unless $record; -$record =GetMarcBiblio($biblionumber) unless $record; - -my $formatted = $record->as_formatted; -$template->param( MARC_FORMATTED => $formatted ); + my $formatted = $record->as_formatted; + $template->param( MARC_FORMATTED => $formatted ); -output_html_with_http_headers $input, $cookie, $template->output; + output_html_with_http_headers $input, $cookie, $template->output; } diff --git a/opac/opac-showmarc.pl b/opac/opac-showmarc.pl index 4475512..3b9a0ac 100755 --- a/opac/opac-showmarc.pl +++ b/opac/opac-showmarc.pl @@ -59,18 +59,19 @@ if ($importid) { $record = MARC::Record->new_from_usmarc($marc) ; if($view eq 'card') { $xmlrecord = $record->as_xml(); - } + } } - if ($view eq 'card' || $view eq 'html') { $xmlrecord = GetXmlBiblio($biblionumber) unless $xmlrecord; my $xslfile; + my $themelang = '/' . C4::Context->preference("opacthemes") . '/' . C4::Templates::_current_language(); + if ($view eq 'card'){ - $xslfile = C4::Context->config('opachtdocs')."/prog/en/xslt/compact.xsl"; + $xslfile = C4::Context->config('opachtdocs').$themelang."/xslt/compact.xsl"; } else { # must be html - $xslfile = C4::Context->config('opachtdocs')."/prog/en/xslt/MARC21slim2OPACMARCdetail.xsl"; + $xslfile = C4::Context->config('opachtdocs').$themelang."/xslt/MARC21slim2OPACMARCdetail.xsl"; } my $parser = XML::LibXML->new(); my $xslt = XML::LibXSLT->new(); -- 1.7.4.1 From robin at catalyst.net.nz Thu Oct 13 04:58:31 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Thu, 13 Oct 2011 15:58:31 +1300 Subject: [Koha-patches] [PATCH] Bug 6973 - this forces alerts to use the message queue Message-ID: <1318474711-21973-1-git-send-email-robin@catalyst.net.nz> Alerts, such as serials claims and routing lists messages and new member details originally used sendmail directly. Now they go into the message queue so that they can use centralised configuration. --- C4/Letters.pm | 90 ++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 55 insertions(+), 35 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 0fccad4..63095f2 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -279,20 +279,18 @@ sub SendAlerts { my $innerletter = $letter; my $borinfo = C4::Members::GetMember('borrowernumber' => $_->{'borrowernumber'}); parseletter( $innerletter, 'borrowers', $_->{'borrowernumber'} ); + $innerletter->{'content-type'} = 'text/plain; charset="utf8"'; # ... then send mail - if ( $borinfo->{email} ) { - my %mail = ( - To => $borinfo->{email}, - From => $borinfo->{email}, - Subject => "" . $innerletter->{title}, - Message => "" . $innerletter->{content}, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; + my %mail = ( + borrowernumber => $borinfo->{borrowernumber}, + message_transport_type => 'email', + letter => $innerletter, + no_local_bcc => 1, + ); + EnqueueLetter( \%mail ); # warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}"; - } } } elsif ( $type eq 'claimacquisition' ) { @@ -335,24 +333,24 @@ sub SendAlerts { } $letter->{content} =~ s/<<[^>]*>>//g; my $innerletter = $letter; - + $innerletter->{'content-type'} = 'text/plain; charset="utf8"'; # ... then send mail if ( $databookseller->{bookselleremail} || $databookseller->{contemail} ) { my %mail = ( - To => $databookseller->{bookselleremail} + to_address => $databookseller->{bookselleremail} . ( $databookseller->{contemail} ? "," . $databookseller->{contemail} : "" ), - From => $userenv->{emailaddress}, - Subject => "" . $innerletter->{title}, - Message => "" . $innerletter->{content}, - 'Content-Type' => 'text/plain; charset="utf8"', + from_address => $userenv->{emailaddress}, + message_transport_type => 'email', + letter => $innerletter, + no_local_bcc => 1, ); - sendmail(%mail) or carp $Mail::Sendmail::error; + EnqueueLetter( \%mail ); } if ( C4::Context->preference("LetterLog") ) { logaction( @@ -422,15 +420,19 @@ sub SendAlerts { my $mail_msg = $innerletter->{content}; $mail_msg ||= q{}; $mail_subj ||= q{}; - + my $letter = { + title => $mail_subj, + content => $mail_msg, + 'content-type' => 'text/plain; charset="utf8"', + }; my %mail = ( - To => $mail_to, - From => $userenv->{emailaddress}, - Subject => $mail_subj, - Message => $mail_msg, - 'Content-Type' => 'text/plain; charset="utf8"', + to_address => $mail_to, + from_address => $userenv->{emailaddress}, + message_transport_type => 'email', + letter => $letter, + no_local_bcc => 1, ); - sendmail(%mail) or carp $Mail::Sendmail::error; + EnqueueLetter( \%mail ); logaction( "ACQUISITION", "CLAIM ISSUE", @@ -443,7 +445,7 @@ sub SendAlerts { . $innerletter->{content} ) if C4::Context->preference("LetterLog"); } - } + } # send an "account details" notice to a newly created user elsif ( $type eq 'members' ) { # must parse the password special, before it's hashed. @@ -453,14 +455,15 @@ sub SendAlerts { parseletter( $letter, 'branches', $externalid->{'branchcode'} ); my $branchdetails = GetBranchDetail($externalid->{'branchcode'}); + $letter->{'content-type'} = 'text/plain; charset="utf8"'; + my %mail = ( - To => $externalid->{'emailaddr'}, - From => $branchdetails->{'branchemail'} || C4::Context->preference("KohaAdminEmailAddress"), - Subject => $letter->{'title'}, - Message => $letter->{'content'}, - 'Content-Type' => 'text/plain; charset="utf8"', + to_address => $externalid->{'emailaddr'}, + message_transport_type => 'email', + letter => $letter, + no_local_bcc => 1, ); - sendmail(%mail) or carp $Mail::Sendmail::error; + EnqueueLetter( \%mail ); } } @@ -633,13 +636,30 @@ sub EnqueueLetter ($) { # If we have any attachments we should encode then into the body. if ( $params->{'attachments'} ) { $params->{'letter'} = _add_attachments( - { letter => $params->{'letter'}, + { + letter => $params->{'letter'}, attachments => $params->{'attachments'}, message => MIME::Lite->new( Type => 'multipart/mixed' ), } ); } + # If we aren't given a from address, we first go for the user's + # branch (which may be the librarians, but that's OK) email, if that doesn't + # work, we go for the koha admin address. + if ( !$params->{'from_address'} ) { + my $userenv = C4::Context->userenv; + my $branch = $userenv->{branch}; + my $branch_detail = GetBranchDetail($branch); + my $branch_email = $branch_detail->{branchemail}; + $params->{from_address} = $branch_email + || C4::Context->preference('KohaAdminEmailAddress'); + } + + # Set a reply-to if there isn't one already. + $params->{'reply_to_address'} = $params->{from_address} + if !$params->{reply_to_address}; + my $dbh = C4::Context->dbh(); my $statement = << 'ENDSQL'; INSERT INTO message_queue @@ -652,9 +672,9 @@ ENDSQL my $sth = $dbh->prepare($statement); my $result = $sth->execute( - $params->{'borrowernumber'}, # borrowernumber - $params->{'letter'}->{'title'}, # subject - $params->{'letter'}->{'content'}, # content + $params->{'borrowernumber'}, # borrowernumber + $params->{'letter'}->{'title'}, # subject + $params->{'letter'}->{'content'}, # content $params->{'letter'}->{'metadata'} || '', # metadata $params->{'letter'}->{'code'} || '', # letter_code $params->{'letter'}->{'content-type'}, # content_type -- 1.7.4.1 From srdjan at catalyst.net.nz Thu Oct 13 05:59:52 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Thu, 13 Oct 2011 16:59:52 +1300 Subject: [Koha-patches] [PATCH] bug_2830: Remove reserve when checking out if the borrower is not the first one in the reserve queue In-Reply-To: References: Message-ID: <1318478392-22009-1-git-send-email-srdjan@catalyst.net.nz> --- C4/Circulation.pm | 42 ++----------------- C4/Items.pm | 2 +- C4/Reserves.pm | 67 ++++++++++++++++++++++++++----- C4/Search.pm | 4 +- C4/XSLT.pm | 2 +- circ/circulation.pl | 2 +- opac/opac-user.pl | 2 +- t/db_dependent/Reserves.t | 6 +- t/db_dependent/lib/KohaTest/Reserves.pm | 1 + 9 files changed, 72 insertions(+), 56 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 42a8b2d..d228304 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -319,7 +319,7 @@ sub transferbook { # find reserves..... # That'll save a database query. - my ( $resfound, $resrec ) = + my ( $resfound, $resrec, undef ) = CheckReserves( $itemnumber ); if ( $resfound and not $ignoreRs ) { $resrec->{'ResFound'} = $resfound; @@ -869,7 +869,7 @@ sub CanBookBeIssued { } # See if the item is on reserve. - my ( $restype, $res ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); + my ( $restype, $res, undef ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); if ($restype) { my $resbor = $res->{'borrowernumber'}; my ( $resborrower ) = C4::Members::GetMemberDetails( $resbor, 0 ); @@ -983,39 +983,7 @@ sub AddIssue { ); } - # See if the item is on reserve. - my ( $restype, $res ) = - C4::Reserves::CheckReserves( $item->{'itemnumber'} ); - if ($restype) { - my $resbor = $res->{'borrowernumber'}; - if ( $resbor eq $borrower->{'borrowernumber'} ) { - # The item is reserved by the current patron - ModReserveFill($res); - } - elsif ( $restype eq "Waiting" ) { - # warn "Waiting"; - # The item is on reserve and waiting, but has been - # reserved by some other patron. - } - elsif ( $restype eq "Reserved" ) { - # warn "Reserved"; - # The item is reserved by someone else. - if ($cancelreserve) { # cancel reserves on this item - CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'}); - } - } - if ($cancelreserve) { - CancelReserve($res->{'biblionumber'}, 0, $res->{'borrowernumber'}); - } - else { - # set waiting reserve to first in reserve queue as book isn't waiting now - ModReserve(1, - $res->{'biblionumber'}, - $res->{'borrowernumber'}, - $res->{'branchcode'} - ); - } - } + MoveReserve( $item->{'itemnumber'}, $borrower->{'borrowernumber'}, $cancelreserve ); # Starting process for transfer job (checking transfert and validate it if we have one) my ($datesent) = GetTransfers($item->{'itemnumber'}); @@ -1636,7 +1604,7 @@ sub AddReturn { # find reserves..... # if we don't have a reserve with the status W, we launch the Checkreserves routine - my ($resfound, $resrec) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); + my ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); if ($resfound) { $resrec->{'ResFound'} = $resfound; $messages->{'ResFound'} = $resrec; @@ -2199,7 +2167,7 @@ sub CanBookBeRenewed { $error="too_many"; } - my ( $resfound, $resrec ) = C4::Reserves::CheckReserves($itemnumber); + my ( $resfound, $resrec, undef ) = C4::Reserves::CheckReserves($itemnumber); if ($resfound) { $renewokay = 0; $error="on_reserve" diff --git a/C4/Items.pm b/C4/Items.pm index 6092fec..67177dd 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1221,7 +1221,7 @@ sub GetItemsInfo { $serial = 1; } if ( $datedue eq '' ) { - my ( $restype, $reserves ) = + my ( $restype, $reserves, undef ) = C4::Reserves::CheckReserves( $data->{'itemnumber'} ); # Previous conditional check with if ($restype) is not needed because a true # result for one item will result in subsequent items defaulting to this true diff --git a/C4/Reserves.pm b/C4/Reserves.pm index c6ef295..60704f5 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -110,6 +110,7 @@ BEGIN { &ModReserveStatus &ModReserveCancelAll &ModReserveMinusPriority + &MoveReserve &CheckReserves &CanBookBeReserved @@ -526,7 +527,7 @@ sub GetOtherReserves { my ($itemnumber) = @_; my $messages; my $nextreservinfo; - my ( $restype, $checkreserves ) = CheckReserves($itemnumber); + my ( undef, $checkreserves, undef ) = CheckReserves($itemnumber); if ($checkreserves) { my $iteminfo = GetItem($itemnumber); if ( $iteminfo->{'holdingbranch'} ne $checkreserves->{'branchcode'} ) { @@ -741,8 +742,8 @@ sub GetReserveStatus { =head2 CheckReserves - ($status, $reserve) = &CheckReserves($itemnumber); - ($status, $reserve) = &CheckReserves(undef, $barcode); + ($status, $reserve, $all_reserves) = &CheckReserves($itemnumber); + ($status, $reserve, $all_reserves) = &CheckReserves(undef, $barcode); Find a book in the reserves. @@ -807,11 +808,11 @@ sub CheckReserves { # note: we get the itemnumber because we might have started w/ just the barcode. Now we know for sure we have it. my ( $biblio, $bibitem, $notforloan_per_itemtype, $notforloan_per_item, $itemnumber ) = $sth->fetchrow_array; - return ( 0, 0 ) unless $itemnumber; # bail if we got nothing. + return ( '' ) unless $itemnumber; # bail if we got nothing. # if item is not for loan it cannot be reserved either..... # execpt where items.notforloan < 0 : This indicates the item is holdable. - return ( 0, 0 ) if ( $notforloan_per_item > 0 ) or $notforloan_per_itemtype; + return ( '' ) if ( $notforloan_per_item > 0 ) or $notforloan_per_itemtype; # Find this item in the reserves my @reserves = _Findgroupreserve( $bibitem, $biblio, $itemnumber ); @@ -825,7 +826,7 @@ sub CheckReserves { my $priority = 10000000; foreach my $res (@reserves) { if ( $res->{'itemnumber'} == $itemnumber && $res->{'priority'} == 0) { - return ( "Waiting", $res ); # Found it + return ( "Waiting", $res, \@reserves ); # Found it } else { # See if this item is more important than what we've got so far if ( $res->{'priority'} && $res->{'priority'} < $priority ) { @@ -846,11 +847,10 @@ sub CheckReserves { # We return the most important (i.e. next) reservation. if ($highest) { $highest->{'itemnumber'} = $item; - return ( "Reserved", $highest ); - } - else { - return ( 0, 0 ); + return ( "Reserved", $highest, \@reserves ); } + + return ( '' ); } =head2 CancelExpiredReserves @@ -1819,6 +1819,53 @@ sub _ShiftPriorityByDateAndPriority { return $new_priority; # so the caller knows what priority they wind up receiving } +=head2 MoveReserve + + MoveReserve( $itemnumber, $borrowernumber, $cancelreserve ) + +Use when checking out an item to handle reserves +If $cancelreserve boolean is set to true, it will remove existing reserve + +=cut + +sub MoveReserve { + my ( $itemnumber, $borrowernumber, $cancelreserve ) = @_; + + my ( $restype, $res, $all_reserves ) = CheckReserves( $itemnumber ); + return unless $res; + + my $biblionumber = $res->{biblionumber}; + my $biblioitemnumber = $res->{biblioitemnumber}; + + if ($res->{borrowernumber} == $borrowernumber) { + ModReserveFill($res); + } + else { + # warn "Reserved"; + # The item is reserved by someone else. + # Find this item in the reserves + + my $borr_res; + foreach (@$all_reserves) { + $_->{'borrowernumber'} == $borrowernumber or next; + $_->{'biblionumber'} == $biblionumber or next; + + $borr_res = $_; + last; + } + + if ( $borr_res ) { + # The item is reserved by the current patron + ModReserveFill($borr_res); + } + + if ($cancelreserve) { # cancel reserves on this item + CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'}); + CancelReserve($res->{'biblionumber'}, 0, $res->{'borrowernumber'}); + } + } +} + =head2 MergeHolds MergeHolds($dbh,$to_biblio, $from_biblio); diff --git a/C4/Search.pm b/C4/Search.pm index 98db887..428cb26 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1673,7 +1673,7 @@ sub searchResults { my ($transfertfrom, $transfertto); # is item on the reserve shelf? - my $reservestatus = 0; + my $reservestatus = ''; my $reserveitem; unless ($item->{wthdrawn} @@ -1695,7 +1695,7 @@ sub searchResults { # should map transit status to record indexed in Zebra. # ($transfertwhen, $transfertfrom, $transfertto) = C4::Circulation::GetTransfers($item->{itemnumber}); - ($reservestatus, $reserveitem) = C4::Reserves::CheckReserves($item->{itemnumber}); + ($reservestatus, $reserveitem, undef) = C4::Reserves::CheckReserves($item->{itemnumber}); } # item is withdrawn, lost, damaged, not for loan, reserved or in transit diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 8bc4000..39071d5 100755 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -190,7 +190,7 @@ sub buildKohaItemsNamespace { my ( $transfertwhen, $transfertfrom, $transfertto ) = C4::Circulation::GetTransfers($item->{itemnumber}); - my ( $reservestatus, $reserveitem ) = C4::Reserves::CheckReserves($item->{itemnumber}); + my ( $reservestatus, $reserveitem, undef ) = C4::Reserves::CheckReserves($item->{itemnumber}); if ( $itemtypes->{ $item->{itype} }->{notforloan} || $item->{notforloan} || $item->{onloan} || $item->{wthdrawn} || $item->{itemlost} || $item->{damaged} || (defined $transfertwhen && $transfertwhen ne '') || $item->{itemnotforloan} || (defined $reservestatus && $reservestatus eq "Waiting") ){ diff --git a/circ/circulation.pl b/circ/circulation.pl index 98fee97..84e4e8a 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -430,7 +430,7 @@ sub build_issue_data { $it->{'borrowernumber'},$it->{'itemnumber'} ); $it->{"renew_error_${can_renew_error}"} = 1 if defined $can_renew_error; - my ( $restype, $reserves ) = CheckReserves( $it->{'itemnumber'} ); + my ( $restype, $reserves, undef ) = CheckReserves( $it->{'itemnumber'} ); $it->{'can_renew'} = $can_renew; $it->{'can_confirm'} = !$can_renew && !$restype; $it->{'renew_error'} = $restype; diff --git a/opac/opac-user.pl b/opac/opac-user.pl index e99e557..b4552e1 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -118,7 +118,7 @@ my $canrenew = 0; if ($issues){ foreach my $issue ( sort { $b->{'date_due'} cmp $a->{'date_due'} } @$issues ) { # check for reserves - my ( $restype, $res ) = CheckReserves( $issue->{'itemnumber'} ); + my ( $restype, $res, undef ) = CheckReserves( $issue->{'itemnumber'} ); if ( $restype ) { $issue->{'reserved'} = 1; } diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t index 177febb..ca4d42e 100755 --- a/t/db_dependent/Reserves.t +++ b/t/db_dependent/Reserves.t @@ -51,12 +51,12 @@ AddReserve($branch, $borrowernumber, $biblionumber, $constraint, $bibitems, $priority, $notes, $title, $checkitem, $found); -my ($status, $reserve) = CheckReserves($itemnumber, $barcode); +my ($status, $reserve, $all_reserves) = CheckReserves($itemnumber, $barcode); ok($status eq "Reserved", "CheckReserves Test 1"); -($status, $reserve) = CheckReserves($itemnumber); +($status, $reserve, $all_reserves) = CheckReserves($itemnumber); ok($status eq "Reserved", "CheckReserves Test 2"); -($status, $reserve) = CheckReserves(undef, $barcode); +($status, $reserve, $all_reserves) = CheckReserves(undef, $barcode); ok($status eq "Reserved", "CheckReserves Test 3"); diff --git a/t/db_dependent/lib/KohaTest/Reserves.pm b/t/db_dependent/lib/KohaTest/Reserves.pm index 5317029..8b05dd0 100644 --- a/t/db_dependent/lib/KohaTest/Reserves.pm +++ b/t/db_dependent/lib/KohaTest/Reserves.pm @@ -29,6 +29,7 @@ sub methods : Test( 1 ) { ModReserveAffect ModReserveCancelAll ModReserveMinusPriority + MoveReserve GetReserveInfo _FixPriority _Findgroupreserve -- 1.6.5 From Katrin.Fischer.83 at web.de Thu Oct 13 07:36:38 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Thu, 13 Oct 2011 07:36:38 +0200 Subject: [Koha-patches] [PATCH] Bug 6904: Changes 'asked' to 'pending' in suggestions for more consistency Message-ID: <1318484198-3677-1-git-send-email-Katrin.Fischer.83@web.de> In some places the suggestions were 'pending' in others the same status was named 'pending'. This patch changes the status to 'pending' in all places on the suggestion page to make it more consistent. --- .../prog/en/modules/suggestion/suggestion.tt | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index 9a9f332..47ee96a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -130,8 +130,8 @@ $(document).ready(function() { calcNewsuggTotal(); });
      Suggestion management
        [% IF ( suggestionid ) %]
      1. - [% IF (statusselected_ASKED ) %] - [% ELSE %][% END %] + [% IF (statusselected_ASKED ) %] + [% ELSE %][% END %] [% IF (statusselected_ACCEPTED ) %] [% ELSE %][% END %] [% IF (statusselected_CHECKED ) %] @@ -338,8 +338,8 @@ $(document).ready(function() { calcNewsuggTotal(); });

        Suggestion information

        1. - [% IF (statusselected_ASKED ) %] - [% ELSE %][% END %] + [% IF (statusselected_ASKED ) %] + [% ELSE %][% END %] [% IF (statusselected_ACCEPTED ) %] [% ELSE %][% END %] [% IF (statusselected_CHECKED ) %] @@ -268,7 +268,7 @@ $(document).ready(function() { calcNewsuggTotal(); }); [% suggestions_loo.budget_name %] - [% IF ( suggestions_loo.ASKED ) %]Asked[% END %] [% IF ( suggestions_loo.ACCEPTED ) %]Accepted[% END %] [% IF ( suggestions_loo.ORDERED ) %]Ordered[% END %] [% IF ( suggestions_loo.REJECTED ) %]Rejected[% END %] [% IF ( suggestions_loo.CHECKED ) %]Checked[% END %] [% IF ( suggestions_loo.reason ) %]
          ([% suggestions_loo.reason %])[% END %] + [% IF ( suggestions_loo.ASKED ) %]Pending[% END %] [% IF ( suggestions_loo.ACCEPTED ) %]Accepted[% END %] [% IF ( suggestions_loo.ORDERED ) %]Ordered[% END %] [% IF ( suggestions_loo.REJECTED ) %]Rejected[% END %] [% IF ( suggestions_loo.CHECKED ) %]Checked[% END %] [% IF ( suggestions_loo.reason ) %]
          ([% suggestions_loo.reason %])[% END %] [% END %] @@ -277,8 +277,8 @@ $(document).ready(function() { calcNewsuggTotal(); });
          - [% IF (statusselected_ASKED ) %] - [% ELSE %][% END %] + [% IF (statusselected_ASKED ) %] + [% ELSE %][% END %] [% IF (statusselected_ACCEPTED ) %] [% ELSE %][% END %] [% IF (statusselected_CHECKED ) %] -- 1.7.2.3 From christophe.croullebois at biblibre.com Sat Oct 15 22:42:05 2011 From: christophe.croullebois at biblibre.com (Christophe Croullebois) Date: Sat, 15 Oct 2011 22:42:05 +0200 Subject: [Koha-patches] [PATCH 1/1] Bug 5680: Follow Up for Order cancelling improvement : the same for parcel.pl Message-ID: <1318711325-9298-1-git-send-email-christophe.croullebois@biblibre.com> The same scope than in basket.pl --- acqui/parcel.pl | 69 +++++++++----------- .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 48 +++++++++++++- 2 files changed, 77 insertions(+), 40 deletions(-) diff --git a/acqui/parcel.pl b/acqui/parcel.pl index ec5071b..c256c60 100755 --- a/acqui/parcel.pl +++ b/acqui/parcel.pl @@ -140,44 +140,6 @@ my ($template, $loggedinuser, $cookie) debug => 1, }); -my $action = $input->param('action'); -my $ordernumber = $input->param('ordernumber'); -my $biblionumber = $input->param('biblionumber'); - -# If canceling an order -if ($action eq "cancelorder") { - - my $error_delitem; - my $error_delbiblio; - - # We delete the order - DelOrder($biblionumber, $ordernumber); - - # We delete all the items related to this order - my @itemnumbers = GetItemnumbersFromOrder($ordernumber); - foreach (@itemnumbers) { - my $delcheck = DelItemCheck(C4::Context->dbh, $biblionumber, $_); - # (should always success, as no issue should exist on item on order) - if ($delcheck != 1) { $error_delitem = 1; } - } - - # We get the number of remaining items - my $itemcount = GetItemsCount($biblionumber); - - # If there are no items left, - if ($itemcount eq 0) { - # We delete the record - $error_delbiblio = DelBiblio($biblionumber); - } - - if ($error_delitem || $error_delbiblio) { - if ($error_delitem) { $template->param(error_delitem => 1); } - if ($error_delbiblio) { $template->param(error_delbiblio => 1); } - } else { - $template->param(success_delorder => 1); - } -} - # If receiving error, report the error (coming from finishrecieve.pl(sic)). if( scalar(@rcv_err) ) { my $cnt=0; @@ -237,6 +199,7 @@ my @loop_orders = (); for (my $i = 0 ; $i < $countpendings ; $i++) { my %line; %line = %{$pendingorders->[$i]}; + $line{quantity}+=0; $line{quantityreceived}+=0; $line{unitprice}+=0; @@ -252,6 +215,36 @@ for (my $i = 0 ; $i < $countpendings ; $i++) { $line{total} = $total; $line{supplierid} = $supplierid; $ordergrandtotal += $line{ecost} * $line{quantity}; + + my $biblionumber = $line{'biblionumber'}; + my $countbiblio = CountBiblioInOrders($biblionumber); + my $ordernumber = $line{'ordernumber'}; + my @subscriptions = GetSubscriptionsId ($biblionumber); + my $itemcount = GetItemsCount($biblionumber); + my $holds = GetHolds ($biblionumber); + my @items = GetItemnumbersFromOrder( $ordernumber ); + my $itemholds; + foreach my $item (@items){ + my $nb = GetItemHolds($biblionumber, $item); + if ($nb){ + $itemholds += $nb; + } + } + + # if the biblio is not in other orders and if there is no items elsewhere and no subscriptions and no holds we can then show the link "Delete order and Biblio" see bug 5680 + $line{can_del_bib} = 1 if $countbiblio <= 1 && $itemcount == scalar @items && !(@subscriptions) && !($holds); + $line{items} = ($itemcount) - (scalar @items); + $line{left_item} = 1 if $line{items} >= 1; + $line{left_biblio} = 1 if $countbiblio > 1; + $line{biblios} = $countbiblio - 1; + $line{left_subscription} = 1 if scalar @subscriptions >= 1; + $line{subscriptions} = scalar @subscriptions; + $line{left_holds} = 1 if $holds >= 1; + $line{left_holds_on_order} = 1 if $line{left_holds}==1 && ($line{items} == 0 || $itemholds ); + $line{holds} = $holds; + $line{holds_on_order} = $itemholds?$itemholds:$holds if $line{left_holds_on_order}; + + push @loop_orders, \%line if ($i >= $startfrom and $i < $startfrom + $resultsperpage); } $freight = $totalfreight unless $freight; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index e67b82e..f6ca1e8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -133,6 +133,24 @@ //]]> + @@ -197,6 +215,7 @@ Unit cost Order cost   +   @@ -205,6 +224,7 @@   [% ordergrandtotal %]   +   @@ -227,8 +247,32 @@ [% loop_order.ecost %] [% loop_order.ordertotal %] - Receive / - Cancel + Receive + + + + [% IF ( loop_order.left_holds_on_order ) %] + Can't delete order
          + [% ELSE %] + Delete order
          + [% END %] + [% IF ( loop_order.can_del_bib ) %] + Delete order and catalog record
          + [% ELSE %] + Can't delete order and catalog record
          + [% END %] + [% IF ( loop_order.left_item ) %] + [% loop_order.items %] item(s) left
          + [% END %] + [% IF ( loop_order.left_biblio ) %] + [% loop_order.biblios %] order(s) left
          + [% END %] + [% IF ( loop_order.left_subscription ) %] + [% loop_order.subscriptions %] subscription(s) left
          + [% END %] + [% IF ( loop_order.left_holds ) %] + [% loop_order.holds %] hold(s) left + [% END %] [% END %] -- 1.7.4.1 From f.demians at tamil.fr Sun Oct 16 21:54:21 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Sun, 16 Oct 2011 21:54:21 +0200 Subject: [Koha-patches] [PATCH] Bug 7038 Contextual help is always in English Message-ID: <1318794861-30227-1-git-send-email-f.demians@tamil.fr> When another language than English is selected in pro interface, the software strings are in this language, but when clicking ?, on the top right of any page, the contextual help page which pop-up is always in English. This patch fixes this bug and another side bug affecting editing contextual help when not in English. help.pl script were in sync with the recently patched/improved theme/language/template selection. --- edithelp.pl | 8 +++----- help.pl | 12 +++--------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/edithelp.pl b/edithelp.pl index 32db062..0cabf69 100755 --- a/edithelp.pl +++ b/edithelp.pl @@ -97,12 +97,10 @@ elsif ( $type eq 'modify' ) { } else { (-w $file) or $error = "WARNING: You will not be able save, because your webserver cannot write to '$file'. Contact your admin about help file permissions."; - open (INFILE, $file) or die "Cannot read file '$file'"; # unlikely death, since we just checked + open (my $fh, '<', $file) or die "Cannot read file '$file'"; # unlikely death, since we just checked my $help = ''; - while ( my $inp = ) { - unless ( $inp =~ /INCLUDE/ ) { - $help .= $inp; - } + while ( <$fh> ) { + $help .= /\[% INCLUDE .* %\](.*)$/ ? $1 : $_; } close INFILE; $template->param( 'help' => $help ); diff --git a/help.pl b/help.pl index 69e8ab8..18d27dd 100755 --- a/help.pl +++ b/help.pl @@ -32,15 +32,9 @@ our $refer = $query->param('url'); $refer = $query->referer() if !$refer || $refer eq 'undefined'; $refer =~ /koha\/(.*)\.pl/; -my $from = "modules/help/$1.tt"; - -my $htdocs = C4::Context->config('intrahtdocs'); -my ( $theme, $lang ) = C4::Templates::themelanguage( $htdocs, $from, "intranet", $query ); -unless ( -e "$htdocs/$theme/$lang/$from" ) { - $from = "modules/help/nohelp.tt"; - ( $theme, $lang ) = C4::Templates::themelanguage( $htdocs, $from, "intranet", $query ); -} -my $template = C4::Templates->new('intranet', "$htdocs/$theme/$lang/$from"); +my $from = "help/$1.tt"; + +my $template = C4::Templates::gettemplate($from, 'intranet', $query); $template->param( referer => $refer ); output_html_with_http_headers $query, "", $template->output; -- 1.7.6.1 From srdjan at catalyst.net.nz Mon Oct 17 04:40:27 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Mon, 17 Oct 2011 15:40:27 +1300 Subject: [Koha-patches] [PATCH] bug_5533: Slightly improved marking items as lost In-Reply-To: References: Message-ID: <1318819227-3615-1-git-send-email-srdjan@catalyst.net.nz> Call LostItem() whenever item is lost. LostItem() new arg - mark returned. Disabled Lost Status on catalogue item edit. --- C4/Accounts.pm | 77 ++++++++------------------- C4/Circulation.pm | 40 ++++++++++++++- C4/Items.pm | 8 +++- catalogue/updateitem.pl | 3 +- cataloguing/additem.pl | 37 ++++++++----- misc/cronjobs/longoverdue.pl | 3 +- t/db_dependent/lib/KohaTest/Accounts.pm | 1 - t/db_dependent/lib/KohaTest/Circulation.pm | 1 + tools/batchMod.pl | 7 ++- 9 files changed, 99 insertions(+), 78 deletions(-) diff --git a/C4/Accounts.pm b/C4/Accounts.pm index 2352e9e..860e187 100644 --- a/C4/Accounts.pm +++ b/C4/Accounts.pm @@ -23,8 +23,7 @@ use strict; use C4::Context; use C4::Stats; use C4::Members; -use C4::Items; -use C4::Circulation qw(MarkIssueReturned); +use C4::Circulation qw(ReturnLostItem); use vars qw($VERSION @ISA @EXPORT); @@ -218,7 +217,7 @@ sub makepayment { #check to see what accounttype if ( $data->{'accounttype'} eq 'Rep' || $data->{'accounttype'} eq 'L' ) { - returnlost( $borrowernumber, $data->{'itemnumber'} ); + ReturnLostItem( $borrowernumber, $data->{'itemnumber'} ); } } @@ -278,64 +277,34 @@ EOT =cut -sub returnlost{ - my ( $borrowernumber, $itemnum ) = @_; - C4::Circulation::MarkIssueReturned( $borrowernumber, $itemnum ); - my $borrower = C4::Members::GetMember( 'borrowernumber'=>$borrowernumber ); - my @datearr = localtime(time); - my $date = ( 1900 + $datearr[5] ) . "-" . ( $datearr[4] + 1 ) . "-" . $datearr[3]; - my $bor = "$borrower->{'firstname'} $borrower->{'surname'} $borrower->{'cardnumber'}"; - ModItem({ paidfor => "Paid for by $bor $date" }, undef, $itemnum); -} - - sub chargelostitem{ # lost ==1 Lost, lost==2 longoverdue, lost==3 lost and paid for # FIXME: itemlost should be set to 3 after payment is made, should be a warning to the interface that # a charge has been added # FIXME : if no replacement price, borrower just doesn't get charged? - my $dbh = C4::Context->dbh(); - my ($itemnumber) = @_; - my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title - FROM issues - JOIN items USING (itemnumber) - JOIN biblio USING (biblionumber) - WHERE issues.itemnumber=?"); - $sth->execute($itemnumber); - my $issues=$sth->fetchrow_hashref(); - - # if a borrower lost the item, add a replacement cost to the their record - if ( $issues->{borrowernumber} ){ - - # first make sure the borrower hasn't already been charged for this item - my $sth1=$dbh->prepare("SELECT * from accountlines - WHERE borrowernumber=? AND itemnumber=? and accounttype='L'"); - $sth1->execute($issues->{'borrowernumber'},$itemnumber); - my $existing_charge_hashref=$sth1->fetchrow_hashref(); - - # OK, they haven't - unless ($existing_charge_hashref) { - # This item is on issue ... add replacement cost to the borrower's record and mark it returned - # Note that we add this to the account even if there's no replacement price, allowing some other - # process (or person) to update it, since we don't handle any defaults for replacement prices. - my $accountno = getnextacctno($issues->{'borrowernumber'}); - my $sth2=$dbh->prepare("INSERT INTO accountlines - (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber) - VALUES (?,?,now(),?,?,'L',?,?)"); - $sth2->execute($issues->{'borrowernumber'},$accountno,$issues->{'replacementprice'}, - "Lost Item $issues->{'title'} $issues->{'barcode'}", - $issues->{'replacementprice'},$itemnumber); - $sth2->finish; - # FIXME: Log this ? - } - #FIXME : Should probably have a way to distinguish this from an item that really was returned. - #warn " $issues->{'borrowernumber'} / $itemnumber "; - C4::Circulation::MarkIssueReturned($issues->{borrowernumber},$itemnumber); - # Shouldn't MarkIssueReturned do this? - C4::Items::ModItem({ onloan => undef }, undef, $itemnumber); + my ($borrowernumber, $itemnumber, $amount, $description) = @_; + + # first make sure the borrower hasn't already been charged for this item + my $sth1=$dbh->prepare("SELECT * from accountlines + WHERE borrowernumber=? AND itemnumber=? and accounttype='L'"); + $sth1->execute($borrowernumber,$itemnumber); + my $existing_charge_hashref=$sth1->fetchrow_hashref(); + + # OK, they haven't + unless ($existing_charge_hashref) { + # This item is on issue ... add replacement cost to the borrower's record and mark it returned + # Note that we add this to the account even if there's no replacement price, allowing some other + # process (or person) to update it, since we don't handle any defaults for replacement prices. + my $accountno = getnextacctno($borrowernumber); + my $sth2=$dbh->prepare("INSERT INTO accountlines + (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber) + VALUES (?,?,now(),?,?,'L',?,?)"); + $sth2->execute($borrowernumber,$accountno,$amount, + $description,$amount,$itemnumber); + $sth2->finish; + # FIXME: Log this ? } - $sth->finish; } =head2 manualinvoice diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 42a8b2d..12eece4 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -59,8 +59,9 @@ BEGIN { # FIXME subs that should probably be elsewhere push @EXPORT, qw( - &FixOverduesOnReturn &barcodedecode + &LostItem + &ReturnLostItem ); # subs to deal with issuing a book @@ -2949,8 +2950,43 @@ sub DeleteBranchTransferLimits { $sth->execute(); } +sub ReturnLostItem{ + my ( $borrowernumber, $itemnum ) = @_; - 1; + MarkIssueReturned( $borrowernumber, $itemnum ); + my $borrower = C4::Members::GetMember( 'borrowernumber'=>$borrowernumber ); + my @datearr = localtime(time); + my $date = ( 1900 + $datearr[5] ) . "-" . ( $datearr[4] + 1 ) . "-" . $datearr[3]; + my $bor = "$borrower->{'firstname'} $borrower->{'surname'} $borrower->{'cardnumber'}"; + ModItem({ paidfor => "Paid for by $bor $date" }, undef, $itemnum); +} + + +sub LostItem{ + my ($itemnumber, $mark_returned) = @_; + + my $dbh = C4::Context->dbh(); + my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title + FROM issues + JOIN items USING (itemnumber) + JOIN biblio USING (biblionumber) + WHERE issues.itemnumber=?"); + $sth->execute($itemnumber); + my $issues=$sth->fetchrow_hashref(); + $sth->finish; + + # if a borrower lost the item, add a replacement cost to the their record + if ( my $borrowernumber = $issues->{borrowernumber} ){ + + C4::Accounts::chargelostitem($borrowernumber, $itemnumber, $issues->{'replacementprice'}, "Lost Item $issues->{'title'} $issues->{'barcode'}"); + #FIXME : Should probably have a way to distinguish this from an item that really was returned. + #warn " $issues->{'borrowernumber'} / $itemnumber "; + MarkIssueReturned($borrowernumber,$itemnumber) if $mark_returned; + } +} + + +1; __END__ diff --git a/C4/Items.pm b/C4/Items.pm index 23eb1eb..ca67c6d 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -401,6 +401,8 @@ Note that only columns that can be directly changed from the cataloging and serials item editors are included in this hash. +Returns item record + =cut my %default_values_for_mod_from_marc = ( @@ -450,7 +452,8 @@ sub ModItemFromMarc { } my $unlinked_item_subfields = _get_unlinked_item_subfields( $localitemmarc, $frameworkcode ); - return ModItem($item, $biblionumber, $itemnumber, $dbh, $frameworkcode, $unlinked_item_subfields); + ModItem($item, $biblionumber, $itemnumber, $dbh, $frameworkcode, $unlinked_item_subfields); + return $item; } =head2 ModItem @@ -499,6 +502,9 @@ sub ModItem { }; $item->{'itemnumber'} = $itemnumber or return undef; + + $item->{onloan} = undef if $item->{itemlost}; + _set_derived_columns_for_mod($item); _do_column_fixes_for_mod($item); # FIXME add checks diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl index e8ce20d..379c12c 100755 --- a/catalogue/updateitem.pl +++ b/catalogue/updateitem.pl @@ -26,7 +26,6 @@ use C4::Biblio; use C4::Items; use C4::Output; use C4::Circulation; -use C4::Accounts; use C4::Reserves; my $cgi= new CGI; @@ -75,6 +74,6 @@ if (defined $itemnotes) { # i.e., itemnotes parameter passed from form ModItem($item_changes, $biblionumber, $itemnumber); -C4::Accounts::chargelostitem($itemnumber) if ($itemlost==1) ; +LostItem($itemnumber, 'MARK RETURNED') if $itemlost; print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber"); diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 6229f0c..4442ed3 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -206,28 +206,33 @@ sub generate_subfield_form { } } - $subfield_data{marc_value} =CGI::scrolling_list( # FIXME: factor out scrolling_list - -name => "field_value", - -values => \@authorised_values, - -default => $value, - -labels => \%authorised_lib, - -override => 1, - -size => 1, - -multiple => 0, - -tabindex => 1, - -id => "tag_".$tag."_subfield_".$subfieldtag."_".$index_subfield, - -class => "input_marceditor", - ); + if ($subfieldlib->{'hidden'}) { + $subfield_data{marc_value} = qq( $authorised_lib{$value}); + } + else { + $subfield_data{marc_value} =CGI::scrolling_list( # FIXME: factor out scrolling_list + -name => "field_value", + -values => \@authorised_values, + -default => $value, + -labels => \%authorised_lib, + -override => 1, + -size => 1, + -multiple => 0, + -tabindex => 1, + -id => "tag_".$tag."_subfield_".$subfieldtag."_".$index_subfield, + -class => "input_marceditor", + ); + } - # it's a thesaurus / authority field } + # it's a thesaurus / authority field elsif ( $subfieldlib->{authtypecode} ) { $subfield_data{marc_value} = " {authtypecode}."&index=$subfield_data{id}','$subfield_data{id}'); return false;\" title=\"Tag Editor\">... "; - # it's a plugin field } + # it's a plugin field elsif ( $subfieldlib->{value_builder} ) { # opening plugin my $plugin = C4::Context->intranetdir . "/cataloguing/value_builder/" . $subfieldlib->{'value_builder'}; @@ -500,7 +505,7 @@ if ($op eq "additem") { if ($exist_itemnumber && $exist_itemnumber != $itemnumber) { push @errors,"barcode_not_unique"; } else { - my ($oldbiblionumber,$oldbibnum,$oldbibitemnum) = ModItemFromMarc($itemtosave,$biblionumber,$itemnumber); + ModItemFromMarc($itemtosave,$biblionumber,$itemnumber); $itemnumber=""; } $nextop="additem"; @@ -665,6 +670,8 @@ if($itemrecord){ next if subfield_is_koha_internal_p($subfieldtag); next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10"); + $subfieldlib->{hidden} = 1 + if $tagslib->{$tag}->{$subfieldtag}->{authorised_value} eq 'LOST'; my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $branches, $today_iso, $biblionumber, $temp, \@loop_data, $i); push @fields, "$tag$subfieldtag"; diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl index 651b9d2..2179d10 100755 --- a/misc/cronjobs/longoverdue.pl +++ b/misc/cronjobs/longoverdue.pl @@ -35,7 +35,6 @@ BEGIN { } use C4::Context; use C4::Items; -use C4::Accounts; use Getopt::Long; my $lost; # key=lost value, value=num days. @@ -155,7 +154,7 @@ foreach my $startrange (sort keys %$lost) { printf ("Due %s: item %5s from borrower %5s to lost: %s\n", $row->{date_due}, $row->{itemnumber}, $row->{borrowernumber}, $lostvalue) if($verbose); if($confirm) { ModItem({ itemlost => $lostvalue }, $row->{'biblionumber'}, $row->{'itemnumber'}); - chargelostitem($row->{'itemnumber'}) if( $charge && $charge eq $lostvalue); + LostItem($row->{'itemnumber'}) if( $charge && $charge eq $lostvalue); } $count++; } diff --git a/t/db_dependent/lib/KohaTest/Accounts.pm b/t/db_dependent/lib/KohaTest/Accounts.pm index 703d478..ac3a78e 100644 --- a/t/db_dependent/lib/KohaTest/Accounts.pm +++ b/t/db_dependent/lib/KohaTest/Accounts.pm @@ -15,7 +15,6 @@ sub methods : Test( 1 ) { my @methods = qw( recordpayment makepayment getnextacctno - returnlost manualinvoice fixcredit refund diff --git a/t/db_dependent/lib/KohaTest/Circulation.pm b/t/db_dependent/lib/KohaTest/Circulation.pm index 7d5e69d..b3a1ff8 100644 --- a/t/db_dependent/lib/KohaTest/Circulation.pm +++ b/t/db_dependent/lib/KohaTest/Circulation.pm @@ -47,6 +47,7 @@ sub methods : Test( 1 ) { CheckSpecialHolidays CheckRepeatableSpecialHolidays CheckValidBarcode + ReturnLostItem ); can_ok( $self->testing_class, @methods ); diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 04cfc87..701d421 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -25,6 +25,7 @@ use C4::Auth; use C4::Output; use C4::Biblio; use C4::Items; +use C4::Circulation; use C4::Context; use C4::Koha; # XXX subfield_is_koha_internal_p use C4::Branch; # XXX subfield_is_koha_internal_p @@ -174,7 +175,11 @@ if ($op eq "action") { if ($values_to_modify || $values_to_blank) { my $localmarcitem = Item2Marc($itemdata); UpdateMarcWith( $marcitem, $localmarcitem ); - eval{ my ( $oldbiblionumber, $oldbibnum, $oldbibitemnum ) = ModItemFromMarc( $localmarcitem, $itemdata->{biblionumber}, $itemnumber ) }; + eval{ + if ( my $item = ModItemFromMarc( $localmarcitem, $itemdata->{biblionumber}, $itemnumber ) ) { + LostItem($itemnumber, 'MARK RETURNED') if $item->{itemlost}; + } + }; } } $i++; -- 1.6.5 From robin at catalyst.net.nz Mon Oct 17 06:59:14 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Mon, 17 Oct 2011 17:59:14 +1300 Subject: [Koha-patches] [PATCH] Bug 7028 - updated the koha-conf.xml template Message-ID: <1318827554-31657-1-git-send-email-robin@catalyst.net.nz> Now it more closely matches the one that's distributed in /etc --- debian/templates/koha-conf-site.xml.in | 132 +++++++++++++++++++++++++++++++- 1 files changed, 130 insertions(+), 2 deletions(-) diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in index d5ca838..a440c96 100644 --- a/debian/templates/koha-conf-site.xml.in +++ b/debian/templates/koha-conf-site.xml.in @@ -3,8 +3,28 @@ unix:/var/run/koha/__KOHASITE__/bibliosocket unix:/var/run/koha/__KOHASITE__/authoritysocket + + + + + + - + /var/lib/koha/__KOHASITE__/biblios /etc/koha/sites/__KOHASITE__/zebra-biblios.cfg /etc/koha/zebradb/pqf.properties @@ -56,10 +76,26 @@ + /etc/koha/zebradb/ccl.properties - kohauser + kohauser __ZEBRA_PASS__ @@ -112,6 +148,22 @@ + /etc/koha/zebradb/ccl.properties @@ -119,6 +171,81 @@ __ZEBRA_PASS__ + + + mysql __DB_NAME__ @@ -136,6 +263,7 @@ /usr/share/koha/intranet/htdocs/intranet-tmpl /usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/includes/ /var/log/koha/__KOHASITE__ + /usr/share/koha/misc/koha-install-log 0 -- 1.7.5.4 From Katrin.Fischer.83 at web.de Mon Oct 17 07:11:33 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 17 Oct 2011 07:11:33 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 7038 Contextual help is always in English Message-ID: <1318828293-4538-1-git-send-email-Katrin.Fischer.83@web.de> From: Fr?d?ric Demians When another language than English is selected in pro interface, the software strings are in this language, but when clicking ?, on the top right of any page, the contextual help page which pop-up is always in English. This patch fixes this bug and another side bug affecting editing contextual help when not in English. help.pl script were in sync with the recently patched/improved theme/language/template selection. Signed-off-by: Katrin Fischer Context help now matches the selected template language. --- edithelp.pl | 10 ++++------ help.pl | 12 +++--------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/edithelp.pl b/edithelp.pl index 32db062..5cde314 100755 --- a/edithelp.pl +++ b/edithelp.pl @@ -97,14 +97,12 @@ elsif ( $type eq 'modify' ) { } else { (-w $file) or $error = "WARNING: You will not be able save, because your webserver cannot write to '$file'. Contact your admin about help file permissions."; - open (INFILE, $file) or die "Cannot read file '$file'"; # unlikely death, since we just checked + open (my $fh, '<', $file) or die "Cannot read file '$file'"; # unlikely death, since we just checked my $help = ''; - while ( my $inp = ) { - unless ( $inp =~ /INCLUDE/ ) { - $help .= $inp; - } + while ( <$fh> ) { + $help .= /\[% INCLUDE .* %\](.*)$/ ? $1 : $_; } - close INFILE; + close $fh; $template->param( 'help' => $help ); $type = 'save'; } diff --git a/help.pl b/help.pl index 69e8ab8..18d27dd 100755 --- a/help.pl +++ b/help.pl @@ -32,15 +32,9 @@ our $refer = $query->param('url'); $refer = $query->referer() if !$refer || $refer eq 'undefined'; $refer =~ /koha\/(.*)\.pl/; -my $from = "modules/help/$1.tt"; - -my $htdocs = C4::Context->config('intrahtdocs'); -my ( $theme, $lang ) = C4::Templates::themelanguage( $htdocs, $from, "intranet", $query ); -unless ( -e "$htdocs/$theme/$lang/$from" ) { - $from = "modules/help/nohelp.tt"; - ( $theme, $lang ) = C4::Templates::themelanguage( $htdocs, $from, "intranet", $query ); -} -my $template = C4::Templates->new('intranet', "$htdocs/$theme/$lang/$from"); +my $from = "help/$1.tt"; + +my $template = C4::Templates::gettemplate($from, 'intranet', $query); $template->param( referer => $refer ); output_html_with_http_headers $query, "", $template->output; -- 1.7.5.4 From Katrin.Fischer.83 at web.de Mon Oct 17 08:09:57 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 17 Oct 2011 08:09:57 +0200 Subject: [Koha-patches] [PATCH 1/2] Bug 5680: Order cancelling improvement : delete attached items & biblio if avalaible Message-ID: <1318831798-6166-1-git-send-email-Katrin.Fischer.83@web.de> From: Christophe Croullebois - all items attached to the order are deleted - if there is no more items, and if the biblio is not in other orders and no subscriptions and no holds then the biblio is proposed to deletion Now whe have 2 links : "delete order" and "delete order and catalog record", the second one appears only if the deletion is possible. Note that if an hold is related to the item or if the item is unique for the biblio the link "Delete order" is canceled due to hold remaining. On mouse over explanations are shown with count. More lines of warnings with count are shown depending of the case. Signed-off-by: Katrin Fischer Configuration: AcqCreateItem = on order Test cases and results: 1) Order new record with 2 items a) From basket - delete order: only deletes items, OK! - delete order and catalog record: deletes record and items, OK b) From shipment/receive - delete order: only deletes items, OK! 2) Order 1 additional item for existing record with 1 item a) From basket: - delete order: works, existing item and record remain, OK - Can't delete order and catalog record, 1 item left, OK! 3) Order new record with 1 item, title level hold on record a) From basket: - delete order: not possible, OK! - delete orer and catalog record: not possible, OK! b) From shipment/receive page - Cancel: Deletes order, record and hold silently. NO WARNING. NOT OK. See note below. 4) Order 1 additional item for existing record with 1 item, item level hold on existing item a) From basket: - delete order: works, hold and existing item remain, OK! - delete order and catalog record: not possible, OK! b) From shipment/receive page - Cancel: on order item is deleted, other item and hold remain. 5) Order new serial record, create subscription a) From basket: - delete order: works, record and subscription remain, OK! - delete order and catalog record: not possible, OK! b) From shipment/receive page: - Cancel: Subscription and record are silently deleted. NOT OK. 6) Order additional item for existing record with other on order items a) From basket: - delete order: works, existing on order items remain, OK! - delete order and catalog record: not possible, OK! b) From shipment: - Cancel: deletes order and ordered item. OK. Changes made: I changed the wording of the error messages a bit in the template. I changed the message 'Can't delete order and catalog record' to not be shown as a link, as the link does nothing. Tooltip still appears. I attached a screenshot to the bug showing some of my changes. Hope that's ok. Necessary enhancements: Cancelling orders when receiving items should work the same as from the basket summary page. We need the same checks and messages there before deleting records and items automatically. I am signing off on this, but to go into Koha it needs a follow-up for the order receive page. --- C4/Acquisition.pm | 5 ++ C4/Biblio.pm | 74 +++++++++++++++++++- C4/Items.pm | 29 +++++++- acqui/addorder.pl | 4 + acqui/basket.pl | 43 +++++++++--- .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 33 ++++++++- 6 files changed, 171 insertions(+), 17 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index f682256..4f0daf7 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1221,6 +1221,11 @@ sub DelOrder { my $sth = $dbh->prepare($query); $sth->execute( $bibnum, $ordernumber ); $sth->finish; + my @itemnumbers = GetItemnumbersFromOrder( $ordernumber ); + foreach my $itemnumber (@itemnumbers){ + C4::Items::DelItem( $dbh, $bibnum, $itemnumber ); + } + } =head2 FUNCTIONS ABOUT PARCELS diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 915139e..7c8e027 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -90,8 +90,10 @@ BEGIN { &GetMarcFromKohaField &GetFrameworkCode &TransformKohaToMarc - &CountItemsIssued + &CountBiblioInOrders + &GetSubscriptionsId + &GetHolds ); # To modify something @@ -3681,6 +3683,76 @@ sub get_biblio_authorised_values { return $authorised_values; } +=head2 CountBiblioInOrders + +=over 4 +$count = &CountBiblioInOrders( $biblionumber); + +=back + +This function return count of biblios in orders with $biblionumber + +=cut + +sub CountBiblioInOrders { + my ($biblionumber) = @_; + my $dbh = C4::Context->dbh; + my $query = "SELECT count(*) + FROM aqorders + WHERE biblionumber=? AND (datecancellationprinted IS NULL OR datecancellationprinted='0000-00-00')"; + my $sth = $dbh->prepare($query); + $sth->execute($biblionumber); + my $count = $sth->fetchrow; + return ($count); +} + +=head2 GetSubscriptionsId + +=over 4 +$subscriptions = &GetSubscriptionsId($biblionumber); + +=back + +This function return an array of subscriptionid with $biblionumber + +=cut + +sub GetSubscriptionsId { + my ($biblionumber) = @_; + my $dbh = C4::Context->dbh; + my $query = "SELECT subscriptionid + FROM subscription + WHERE biblionumber=?"; + my $sth = $dbh->prepare($query); + $sth->execute($biblionumber); + my @subscriptions = $sth->fetchrow_array; + return (@subscriptions); +} + +=head2 GetHolds + +=over 4 +$holds = &GetHolds($biblionumber); + +=back + +This function return the count of holds with $biblionumber + +=cut + +sub GetHolds { + my ($biblionumber) = @_; + my $dbh = C4::Context->dbh; + my $query = "SELECT count(*) + FROM reserves + WHERE biblionumber=?"; + my $sth = $dbh->prepare($query); + $sth->execute($biblionumber); + my $holds = $sth->fetchrow; + return ($holds); +} + + 1; __END__ diff --git a/C4/Items.pm b/C4/Items.pm index 2e85130..9469d44 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -68,16 +68,16 @@ BEGIN { GetItemInfosOf GetItemsByBiblioitemnumber GetItemsInfo - GetItemsLocationInfo + GetItemsLocationInfo get_itemnumbers_of GetItemnumberFromBarcode GetBarcodeFromItemnumber - GetHiddenItemnumbers - + GetHiddenItemnumbers DelItemCheck MoveItemFromBiblio GetLatestAcquisitions CartToShelf + GetItemHolds ); } @@ -2339,4 +2339,27 @@ sub _parse_unlinked_item_subfields_from_xml { return $unlinked_subfields; } +=head2 GetItemHolds + +=over 4 +$holds = &GetItemHolds($biblionumber, $itemnumber); + +=back + +This function return the count of holds with $biblionumber and $itemnumber + +=cut + +sub GetItemHolds { + my ($biblionumber, $itemnumber) = @_; + my $holds; + my $dbh = C4::Context->dbh; + my $query = "SELECT count(*) + FROM reserves + WHERE biblionumber=? AND itemnumber=?"; + my $sth = $dbh->prepare($query); + $sth->execute($biblionumber, $itemnumber); + $holds = $sth->fetchrow; + return $holds; +} 1; diff --git a/acqui/addorder.pl b/acqui/addorder.pl index e321d2c..d7f7e96 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -190,6 +190,7 @@ my $user = $input->remote_user; # create if $quantity>=0 and $existing='no' # modify if $quantity>=0 and $existing='yes' # delete if $quantity has been set to 0 by the librarian +# delete biblio if delbiblio has been set to 1 by the librarian my $bibitemnum; if ( $orderinfo->{quantity} ne '0' ) { #TODO:check to see if biblio exists @@ -271,6 +272,9 @@ if ( $orderinfo->{quantity} ne '0' ) { else { # qty=0, delete the line my $biblionumber = $input->param('biblionumber'); DelOrder( $biblionumber, $$orderinfo{ordernumber} ); + if ($orderinfo->{delbiblio} == 1){ + DelBiblio($biblionumber); + } } my $basketno=$$orderinfo{basketno}; my $booksellerid=$$orderinfo{booksellerid}; diff --git a/acqui/basket.pl b/acqui/basket.pl index 9377a43..b836280 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -28,12 +28,12 @@ use C4::Output; use CGI; use C4::Acquisition; use C4::Budgets; - use C4::Bookseller qw( GetBookSellerFromId); use C4::Dates qw/format_date/; use C4::Debug; - +use C4::Biblio; use C4::Members qw/GetMember/; #needed for permissions checking for changing basketgroup of a basket +use C4::Items; =head1 NAME basket.pl @@ -259,13 +259,38 @@ if ( $op eq 'delete_confirm' ) { # FIXME: what about the "actual cost" field? $qty_total += $qty; my %line = %{ $order }; - - $line{order_received} = ( $qty == $order->{'quantityreceived'} ); - $line{basketno} = $basketno; - $line{budget_name} = $budget->{budget_name}; - $line{rrp} = sprintf( "%.2f", $line{'rrp'} ); - $line{ecost} = sprintf( "%.2f", $line{'ecost'} ); - $line{line_total} = sprintf( "%.2f", $line_total ); + my $biblionumber = $order->{'biblionumber'}; + my $countbiblio = CountBiblioInOrders($biblionumber); + my $ordernumber = $order->{'ordernumber'}; + my @subscriptions = GetSubscriptionsId ($biblionumber); + my $itemcount = GetItemsCount($biblionumber); + my $holds = GetHolds ($biblionumber); + my @items = GetItemnumbersFromOrder( $ordernumber ); + my $itemholds; + foreach my $item (@items){ + my $nb = GetItemHolds($biblionumber, $item); + if ($nb){ + $itemholds += $nb; + } + } + # if the biblio is not in other orders and if there is no items elsewhere and no subscriptions and no holds we can then show the link "Delete order and Biblio" see bug 5680 + $line{can_del_bib} = 1 if $countbiblio <= 1 && $itemcount == scalar @items && !(@subscriptions) && !($holds); + $line{items} = ($itemcount) - (scalar @items); + $line{left_item} = 1 if $line{items} >= 1; + $line{left_biblio} = 1 if $countbiblio > 1; + $line{biblios} = $countbiblio - 1; + $line{left_subscription} = 1 if scalar @subscriptions >= 1; + $line{subscriptions} = scalar @subscriptions; + $line{left_holds} = 1 if $holds >= 1; + $line{left_holds_on_order} = 1 if $line{left_holds}==1 && ($line{items} == 0 || $itemholds ); + $line{holds} = $holds; + $line{holds_on_order} = $itemholds?$itemholds:$holds if $line{left_holds_on_order}; + $line{order_received} = ( $qty == $order->{'quantityreceived'} ); + $line{basketno} = $basketno; + $line{budget_name} = $budget->{budget_name}; + $line{rrp} = sprintf( "%.2f", $line{'rrp'} ); + $line{ecost} = sprintf( "%.2f", $line{'ecost'} ); + $line{line_total} = sprintf( "%.2f", $line_total ); if ($line{uncertainprice}) { $template->param( uncertainprices => 1 ); $line{rrp} .= ' (Uncertain)'; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 2654303..90ddacb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -39,6 +39,13 @@ window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber; } } + + function confirm_delete_biblio(ordernumber, biblionumber) { + var is_confirmed = confirm(_('Are you sure you want to delete this catalog record and order ?')); + if (is_confirmed) { + window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber+"&delbiblio=1"; + } + } //]]> @@ -277,7 +284,28 @@ Modify - Delete + [% IF ( books_loo.left_holds_on_order ) %] + Can't delete order
          + [% ELSE %] + Delete order
          + [% END %] + [% IF ( books_loo.can_del_bib ) %] + Delete order and catalog record
          + [% ELSE %] + Can't delete order and catalog record
          + [% END %] + [% IF ( books_loo.left_item ) %] + [% books_loo.items %] item(s) left
          + [% END %] + [% IF ( books_loo.left_biblio ) %] + [% books_loo.biblios %] order(s) left
          + [% END %] + [% IF ( books_loo.left_subscription ) %] + [% books_loo.subscriptions %] subscription(s) left
          + [% END %] + [% IF ( books_loo.left_holds ) %] + [% books_loo.holds %] hold(s) left + [% END %] [% END %] [% END %] @@ -320,9 +348,6 @@
          [% END %] - - -
    -- 1.7.5.4 From Katrin.Fischer.83 at web.de Mon Oct 17 08:09:58 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 17 Oct 2011 08:09:58 +0200 Subject: [Koha-patches] [PATCH 2/2] [SIGNED-OFF] Bug 5680: Follow Up for Order cancelling improvement : the same for parcel.pl In-Reply-To: <1318831798-6166-1-git-send-email-Katrin.Fischer.83@web.de> References: <1318831798-6166-1-git-send-email-Katrin.Fischer.83@web.de> Message-ID: <1318831798-6166-2-git-send-email-Katrin.Fischer.83@web.de> From: Christophe Croullebois The same scope than in basket.pl Signed-off-by: Katrin Fischer Detailed information about possible deletion of orders on parcel page. 1) Delete order for record with 1 other item and item level hold OK. Record, item and hold remain, only on order item is deleted. 2) Delete order for ordered record with 1 item and title level hold OK. Deletion is not possible, before hold is cancelled. 3) Delete order for new record with only items connected to this order OK. Cancelling the order deletes record and item or only order, depending on link used. 4) Delete order for record with subscription. OK. Subscription remains untouched, item is deleted. Also checked: AcqCreateItem = on receive / in cataloging Links show and it's possible to delete the order or only the record using different links. Comments: There is a table sorter option for the last column with the delete links. I am not sure it is useful here, but it does work. Before patch is applied, the links use 'cancel' instead of 'delete'. I am not sure which is better and if it should be different on basket summary and order receive or the same on both. --- acqui/parcel.pl | 69 +++++++++----------- .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 48 +++++++++++++- 2 files changed, 77 insertions(+), 40 deletions(-) diff --git a/acqui/parcel.pl b/acqui/parcel.pl index ec5071b..c256c60 100755 --- a/acqui/parcel.pl +++ b/acqui/parcel.pl @@ -140,44 +140,6 @@ my ($template, $loggedinuser, $cookie) debug => 1, }); -my $action = $input->param('action'); -my $ordernumber = $input->param('ordernumber'); -my $biblionumber = $input->param('biblionumber'); - -# If canceling an order -if ($action eq "cancelorder") { - - my $error_delitem; - my $error_delbiblio; - - # We delete the order - DelOrder($biblionumber, $ordernumber); - - # We delete all the items related to this order - my @itemnumbers = GetItemnumbersFromOrder($ordernumber); - foreach (@itemnumbers) { - my $delcheck = DelItemCheck(C4::Context->dbh, $biblionumber, $_); - # (should always success, as no issue should exist on item on order) - if ($delcheck != 1) { $error_delitem = 1; } - } - - # We get the number of remaining items - my $itemcount = GetItemsCount($biblionumber); - - # If there are no items left, - if ($itemcount eq 0) { - # We delete the record - $error_delbiblio = DelBiblio($biblionumber); - } - - if ($error_delitem || $error_delbiblio) { - if ($error_delitem) { $template->param(error_delitem => 1); } - if ($error_delbiblio) { $template->param(error_delbiblio => 1); } - } else { - $template->param(success_delorder => 1); - } -} - # If receiving error, report the error (coming from finishrecieve.pl(sic)). if( scalar(@rcv_err) ) { my $cnt=0; @@ -237,6 +199,7 @@ my @loop_orders = (); for (my $i = 0 ; $i < $countpendings ; $i++) { my %line; %line = %{$pendingorders->[$i]}; + $line{quantity}+=0; $line{quantityreceived}+=0; $line{unitprice}+=0; @@ -252,6 +215,36 @@ for (my $i = 0 ; $i < $countpendings ; $i++) { $line{total} = $total; $line{supplierid} = $supplierid; $ordergrandtotal += $line{ecost} * $line{quantity}; + + my $biblionumber = $line{'biblionumber'}; + my $countbiblio = CountBiblioInOrders($biblionumber); + my $ordernumber = $line{'ordernumber'}; + my @subscriptions = GetSubscriptionsId ($biblionumber); + my $itemcount = GetItemsCount($biblionumber); + my $holds = GetHolds ($biblionumber); + my @items = GetItemnumbersFromOrder( $ordernumber ); + my $itemholds; + foreach my $item (@items){ + my $nb = GetItemHolds($biblionumber, $item); + if ($nb){ + $itemholds += $nb; + } + } + + # if the biblio is not in other orders and if there is no items elsewhere and no subscriptions and no holds we can then show the link "Delete order and Biblio" see bug 5680 + $line{can_del_bib} = 1 if $countbiblio <= 1 && $itemcount == scalar @items && !(@subscriptions) && !($holds); + $line{items} = ($itemcount) - (scalar @items); + $line{left_item} = 1 if $line{items} >= 1; + $line{left_biblio} = 1 if $countbiblio > 1; + $line{biblios} = $countbiblio - 1; + $line{left_subscription} = 1 if scalar @subscriptions >= 1; + $line{subscriptions} = scalar @subscriptions; + $line{left_holds} = 1 if $holds >= 1; + $line{left_holds_on_order} = 1 if $line{left_holds}==1 && ($line{items} == 0 || $itemholds ); + $line{holds} = $holds; + $line{holds_on_order} = $itemholds?$itemholds:$holds if $line{left_holds_on_order}; + + push @loop_orders, \%line if ($i >= $startfrom and $i < $startfrom + $resultsperpage); } $freight = $totalfreight unless $freight; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index e67b82e..f6ca1e8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -133,6 +133,24 @@ //]]> + @@ -197,6 +215,7 @@ Unit cost Order cost   +   @@ -205,6 +224,7 @@   [% ordergrandtotal %]   +   @@ -227,8 +247,32 @@ [% loop_order.ecost %] [% loop_order.ordertotal %] - Receive / - Cancel + Receive + + + + [% IF ( loop_order.left_holds_on_order ) %] + Can't delete order
    + [% ELSE %] + Delete order
    + [% END %] + [% IF ( loop_order.can_del_bib ) %] + Delete order and catalog record
    + [% ELSE %] + Can't delete order and catalog record
    + [% END %] + [% IF ( loop_order.left_item ) %] + [% loop_order.items %] item(s) left
    + [% END %] + [% IF ( loop_order.left_biblio ) %] + [% loop_order.biblios %] order(s) left
    + [% END %] + [% IF ( loop_order.left_subscription ) %] + [% loop_order.subscriptions %] subscription(s) left
    + [% END %] + [% IF ( loop_order.left_holds ) %] + [% loop_order.holds %] hold(s) left + [% END %] [% END %] -- 1.7.5.4 From f.demians at tamil.fr Mon Oct 17 08:05:39 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Mon, 17 Oct 2011 08:05:39 +0200 Subject: [Koha-patches] [PATCH] Bug 7026 Web installer does not switch language Message-ID: <1318831539-2613-1-git-send-email-f.demians@tamil.fr> Language installer should switch to template files of language selected in first step. It used to do that, but the feature seems to be broken now. Web installer remains English after selecting a different language. To reproduce: - make sure your database is empty - run 'perl translate install - access web installer - select language other then en on the first page => templates should change to translated templates --- installer/InstallAuth.pm | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/installer/InstallAuth.pm b/installer/InstallAuth.pm index 3918698..2c07bbe 100644 --- a/installer/InstallAuth.pm +++ b/installer/InstallAuth.pm @@ -163,13 +163,7 @@ sub _get_template_language { my ($opaclang)= @_; return 'en' unless $opaclang; my $path= C4::Context->config('intrahtdocs')."/prog/$opaclang"; - my $pref= ','.C4::Context->preference('language').','; - if(-d $path) { - if($pref =~ /,$opaclang,/ ) { - return $opaclang; - } - } - return 'en'; + -d $path ? $opaclang : 'en'; } =item checkauth -- 1.7.6.1 From M.de.Rooy at rijksmuseum.nl Mon Oct 17 09:51:22 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 17 Oct 2011 07:51:22 +0000 Subject: [Koha-patches] [PATCH] 7041 Sort search results with sortmax parameter in zebra config file Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3134CA13@S-MAIL-1B.rijksmuseum.intra> By default, zebra does not sort more than 1000 records (search results). You can increase this number by adding the sortmax parameter in zebra-biblios.cfg. Putting this value in Koha's zebra config file will make this default value visible and make it easier to increase it if one prefers that. --- etc/zebradb/zebra-biblios.cfg | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/etc/zebradb/zebra-biblios.cfg b/etc/zebradb/zebra-biblios.cfg index 6de43bf..b461a64 100644 --- a/etc/zebradb/zebra-biblios.cfg +++ b/etc/zebradb/zebra-biblios.cfg @@ -57,3 +57,8 @@ keyTmpDir: __ZEBRA_DATA_DIR__/biblios/key memMax: 50M rank:rank-1 truncmax: 1000000000 + +# Specifies the maximum number of records that will be sorted in a result set. +# If the result set contains more than that limit, the records after the limit +# will not be sorted. If omitted, the default value is 1,000. +sortmax: 1000 -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Mon Oct 17 11:51:26 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 17 Oct 2011 09:51:26 +0000 Subject: [Koha-patches] [PATCH] 7042 Improving cleanup_database.pl: handling quotes in a_session and interpreting sessdays parameter Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3134DA4D@S-MAIL-1B.rijksmuseum.intra> Improving the cleanup_database.pl script in two aspects: 1) In some cases CGI::Session seems to place quotes around the atime and ctime data in the a_session field. Two regexps now take this into account. 2) If the --sessdays parameter is used, the --sessions parameter is now implicitly enabled too. With thanks to Ian Bays and Tom Hanstra. --- misc/cronjobs/cleanup_database.pl | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl index 1333111..ba2a6d8 100755 --- a/misc/cronjobs/cleanup_database.pl +++ b/misc/cronjobs/cleanup_database.pl @@ -44,7 +44,7 @@ Usage: $0 [-h|--help] [--sessions] [--sessdays DAYS] [-v|--verbose] [--zebraqueu other options --sessions purge the sessions table. If you use this while users are logged into Koha, they will have to reconnect. - --sessdays DAYS purge only sessions older than DAYS days (use together with sessions parameter). + --sessdays DAYS purge only sessions older than DAYS days. -v --verbose will cause the script to give you a bit more information about the run. --zebraqueue DAYS purge completed entries from the zebraqueue from @@ -64,6 +64,7 @@ GetOptions( 'm|mail' => \$mail, 'zebraqueue:i' => \$zebraqueue_days, ) || usage(1); +$sessions=1 if $sess_days && $sess_days>0; if ($help) { usage(0); @@ -148,9 +149,9 @@ sub RemoveOldSessions { while ( $sth->fetch ) { $lasttime = 0; - if ( $a_session =~ /lasttime:\s+(\d+)/ ) { + if ( $a_session =~ /lasttime:\s+'?(\d+)/ ) { $lasttime = $1; - } elsif ( $a_session =~ /(ATIME|CTIME):\s+(\d+)/ ) { + } elsif ( $a_session =~ /(ATIME|CTIME):\s+'?(\d+)/ ) { $lasttime = $2; } if ( $lasttime && $lasttime < $limit ) { -- 1.6.0.6 From magnus at enger.priv.no Mon Oct 17 12:25:19 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Mon, 17 Oct 2011 12:25:19 +0200 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_Bug_4877_-_Add_DocBook_for_m?= =?utf-8?q?issing_manual_pages?= Message-ID: <1318847119-4600-1-git-send-email-magnus@enger.priv.no> Add DocBook manual pages for commands that do not have a manual page yet. Also add a page for koha-common itself, listing all the available commands. --- debian/docs/koha-common.xml | 206 +++++++++++++++++++++++++++++++++++ debian/docs/koha-create-dirs.xml | 43 +++++++ debian/docs/koha-disable.xml | 45 ++++++++ debian/docs/koha-dump-defaults.xml | 44 ++++++++ debian/docs/koha-dump.xml | 45 ++++++++ debian/docs/koha-email-disable.xml | 42 +++++++ debian/docs/koha-email-enable.xml | 42 +++++++ debian/docs/koha-enable.xml | 45 ++++++++ debian/docs/koha-foreach.xml | 43 +++++++ debian/docs/koha-list.xml | 73 ++++++++++++ debian/docs/koha-mysql.xml | 44 ++++++++ debian/docs/koha-rebuild-zebra.xml | 67 +++++++++++ debian/docs/koha-remove.xml | 17 ++- debian/docs/koha-reset-passwd.xml | 44 ++++++++ debian/docs/koha-restart-zebra.xml | 44 ++++++++ debian/docs/koha-restore.xml | 45 ++++++++ debian/docs/koha-start-zebra.xml | 44 ++++++++ debian/docs/koha-stop-zebra.xml | 44 ++++++++ debian/docs/koha-upgrade-schema.xml | 44 ++++++++ debian/docs/koha-upgrade-to-3.4.xml | 41 +++++++ 20 files changed, 1058 insertions(+), 4 deletions(-) create mode 100644 debian/docs/koha-common.xml create mode 100644 debian/docs/koha-create-dirs.xml create mode 100644 debian/docs/koha-disable.xml create mode 100644 debian/docs/koha-dump-defaults.xml create mode 100644 debian/docs/koha-dump.xml create mode 100644 debian/docs/koha-email-disable.xml create mode 100644 debian/docs/koha-email-enable.xml create mode 100644 debian/docs/koha-enable.xml create mode 100644 debian/docs/koha-foreach.xml create mode 100644 debian/docs/koha-list.xml create mode 100644 debian/docs/koha-mysql.xml create mode 100644 debian/docs/koha-rebuild-zebra.xml create mode 100644 debian/docs/koha-reset-passwd.xml create mode 100644 debian/docs/koha-restart-zebra.xml create mode 100644 debian/docs/koha-restore.xml create mode 100644 debian/docs/koha-start-zebra.xml create mode 100644 debian/docs/koha-stop-zebra.xml create mode 100644 debian/docs/koha-upgrade-schema.xml create mode 100644 debian/docs/koha-upgrade-to-3.4.xml diff --git a/debian/docs/koha-common.xml b/debian/docs/koha-common.xml new file mode 100644 index 0000000..0e70595 --- /dev/null +++ b/debian/docs/koha-common.xml @@ -0,0 +1,206 @@ +
    +koha-common + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-common + 8 + + + + koha-common + Create and manage Koha instances. + UNIX/Linux + + + Description + koha-common provides a number of scripts for creating and administering Koha instances. It is meant for sites that provide Koha hosting, and serves several sites from the same host. + + + Commands + The following commands are available after when koha-common has been installed. See individual manual pages for each command for optios and other details related to their usage. + + Administer instances + + + + + + Disable a Koha instance. + + + + + + + Enable a Koha instance. New instances are enabled by default. You only need this command if you have previously disabled a site with koha-disable. + + + + + + + Restore a Koha site from a dump (from koha-dump). + + + + + + + Dump all contents and configs for a Koha site. + + + + + + + Remove a Koha instance. + + + + + + Database-related + + + + + + Create default contents from an existing Koha site. + + + + + + + Upgrade the DB schema for Koha instances. Done automatically on package upgrades. + + + + + + + Reset password for a user in a Koha instance. + + + + + + + Provide an interactive mysql shell set up for the specified koha instance. + + + + + + Zebra-related + + + + + + Start Zebra for named Koha instances. + + + + + + + Restart Zebra for named Koha instances. + + + + + + + Rebuild the Zebra database for a Koha instance. + + + + + + + Stop Zebra for named Koha instances. + + + + + + E-mail + + + + + + Turn on the email for a Koha instance. + + + + + + + Turn off the email for a Koha instance. + + + + + + Misc + + + + + + Performs the necessary changes to upgrade a Koha system from 3.2 to 3.4. If no instance names are provided, this will run it on all of them. + + + + + + Utilities + + + + + + Create dirs for a Koha instance. + + + + + + + Lists Koha instances, optionally only those that are enabled or have email turned on. + + + + + + + Run a command for each Koha instance. Takes the same arguments as koha-list. + + + + + + + Bugs + The scripts are a bit fragile. If something goes wrong, they do not clean up after themselves. + Bugs can be reported here: http://bugs.koha-community.org/bugzilla3/ + + + About Koha + Koha is the first free software library automation package. In use worldwide, its development is steered by a growing community of users collaborating to achieve their technology goals. Koha?s feature set continues to evolve and expand to meet the needs of its user base. + + + + +
    diff --git a/debian/docs/koha-create-dirs.xml b/debian/docs/koha-create-dirs.xml new file mode 100644 index 0000000..9f9ddea --- /dev/null +++ b/debian/docs/koha-create-dirs.xml @@ -0,0 +1,43 @@ +
    +koha-create-dirs + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-create-dirs + 8 + + + + koha-create-dirs + Create dirs for a Koha instance. + UNIX/Linux + + + + + koha-create-dirs instancename + + + + Description + Create dirs for a Koha instance. + + + See also + + koha-foreach(8) + koha-list(8) + + + + + +
    diff --git a/debian/docs/koha-disable.xml b/debian/docs/koha-disable.xml new file mode 100644 index 0000000..8b7f729 --- /dev/null +++ b/debian/docs/koha-disable.xml @@ -0,0 +1,45 @@ +
    +koha-disable + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-disable + 8 + + + + koha-disable + Disable a Koha instance. + UNIX/Linux + + + + + koha-disable instancename + + + + Description + Disable a Koha instance. + + + See also + + koha-dump(8) + koha-enable(8) + koha-remove(8) + koha-restore(8) + + + + + +
    diff --git a/debian/docs/koha-dump-defaults.xml b/debian/docs/koha-dump-defaults.xml new file mode 100644 index 0000000..048c3e9 --- /dev/null +++ b/debian/docs/koha-dump-defaults.xml @@ -0,0 +1,44 @@ +
    +koha-dump-defaults + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-dump-defaults + 8 + + + + koha-dump-defaults + Create default contents from an existing Koha site. + UNIX/Linux + + + + + koha-dump-defaults instancename + + + + Description + Create default contents from an existing Koha site. + + + See also + + koha-mysql(8) + koha-reset-passwd(8) + koha-upgrade-schema(8) + + + + + +
    diff --git a/debian/docs/koha-dump.xml b/debian/docs/koha-dump.xml new file mode 100644 index 0000000..ec79f6e --- /dev/null +++ b/debian/docs/koha-dump.xml @@ -0,0 +1,45 @@ +
    +koha-dump + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-dump + 8 + + + + koha-dump + Dump all contents and configs for a Koha site. + UNIX/Linux + + + + + koha-dump instancename + + + + Description + Dump all contents and configs for a Koha site. + + + See also + + koha-disable(8) + koha-enable(8) + koha-remove(8) + koha-restore(8) + + + + + +
    diff --git a/debian/docs/koha-email-disable.xml b/debian/docs/koha-email-disable.xml new file mode 100644 index 0000000..83bf8ef --- /dev/null +++ b/debian/docs/koha-email-disable.xml @@ -0,0 +1,42 @@ +
    +koha-email-disable + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-email-disable + 8 + + + + koha-email-disable + Turn off the email for a Koha instance. + UNIX/Linux + + + + + koha-email-disable instancename + + + + Description + Turn off the email for a Koha instance. + + + See also + + koha-email-enable(8) + + + + + +
    diff --git a/debian/docs/koha-email-enable.xml b/debian/docs/koha-email-enable.xml new file mode 100644 index 0000000..5274f75 --- /dev/null +++ b/debian/docs/koha-email-enable.xml @@ -0,0 +1,42 @@ +
    +koha-email-enable + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-email-enable + 8 + + + + koha-email-enable + Turn on the email for a Koha instance. + UNIX/Linux + + + + + koha-email-enable instancename + + + + Description + Turn on the email for a Koha instance. + + + See also + + koha-email-disable(8) + + + + + +
    diff --git a/debian/docs/koha-enable.xml b/debian/docs/koha-enable.xml new file mode 100644 index 0000000..a2f8cc3 --- /dev/null +++ b/debian/docs/koha-enable.xml @@ -0,0 +1,45 @@ +
    +koha-enable + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-enable + 8 + + + + koha-enable + Enable a Koha instance. New instances are enabled by default. You only need this command if you have previously disabled a site with koha-disable. + UNIX/Linux + + + + + koha-enable instancename + + + + Description + Enable a Koha instance. New instances are enabled by default. You only need this command if you have previously disabled a site with koha-disable. + + + See also + + koha-disable(8) + koha-dump(8) + koha-remove(8) + koha-restore(8) + + + + + +
    diff --git a/debian/docs/koha-foreach.xml b/debian/docs/koha-foreach.xml new file mode 100644 index 0000000..869e9c7 --- /dev/null +++ b/debian/docs/koha-foreach.xml @@ -0,0 +1,43 @@ +
    +koha-foreach + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-foreach + 8 + + + + koha-foreach + Run a command for each Koha instance. Takes the same arguments as koha-list. + UNIX/Linux + + + + + koha-list | + + + + Description + Run a command for each Koha instance. Takes the same arguments as koha-list. + + + See also + + koha-create-dirs(8) + koha-list(8) + + + + + +
    diff --git a/debian/docs/koha-list.xml b/debian/docs/koha-list.xml new file mode 100644 index 0000000..9d0acf9 --- /dev/null +++ b/debian/docs/koha-list.xml @@ -0,0 +1,73 @@ +
    +koha-list + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-list + 8 + + + + koha-list + Lists Koha instances, optionally only those that are enabled or have email turned on. + UNIX/Linux + + + + + koha-list + + + + Options + The filtering options can be combined, and you probably want to do this (except --email and --noemail, that's just silly.) + + + + + Only show instances that are enabled. + + + + + + Only show instances that have email enabled. + + + + + + Only show instances that do not have email enabled. + + + + + + This help. + + + + + + Description + Lists Koha instances, optionally only those that are enabled or have email turned on. + + + See also + + koha-create-dirs(8) + koha-foreach(8) + + + + + +
    diff --git a/debian/docs/koha-mysql.xml b/debian/docs/koha-mysql.xml new file mode 100644 index 0000000..b8079ce --- /dev/null +++ b/debian/docs/koha-mysql.xml @@ -0,0 +1,44 @@ +
    +koha-mysql + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-mysql + 8 + + + + koha-mysql + Provide an interactive mysql shell set up for the specified koha instance. + UNIX/Linux + + + + + koha-mysql instancename + + + + Description + Provide an interactive mysql shell set up for the specified koha instance. + + + See also + + koha-dump-defaults(8) + koha-reset-passwd(8) + koha-upgrade-schema(8) + + + + + +
    diff --git a/debian/docs/koha-rebuild-zebra.xml b/debian/docs/koha-rebuild-zebra.xml new file mode 100644 index 0000000..e5b319c --- /dev/null +++ b/debian/docs/koha-rebuild-zebra.xml @@ -0,0 +1,67 @@ +
    +koha-rebuild-zebra + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-rebuild-zebra + 8 + + + + koha-rebuild-zebra + Rebuild the Zebra database for a Koha instance. + UNIX/Linux + + + + + koha-rebuild-zebra | | instancename + + + + Options + + + + + Runs the process as USMARC rather than the default of MARCXML. + + + + + + Does a reindex of the whole collection. + + + + + + Anything else is passed directly to rebuild_zebra. This is useful in particular for -v. + + + + + + Description + Rebuild the Zebra database for a Koha instance. + + + See also + + koha-restart-zebra(8) + koha-start-zebra(8) + koha-stop-zebra(8) + + + + + +
    diff --git a/debian/docs/koha-remove.xml b/debian/docs/koha-remove.xml index 5d5767f..ee2b266 100644 --- a/debian/docs/koha-remove.xml +++ b/debian/docs/koha-remove.xml @@ -17,20 +17,29 @@ koha-remove - Remove one or more Koha instance(s). + Remove a Koha instance. UNIX/Linux - koha-remove - instancename + koha-remove instancename Description - Remove one or more Koha instance(s). This removes all files associated with a Koha instance. + Remove a Koha instance. + + See also + + koha-disable(8) + koha-dump(8) + koha-enable(8) + koha-restore(8) + + + diff --git a/debian/docs/koha-reset-passwd.xml b/debian/docs/koha-reset-passwd.xml new file mode 100644 index 0000000..85e8443 --- /dev/null +++ b/debian/docs/koha-reset-passwd.xml @@ -0,0 +1,44 @@ +
    +koha-reset-passwd + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-reset-passwd + 8 + + + + koha-reset-passwd + Reset password for a user in a Koha instance. + UNIX/Linux + + + + + koha-reset-passwd instancename username + + + + Description + Reset password for a user in a Koha instance. + + + See also + + koha-dump-defaults(8) + koha-mysql(8) + koha-upgrade-schema(8) + + + + + +
    diff --git a/debian/docs/koha-restart-zebra.xml b/debian/docs/koha-restart-zebra.xml new file mode 100644 index 0000000..649df1e --- /dev/null +++ b/debian/docs/koha-restart-zebra.xml @@ -0,0 +1,44 @@ +
    +koha-restart-zebra + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-restart-zebra + 8 + + + + koha-restart-zebra + Restart Zebra for named Koha instances. + UNIX/Linux + + + + + koha-restart-zebra instancename + + + + Description + Restart Zebra for named Koha instances. + + + See also + + koha-rebuild-zebra(8) + koha-start-zebra(8) + koha-stop-zebra(8) + + + + + +
    diff --git a/debian/docs/koha-restore.xml b/debian/docs/koha-restore.xml new file mode 100644 index 0000000..6acb0e8 --- /dev/null +++ b/debian/docs/koha-restore.xml @@ -0,0 +1,45 @@ +
    +koha-restore + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-restore + 8 + + + + koha-restore + Restore a Koha site from a dump (from koha-dump). + UNIX/Linux + + + + + koha-restore + + + + Description + Restore a Koha site from a dump (from koha-dump). + + + See also + + koha-disable(8) + koha-dump(8) + koha-enable(8) + koha-remove(8) + + + + + +
    diff --git a/debian/docs/koha-start-zebra.xml b/debian/docs/koha-start-zebra.xml new file mode 100644 index 0000000..eb3c2ab --- /dev/null +++ b/debian/docs/koha-start-zebra.xml @@ -0,0 +1,44 @@ +
    +koha-start-zebra + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-start-zebra + 8 + + + + koha-start-zebra + Start Zebra for named Koha instances. + UNIX/Linux + + + + + koha-start-zebra instancename + + + + Description + Start Zebra for named Koha instances. + + + See also + + koha-rebuild-zebra(8) + koha-restart-zebra(8) + koha-stop-zebra(8) + + + + + +
    diff --git a/debian/docs/koha-stop-zebra.xml b/debian/docs/koha-stop-zebra.xml new file mode 100644 index 0000000..050ddd7 --- /dev/null +++ b/debian/docs/koha-stop-zebra.xml @@ -0,0 +1,44 @@ +
    +koha-stop-zebra + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-stop-zebra + 8 + + + + koha-stop-zebra + Stop Zebra for named Koha instances. + UNIX/Linux + + + + + koha-stop-zebra instancename + + + + Description + Stop Zebra for named Koha instances. + + + See also + + koha-rebuild-zebra(8) + koha-restart-zebra(8) + koha-start-zebra(8) + + + + + +
    diff --git a/debian/docs/koha-upgrade-schema.xml b/debian/docs/koha-upgrade-schema.xml new file mode 100644 index 0000000..8b5a4c4 --- /dev/null +++ b/debian/docs/koha-upgrade-schema.xml @@ -0,0 +1,44 @@ +
    +koha-upgrade-schema + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-upgrade-schema + 8 + + + + koha-upgrade-schema + Upgrade the DB schema for Koha instances. Done automatically on package upgrades. + UNIX/Linux + + + + + koha-upgrade-schema instancename + + + + Description + Upgrade the DB schema for Koha instances. Done automatically on package upgrades. + + + See also + + koha-dump-defaults(8) + koha-mysql(8) + koha-reset-passwd(8) + + + + + +
    diff --git a/debian/docs/koha-upgrade-to-3.4.xml b/debian/docs/koha-upgrade-to-3.4.xml new file mode 100644 index 0000000..c528377 --- /dev/null +++ b/debian/docs/koha-upgrade-to-3.4.xml @@ -0,0 +1,41 @@ +
    +koha-upgrade-to-3.4 + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-upgrade-to-3.4 + 8 + + + + koha-upgrade-to-3.4 + Performs the necessary changes to upgrade a Koha system from 3.2 to 3.4. If no instance names are provided, this will run it on all of them. + UNIX/Linux + + + + + koha-upgrade-to-3.4 instancename + + + + Description + Performs the necessary changes to upgrade a Koha system from 3.2 to 3.4. If no instance names are provided, this will run it on all of them. + + + See also + + + + + + +
    -- 1.7.5.4 From nengard at bywatersolutions.com Sat Oct 15 04:41:41 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Fri, 14 Oct 2011 22:41:41 -0400 Subject: [Koha-patches] [PATCH] Bug 7044 OPAC Branch Selector Fix Message-ID: <1318646501-19374-1-git-send-email-nengard@bywatersolutions.com> There was a typo in the OPAC branch selector added by the OpacAddMastheadLibraryPulldown preference where the current branch wasn't selected. This patch fixes that typo. --- koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc index b3672f4..92e58bc 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc @@ -80,7 +80,7 @@ -- 1.7.2.3 From oleonard at myacpl.org Mon Oct 17 17:21:02 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 17 Oct 2011 11:21:02 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 7044 OPAC Branch Selector Fix Message-ID: <1318864862-12295-1-git-send-email-oleonard@myacpl.org> From: Nicole C. Engard There was a typo in the OPAC branch selector added by the OpacAddMastheadLibraryPulldown preference where the current branch wasn't selected. This patch fixes that typo. Signed-off-by: Owen Leonard --- koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc index b3672f4..92e58bc 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc @@ -80,7 +80,7 @@ -- 1.7.3 From nengard at bywatersolutions.com Sat Oct 15 06:16:41 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Sat, 15 Oct 2011 00:16:41 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 7045: Default-value behavior inconsistency Message-ID: <1318652201-20013-1-git-send-email-nengard@bywatersolutions.com> From: D Ruth Bavousett This patch will allow for YY as well as YYYY substitutions on framework default values, and changes the substitution of 'user' for the username to require USER. It also will now allow USER in item fields. Signed-off-by: Nicole C. Engard Test Plan: 1. Edit 952 in one framework to include 4 defaults, YYYY-MM-DD, MM/DD/YY, USER, and user (in any fields) 2. Edit bib fields (I chose 5xx fields) with the same 4 values 3. Catalog using those frameworks and see if the values populate properly Note: USER enters the logged in User's last name only, not their username or their full name. --- cataloguing/addbiblio.pl | 4 +++- cataloguing/additem.pl | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index ee0662a..e180c82 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -307,13 +307,15 @@ sub create_input { # get today date & replace YYYY, MM, DD if provided in the default value my ( $year, $month, $day ) = Today(); + my $shortyear = substr $year, 2, 2; $month = sprintf( "%02d", $month ); $day = sprintf( "%02d", $day ); $value =~ s/YYYY/$year/g; + $value =~ s/YY/$shortyear/g; $value =~ s/MM/$month/g; $value =~ s/DD/$day/g; my $username=(C4::Context->userenv?C4::Context->userenv->{'surname'}:"superlibrarian"); - $value=~s/user/$username/g; + $value=~s/USER/$username/g; } my $dbh = C4::Context->dbh; diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 6229f0c..9fe22b7 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -33,6 +33,7 @@ use C4::ClassSource; use C4::Dates; use List::MoreUtils qw/any/; +use Date::Calc qw(Today); use MARC::File::XML; use URI::Escape; @@ -124,10 +125,15 @@ sub generate_subfield_form { if ( ! defined( $value ) || $value eq '') { $value = $subfieldlib->{defaultvalue}; # get today date & replace YYYY, MM, DD if provided in the default value - my ( $year, $month, $day ) = split ',', $today_iso; # FIXME: iso dates don't have commas! + my ( $year, $month, $day ) = Today(); + my $shortyear = substr $year, 2, 2; $value =~ s/YYYY/$year/g; + $value =~ s/YY/$shortyear/g; $value =~ s/MM/$month/g; $value =~ s/DD/$day/g; + my $username=(C4::Context->userenv?C4::Context->userenv->{'surname'}:"superlibrarian"); + $value=~s/USER/$username/g; + } $subfield_data{visibility} = "display:none;" if (($subfieldlib->{hidden} > 4) || ($subfieldlib->{hidden} < -4)); -- 1.7.2.3 From oleonard at myacpl.org Mon Oct 17 17:52:42 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 17 Oct 2011 11:52:42 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 7043 - masthead_search id used twice in template Message-ID: <1318866762-12571-1-git-send-email-oleonard@myacpl.org> Changing ID of library selector, and moving inline styles to the CSS as requested by kf in the bug comments. --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 6 ++++++ koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 665d143..14236c8 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -784,6 +784,12 @@ body#advsearch #listsmenulink { margin : .2em .3em 0 0; } +#masthead_search, +#select_library { + max-width: 10em; + width: 10em; +} + #search-facets ul { margin : 0; diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc index b3672f4..ee8b468 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc @@ -35,7 +35,7 @@ [% END %] - [% IF ( ms_kw ) %] [% ELSE %] @@ -77,7 +77,7 @@
    [% END %] [% IF ( OpacAddMastheadLibraryPulldown ) %] - [% FOREACH BranchesLoo IN BranchesLoop %] [% IF ( BranchesLoo.selected ) %] -- 1.7.3 From nengard at bywatersolutions.com Sat Oct 15 06:43:31 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Sat, 15 Oct 2011 00:43:31 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 7043 - masthead_search id used twice in template Message-ID: <1318653811-20312-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard Changing ID of library selector, and moving inline styles to the CSS as requested by kf in the bug comments. Signed-off-by: Nicole C. Engard --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 6 ++++++ koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 665d143..14236c8 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -784,6 +784,12 @@ body#advsearch #listsmenulink { margin : .2em .3em 0 0; } +#masthead_search, +#select_library { + max-width: 10em; + width: 10em; +} + #search-facets ul { margin : 0; diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc index b3672f4..ee8b468 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc @@ -35,7 +35,7 @@ [% END %] - [% IF ( ms_kw ) %] [% ELSE %] @@ -77,7 +77,7 @@
    [% END %] [% IF ( OpacAddMastheadLibraryPulldown ) %] - [% FOREACH BranchesLoo IN BranchesLoop %] [% IF ( BranchesLoo.selected ) %] -- 1.7.2.3 From nengard at bywatersolutions.com Sat Oct 15 07:03:17 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Sat, 15 Oct 2011 01:03:17 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6390: Implement 'see mine/my branches/all baskets'-syspref Message-ID: <1318654997-20606-1-git-send-email-nengard@bywatersolutions.com> From: Jonathan Druart Code written by Edgar Fu? , Mathematisches Institut der Uniersit?t Bonn Signed-off-by: Katrin Fischer - rebased on current master, fixed a conflict in booksellers.pl - reworked permission checks to account for general acq permissions and superlibrarian permission - rephrased text of system preference (Thx to Jared Camins-Esakov) Signed-off-by: Nicole C. Engard --- acqui/booksellers.pl | 28 ++++++++++++++----- admin/systempreferences.pl | 1 + installer/data/mysql/sysprefs.sql | 1 + .../en/modules/admin/preferences/acquisitions.pref | 7 +++++ 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index fb6b2f1..2b16fe4 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -59,6 +59,7 @@ use CGI; use C4::Dates qw/format_date/; use C4::Bookseller qw/ GetBookSellerFromId GetBookSeller /; use C4::Members qw/GetMember/; +use C4::Context; my $query = CGI->new; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( @@ -95,6 +96,11 @@ if ($loggedinuser) { $uid = GetMember( borrowernumber => $loggedinuser )->{userid}; } +my $userenv = C4::Context::userenv; +my $viewbaskets = C4::Context->preference('AcqViewBaskets'); + +my $userbranch = $userenv->{branch}; + #build result page my $loop_suppliers = []; @@ -102,19 +108,25 @@ for my $vendor (@suppliers) { my $baskets = get_vendors_baskets( $vendor->{id} ); my $loop_basket = []; + for my $basket ( @{$baskets} ) { - if (( $basket->{authorisedby} - && $basket->{authorisedby} eq $loggedinuser - ) - || haspermission( $uid, { acquisition => q{*} } ) - ) { + my $authorisedby = $basket->{authorisedby}; + my $basketbranch = GetMember( borrowernumber => $authorisedby )->{branchcode}; + + if ($userenv->{'flags'} & 1 || #user is superlibrarian + (haspermission( $uid, { acquisition => q{*} } ) && #user has acq permissions and + ($viewbaskets eq 'all' || #user is allowed to see all baskets + ($viewbaskets eq 'branch' && $authorisedby && $userbranch eq $basketbranch) || #basket belongs to user's branch + ($basket->{authorisedby} && $viewbaskets == 'user' && $authorisedby == $loggedinuser) #user created this basket + ) + ) + ) { for my $date_field (qw( creationdate closedate)) { if ( $basket->{$date_field} ) { - $basket->{$date_field} = - format_date( $basket->{$date_field} ); + $basket->{$date_field} = format_date( $basket->{$date_field} ); } } - push @{$loop_basket}, $basket; + push @{$loop_basket}, $basket; } } diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 87ecac4..78d0768 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -76,6 +76,7 @@ my %tabsysprefs; $tabsysprefs{AcqCreateItem}="Acquisitions"; $tabsysprefs{OrderPdfFormat}="Acquisitions"; $tabsysprefs{CurrencyFormat}="Acquisitions"; + $tabsysprefs{AcqViewBaskets}="Acquisitions"; # Admin $tabsysprefs{singleBranchMode} = "Admin"; diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 8cfd73f..7905d3f 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -1,3 +1,4 @@ +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('advancedMARCeditor',0,"If ON, the MARC editor won't display field/subfield descriptions",'','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowHoldDateInFuture','0','If set a date field is displayed on the Hold screen of the Staff Interface, allowing the hold date to be set in the future.','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACAllowHoldDateInFuture','0','If set, along with the AllowHoldDateInFuture system preference, OPAC users can set the date of a hold to be in the future.','','YesNo'); 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 43a7ad5..70e660d 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 @@ -16,6 +16,13 @@ Acquisitions: 1: always ask for confirmation. 2: do not ask for confirmation. - + - Show baskets + - pref: AcqViewBaskets + choices: + user: created by staff member. + branch: from staff member's branch. + all: in system, regardless of owner. + - - Display currencies using the following format - pref: CurrencyFormat choices: -- 1.7.2.3 From nengard at bywatersolutions.com Sat Oct 15 07:32:18 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Sat, 15 Oct 2011 01:32:18 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] bug_5533: Slightly improved marking items as lost Message-ID: <1318656738-20843-1-git-send-email-nengard@bywatersolutions.com> From: Srdjan Jankovic Call LostItem() whenever item is lost. LostItem() new arg - mark returned. Disabled Lost Status on catalogue item edit. Signed-off-by: Nicole C. Engard For follow up we need to explain how to hide the 952$1 (lost) from the framework by putting it in the 'ignore' tab. --- C4/Accounts.pm | 77 ++++++++------------------- C4/Circulation.pm | 40 ++++++++++++++- C4/Items.pm | 8 +++- catalogue/updateitem.pl | 3 +- cataloguing/additem.pl | 37 ++++++++----- misc/cronjobs/longoverdue.pl | 3 +- t/db_dependent/lib/KohaTest/Accounts.pm | 1 - t/db_dependent/lib/KohaTest/Circulation.pm | 1 + tools/batchMod.pl | 7 ++- 9 files changed, 99 insertions(+), 78 deletions(-) diff --git a/C4/Accounts.pm b/C4/Accounts.pm index 2352e9e..860e187 100644 --- a/C4/Accounts.pm +++ b/C4/Accounts.pm @@ -23,8 +23,7 @@ use strict; use C4::Context; use C4::Stats; use C4::Members; -use C4::Items; -use C4::Circulation qw(MarkIssueReturned); +use C4::Circulation qw(ReturnLostItem); use vars qw($VERSION @ISA @EXPORT); @@ -218,7 +217,7 @@ sub makepayment { #check to see what accounttype if ( $data->{'accounttype'} eq 'Rep' || $data->{'accounttype'} eq 'L' ) { - returnlost( $borrowernumber, $data->{'itemnumber'} ); + ReturnLostItem( $borrowernumber, $data->{'itemnumber'} ); } } @@ -278,64 +277,34 @@ EOT =cut -sub returnlost{ - my ( $borrowernumber, $itemnum ) = @_; - C4::Circulation::MarkIssueReturned( $borrowernumber, $itemnum ); - my $borrower = C4::Members::GetMember( 'borrowernumber'=>$borrowernumber ); - my @datearr = localtime(time); - my $date = ( 1900 + $datearr[5] ) . "-" . ( $datearr[4] + 1 ) . "-" . $datearr[3]; - my $bor = "$borrower->{'firstname'} $borrower->{'surname'} $borrower->{'cardnumber'}"; - ModItem({ paidfor => "Paid for by $bor $date" }, undef, $itemnum); -} - - sub chargelostitem{ # lost ==1 Lost, lost==2 longoverdue, lost==3 lost and paid for # FIXME: itemlost should be set to 3 after payment is made, should be a warning to the interface that # a charge has been added # FIXME : if no replacement price, borrower just doesn't get charged? - my $dbh = C4::Context->dbh(); - my ($itemnumber) = @_; - my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title - FROM issues - JOIN items USING (itemnumber) - JOIN biblio USING (biblionumber) - WHERE issues.itemnumber=?"); - $sth->execute($itemnumber); - my $issues=$sth->fetchrow_hashref(); - - # if a borrower lost the item, add a replacement cost to the their record - if ( $issues->{borrowernumber} ){ - - # first make sure the borrower hasn't already been charged for this item - my $sth1=$dbh->prepare("SELECT * from accountlines - WHERE borrowernumber=? AND itemnumber=? and accounttype='L'"); - $sth1->execute($issues->{'borrowernumber'},$itemnumber); - my $existing_charge_hashref=$sth1->fetchrow_hashref(); - - # OK, they haven't - unless ($existing_charge_hashref) { - # This item is on issue ... add replacement cost to the borrower's record and mark it returned - # Note that we add this to the account even if there's no replacement price, allowing some other - # process (or person) to update it, since we don't handle any defaults for replacement prices. - my $accountno = getnextacctno($issues->{'borrowernumber'}); - my $sth2=$dbh->prepare("INSERT INTO accountlines - (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber) - VALUES (?,?,now(),?,?,'L',?,?)"); - $sth2->execute($issues->{'borrowernumber'},$accountno,$issues->{'replacementprice'}, - "Lost Item $issues->{'title'} $issues->{'barcode'}", - $issues->{'replacementprice'},$itemnumber); - $sth2->finish; - # FIXME: Log this ? - } - #FIXME : Should probably have a way to distinguish this from an item that really was returned. - #warn " $issues->{'borrowernumber'} / $itemnumber "; - C4::Circulation::MarkIssueReturned($issues->{borrowernumber},$itemnumber); - # Shouldn't MarkIssueReturned do this? - C4::Items::ModItem({ onloan => undef }, undef, $itemnumber); + my ($borrowernumber, $itemnumber, $amount, $description) = @_; + + # first make sure the borrower hasn't already been charged for this item + my $sth1=$dbh->prepare("SELECT * from accountlines + WHERE borrowernumber=? AND itemnumber=? and accounttype='L'"); + $sth1->execute($borrowernumber,$itemnumber); + my $existing_charge_hashref=$sth1->fetchrow_hashref(); + + # OK, they haven't + unless ($existing_charge_hashref) { + # This item is on issue ... add replacement cost to the borrower's record and mark it returned + # Note that we add this to the account even if there's no replacement price, allowing some other + # process (or person) to update it, since we don't handle any defaults for replacement prices. + my $accountno = getnextacctno($borrowernumber); + my $sth2=$dbh->prepare("INSERT INTO accountlines + (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber) + VALUES (?,?,now(),?,?,'L',?,?)"); + $sth2->execute($borrowernumber,$accountno,$amount, + $description,$amount,$itemnumber); + $sth2->finish; + # FIXME: Log this ? } - $sth->finish; } =head2 manualinvoice diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 42a8b2d..12eece4 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -59,8 +59,9 @@ BEGIN { # FIXME subs that should probably be elsewhere push @EXPORT, qw( - &FixOverduesOnReturn &barcodedecode + &LostItem + &ReturnLostItem ); # subs to deal with issuing a book @@ -2949,8 +2950,43 @@ sub DeleteBranchTransferLimits { $sth->execute(); } +sub ReturnLostItem{ + my ( $borrowernumber, $itemnum ) = @_; - 1; + MarkIssueReturned( $borrowernumber, $itemnum ); + my $borrower = C4::Members::GetMember( 'borrowernumber'=>$borrowernumber ); + my @datearr = localtime(time); + my $date = ( 1900 + $datearr[5] ) . "-" . ( $datearr[4] + 1 ) . "-" . $datearr[3]; + my $bor = "$borrower->{'firstname'} $borrower->{'surname'} $borrower->{'cardnumber'}"; + ModItem({ paidfor => "Paid for by $bor $date" }, undef, $itemnum); +} + + +sub LostItem{ + my ($itemnumber, $mark_returned) = @_; + + my $dbh = C4::Context->dbh(); + my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title + FROM issues + JOIN items USING (itemnumber) + JOIN biblio USING (biblionumber) + WHERE issues.itemnumber=?"); + $sth->execute($itemnumber); + my $issues=$sth->fetchrow_hashref(); + $sth->finish; + + # if a borrower lost the item, add a replacement cost to the their record + if ( my $borrowernumber = $issues->{borrowernumber} ){ + + C4::Accounts::chargelostitem($borrowernumber, $itemnumber, $issues->{'replacementprice'}, "Lost Item $issues->{'title'} $issues->{'barcode'}"); + #FIXME : Should probably have a way to distinguish this from an item that really was returned. + #warn " $issues->{'borrowernumber'} / $itemnumber "; + MarkIssueReturned($borrowernumber,$itemnumber) if $mark_returned; + } +} + + +1; __END__ diff --git a/C4/Items.pm b/C4/Items.pm index 23eb1eb..ca67c6d 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -401,6 +401,8 @@ Note that only columns that can be directly changed from the cataloging and serials item editors are included in this hash. +Returns item record + =cut my %default_values_for_mod_from_marc = ( @@ -450,7 +452,8 @@ sub ModItemFromMarc { } my $unlinked_item_subfields = _get_unlinked_item_subfields( $localitemmarc, $frameworkcode ); - return ModItem($item, $biblionumber, $itemnumber, $dbh, $frameworkcode, $unlinked_item_subfields); + ModItem($item, $biblionumber, $itemnumber, $dbh, $frameworkcode, $unlinked_item_subfields); + return $item; } =head2 ModItem @@ -499,6 +502,9 @@ sub ModItem { }; $item->{'itemnumber'} = $itemnumber or return undef; + + $item->{onloan} = undef if $item->{itemlost}; + _set_derived_columns_for_mod($item); _do_column_fixes_for_mod($item); # FIXME add checks diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl index e8ce20d..379c12c 100755 --- a/catalogue/updateitem.pl +++ b/catalogue/updateitem.pl @@ -26,7 +26,6 @@ use C4::Biblio; use C4::Items; use C4::Output; use C4::Circulation; -use C4::Accounts; use C4::Reserves; my $cgi= new CGI; @@ -75,6 +74,6 @@ if (defined $itemnotes) { # i.e., itemnotes parameter passed from form ModItem($item_changes, $biblionumber, $itemnumber); -C4::Accounts::chargelostitem($itemnumber) if ($itemlost==1) ; +LostItem($itemnumber, 'MARK RETURNED') if $itemlost; print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber"); diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 6229f0c..4442ed3 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -206,28 +206,33 @@ sub generate_subfield_form { } } - $subfield_data{marc_value} =CGI::scrolling_list( # FIXME: factor out scrolling_list - -name => "field_value", - -values => \@authorised_values, - -default => $value, - -labels => \%authorised_lib, - -override => 1, - -size => 1, - -multiple => 0, - -tabindex => 1, - -id => "tag_".$tag."_subfield_".$subfieldtag."_".$index_subfield, - -class => "input_marceditor", - ); + if ($subfieldlib->{'hidden'}) { + $subfield_data{marc_value} = qq( $authorised_lib{$value}); + } + else { + $subfield_data{marc_value} =CGI::scrolling_list( # FIXME: factor out scrolling_list + -name => "field_value", + -values => \@authorised_values, + -default => $value, + -labels => \%authorised_lib, + -override => 1, + -size => 1, + -multiple => 0, + -tabindex => 1, + -id => "tag_".$tag."_subfield_".$subfieldtag."_".$index_subfield, + -class => "input_marceditor", + ); + } - # it's a thesaurus / authority field } + # it's a thesaurus / authority field elsif ( $subfieldlib->{authtypecode} ) { $subfield_data{marc_value} = " {authtypecode}."&index=$subfield_data{id}','$subfield_data{id}'); return false;\" title=\"Tag Editor\">... "; - # it's a plugin field } + # it's a plugin field elsif ( $subfieldlib->{value_builder} ) { # opening plugin my $plugin = C4::Context->intranetdir . "/cataloguing/value_builder/" . $subfieldlib->{'value_builder'}; @@ -500,7 +505,7 @@ if ($op eq "additem") { if ($exist_itemnumber && $exist_itemnumber != $itemnumber) { push @errors,"barcode_not_unique"; } else { - my ($oldbiblionumber,$oldbibnum,$oldbibitemnum) = ModItemFromMarc($itemtosave,$biblionumber,$itemnumber); + ModItemFromMarc($itemtosave,$biblionumber,$itemnumber); $itemnumber=""; } $nextop="additem"; @@ -665,6 +670,8 @@ if($itemrecord){ next if subfield_is_koha_internal_p($subfieldtag); next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10"); + $subfieldlib->{hidden} = 1 + if $tagslib->{$tag}->{$subfieldtag}->{authorised_value} eq 'LOST'; my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $branches, $today_iso, $biblionumber, $temp, \@loop_data, $i); push @fields, "$tag$subfieldtag"; diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl index 651b9d2..2179d10 100755 --- a/misc/cronjobs/longoverdue.pl +++ b/misc/cronjobs/longoverdue.pl @@ -35,7 +35,6 @@ BEGIN { } use C4::Context; use C4::Items; -use C4::Accounts; use Getopt::Long; my $lost; # key=lost value, value=num days. @@ -155,7 +154,7 @@ foreach my $startrange (sort keys %$lost) { printf ("Due %s: item %5s from borrower %5s to lost: %s\n", $row->{date_due}, $row->{itemnumber}, $row->{borrowernumber}, $lostvalue) if($verbose); if($confirm) { ModItem({ itemlost => $lostvalue }, $row->{'biblionumber'}, $row->{'itemnumber'}); - chargelostitem($row->{'itemnumber'}) if( $charge && $charge eq $lostvalue); + LostItem($row->{'itemnumber'}) if( $charge && $charge eq $lostvalue); } $count++; } diff --git a/t/db_dependent/lib/KohaTest/Accounts.pm b/t/db_dependent/lib/KohaTest/Accounts.pm index 703d478..ac3a78e 100644 --- a/t/db_dependent/lib/KohaTest/Accounts.pm +++ b/t/db_dependent/lib/KohaTest/Accounts.pm @@ -15,7 +15,6 @@ sub methods : Test( 1 ) { my @methods = qw( recordpayment makepayment getnextacctno - returnlost manualinvoice fixcredit refund diff --git a/t/db_dependent/lib/KohaTest/Circulation.pm b/t/db_dependent/lib/KohaTest/Circulation.pm index 7d5e69d..b3a1ff8 100644 --- a/t/db_dependent/lib/KohaTest/Circulation.pm +++ b/t/db_dependent/lib/KohaTest/Circulation.pm @@ -47,6 +47,7 @@ sub methods : Test( 1 ) { CheckSpecialHolidays CheckRepeatableSpecialHolidays CheckValidBarcode + ReturnLostItem ); can_ok( $self->testing_class, @methods ); diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 04cfc87..701d421 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -25,6 +25,7 @@ use C4::Auth; use C4::Output; use C4::Biblio; use C4::Items; +use C4::Circulation; use C4::Context; use C4::Koha; # XXX subfield_is_koha_internal_p use C4::Branch; # XXX subfield_is_koha_internal_p @@ -174,7 +175,11 @@ if ($op eq "action") { if ($values_to_modify || $values_to_blank) { my $localmarcitem = Item2Marc($itemdata); UpdateMarcWith( $marcitem, $localmarcitem ); - eval{ my ( $oldbiblionumber, $oldbibnum, $oldbibitemnum ) = ModItemFromMarc( $localmarcitem, $itemdata->{biblionumber}, $itemnumber ) }; + eval{ + if ( my $item = ModItemFromMarc( $localmarcitem, $itemdata->{biblionumber}, $itemnumber ) ) { + LostItem($itemnumber, 'MARK RETURNED') if $item->{itemlost}; + } + }; } } $i++; -- 1.7.2.3 From Katrin.Fischer.83 at web.de Mon Oct 17 21:01:54 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 17 Oct 2011 21:01:54 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6982 - Don't show MARC tag documentation links for NORMARC Message-ID: <1318878114-3797-1-git-send-email-Katrin.Fischer.83@web.de> From: Magnus Enger Links to UNIMARC documentation were being shown when marcflavour = NORMARC. This patch hides the doc link functionality for NORMARC by hiding: 1. The checkbox for turning doc links on/off 2. The hyperlinked questionmarks This patch does not hide e.g. the JavaScript functions related to the doc link functionality, in order to make it easy to add doc links for NORMARC in the future (hopefully). The doc link functionality was passing a variable called MARC21 (based on the contents of the marcflavour syspref) to the template and testing the value of this to decide if MARC21 or UNIMARC doc links were to be shown. I have replaced this variable with he standard/full marcflavour syspref, in order to make it possible to test for more then two MARC dialects. To test: - Set the marcflavour syspref to MARC21, NORMARC and UNIMARC, one after the other. - Check that correct doc links are shown for MARC21 and UNIMARC on the cataloguing screen, and that no checkbox and no doc links are displayed for NORMARC. Signed-off-by: Katrin Fischer Works as described - thx for the great test plan! --- cataloguing/addbiblio.pl | 8 ++------ .../prog/en/modules/cataloguing/addbiblio.tt | 13 +++++++------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index ee0662a..1a82989 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -1075,16 +1075,12 @@ elsif ( $op eq "delete" ) { } $template->param( title => $record->title() ) if ( $record ne "-1" ); -if (C4::Context->preference("marcflavour") eq "MARC21"){ - $template->param(MARC21 => 1); -} - - $template->param( popup => $mode, frameworkcode => $frameworkcode, itemtype => $frameworkcode, - borrowernumber => $loggedinuser + borrowernumber => $loggedinuser, + marcflavour => C4::Context->preference("marcflavour"), ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index 8155be1..65feefb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -78,9 +78,9 @@ function PopupZ3950() { } function PopupMARCFieldDoc(field, blocknumber) { - [% IF ( MARC21 ) %] + [% IF ( marcflavour == 'MARC21' ) %] _MARC21FieldDoc(field); - [% ELSE %] + [% ELSIF ( marcflavour == 'UNIMARC' ) %] _UNIMARCFieldDoc(field, blocknumber); [% END %] } @@ -664,10 +664,10 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
    - -

    [% IF ( biblionumber ) %]Editing [% title |html %] (Record Number [% biblionumber %])

    [% ELSE %]Add MARC Record[% END %] +[% IF marcflavour != 'NORMARC' %]
    Show MARC tag documentation links
    +[% END %] [% UNLESS ( number ) %] @@ -825,8 +825,9 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ? [% IF advancedMARCEditor %] [% innerloo.tag %] [% ELSE %] - [% innerloo.tag %] ? + [% innerloo.tag %] + [% IF marcflavour != 'NORMARC' %] ?[% END %] + [% END %] [% IF ( innerloo.fixedfield ) %] -- 1.7.5.4 From Katrin.Fischer.83 at web.de Tue Oct 18 07:54:18 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Tue, 18 Oct 2011 07:54:18 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 7026 Web installer does not switch language Message-ID: <1318917258-7746-1-git-send-email-Katrin.Fischer.83@web.de> From: Fr?d?ric Demians Language installer should switch to template files of language selected in first step. It used to do that, but the feature seems to be broken now. Web installer remains English after selecting a different language. To reproduce: - make sure your database is empty - run 'perl translate install - access web installer - select language other then en on the first page => templates should change to translated templates Signed-off-by: Katrin Fischer Test plan provided works, correct language and sample files are selected. In a second test I deleted the staff templates for de-DE and repeated the steps. de-DE is not offered in the language selection of the web installer now, but does appear in the opaclanguages list after running the web installer. (Bug 5660) Signed-off-by: Katrin Fischer --- installer/InstallAuth.pm | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/installer/InstallAuth.pm b/installer/InstallAuth.pm index 3918698..2c07bbe 100644 --- a/installer/InstallAuth.pm +++ b/installer/InstallAuth.pm @@ -163,13 +163,7 @@ sub _get_template_language { my ($opaclang)= @_; return 'en' unless $opaclang; my $path= C4::Context->config('intrahtdocs')."/prog/$opaclang"; - my $pref= ','.C4::Context->preference('language').','; - if(-d $path) { - if($pref =~ /,$opaclang,/ ) { - return $opaclang; - } - } - return 'en'; + -d $path ? $opaclang : 'en'; } =item checkauth -- 1.7.5.4 From Katrin.Fischer.83 at web.de Tue Oct 18 07:19:01 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Tue, 18 Oct 2011 07:19:01 +0200 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_=5BSIGNED-OFF=5D_Bug_6883_Up?= =?utf-8?q?date_userpermisions=2Esql_fr-FR_file?= Message-ID: <1318915141-4975-1-git-send-email-Katrin.Fischer.83@web.de> From: Fr?d?ric Demians Signed-off-by: Katrin Fischer I verified that the new files works with the web installer, permissions can be set and removed. --- .../mysql/fr-FR/1-Obligatoire/userpermissions.sql | 24 ++++++++++---------- 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql index 7f67d1b..347d3ec 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql @@ -1,11 +1,11 @@ INSERT INTO permissions (module_bit, code, description) VALUES - ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), + ( 1, 'circulate_remaining_permissions', 'Fonctions de circulation restantes'), ( 1, 'override_renewals', 'Outrepasser les limites de renouvellement'), ( 6, 'place_holds', 'R?server pour des adh?rents'), ( 6, 'modify_holds_priority', 'Modifier la priorit? des r?servations'), - ( 9, 'edit_catalogue', 'Ajouter et modifier les notices du catalogue'), + ( 9, 'edit_catalogue', 'Ajouter et modifier des notices au catalogue'), ( 9, 'fast_cataloging', 'Catalogage rapide'), - ( 9, 'edit_items', 'Modification des exemplaires'), + ( 9, 'edit_items', 'Modifier des exemplaires'), (13, 'edit_news', 'Ecrire des nouvelles pour l''OPAC et l''interface professionnelle'), (13, 'label_creator', 'Cr?er des ?tiquettes ? partir des donn?es du catalogues et des adh?rents'), (13, 'edit_calendar', 'D?finir les jours de fermeture de la biblioth?que'), @@ -32,18 +32,18 @@ INSERT INTO permissions (module_bit, code, description) VALUES (11, 'order_receive', 'G?rer les r?ceptions'), (11, 'budget_add_del', 'Ajouter et supprimer les budgets (mais pas modifier)'), (13, 'manage_csv_profiles', 'G?rer les profils d''export CSV'), - (13, 'moderate_tags', 'Moderate patron tags'), + (13, 'moderate_tags', 'Mod?rer les tags des adh?rents'), (13, 'rotating_collections', 'G?rer les collections tournantes'), (13, 'items_batchmod', 'Modifier les exemplaires par lot'), (13, 'items_batchdel', 'Supprimer les exemplaires par lot'), - (15, 'check_expiration', 'Check the expiration of a serial'), - (15, 'claim_serials', 'Claim missing serials'), - (15, 'create_subscription', 'Create a new subscription'), - (15, 'delete_subscription', 'Delete an existing subscription'), - (15, 'edit_subscription', 'Edit an existing subscription'), - (15, 'receive_serials', 'Serials receiving'), - (15, 'renew_subscription', 'Renew a subscription'), - (15, 'routing', 'Routing'), + (15, 'check_expiration', 'Contr?ler l''expiration d''un p?riodique'), + (15, 'claim_serials', 'R?clamer les p?riodiques manquants'), + (15, 'create_subscription', 'Cr?er de nouveaux abonnements'), + (15, 'delete_subscription', 'Supprimer un abonnement existant'), + (15, 'edit_subscription', 'Modifier un abonnement existant'), + (15, 'receive_serials', 'Bulletiner les p?riodiques'), + (15, 'renew_subscription', 'Renouveler les abonnements'), + (15, 'routing', 'Mettre en circulation'), (16, 'execute_reports', 'Lancer les rapports SQL'), (16, 'create_reports', 'Cr?er les rapports SQL Reports') -- 1.7.5.4 From Katrin.Fischer.83 at web.de Mon Oct 17 22:53:25 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 17 Oct 2011 22:53:25 +0200 Subject: [Koha-patches] =?utf-8?q?=5BPATCH_1/2=5D_=5BSIGNED-OFF=5D_Bug_696?= =?utf-8?q?3=3A_Corrects_a_problem_when_a_new_order_is_created_with?= =?utf-8?q?_a_duplicate_barcode=2E?= Message-ID: <1318884806-7180-1-git-send-email-Katrin.Fischer.83@web.de> From: Fr?d?rick Capovilla If the AcqCreateItem preference is set to "ordering" and the barcode for the new item is already in use, no error is returned, but an invalid itemnumber is saved in the aqorders_items table and the item is never created. This patch adds a duplicate barcode verification in neworderempty.pl _koha_add_item is also modified so it won't return an invalid ID when an item can't be added. http://bugs.koha-community.org/show_bug.cgi?id=6963 Signed-off-by: Katrin Fischer Test plan on second patch. --- C4/Items.pm | 7 ++- acqui/check_duplicate_barcode_ajax.pl | 55 ++++++++++++++++++++ .../prog/en/modules/acqui/neworderempty.tt | 48 ++++++++++++++++- 3 files changed, 106 insertions(+), 4 deletions(-) create mode 100755 acqui/check_duplicate_barcode_ajax.pl diff --git a/C4/Items.pm b/C4/Items.pm index ca67c6d..b4421d7 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2139,10 +2139,15 @@ sub _koha_new_item { $item->{'copynumber'}, $item->{'stocknumber'}, ); - my $itemnumber = $dbh->{'mysql_insertid'}; + + my $itemnumber; if ( defined $sth->errstr ) { $error.="ERROR in _koha_new_item $query".$sth->errstr; } + else { + $itemnumber = $dbh->{'mysql_insertid'}; + } + return ( $itemnumber, $error ); } diff --git a/acqui/check_duplicate_barcode_ajax.pl b/acqui/check_duplicate_barcode_ajax.pl new file mode 100755 index 0000000..fe50b6d --- /dev/null +++ b/acqui/check_duplicate_barcode_ajax.pl @@ -0,0 +1,55 @@ +#!/usr/bin/perl + +# Fr?d?rick Capovilla, 2011 - Lib?o +# +# 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 CGI::Cookie; +use JSON; +use C4::Auth; +use C4::Items; +use C4::Context; + +my $input = new CGI; +print $input->header('application/json'); + +# Check the user's permissions +my %cookies = fetch CGI::Cookie; +my $sessid = $cookies{'CGISESSID'}->value || $input->param('CGISESSID'); +my ($auth_status, $auth_sessid) = C4::Auth::check_cookie_auth($sessid, {acquisition => 'order_manage'}); +if ($auth_status ne "ok") { + print to_json({status => 'UNAUTHORIZED'}); + exit 0; +} + +my $json; + +#Check if the barcodes already exist. +my @barcodes = $input->param('barcodes'); +foreach my $barcode (@barcodes) { + my $existing_itemnumber = GetItemnumberFromBarcode($barcode); + if ($existing_itemnumber) { + $json->{status} = "DUPLICATES"; + push @{$json->{barcodes}}, $barcode; + } +} + +$json->{status} = 'OK' unless defined $json->{status}; +print to_json($json); + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index 39e9ca2..ed5ee82 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -46,26 +46,68 @@ function Check(ff) { } if ( ff.field_value ) { + var barcodes = []; var empty_item_mandatory = 0; for (i = 0; i < ff.field_value.length; i++) { //alert("i = " + i + " => " + ff.kohafield[i] ); if (ff.field_value[i].value.length == 0 && ff.mandatory[i].value == 1) { empty_item_mandatory++; } + if(ff.subfield[i].value === 'p' && ff.field_value[i].value.length != 0) { + barcodes.push(ff.field_value[i].value); + } } if (empty_item_mandatory > 0) { ok = 1; _alertString += "\n- " + empty_item_mandatory + _(" item mandatory fields empty"); } + + if(barcodes.length > 0) { + // Check for duplicate barcodes in the form + barcodes = barcodes.sort(); + for(var i=0; i The item form on the order receive page (AcqCreateItem = on receive) contains a lot of blank space which makes it hard to read and fill out. To test: - set AcqCreateItem = on receive - create basket, order something, receive shipment - check item form is nicely formatted and doesn't include lots of blank space Note: It will be easier to test if you have an ACQ framework created to hide some unnecessary subfields, because the hidden fields create the blank space. --- .../prog/en/modules/acqui/orderreceive.tt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index 746155f..7147b19 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -45,8 +45,8 @@ [% FOREACH item IN items %]
    -
      [% FOREACH iteminformatio IN item.iteminformation %]
    1. -
      +
        [% FOREACH iteminformatio IN item.iteminformation %]
      1. +
        [% iteminformatio.marc_value %] -- 1.7.5.4 From Katrin.Fischer.83 at web.de Mon Oct 17 22:53:26 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 17 Oct 2011 22:53:26 +0200 Subject: [Koha-patches] [PATCH 2/2] [SIGNED-OFF] Follow-up patch : use the subfield associated with items.barcode In-Reply-To: <1318884806-7180-1-git-send-email-Katrin.Fischer.83@web.de> References: <1318884806-7180-1-git-send-email-Katrin.Fischer.83@web.de> Message-ID: <1318884806-7180-2-git-send-email-Katrin.Fischer.83@web.de> From: Fr?d?rick Capovilla Instead of using the 'p' subfield directly, use the subfield letter associated with the items.barcode column. http://bugs.koha-community.org/show_bug.cgi?id=6963 Signed-off-by: Katrin Fischer Test cases tested: - 1 item, barcode empty - 2 items, barcodes both empty - 1 item, existing barcode - 1 item, new barcode - 2 items, one barcode empty, one existing All test cases worked nicely and gave correct error messages. --- acqui/neworderempty.pl | 4 ++++ .../prog/en/modules/acqui/neworderempty.tt | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 6361125..592758e 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -333,6 +333,9 @@ if (C4::Context->preference('AcqCreateItem') eq 'ordering' && !$ordernumber) { my @itemtypes; @itemtypes = C4::ItemType->all unless C4::Context->preference('item-level_itypes'); +# Find the items.barcode subfield for barcode validations +my (undef, $barcode_subfield) = GetMarcFromKohaField('items.barcode', ''); + # fill template $template->param( close => $close, @@ -385,6 +388,7 @@ $template->param( ecost => $data->{'ecost'}, notes => $data->{'notes'}, publishercode => $data->{'publishercode'}, + barcode_subfield => $barcode_subfield, import_batch_id => $import_batch_id, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index ed5ee82..58b8493 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -53,7 +53,7 @@ function Check(ff) { if (ff.field_value[i].value.length == 0 && ff.mandatory[i].value == 1) { empty_item_mandatory++; } - if(ff.subfield[i].value === 'p' && ff.field_value[i].value.length != 0) { + if(ff.subfield[i].value === '[% barcode_subfield %]' && ff.field_value[i].value.length != 0) { barcodes.push(ff.field_value[i].value); } } -- 1.7.5.4 From Katrin.Fischer.83 at web.de Mon Oct 17 23:06:26 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 17 Oct 2011 23:06:26 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6949: cannot remove owner from fund Message-ID: <1318885586-7658-1-git-send-email-Katrin.Fischer.83@web.de> From: Ian Walls The Javascript to remove an owner from a budget cleared the name from the screen, but did not remove the actual value in the form, so when saving, the original owner was retained. This patch adds the command to set the value to ''. Signed-off-by: Katrin Fischer I could reproduce the bug on current master. Patch fixes the problem, fund owners can now be added and removed without any problems. Thx for providing a test plan! --- .../prog/en/modules/admin/aqbudgets.tt | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt index ca623f3..c27a880 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt @@ -11,6 +11,7 @@ function ownerRemove(f) { document.getElementById('budget_owner_name').innerHTML = ''; + document.getElementById('budget_owner_id').value = ''; } function Check(f) { -- 1.7.5.4 From Katrin.Fischer.83 at web.de Tue Oct 18 22:51:47 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Tue, 18 Oct 2011 22:51:47 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6390 Followup: Basket's authorisedby might not be a borrowernumber Message-ID: <1318971107-9857-1-git-send-email-Katrin.Fischer.83@web.de> From: Ian Walls aqbasket.authorisedby is not foreign key constrainted to borrowers.borrowernumber, so if it's anything other than that, vendor search breaks by using an undefined value (GetMember() on an invalid borrowernumber) as a HASH ref. This patch sets the branchcode (the desired value from GetMember) to a blank value, then only changes it if GetMember is defined. In the case where the authorisedby librarian has been deleted, or the value is otherwise invalid, and AcqViewBaskets is set to 'branch', the basket will not appear except to superlibrarians Signed-off-by: Katrin Fischer Invalid borrowernumber in aqbasket.authorisedby no longer breaks search. --- acqui/booksellers.pl | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index 2b16fe4..634eb93 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -111,7 +111,11 @@ for my $vendor (@suppliers) { for my $basket ( @{$baskets} ) { my $authorisedby = $basket->{authorisedby}; - my $basketbranch = GetMember( borrowernumber => $authorisedby )->{branchcode}; + my $basketbranch = ''; # set a blank branch to start with + if ( GetMember( borrowernumber => $authorisedby ) ) { + # authorisedby may not be a valid borrowernumber; it's not foreign-key constrained! + $basketbranch = GetMember( borrowernumber => $authorisedby )->{branchcode}; + } if ($userenv->{'flags'} & 1 || #user is superlibrarian (haspermission( $uid, { acquisition => q{*} } ) && #user has acq permissions and -- 1.7.5.4 From robin at catalyst.net.nz Wed Oct 19 04:22:57 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Wed, 19 Oct 2011 15:22:57 +1300 Subject: [Koha-patches] [PATCH] Bug 6296: allow users to be authenticated by SSL client certs Message-ID: <1318990977-31028-1-git-send-email-robin@catalyst.net.nz> This adds a new syspref: AllowPKIAuth. It can have one of three states: * None * Common Name * emailAddress If a) this is set to something that's not "None", and b) the webserver is passing SSL client cert details on to Koha, then the relevant field in the user's certificate will be matched up against the field in the database and they will be automatically logged in. This is used as a secure form of single sign-on in some organisations. The "Common Name" field is matched up against the userid, while "emailAddress" is matched against the primary email. This is an example of what might go in the Apache configuration for the virtual host: SSLVerifyClient require SSLVerifyDepth 2 SSLCACertificateFile /etc/apache2/ssl/test/ca.crt SSLOptions +StdEnvVars The last line ensures that the required details are passed to Koha. --- C4/Auth.pm | 275 +++++++++++--------- C4/Members.pm | 29 ++ acqui/finishreceive.pl | 4 +- catalogue/updateitem.pl | 4 +- etc/koha-httpd.conf | 16 ++ installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 8 + .../prog/en/modules/admin/preferences/admin.pref | 11 +- members/setstatus.pl | 2 +- reserve/placerequest.pl | 2 +- serials/reorder_members.pl | 3 +- serials/subscription-detail.pl | 3 +- 12 files changed, 227 insertions(+), 132 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 36a6472..8a7e7c8 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -157,6 +157,19 @@ sub get_template_and_user { my $borrowernumber; my $insecure = C4::Context->preference('insecure'); if ($user or $insecure) { + # It's possible for $user to be the borrowernumber if they don't have a + # userid defined (and are logging in through some other method, such + # as SSL certs against an email address) + $borrowernumber = getborrowernumber($user) if defined($user); + if (!defined($borrowernumber) && defined($user)) { + my $borrower = GetMember(borrowernumber => $user); + if ($borrower) { + $borrowernumber = $user; + # A bit of a hack, but I don't know there's a nicer way + # to do it. + $user = $borrower->{firstname} . ' ' . $borrower->{surname}; + } + } # load the template variables for stylesheets and JavaScript $template->param( css_libs => $in->{'css_libs'} ); @@ -187,8 +200,6 @@ sub get_template_and_user { $template->param( bartotal => $total->{'bartotal'}, ) if ($total->{'bartotal'} > scalar @{$barshelves}); } - $borrowernumber = getborrowernumber($user) if defined($user); - my ( $borr ) = GetMemberDetails( $borrowernumber ); my @bordat; $bordat[0] = $borr; @@ -740,9 +751,9 @@ sub checkauth { } unless ($userid || $sessionID) { #we initiate a session prior to checking for a username to allow for anonymous sessions... - my $session = get_session("") or die "Auth ERROR: Cannot get_session()"; + my $session = get_session("") or die "Auth ERROR: Cannot get_session()"; my $sessionID = $session->id; - C4::Context->_new_userenv($sessionID); + C4::Context->_new_userenv($sessionID); $cookie = $query->cookie(CGISESSID => $sessionID); $userid = $query->param('userid'); if ($cas || $userid) { @@ -753,7 +764,29 @@ sub checkauth { ( $return, $cardnumber, $retuserid ) = checkpw( $dbh, $userid, $password, $query ); $userid = $retuserid; $info{'invalidCasLogin'} = 1 unless ($return); - } else { + } elsif (($pki_field eq 'Common Name' && $ENV{'SSL_CLIENT_S_DN_CN'}) || + ($pki_field eq 'emailAddress' && $ENV{'SSL_CLIENT_S_DN_Email'})) { + my $value; + if ($pki_field eq 'Common Name') { + $value = $ENV{'SSL_CLIENT_S_DN_CN'}; + } elsif ($pki_field eq 'emailAddress') { + $value = $ENV{'SSL_CLIENT_S_DN_Email'}; + # If we're looking up the email, there's a chance that the person + # doesn't have a userid. So if there is none, we pass along the + # borrower number, and the bits of code that need to know the user + # ID will have to be smart enough to handle that. + my @users_info = GetBorrowersWithEmail($value); + if (@users_info) { + # First the userid, then the borrowernum + $value = $users_info[0][1] || $users_info[0][0]; + } else { + undef $value; + } + } + # 0 for no user, 1 for normal, 2 for demo user. + $return = $value ? 1 : 0; + $userid = $value; + } else { my $retuserid; ( $return, $cardnumber, $retuserid ) = checkpw( $dbh, $userid, $password, $query ); $userid = $retuserid if ($retuserid ne ''); @@ -768,126 +801,126 @@ sub checkauth { C4::Context->_unset_userenv($sessionID); } - my ($borrowernumber, $firstname, $surname, $userflags, - $branchcode, $branchname, $branchprinter, $emailaddress); - - if ( $return == 1 ) { - my $select = " - SELECT borrowernumber, firstname, surname, flags, borrowers.branchcode, - branches.branchname as branchname, - branches.branchprinter as branchprinter, - email - FROM borrowers - LEFT JOIN branches on borrowers.branchcode=branches.branchcode - "; - my $sth = $dbh->prepare("$select where userid=?"); - $sth->execute($userid); - unless ($sth->rows) { - $debug and print STDERR "AUTH_1: no rows for userid='$userid'\n"; - $sth = $dbh->prepare("$select where cardnumber=?"); - $sth->execute($cardnumber); - - unless ($sth->rows) { - $debug and print STDERR "AUTH_2a: no rows for cardnumber='$cardnumber'\n"; - $sth->execute($userid); - unless ($sth->rows) { - $debug and print STDERR "AUTH_2b: no rows for userid='$userid' AS cardnumber\n"; - } - } - } - if ($sth->rows) { - ($borrowernumber, $firstname, $surname, $userflags, - $branchcode, $branchname, $branchprinter, $emailaddress) = $sth->fetchrow; - $debug and print STDERR "AUTH_3 results: " . - "$cardnumber,$borrowernumber,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress\n"; - } else { - print STDERR "AUTH_3: no results for userid='$userid', cardnumber='$cardnumber'.\n"; - } + my ($borrowernumber, $firstname, $surname, $userflags, + $branchcode, $branchname, $branchprinter, $emailaddress); + + if ( $return == 1 ) { + my $select = " + SELECT borrowernumber, firstname, surname, flags, borrowers.branchcode, + branches.branchname as branchname, + branches.branchprinter as branchprinter, + email + FROM borrowers + LEFT JOIN branches on borrowers.branchcode=branches.branchcode + "; + my $sth = $dbh->prepare("$select where userid=?"); + $sth->execute($userid); + unless ($sth->rows) { + $debug and print STDERR "AUTH_1: no rows for userid='$userid'\n"; + $sth = $dbh->prepare("$select where cardnumber=?"); + $sth->execute($cardnumber); + + unless ($sth->rows) { + $debug and print STDERR "AUTH_2a: no rows for cardnumber='$cardnumber'\n"; + $sth->execute($userid); + unless ($sth->rows) { + $debug and print STDERR "AUTH_2b: no rows for userid='$userid' AS cardnumber\n"; + } + } + } + if ($sth->rows) { + ($borrowernumber, $firstname, $surname, $userflags, + $branchcode, $branchname, $branchprinter, $emailaddress) = $sth->fetchrow; + $debug and print STDERR "AUTH_3 results: " . + "$cardnumber,$borrowernumber,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress\n"; + } else { + print STDERR "AUTH_3: no results for userid='$userid', cardnumber='$cardnumber'.\n"; + } # launch a sequence to check if we have a ip for the branch, i # if we have one we replace the branchcode of the userenv by the branch bound in the ip. - my $ip = $ENV{'REMOTE_ADDR'}; - # if they specify at login, use that - if ($query->param('branch')) { - $branchcode = $query->param('branch'); - $branchname = GetBranchName($branchcode); - } - my $branches = GetBranches(); - if (C4::Context->boolean_preference('IndependantBranches') && C4::Context->boolean_preference('Autolocation')){ - # we have to check they are coming from the right ip range - my $domain = $branches->{$branchcode}->{'branchip'}; - if ($ip !~ /^$domain/){ - $loggedin=0; - $info{'wrongip'} = 1; - } - } - - my @branchesloop; - foreach my $br ( keys %$branches ) { - # now we work with the treatment of ip - my $domain = $branches->{$br}->{'branchip'}; - if ( $domain && $ip =~ /^$domain/ ) { - $branchcode = $branches->{$br}->{'branchcode'}; - - # new op dev : add the branchprinter and branchname in the cookie - $branchprinter = $branches->{$br}->{'branchprinter'}; - $branchname = $branches->{$br}->{'branchname'}; - } - } - $session->param('number',$borrowernumber); - $session->param('id',$userid); - $session->param('cardnumber',$cardnumber); - $session->param('firstname',$firstname); - $session->param('surname',$surname); - $session->param('branch',$branchcode); - $session->param('branchname',$branchname); - $session->param('flags',$userflags); - $session->param('emailaddress',$emailaddress); - $session->param('ip',$session->remote_addr()); - $session->param('lasttime',time()); - $debug and printf STDERR "AUTH_4: (%s)\t%s %s - %s\n", map {$session->param($_)} qw(cardnumber firstname surname branch) ; - } - elsif ( $return == 2 ) { - #We suppose the user is the superlibrarian - $borrowernumber = 0; - $session->param('number',0); - $session->param('id',C4::Context->config('user')); - $session->param('cardnumber',C4::Context->config('user')); - $session->param('firstname',C4::Context->config('user')); - $session->param('surname',C4::Context->config('user')); - $session->param('branch','NO_LIBRARY_SET'); - $session->param('branchname','NO_LIBRARY_SET'); - $session->param('flags',1); - $session->param('emailaddress', C4::Context->preference('KohaAdminEmailAddress')); - $session->param('ip',$session->remote_addr()); - $session->param('lasttime',time()); - } - C4::Context::set_userenv( - $session->param('number'), $session->param('id'), - $session->param('cardnumber'), $session->param('firstname'), - $session->param('surname'), $session->param('branch'), - $session->param('branchname'), $session->param('flags'), - $session->param('emailaddress'), $session->param('branchprinter') - ); - - # Grab borrower's shelves and public shelves and add them to the session - # $row_count determines how many records are returned from the db query - # and the number of lists to be displayed of each type in the 'Lists' button drop down - my $row_count = 10; # FIXME:This probably should be a syspref - my ($total, $totshelves, $barshelves, $pubshelves); - ($barshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(1, $row_count, $borrowernumber); - $total->{'bartotal'} = $totshelves; - ($pubshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(2, $row_count, undef); - $total->{'pubtotal'} = $totshelves; - $session->param('barshelves', $barshelves); - $session->param('pubshelves', $pubshelves); - $session->param('totshelves', $total); - - C4::Context::set_shelves_userenv('bar',$barshelves); - C4::Context::set_shelves_userenv('pub',$pubshelves); - C4::Context::set_shelves_userenv('tot',$total); - } + my $ip = $ENV{'REMOTE_ADDR'}; + # if they specify at login, use that + if ($query->param('branch')) { + $branchcode = $query->param('branch'); + $branchname = GetBranchName($branchcode); + } + my $branches = GetBranches(); + if (C4::Context->boolean_preference('IndependantBranches') && C4::Context->boolean_preference('Autolocation')){ + # we have to check they are coming from the right ip range + my $domain = $branches->{$branchcode}->{'branchip'}; + if ($ip !~ /^$domain/){ + $loggedin=0; + $info{'wrongip'} = 1; + } + } + + my @branchesloop; + foreach my $br ( keys %$branches ) { + # now we work with the treatment of ip + my $domain = $branches->{$br}->{'branchip'}; + if ( $domain && $ip =~ /^$domain/ ) { + $branchcode = $branches->{$br}->{'branchcode'}; + + # new op dev : add the branchprinter and branchname in the cookie + $branchprinter = $branches->{$br}->{'branchprinter'}; + $branchname = $branches->{$br}->{'branchname'}; + } + } + $session->param('number',$borrowernumber); + $session->param('id',$userid); + $session->param('cardnumber',$cardnumber); + $session->param('firstname',$firstname); + $session->param('surname',$surname); + $session->param('branch',$branchcode); + $session->param('branchname',$branchname); + $session->param('flags',$userflags); + $session->param('emailaddress',$emailaddress); + $session->param('ip',$session->remote_addr()); + $session->param('lasttime',time()); + $debug and printf STDERR "AUTH_4: (%s)\t%s %s - %s\n", map {$session->param($_)} qw(cardnumber firstname surname branch) ; + } + elsif ( $return == 2 ) { + #We suppose the user is the superlibrarian + $borrowernumber = 0; + $session->param('number',0); + $session->param('id',C4::Context->config('user')); + $session->param('cardnumber',C4::Context->config('user')); + $session->param('firstname',C4::Context->config('user')); + $session->param('surname',C4::Context->config('user')); + $session->param('branch','NO_LIBRARY_SET'); + $session->param('branchname','NO_LIBRARY_SET'); + $session->param('flags',1); + $session->param('emailaddress', C4::Context->preference('KohaAdminEmailAddress')); + $session->param('ip',$session->remote_addr()); + $session->param('lasttime',time()); + } + C4::Context::set_userenv( + $session->param('number'), $session->param('id'), + $session->param('cardnumber'), $session->param('firstname'), + $session->param('surname'), $session->param('branch'), + $session->param('branchname'), $session->param('flags'), + $session->param('emailaddress'), $session->param('branchprinter') + ); + + # Grab borrower's shelves and public shelves and add them to the session + # $row_count determines how many records are returned from the db query + # and the number of lists to be displayed of each type in the 'Lists' button drop down + my $row_count = 10; # FIXME:This probably should be a syspref + my ($total, $totshelves, $barshelves, $pubshelves); + ($barshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(1, $row_count, $borrowernumber); + $total->{'bartotal'} = $totshelves; + ($pubshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(2, $row_count, undef); + $total->{'pubtotal'} = $totshelves; + $session->param('barshelves', $barshelves); + $session->param('pubshelves', $pubshelves); + $session->param('totshelves', $total); + + C4::Context::set_shelves_userenv('bar',$barshelves); + C4::Context::set_shelves_userenv('pub',$pubshelves); + C4::Context::set_shelves_userenv('tot',$total); + } else { if ($userid) { $info{'invalid_username_or_password'} = 1; diff --git a/C4/Members.pm b/C4/Members.pm index 1730d6c..f7bb9f2 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -92,6 +92,7 @@ BEGIN { &DeleteMessage &GetMessages &GetMessagesCount + GetBorrowersWithEmail ); #Modify data @@ -2283,6 +2284,34 @@ sub DeleteMessage { } +=head2 GetBorrowersWithEmail + + ([$borrnum,$userid], ...) = GetBorrowersWithEmail('me at example.com'); + +This gets a list of users and their basic details from their email address. +As it's possible for multiple user to have the same email address, it provides +you with all of them. If there is no userid for the user, there will be an +C there. An empty list will be returned if there are no matches. + +=cut + +sub GetBorrowersWithEmail { + my $email = shift; + + my $dbh = C4::Context->dbh; + + my $query = "SELECT borrowernumber, userid FROM borrowers WHERE email=?"; + my $sth=$dbh->prepare($query); + $sth->execute($email); + my @result = (); + while (my $ref = $sth->fetch) { + push @result, $ref; + } + die "Failure searching for borrowers by email address: $sth->errstr" if $sth->err; + return @result; +} + + END { } # module clean-up code here (global destructor) 1; diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl index 71b13d6..f8051ba 100755 --- a/acqui/finishreceive.pl +++ b/acqui/finishreceive.pl @@ -34,7 +34,9 @@ use List::MoreUtils qw/any/; my $input=new CGI; my $flagsrequired = {acquisition => 'order_receive'}; -my ($loggedinuser, $cookie, $sessionID) = checkauth($input, 0, $flagsrequired, 'intranet'); + +checkauth($input, 0, $flagsrequired, 'intranet'); + my $user=$input->remote_user; my $biblionumber = $input->param('biblionumber'); my $biblioitemnumber=$input->param('biblioitemnumber'); diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl index 379c12c..21e3c01 100755 --- a/catalogue/updateitem.pl +++ b/catalogue/updateitem.pl @@ -30,7 +30,7 @@ use C4::Reserves; my $cgi= new CGI; -my ($loggedinuser, $cookie, $sessionID) = checkauth($cgi, 0, {circulate => 'circulate_remaining_permissions'}, 'intranet'); +checkauth($cgi, 0, {circulate => 'circulate_remaining_permissions'}, 'intranet'); my $biblionumber=$cgi->param('biblionumber'); my $itemnumber=$cgi->param('itemnumber'); @@ -56,7 +56,7 @@ for ($damaged,$itemlost,$wthdrawn) { # modify MARC item if input differs from items table. my $item_changes = {}; if (defined $itemnotes) { # i.e., itemnotes parameter passed from form - my ($loggedinuser, $cookie, $sessionID) = checkauth($cgi, 0, {editcatalogue => 'edit_items'}, 'intranet'); + checkauth($cgi, 0, {editcatalogue => 'edit_items'}, 'intranet'); if ((not defined $item_data_hashref->{'itemnotes'}) or $itemnotes ne $item_data_hashref->{'itemnotes'}) { $item_changes->{'itemnotes'} = $itemnotes; } diff --git a/etc/koha-httpd.conf b/etc/koha-httpd.conf index bf8cdc7..c2a9173 100644 --- a/etc/koha-httpd.conf +++ b/etc/koha-httpd.conf @@ -18,6 +18,14 @@ SetEnv KOHA_CONF "__KOHA_CONF_DIR__/koha-conf.xml" SetEnv PERL5LIB "__PERL_MODULE_DIR__" +# If your Apache is configured to use SSL, activating these will allow you +# to use client-side certificates to authenticate users. See the 'AllowPKIAuth' +# system preference. +# SSLVerifyClient require +# SSLVerifyDepth 2 +# SSLCACertificateFile /etc/apache2/ssl/test/ca.crt +# SSLOptions +StdEnvVars + mod_gzip_on yes mod_gzip_dechunk yes @@ -115,6 +123,14 @@ ErrorDocument 404 /cgi-bin/koha/errors/404.pl ErrorDocument 500 /cgi-bin/koha/errors/500.pl +# If your Apache is configured to use SSL, activating these will allow you +# to use client-side certificates to authenticate users. See the 'AllowPKIAuth' +# system preference. +# SSLVerifyClient require +# SSLVerifyDepth 2 +# SSLCACertificateFile /etc/apache2/ssl/test/ca.crt +# SSLOptions +StdEnvVars + mod_gzip_on yes mod_gzip_dechunk yes diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 7905d3f..93ef03a 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -327,4 +327,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo'); - +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowPKIAuth','None','Use the field from a client-side SSL certificate to look a user in the Koha database','None|Common Name|emailAddress','Choice'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e3309a2..1a2dd0a 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4523,6 +4523,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "XXXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do(qq{ + INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AllowPKIAuth',0,'This allows the user to authenticate via client side certificates',NULL,'YesNo'); + }); + print "Upgrade to $DBversion done (Bug 6296 New System preference AllowPKIAuth)\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref index f026c7e..04a3f44 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref @@ -94,4 +94,13 @@ Administration: - of CAS when logging out of Koha. - - The CAS Authentication Server can be found at - - pref: casServerUrl + - pref: casServerUrl + - + - Use + - pref: AllowPKIAuth + default: None + choices: + None: "no" + Common Name: the Common Name (checked against userid) + emailAddress: the emailAddress + - field for SSL client certificate authentication diff --git a/members/setstatus.pl b/members/setstatus.pl index addeeb3..88825b6 100755 --- a/members/setstatus.pl +++ b/members/setstatus.pl @@ -36,7 +36,7 @@ my $input = new CGI; my $flagsrequired; $flagsrequired->{borrowers}=1; -my ($loggedinuser, $cookie, $sessionID) = checkauth($input, 0, $flagsrequired); +checkauth($input, 0, $flagsrequired); my $destination = $input->param("destination") || ''; my $cardnumber = $input->param("cardnumber"); diff --git a/reserve/placerequest.pl b/reserve/placerequest.pl index f3e79b3..3fe459c 100755 --- a/reserve/placerequest.pl +++ b/reserve/placerequest.pl @@ -35,7 +35,7 @@ use C4::Auth qw/checkauth/; my $input = CGI->new(); -my ($user, $cookie, $sesion_id, $flags) = checkauth($input, 0, { reserveforothers => 'place_holds' }, 'intranet'); +checkauth($input, 0, { reserveforothers => 'place_holds' }, 'intranet'); my @bibitems=$input->param('biblioitem'); # FIXME I think reqbib does not exist anymore, it's used in line 82, to AddReserve of contraint type 'o' diff --git a/serials/reorder_members.pl b/serials/reorder_members.pl index 28175fb..8b64fc7 100755 --- a/serials/reorder_members.pl +++ b/serials/reorder_members.pl @@ -29,8 +29,7 @@ my $subscriptionid = $query->param('subscriptionid'); my $routingid = $query->param('routingid'); my $rank = $query->param('rank'); -my ( $user, $cookie, $sesion_id, $flags ) = - checkauth( $query, 0, { serials => 1 }, 'intranet' ); +checkauth( $query, 0, { serials => 1 }, 'intranet' ); reorder_members( $subscriptionid, $routingid, $rank ); diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl index 7386820..ebb47ad 100755 --- a/serials/subscription-detail.pl +++ b/serials/subscription-detail.pl @@ -94,8 +94,7 @@ if ($op eq 'del') { } my $hasRouting = check_routing($subscriptionid); -my ($user, $sessionID, $flags); -($user, $cookie, $sessionID, $flags) +(undef, $cookie, undef, undef) = checkauth($query, 0, {catalogue => 1}, "intranet"); # COMMENT hdl : IMHO, we should think about passing more and more data hash to template->param rather than duplicating code a new coding Guideline ? -- 1.7.5.4 From M.de.Rooy at rijksmuseum.nl Wed Oct 19 14:05:51 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Wed, 19 Oct 2011 12:05:51 +0000 Subject: [Koha-patches] [PATCH] [REBASED] 6094 Fixing ModAuthority problems (db revision) Message-ID: <809BE39CD64BFD4EB9036172EBCCFA31354443@S-MAIL-1B.rijksmuseum.intra> Only contains db revision to insert new table need_merge_authorities. You can apply the revision by running cgi-bin/koha/installer/install.pl?step=3&op=updatestructure. (Will not change your version while testing.) --- installer/data/mysql/kohastructure.sql | 11 +++++++++++ installer/data/mysql/updatedatabase.pl | 6 ++++++ 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index c119ca1..e4388a4 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1311,6 +1311,17 @@ CREATE TABLE `matchchecks` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- +-- Table structure for table `need_merge_authorities` +-- + +DROP TABLE IF EXISTS `need_merge_authorities`; +CREATE TABLE `need_merge_authorities` ( + `id` int NOT NULL auto_increment PRIMARY KEY, + `authid` bigint NOT NULL, + `done` tinyint DEFAULT 0 +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- -- Table structure for table `notifys` -- diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e3309a2..1f37c18 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4523,6 +4523,12 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; #RM: Please remove 1 from if and uncomment SetVersion too!! +if (1||C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("CREATE TABLE need_merge_authorities (id int NOT NULL auto_increment PRIMARY KEY, authid bigint NOT NULL, done tinyint DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=utf8"); + print "Upgrade to $DBversion done (6094: Fixing ModAuthority problems)\n"; + #SetVersion($DBversion); +} =head1 FUNCTIONS -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Wed Oct 19 16:57:41 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Wed, 19 Oct 2011 14:57:41 +0000 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6957, authors disappearing when emailing lists Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3135A825@S-MAIL-1B.rijksmuseum.intra> From: Owen Leonard Standard author information wasn't even in the template markup, only "additional author." Added standard author and improved output of additional authors (hiding label when empty). Also added subtitle via GetRecordValue (see bug 3550). Also added check for and output of OPACBaseURL in order to make OPAC links in the email clickable. Signed-off-by: Marcel de Rooy --- .../prog/en/modules/virtualshelves/sendshelf.tt | 12 +++++++----- .../opac-tmpl/prog/en/modules/opac-sendshelf.tt | 11 +++++++---- opac/opac-sendshelf.pl | 10 ++++++++-- virtualshelves/sendshelf.pl | 10 ++++++++-- 4 files changed, 30 insertions(+), 13 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt index 686d278..52f36c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt @@ -17,9 +17,11 @@ Reference Manager or ProCite. [% IF ( comment ) %] [% comment %] [% END %] -[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %][% BIBLIO_RESULT.title %][% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %][% IF ( BIBLIO_RESULT.MARCAUTHORS ) %] -Author(s): [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %][% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %][% MARCAUTHOR_SUBFIELDS_LOO.value %][% END %][% UNLESS ( loop.last ) %]; [% ELSE %] -[% END %][% END %][% END %][% IF ( BIBLIO_RESULT.ISBN ) %] +[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %][% BIBLIO_RESULT.title %][% IF ( BIBLIO_RESULT.subtitle.size ) %] [% FOREACH subtitle IN BIBLIO_RESULT.subtitle %][% subtitle.subfield %][% END %][% END %][% IF ( BIBLIO_RESULT.author ) %] + +by [% BIBLIO_RESULT.author %][% END %] +[% IF ( BIBLIO_RESULT.MARCAUTHORS.size ) %] +Additional author(s): [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %][% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %] [% MARCAUTHOR_SUBFIELDS_LOO.value %][% END %][% UNLESS ( loop.last ) %];[% END %][% END %][% END %][% IF ( BIBLIO_RESULT.ISBN ) %] ISBN: [% BIBLIO_RESULT.ISBN %][% END %] [% IF ( BIBLIO_RESULT.publishercode ) %]Published by: [% BIBLIO_RESULT.publishercode %][% END %][% IF ( BIBLIO_RESULT.publicationyear ) %] in [% END %][% BIBLIO_RESULT.publicationyear %][% IF ( BIBLIO_RESULT.pages ) %], [% END %][% BIBLIO_RESULT.pages %][% IF ( BIBLIO_RESULT.size ) %], [% END %][% BIBLIO_RESULT.size %][% IF ( BIBLIO_RESULT.collection ) %] Collection: [% BIBLIO_RESULT.seriestitle %][% END %][% IF ( BIBLIO_RESULT.subject ) %] @@ -31,9 +33,9 @@ Serial: [% BIBLIO_RESULT.serial %][% END %][% IF ( BIBLIO_RESULT.dewey ) %] Dewey: [% BIBLIO_RESULT.dewey %][% END %][% IF ( BIBLIO_RESULT.classification ) %] Classification: [% BIBLIO_RESULT.classification %][% END %][% IF ( BIBLIO_RESULT.lccn ) %] LCCN: [% BIBLIO_RESULT.lccn %][% END %][% IF ( BIBLIO_RESULT.url ) %] -url : [% BIBLIO_RESULT.url %][% END %] +url : [% BIBLIO_RESULT.url %][% END %][% IF ( OPACBaseurl ) %] In the online catalog: -[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %] + http://[% OPACBaseurl %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %][% END %] Items : [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %] [% ITEM_RESULT.branchname %] [% ITEM_RESULT.location %] [% IF ( ITEM_RESULT.itemcallnumber ) %]([% ITEM_RESULT.itemcallnumber %])[% END %] [% ITEM_RESULT.barcode %][% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tt index 74317df..b329cd4 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tt @@ -17,8 +17,11 @@ Reference Manager or ProCite. [% IF ( comment ) %] [% comment %] [% END %] -[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %][% BIBLIO_RESULT.title %][% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %][% IF ( BIBLIO_RESULT.MARCAUTHORS ) %] -Author(s): [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %][% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %][% MARCAUTHOR_SUBFIELDS_LOO.value %][% END %][% UNLESS ( loop.last ) %]; [% ELSE %] +[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %][% BIBLIO_RESULT.title %][% IF ( BIBLIO_RESULT.subtitle.size ) %] [% FOREACH subtitle IN BIBLIO_RESULT.subtitle %][% subtitle.subfield %][% END %][% END %][% IF ( BIBLIO_RESULT.author ) %] + +by [% BIBLIO_RESULT.author %][% END %] +[% IF ( BIBLIO_RESULT.MARCAUTHORS.size ) %] +Additional author(s): [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %][% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %] [% MARCAUTHOR_SUBFIELDS_LOO.value %][% END %][% UNLESS ( loop.last ) %]; [% ELSE %] [% END %][% END %][% END %][% IF ( BIBLIO_RESULT.ISBN ) %] ISBN: [% BIBLIO_RESULT.ISBN %][% END %] [% IF ( BIBLIO_RESULT.publishercode ) %]Published by: [% BIBLIO_RESULT.publishercode %][% END %][% IF ( BIBLIO_RESULT.publicationyear ) %] in [% END %][% BIBLIO_RESULT.publicationyear %][% IF ( BIBLIO_RESULT.pages ) %], [% END %][% BIBLIO_RESULT.pages %][% IF ( BIBLIO_RESULT.size ) %], [% END %][% BIBLIO_RESULT.size %][% IF ( BIBLIO_RESULT.collection ) %] @@ -31,9 +34,9 @@ Serial: [% BIBLIO_RESULT.serial %][% END %][% IF ( BIBLIO_RESULT.dewey ) %] Dewey: [% BIBLIO_RESULT.dewey %][% END %][% IF ( BIBLIO_RESULT.classification ) %] Classification: [% BIBLIO_RESULT.classification %][% END %][% IF ( BIBLIO_RESULT.lccn ) %] LCCN: [% BIBLIO_RESULT.lccn %][% END %][% IF ( BIBLIO_RESULT.url ) %] -url : [% BIBLIO_RESULT.url %][% END %] +url : [% BIBLIO_RESULT.url %][% END %][% IF ( OPACBaseurl ) %] In the online catalog: -[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %] + http://[% OPACBaseurl %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %][% END %] Items : [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %] [% ITEM_RESULT.branchname %] [% ITEM_RESULT.location %] [% IF ( ITEM_RESULT.itemcallnumber ) %]([% ITEM_RESULT.itemcallnumber %])[% END %] [% ITEM_RESULT.barcode %][% END %] diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl index b571e07..55abd14 100755 --- a/opac/opac-sendshelf.pl +++ b/opac/opac-sendshelf.pl @@ -81,12 +81,13 @@ if ( $email ) { # retrieve biblios from shelf foreach my $biblio (@$items) { my $biblionumber = $biblio->{biblionumber}; - + my $fw = GetFrameworkCode($biblionumber); my $dat = GetBiblioData($biblionumber); my $record = GetMarcBiblio($biblionumber); my $marcnotesarray = GetMarcNotes( $record, $marcflavour ); my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); + my $subtitle = GetRecordValue('subtitle', $record, $fw); my @items = GetItemsInfo( $biblionumber ); @@ -95,13 +96,18 @@ if ( $email ) { $dat->{MARCAUTHORS} = $marcauthorsarray; $dat->{'biblionumber'} = $biblionumber; $dat->{ITEM_RESULTS} = \@items; + $dat->{subtitle} = $subtitle; $iso2709 .= $record->as_usmarc(); push( @results, $dat ); } - my $user = GetMember(borrowernumber => $borrowernumber); + my $user = GetMember(borrowernumber => $borrowernumber); + + if (C4::Context->preference('OPACBaseURL')){ + $template2->param( OPACBaseurl => C4::Context->preference('OPACBaseURL') ); + } $template2->param( BIBLIO_RESULTS => \@results, diff --git a/virtualshelves/sendshelf.pl b/virtualshelves/sendshelf.pl index 16ada89..37ec545 100755 --- a/virtualshelves/sendshelf.pl +++ b/virtualshelves/sendshelf.pl @@ -77,13 +77,14 @@ if ( $email ) { # retrieve biblios from shelf foreach my $biblio (@$items) { - my $biblionumber = $biblio->{biblionumber}; - + my $biblionumber = $biblio->{biblionumber}; + my $fw = GetFrameworkCode($biblionumber); my $dat = GetBiblioData($biblionumber); my $record = GetMarcBiblio($biblionumber); my $marcnotesarray = GetMarcNotes( $record, $marcflavour ); my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); + my $subtitle = GetRecordValue('subtitle', $record, $fw); my @items = GetItemsInfo( $biblionumber ); @@ -92,12 +93,17 @@ if ( $email ) { $dat->{MARCAUTHORS} = $marcauthorsarray; $dat->{'biblionumber'} = $biblionumber; $dat->{ITEM_RESULTS} = \@items; + $dat->{subtitle} = $subtitle; $iso2709 .= $record->as_usmarc(); push( @results, $dat ); } + if (C4::Context->preference('OPACBaseURL')){ + $template2->param( OPACBaseurl => C4::Context->preference('OPACBaseURL') ); + } + $template2->param( BIBLIO_RESULTS => \@results, email_sender => $email_from, -- 1.6.0.6 From Katrin.Fischer.83 at web.de Wed Oct 19 20:31:40 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Wed, 19 Oct 2011 20:31:40 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6980, Patron attributes are shown when ExtendedPatronAttributes is disabled Message-ID: <1319049100-4458-1-git-send-email-Katrin.Fischer.83@web.de> From: Owen Leonard This patch adds a check for the value of the ExtendedPatronAttributes preference to the scripts and corresponding logic to the templates controlling the sidebar menu. The patch also corrects a duplication of attributes code in moremember.pl Signed-off-by: Katrin Fischer 1) Added extended patron attributes in configuration, turned ExtendedPatronAttributes on 2) Altered patron details, added values for patron attributes > Verified patron attributes show show correctly 3) Turned off ExtendedPatronAttributes > Verified patron attributes were hidden everywhere --- circ/circulation.pl | 10 ++++++++-- .../intranet-tmpl/prog/en/includes/circ-menu.inc | 4 ++-- .../intranet-tmpl/prog/en/includes/circ-menu.tt | 4 ++-- .../prog/en/modules/members/moremember.tt | 10 +++++----- members/boraccount.pl | 10 ++++++++-- members/mancredit.pl | 8 +++++++- members/maninvoice.pl | 9 +++++++-- members/member-flags.pl | 10 ++++++++-- members/member-password.pl | 10 ++++++++-- members/moremember.pl | 9 +++++---- members/notices.pl | 10 ++++++++-- members/pay.pl | 8 +++++++- members/readingrec.pl | 10 ++++++++-- 13 files changed, 83 insertions(+), 29 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index bbcccd5..efb87da 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -632,7 +632,14 @@ my $fast_cataloging = 0; if (defined getframeworkinfo('FA')) { $fast_cataloging = 1 } -my $attributes = GetBorrowerAttributes($borrowernumber); + +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( lib_messages_loop => $lib_messages_loop, @@ -682,7 +689,6 @@ $template->param( circview => 1, soundon => C4::Context->preference("SoundOn"), fast_cataloging => $fast_cataloging, - extendedattributes => $attributes, ); # save stickyduedate to session diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index a9fd453..67300d5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -48,13 +48,13 @@
      2. No email stored.
      3. [% END %] [% END %] - [% FOREACH extendedattribute IN extendedattributes %] + [% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN extendedattributes %] [% IF ( extendedattribute.display_checkout ) %] [% IF ( extendedattribute.value ) %]
      4. [% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]
      5. [% END %] [% END %] - [% END %] + [% END %][% END %]
      6. Category: [% categoryname %] ([% categorycode %])
      7. Home Library: [% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]
      diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt index 47c1290..fe04b63 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt @@ -50,13 +50,13 @@ in the global namespace %]
    2. No email stored.
    3. [% END %] [% END %] - [% FOREACH extendedattribute IN borrower.extendedattributes %] + [% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN borrower.extendedattributes %] [% IF ( extendedattribute.display_checkout ) %] [% IF ( extendedattribute.value ) %]
    4. [% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]
    5. [% END %] [% END %] - [% END %] + [% END %][% END %]
    6. Category: [% borrower.description %] ([% borrower.categorycode %])
    7. Home Library: [% IF ( borrower.branchname ) %][% borrower.branchname %][% ELSE %][% borrower.branch %][% END %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 3eb42f3..49a56cf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -285,12 +285,12 @@ function validate1(date) { Type Value - [% FOREACH patron_attribute IN patron_attributes %] + [% FOREACH extendedattribute IN extendedattributes %] - [% patron_attribute.code %] ([% patron_attribute.description %]) - [% patron_attribute.value %] - [% IF ( patron_attribute.value_description ) %] - ([% patron_attribute.value_description %]) + [% extendedattribute.code %] ([% extendedattribute.description %]) + [% extendedattribute.value %] + [% IF ( extendedattribute.value_description ) %] + ([% extendedattribute.value_description %]) [% END %] diff --git a/members/boraccount.pl b/members/boraccount.pl index b197b3f..e16405b 100755 --- a/members/boraccount.pl +++ b/members/boraccount.pl @@ -94,7 +94,14 @@ $template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); $template->param( picture => 1 ) if $picture; -my $attributes = GetBorrowerAttributes($borrowernumber); + +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( finesview => 1, @@ -120,7 +127,6 @@ $template->param( is_child => ($data->{'category_type'} eq 'C'), reverse_col => $reverse_col, accounts => $accts, - extendedattributes => $attributes, ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/mancredit.pl b/members/mancredit.pl index 801fcc2..3c664c2 100755 --- a/members/mancredit.pl +++ b/members/mancredit.pl @@ -78,7 +78,14 @@ if ($add){ $template->param( adultborrower => 1 ) if ( $data->{category_type} eq 'A' ); my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); $template->param( picture => 1 ) if $picture; + +if (C4::Context->preference('ExtendedPatronAttributes')) { my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( borrowernumber => $borrowernumber, @@ -99,7 +106,6 @@ if ($add){ branchcode => $data->{'branchcode'}, branchname => GetBranchName($data->{'branchcode'}), is_child => ($data->{'category_type'} eq 'C'), - extendedattributes => $attributes, ); output_html_with_http_headers $input, $cookie, $template->output; } diff --git a/members/maninvoice.pl b/members/maninvoice.pl index 9a040b6..1f42093 100755 --- a/members/maninvoice.pl +++ b/members/maninvoice.pl @@ -106,8 +106,14 @@ if ($add){ $template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); $template->param( picture => 1 ) if $picture; - my $attributes = GetBorrowerAttributes($borrowernumber); +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( borrowernumber => $borrowernumber, firstname => $data->{'firstname'}, @@ -127,7 +133,6 @@ if ($add){ branchcode => $data->{'branchcode'}, branchname => GetBranchName($data->{'branchcode'}), is_child => ($data->{'category_type'} eq 'C'), - extendedattributes => $attributes, ); output_html_with_http_headers $input, $cookie, $template->output; } diff --git a/members/member-flags.pl b/members/member-flags.pl index 00a3268..76f300e 100755 --- a/members/member-flags.pl +++ b/members/member-flags.pl @@ -162,7 +162,14 @@ if ($input->param('newflags')) { $template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' ); my ($picture, $dberror) = GetPatronImage($bor->{'cardnumber'}); $template->param( picture => 1 ) if $picture; -my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'}); + +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'}); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( borrowernumber => $bor->{'borrowernumber'}, @@ -184,7 +191,6 @@ $template->param( branchname => GetBranchName($bor->{'branchcode'}), loop => \@loop, is_child => ($bor->{'category_type'} eq 'C'), - extendedattributes => $attributes, ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/member-password.pl b/members/member-password.pl index 03f5243..25e9551 100755 --- a/members/member-password.pl +++ b/members/member-password.pl @@ -90,7 +90,14 @@ if ( $newpassword && ! $errormsg ) { $template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' ); my ($picture, $dberror) = GetPatronImage($bor->{'cardnumber'}); $template->param( picture => 1 ) if $picture; -my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'}); + +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'}); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( othernames => $bor->{'othernames'}, surname => $bor->{'surname'}, @@ -114,7 +121,6 @@ my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'}); destination => $destination, is_child => ($bor->{'category_type'} eq 'C'), defaultnewpassword => $defaultnewpassword, - extendedattributes => $attributes, ); diff --git a/members/moremember.pl b/members/moremember.pl index 7f47dd6..9115dd1 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -425,8 +425,11 @@ my $branch=C4::Context->userenv->{'branch'}; $template->param(%$data); if (C4::Context->preference('ExtendedPatronAttributes')) { - $template->param(ExtendedPatronAttributes => 1); - $template->param(patron_attributes => C4::Members::Attributes::GetBorrowerAttributes($borrowernumber)); + my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); my @types = C4::Members::AttributeTypes::GetAttributeTypes(); if (scalar(@types) == 0) { $template->param(no_patron_attribute_types => 1); @@ -439,7 +442,6 @@ if (C4::Context->preference('EnhancedMessagingPreferences')) { $template->param(SMSSendDriver => C4::Context->preference("SMSSendDriver")); $template->param(SMSnumber => defined $data->{'smsalertnumber'} ? $data->{'smsalertnumber'} : $data->{'mobile'}); } -my $attributes = GetBorrowerAttributes($borrowernumber); $template->param( detailview => 1, @@ -469,7 +471,6 @@ $template->param( "dateformat_" . (C4::Context->preference("dateformat") || '') => 1, samebranch => $samebranch, quickslip => $quickslip, - extendedattributes => $attributes, ); #Get the slip news items diff --git a/members/notices.pl b/members/notices.pl index a6e65c8..41f2a90 100755 --- a/members/notices.pl +++ b/members/notices.pl @@ -53,7 +53,14 @@ $template->param( picture => 1 ) if $picture; # Getting the messages my $queued_messages = C4::Letters::GetQueuedMessages({borrowernumber => $borrowernumber}); $template->param( %{$borrower} ); -my $attributes = GetBorrowerAttributes($borrowernumber); + +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( QUEUED_MESSAGES => $queued_messages, @@ -61,7 +68,6 @@ $template->param( sentnotices => 1, branchname => GetBranchName($borrower->{'branchcode'}), categoryname => $borrower->{'description'}, - extendedattributes => $attributes, ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/pay.pl b/members/pay.pl index 9389f82..6bc18fc 100755 --- a/members/pay.pl +++ b/members/pay.pl @@ -233,7 +233,13 @@ sub borrower_add_additional_fields { if ($picture) { $b_ref->{has_picture} = 1; } - $b_ref->{extendedattributes} = GetBorrowerAttributes($borrowernumber); + + if (C4::Context->preference('ExtendedPatronAttributes')) { + $b_ref->{extendedattributes} = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + ); + } $b_ref->{branchname} = GetBranchName( $b_ref->{branchcode} ); return; diff --git a/members/readingrec.pl b/members/readingrec.pl index 04414e3..8c0cd6f 100755 --- a/members/readingrec.pl +++ b/members/readingrec.pl @@ -96,7 +96,14 @@ if (! $limit){ my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); $template->param( picture => 1 ) if $picture; -my $attributes = GetBorrowerAttributes($borrowernumber); + +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( readingrecordview => 1, @@ -125,7 +132,6 @@ $template->param( branchname => GetBranchName($data->{'branchcode'}), showfulllink => (scalar @loop_reading > 50), loop_reading => \@loop_reading, - extendedattributes => $attributes, ); output_html_with_http_headers $input, $cookie, $template->output; -- 1.7.5.4 From Katrin.Fischer.83 at web.de Wed Oct 19 20:44:17 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Wed, 19 Oct 2011 20:44:17 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6553: parentheses in authors break tracings Message-ID: <1319049857-4836-1-git-send-email-Katrin.Fischer.83@web.de> From: Ian Walls If an author's name includes parentheses or other escape-characters, the tracing links produced in the OPAC and staff client fail in XSLT mode. This patch wraps the author names in double-quotes, providing the necessary escapement. Signed-off-by: Katrin Fischer Test plan: - Create a new framework, delete Thesaurus from 700 and other fields - Create a new record in this framework - Add 700$a - use parentheses - Check the search links in OPAC and staff detail pages > before patch link was broken, after it works Note: Links are only broken when no authorities are being used. When using authorities the link uses the auth number instead of the text for linking, so the parentheses don't matter for search. --- .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 2 +- .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index 93ae4b4..b0de609 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -847,7 +847,7 @@ /cgi-bin/koha/catalogue/search.pl?q=an: - /cgi-bin/koha/catalogue/search.pl?q=au: + /cgi-bin/koha/catalogue/search.pl?q=au:"" diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl index 2e4228f..e16db73 100755 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -137,7 +137,7 @@ /cgi-bin/koha/opac-search.pl?q=an: - /cgi-bin/koha/opac-search.pl?q=au: + /cgi-bin/koha/opac-search.pl?q=au:"" @@ -152,7 +152,7 @@ /cgi-bin/koha/opac-search.pl?q=an: - /cgi-bin/koha/opac-search.pl?q=au: + /cgi-bin/koha/opac-search.pl?q=au:"" @@ -174,7 +174,7 @@ /cgi-bin/koha/opac-search.pl?q=an: - /cgi-bin/koha/opac-search.pl?q=au: + /cgi-bin/koha/opac-search.pl?q=au:"" -- 1.7.5.4 From nengard at bywatersolutions.com Wed Oct 19 21:40:25 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 19 Oct 2011 15:40:25 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 7057: CheckReserves uses GetMemberDetails unnecessarily Message-ID: <1319053225-3352-1-git-send-email-nengard@bywatersolutions.com> From: Ian Walls Replaces call to GetMemberDetails with a call to GetMember. Much more efficient, and since only branchcode is used, no required data is lost. Signed-off-by: Nicole C. Engard --- C4/Reserves.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index f7a2e72..eff4e9f 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -828,7 +828,7 @@ sub CheckReserves { } else { # See if this item is more important than what we've got so far if ( $res->{'priority'} && $res->{'priority'} < $priority ) { - my $borrowerinfo=C4::Members::GetMemberDetails($res->{'borrowernumber'}); + my $borrowerinfo=C4::Members::GetMember(borrowernumber => $res->{'borrowernumber'}); my $iteminfo=C4::Items::GetItem($itemnumber); my $branch=C4::Circulation::_GetCircControlBranch($iteminfo,$borrowerinfo); my $branchitemrule = C4::Circulation::GetBranchItemRule($branch,$iteminfo->{'itype'}); -- 1.7.2.3 From nengard at bywatersolutions.com Wed Oct 19 21:43:48 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 19 Oct 2011 15:43:48 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 7059: Remove GetMemberDetails from reserve/request.pl Message-ID: <1319053428-3467-1-git-send-email-nengard@bywatersolutions.com> From: Ian Walls Replaces all four usages of GetMemberDetails with GetMember, since none of the hashref fields used were anything other than those in borrower table, which GetMember returns. To Test: 1. Apply patch 2. Go to reserve/request.pl; the page should load without error 3. Search for a cardnumber: the page should load without error Signed-off-by: Nicole C. Engard --- reserve/request.pl | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/reserve/request.pl b/reserve/request.pl index cfeea73..21183da 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -129,7 +129,7 @@ if ($findborrower) { # If we have the borrowernumber because we've performed an action, then we # don't want to try to place another reserve. if ($borrowernumber_hold && !$action) { - my $borrowerinfo = GetMemberDetails( $borrowernumber_hold ); + my $borrowerinfo = GetMember( borrowernumber => $borrowernumber_hold ); my $diffbranch; my @getreservloop; my $count_reserv = 0; @@ -217,8 +217,8 @@ if ($borrowerslist) { ); } -# FIXME launch another time GetMemberDetails perhaps until -my $borrowerinfo = GetMemberDetails( $borrowernumber_hold ); +# FIXME launch another time GetMember perhaps until +my $borrowerinfo = GetMember( borrowernumber => $borrowernumber_hold ); my @biblionumbers = (); my $biblionumbers = $input->param('biblionumbers'); @@ -373,7 +373,7 @@ foreach my $biblionumber (@biblionumbers) { # checking reserve my ($reservedate,$reservedfor,$expectedAt) = GetReservesFromItemnumber($itemnumber); - my $ItemBorrowerReserveInfo = GetMemberDetails( $reservedfor, 0); + my $ItemBorrowerReserveInfo = GetMember( borrowernumber => $reservedfor ); if ( defined $reservedate ) { $item->{backgroundcolor} = 'reserved'; @@ -542,7 +542,7 @@ foreach my $biblionumber (@biblionumbers) { } # get borrowers reserve info - my $reserveborrowerinfo = GetMemberDetails( $res->{'borrowernumber'}, 0); + my $reserveborrowerinfo = GetMember( borrowernumber => $res->{'borrowernumber'} ); if (C4::Context->preference('HidePatronName')){ $reserve{'hidename'} = 1; $reserve{'cardnumber'} = $reserveborrowerinfo->{'cardnumber'}; -- 1.7.2.3 From Katrin.Fischer.83 at web.de Wed Oct 19 21:47:04 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Wed, 19 Oct 2011 21:47:04 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Make all strings translatable in marc21_field_007.tt Message-ID: <1319053624-8129-1-git-send-email-Katrin.Fischer.83@web.de> From: Fr?d?rick Capovilla http://bugs.koha-community.org/show_bug.cgi?id=7033 Signed-off-by: Katrin Fischer Test plan: - apply patch - update po files using 'perl translate update - check po files for new strings from 007 plugin - translate some / all of them - update templates with changed po files 'perl translate install - verify 007 still works and got translated --- .../cataloguing/value_builder/marc21_field_007.tt | 7684 +++++++++++++++----- 1 files changed, 5763 insertions(+), 1921 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt index 3c7d656..88a1bec 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt @@ -124,299 +124,513 @@ function RedrawChoices(typ){ case "a": divOutput.innerHTML=' \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -426,433 +640,741 @@ function RedrawChoices(typ){ case "c": divOutput.innerHTML='
    00 Category of materiala- Map' + + _("00 Category of material") + + '' + + _("a- Map") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -862,175 +1384,297 @@ function RedrawChoices(typ){ case "d": divOutput.innerHTML='
    00 Category of materialc- Electronic Resource' + + _("00 Category of material") + + '' + + _("c- Electronic Resource") + + '
    \ \
    \ \
    \ \
    \ \
    \ \

    (if exact bit depth known, enter;
    otherwise use pulldown)

    (if exact bit depth known, enter;
    otherwise use pulldown)
    - \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -1040,535 +1684,933 @@ function RedrawChoices(typ){ case "f": divOutput.innerHTML='
    00 Category of materiald- Globe' + + _("00 Category of material") + + '' + + _("d- Globe") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ - \ + \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -1578,437 +2620,757 @@ function RedrawChoices(typ){ case "g": divOutput.innerHTML='
    00 Category of materialf- Tactile Material' + + _("00 Category of material") + + '' + + _("f- Tactile Material") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -2018,413 +3380,709 @@ function RedrawChoices(typ){ case "h": divOutput.innerHTML='
    00 Category of materialg- Projected graphic' + + _("00 Category of material") + + '' + + _("g- Projected graphic") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -2434,340 +4092,594 @@ function RedrawChoices(typ){ case "k": divOutput.innerHTML='
    00 Category of materialh- Microform' + + _("00 Category of material") + + '' + + _("h- Microform") + + '
    \ \
    \ \
    \ \
    \ \
    \ \

    (three digits, pad with zero as needed,
    or ||| for no attempt to code)

    (three digits, pad with zero as needed,
    or ||| for no attempt to code)
    - 001-999 \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -2777,836 +4689,1446 @@ function RedrawChoices(typ){ case "m": divOutput.innerHTML='
    00 Category of materialk- Nonprojected graphic' + + _("00 Category of material") + + '' + + _("k- Nonprojected graphic") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ - \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ @@ -3615,22 +6137,36 @@ function RedrawChoices(typ){ case "o": divOutput.innerHTML='
    00 Category of materialm- Motion Picture' + + _("00 Category of material") + + '' + + _("m- Motion Picture") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \

    (YYYYMM; use up to 6 - for unknown
    or | for no attempt to code)

    (YYYYMM; use up to 6 - for unknown
    or | for no attempt to code)
    - Date \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ @@ -3640,22 +6176,36 @@ function RedrawChoices(typ){ case "q": divOutput.innerHTML='
    00 Category of materialo- Kit' + + _("00 Category of material") + + '' + + _("o- Kit") + + '
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ @@ -3665,553 +6215,963 @@ function RedrawChoices(typ){ case "r": divOutput.innerHTML='
    00 Category of materialq- Notated music' + + _("00 Category of material") + + '' + + _("q- Notated music") + + '
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -4221,711 +7181,1233 @@ function RedrawChoices(typ){ case "s": divOutput.innerHTML='
    00 Category of materialr- Remote-sensing image' + + _("00 Category of material") + + '' + + _("r- Remote-sensing image") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -4935,47 +8417,81 @@ function RedrawChoices(typ){ case "t": divOutput.innerHTML='
    00 Category of materials- Sound recording' + + _("00 Category of material") + + '' + + _("s- Sound recording") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ @@ -4985,416 +8501,720 @@ function RedrawChoices(typ){ case "v": divOutput.innerHTML='
    00 Category of materialt- Text' + + _("00 Category of material") + + '' + + _("t- Text") + + '
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -5404,32 +9224,54 @@ function RedrawChoices(typ){ case "z": divOutput.innerHTML='
    00 Category of materialv- Videorecording' + + _("00 Category of material") + + '' + + _("v- Videorecording") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ -- 1.7.5.4 From nengard at bywatersolutions.com Wed Oct 19 21:46:36 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 19 Oct 2011 15:46:36 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 7060: GetMemberDetails unnecessary in C4::Circulation Message-ID: <1319053596-3603-1-git-send-email-nengard@bywatersolutions.com> From: Ian Walls Replaces all instances of GetMemberDetails with the more efficient GetMember. Since no hash values other than the borrowers table's fields are used in this module, the transition is safe. To test: 1. Checkout a material; the page should load without error 2. Renew a material: the page should load without error 3. Return a material: the page should load without error The above test plan invokes all the subroutines affected by this patch; any call to an undefined value in a hashref should give a warning Signed-off-by: Nicole C. Engard --- C4/Circulation.pm | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index be62584..c43385a 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -578,7 +578,7 @@ C<$issuingimpossible> and C<$needsconfirmation> are some hashref. =over 4 -=item C<$borrower> hash with borrower informations (from GetMemberDetails) +=item C<$borrower> hash with borrower informations (from GetMember or GetMemberDetails) =item C<$barcode> is the bar code of the book being issued. @@ -858,7 +858,7 @@ sub CanBookBeIssued { elsif ($issue->{borrowernumber}) { # issued to someone else - my $currborinfo = C4::Members::GetMemberDetails( $issue->{borrowernumber} ); + my $currborinfo = C4::Members::GetMember( borrowernumber => $issue->{borrowernumber} ); # warn "=>.$currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})"; $needsconfirmation{ISSUED_TO_ANOTHER} = 1; @@ -872,7 +872,7 @@ sub CanBookBeIssued { my ( $restype, $res ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); if ($restype) { my $resbor = $res->{'borrowernumber'}; - my ( $resborrower ) = C4::Members::GetMemberDetails( $resbor, 0 ); + my ( $resborrower ) = C4::Members::GetMember( borrowernumber => $resbor ); my $branches = GetBranches(); my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'}; if ( $resbor ne $borrower->{'borrowernumber'} && $restype eq "Waiting" ) @@ -909,7 +909,7 @@ Issue a book. Does no check, they are done in CanBookBeIssued. If we reach this =over 4 -=item C<$borrower> is a hash with borrower informations (from GetMemberDetails). +=item C<$borrower> is a hash with borrower informations (from GetMember or GetMemberDetails). =item C<$barcode> is the barcode of the item being issued. @@ -1525,7 +1525,7 @@ sub AddReturn { my $issue = GetItemIssue($itemnumber); # warn Dumper($iteminformation); if ($issue and $issue->{borrowernumber}) { - $borrower = C4::Members::GetMemberDetails($issue->{borrowernumber}) + $borrower = C4::Members::GetMember( borrowernumber => $issue->{borrowernumber}) or die "Data inconsistency: barcode $barcode (itemnumber:$itemnumber) claims to be issued to non-existant borrowernumber '$issue->{borrowernumber}'\n" . Dumper($issue) . "\n"; } else { @@ -2261,7 +2261,7 @@ sub AddRenewal { # based on the value of the RenewalPeriodBase syspref. unless ($datedue) { - my $borrower = C4::Members::GetMemberDetails( $borrowernumber, 0 ) or return undef; + my $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber ) or return undef; my $itemtype = (C4::Context->preference('item-level_itypes')) ? $biblio->{'itype'} : $biblio->{'itemtype'}; $datedue = (C4::Context->preference('RenewalPeriodBase') eq 'date_due') ? @@ -2315,7 +2315,7 @@ sub GetRenewCount { my $renewsallowed = 0; my $renewsleft = 0; - my $borrower = C4::Members::GetMemberDetails($bornum); + my $borrower = C4::Members::GetMember( borrowernumber => $bornum); my $item = GetItem($itemno); # Look in the issues table for this item, lent to this borrower, -- 1.7.2.3 From nengard at bywatersolutions.com Wed Oct 19 21:54:09 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 19 Oct 2011 15:54:09 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 7061: unnecessary global variables declared in C4::SQLHelper Message-ID: <1319054049-3814-1-git-send-email-nengard@bywatersolutions.com> From: Ian Walls Removes $tablename and $hash from global scope of C4/SQLHelper.pm. They are never used; all instances of $table are locally scoped to the subroutines, and $hash is never used. This may help with persistance; if not, it's at least a bit of trivial cleanup. To test: 1. Search for a patron 2. Create a Contract in Acquisitions 3. Modify that Contract 4. Delete that Contract All instances should return error free. This checks the subroutines of SQLHelper Signed-off-by: Nicole C. Engard --- C4/SQLHelper.pm | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/C4/SQLHelper.pm b/C4/SQLHelper.pm index 720dc99..e5ca94e 100644 --- a/C4/SQLHelper.pm +++ b/C4/SQLHelper.pm @@ -43,9 +43,6 @@ BEGIN { ); } -my $tablename; -my $hash; - =head1 NAME C4::SQLHelper - Perl Module containing convenience functions for SQL Handling -- 1.7.2.3 From nengard at bywatersolutions.com Wed Oct 19 22:03:36 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 19 Oct 2011 16:03:36 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 7016: CanBookBeReserved uses GetItemsInfo unnecessarily Message-ID: <1319054616-3970-1-git-send-email-nengard@bywatersolutions.com> From: Ian Walls CanBookBeReserved uses the very heavy-weight function GetItemsInfo to simply retrieve the itemnumbers attached to a given biblio. The function get_itemnumbers_of() is much lighter-weight and returns the required information; switching to it will reduce the overall system resource cost of placing a hold. Signed-off-by: Nicole C. Engard --- C4/Reserves.pm | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index f7a2e72..f12c23f 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -383,17 +383,15 @@ sub GetReservesFromBorrowernumber { 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); - } + my @items = get_itemnumbers_of($biblionumber); + #get items linked via host records + my @hostitems = get_hostitemnumbers_of($biblionumber); + if (@hostitems){ + push (@items, at hostitems); + } foreach my $item (@items){ - return 1 if CanItemBeReserved($borrowernumber, $item->{itemnumber}); + return 1 if CanItemBeReserved($borrowernumber, $item); } return 0; } -- 1.7.2.3 From Katrin.Fischer.83 at web.de Wed Oct 19 22:20:50 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Wed, 19 Oct 2011 22:20:50 +0200 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] Make all strings translatable in marc21_field_007.tt Message-ID: <1319055651-10034-1-git-send-email-Katrin.Fischer.83@web.de> From: Fr?d?rick Capovilla http://bugs.koha-community.org/show_bug.cgi?id=7033 Signed-off-by: Katrin Fischer Test plan: - apply patch - update po files using 'perl translate update - check po files for new strings from 007 plugin - translate some / all of them - update templates with changed po files 'perl translate install - verify 007 still works and got translated --- .../cataloguing/value_builder/marc21_field_007.tt | 7684 +++++++++++++++----- 1 files changed, 5763 insertions(+), 1921 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt index 3c7d656..88a1bec 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt @@ -124,299 +124,513 @@ function RedrawChoices(typ){ case "a": divOutput.innerHTML='
    00 Category of materialz- Unspecified' + + _("00 Category of material") + + '' + + _("z- Unspecified") + + '
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -426,433 +640,741 @@ function RedrawChoices(typ){ case "c": divOutput.innerHTML='
    00 Category of materiala- Map' + + _("00 Category of material") + + '' + + _("a- Map") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -862,175 +1384,297 @@ function RedrawChoices(typ){ case "d": divOutput.innerHTML='
    00 Category of materialc- Electronic Resource' + + _("00 Category of material") + + '' + + _("c- Electronic Resource") + + '
    \ \
    \ \
    \ \
    \ \
    \ \

    (if exact bit depth known, enter;
    otherwise use pulldown)

    (if exact bit depth known, enter;
    otherwise use pulldown)
    - \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -1040,535 +1684,933 @@ function RedrawChoices(typ){ case "f": divOutput.innerHTML='
    00 Category of materiald- Globe' + + _("00 Category of material") + + '' + + _("d- Globe") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ - \ + \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -1578,437 +2620,757 @@ function RedrawChoices(typ){ case "g": divOutput.innerHTML='
    00 Category of materialf- Tactile Material' + + _("00 Category of material") + + '' + + _("f- Tactile Material") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -2018,413 +3380,709 @@ function RedrawChoices(typ){ case "h": divOutput.innerHTML='
    00 Category of materialg- Projected graphic' + + _("00 Category of material") + + '' + + _("g- Projected graphic") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -2434,340 +4092,594 @@ function RedrawChoices(typ){ case "k": divOutput.innerHTML='
    00 Category of materialh- Microform' + + _("00 Category of material") + + '' + + _("h- Microform") + + '
    \ \
    \ \
    \ \
    \ \
    \ \

    (three digits, pad with zero as needed,
    or ||| for no attempt to code)

    (three digits, pad with zero as needed,
    or ||| for no attempt to code)
    - 001-999 \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -2777,836 +4689,1446 @@ function RedrawChoices(typ){ case "m": divOutput.innerHTML='
    00 Category of materialk- Nonprojected graphic' + + _("00 Category of material") + + '' + + _("k- Nonprojected graphic") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ - \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ @@ -3615,22 +6137,36 @@ function RedrawChoices(typ){ case "o": divOutput.innerHTML='
    00 Category of materialm- Motion Picture' + + _("00 Category of material") + + '' + + _("m- Motion Picture") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \

    (YYYYMM; use up to 6 - for unknown
    or | for no attempt to code)

    (YYYYMM; use up to 6 - for unknown
    or | for no attempt to code)
    - Date \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ @@ -3640,22 +6176,36 @@ function RedrawChoices(typ){ case "q": divOutput.innerHTML='
    00 Category of materialo- Kit' + + _("00 Category of material") + + '' + + _("o- Kit") + + '
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ @@ -3665,553 +6215,963 @@ function RedrawChoices(typ){ case "r": divOutput.innerHTML='
    00 Category of materialq- Notated music' + + _("00 Category of material") + + '' + + _("q- Notated music") + + '
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -4221,711 +7181,1233 @@ function RedrawChoices(typ){ case "s": divOutput.innerHTML='
    00 Category of materialr- Remote-sensing image' + + _("00 Category of material") + + '' + + _("r- Remote-sensing image") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -4935,47 +8417,81 @@ function RedrawChoices(typ){ case "t": divOutput.innerHTML='
    00 Category of materials- Sound recording' + + _("00 Category of material") + + '' + + _("s- Sound recording") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ @@ -4985,416 +8501,720 @@ function RedrawChoices(typ){ case "v": divOutput.innerHTML='
    00 Category of materialt- Text' + + _("00 Category of material") + + '' + + _("t- Text") + + '
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ \ \ - \ + \ \ @@ -5404,32 +9224,54 @@ function RedrawChoices(typ){ case "z": divOutput.innerHTML='
    00 Category of materialv- Videorecording' + + _("00 Category of material") + + '' + + _("v- Videorecording") + + '
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \
    \ \ - \ - \ + \ + \ \ \ - \ + \ \ -- 1.7.5.4 From Katrin.Fischer.83 at web.de Wed Oct 19 22:24:14 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Wed, 19 Oct 2011 22:24:14 +0200 Subject: [Koha-patches] [PATCH 2/2] [SIGNED-OFF] Bug 7069: Put strings in "" instead of '' to fix the javascript not working when the translated string has a ' in it. Message-ID: <1319055854-10092-2-git-send-email-Katrin.Fischer.83@web.de> From: Maxime Pelletier http://bugs.koha-community.org/show_bug.cgi?id=7069 Signed-off-by: Katrin Fischer Patch changes '' to "" to make it work for strings which contain '. Patch does NOT add new strings to the po files. --- .../intranet-tmpl/prog/en/modules/tags/review.tt | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt index 5dfe91a..5d025af 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt @@ -51,22 +51,22 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; } // 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); }; 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() { -- 1.7.5.4 From serhijdubyk at gmail.com Wed Oct 19 23:43:18 2011 From: serhijdubyk at gmail.com (=?UTF-8?q?Serhij=20Dubyk=20=7B=D0=A1=D0=B5=D1=80=D0=B3=D1=96=D0=B9=20=D0=94=D1=83=D0=B1=D0=B8=D0=BA=7D?=) Date: Thu, 20 Oct 2011 00:43:18 +0300 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Zebra lang defs with charsets for Ukrainian an Russian Message-ID: <1319060598-13870-1-git-send-email-serhijdubyk@gmail.com> Signed-off-by: Serhij Dubyk {?????? ?????} --- etc/zebradb/lang_defs/ru/sort-string-utf.chr | 23 +++++++++++++++++++++++ etc/zebradb/lang_defs/uk/sort-string-utf.chr | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+), 0 deletions(-) create mode 100644 etc/zebradb/lang_defs/ru/sort-string-utf.chr create mode 100644 etc/zebradb/lang_defs/uk/sort-string-utf.chr diff --git a/etc/zebradb/lang_defs/ru/sort-string-utf.chr b/etc/zebradb/lang_defs/ru/sort-string-utf.chr new file mode 100644 index 0000000..34ace41 --- /dev/null +++ b/etc/zebradb/lang_defs/ru/sort-string-utf.chr @@ -0,0 +1,23 @@ +# Generic character map. +# + +encoding utf-8 + +# Define the basic value-set. *Beware* of changing this without re-indexing +# your databases. +lowercase {0-9}{a-z}?????????????????????????????????????? +uppercase {0-9}{A-Z}?????????????????????????????????????? + +# Breaking characters + +space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~{\x88-\x89} + +# Characters to be considered equivalent for searching purposes. +equivalent ?(?) +equivalent ?(?) +equivalent ?(?) + +# Supplemental mappings + +map (^En\s) @ +map (^Den\s) @ diff --git a/etc/zebradb/lang_defs/uk/sort-string-utf.chr b/etc/zebradb/lang_defs/uk/sort-string-utf.chr new file mode 100644 index 0000000..34ace41 --- /dev/null +++ b/etc/zebradb/lang_defs/uk/sort-string-utf.chr @@ -0,0 +1,23 @@ +# Generic character map. +# + +encoding utf-8 + +# Define the basic value-set. *Beware* of changing this without re-indexing +# your databases. +lowercase {0-9}{a-z}?????????????????????????????????????? +uppercase {0-9}{A-Z}?????????????????????????????????????? + +# Breaking characters + +space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~{\x88-\x89} + +# Characters to be considered equivalent for searching purposes. +equivalent ?(?) +equivalent ?(?) +equivalent ?(?) + +# Supplemental mappings + +map (^En\s) @ +map (^Den\s) @ -- 1.7.2.5 From srdjan at catalyst.net.nz Thu Oct 20 03:28:09 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Thu, 20 Oct 2011 14:28:09 +1300 Subject: [Koha-patches] [PATCH] bug_5533: Improved marking items as lost In-Reply-To: References: Message-ID: <1319074089-9267-1-git-send-email-srdjan@catalyst.net.nz> Call LostItem() whenever an item is lost Disable lost status on catalogue item edit --- C4/Accounts.pm | 77 ++++++++------------------- C4/Circulation.pm | 40 ++++++++++++++- C4/Items.pm | 8 +++- catalogue/updateitem.pl | 3 +- cataloguing/additem.pl | 37 ++++++++----- misc/cronjobs/longoverdue.pl | 3 +- t/db_dependent/lib/KohaTest/Accounts.pm | 1 - t/db_dependent/lib/KohaTest/Circulation.pm | 1 + tools/batchMod.pl | 16 +++++- 9 files changed, 106 insertions(+), 80 deletions(-) diff --git a/C4/Accounts.pm b/C4/Accounts.pm index eea142c..70b3944 100644 --- a/C4/Accounts.pm +++ b/C4/Accounts.pm @@ -23,8 +23,7 @@ use strict; use C4::Context; use C4::Stats; use C4::Members; -use C4::Items; -use C4::Circulation qw(MarkIssueReturned); +use C4::Circulation qw(ReturnLostItem); use vars qw($VERSION @ISA @EXPORT); @@ -216,7 +215,7 @@ sub makepayment { #check to see what accounttype if ( $data->{'accounttype'} eq 'Rep' || $data->{'accounttype'} eq 'L' ) { - returnlost( $borrowernumber, $data->{'itemnumber'} ); + ReturnLostItem( $borrowernumber, $data->{'itemnumber'} ); } } @@ -276,64 +275,34 @@ EOT =cut -sub returnlost{ - my ( $borrowernumber, $itemnum ) = @_; - C4::Circulation::MarkIssueReturned( $borrowernumber, $itemnum ); - my $borrower = C4::Members::GetMember( 'borrowernumber'=>$borrowernumber ); - my @datearr = localtime(time); - my $date = ( 1900 + $datearr[5] ) . "-" . ( $datearr[4] + 1 ) . "-" . $datearr[3]; - my $bor = "$borrower->{'firstname'} $borrower->{'surname'} $borrower->{'cardnumber'}"; - ModItem({ paidfor => "Paid for by $bor $date" }, undef, $itemnum); -} - - sub chargelostitem{ # lost ==1 Lost, lost==2 longoverdue, lost==3 lost and paid for # FIXME: itemlost should be set to 3 after payment is made, should be a warning to the interface that # a charge has been added # FIXME : if no replacement price, borrower just doesn't get charged? - my $dbh = C4::Context->dbh(); - my ($itemnumber) = @_; - my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title - FROM issues - JOIN items USING (itemnumber) - JOIN biblio USING (biblionumber) - WHERE issues.itemnumber=?"); - $sth->execute($itemnumber); - my $issues=$sth->fetchrow_hashref(); - - # if a borrower lost the item, add a replacement cost to the their record - if ( $issues->{borrowernumber} ){ - - # first make sure the borrower hasn't already been charged for this item - my $sth1=$dbh->prepare("SELECT * from accountlines - WHERE borrowernumber=? AND itemnumber=? and accounttype='L'"); - $sth1->execute($issues->{'borrowernumber'},$itemnumber); - my $existing_charge_hashref=$sth1->fetchrow_hashref(); - - # OK, they haven't - unless ($existing_charge_hashref) { - # This item is on issue ... add replacement cost to the borrower's record and mark it returned - # Note that we add this to the account even if there's no replacement price, allowing some other - # process (or person) to update it, since we don't handle any defaults for replacement prices. - my $accountno = getnextacctno($issues->{'borrowernumber'}); - my $sth2=$dbh->prepare("INSERT INTO accountlines - (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber) - VALUES (?,?,now(),?,?,'L',?,?)"); - $sth2->execute($issues->{'borrowernumber'},$accountno,$issues->{'replacementprice'}, - "Lost Item $issues->{'title'} $issues->{'barcode'}", - $issues->{'replacementprice'},$itemnumber); - $sth2->finish; - # FIXME: Log this ? - } - #FIXME : Should probably have a way to distinguish this from an item that really was returned. - #warn " $issues->{'borrowernumber'} / $itemnumber "; - C4::Circulation::MarkIssueReturned($issues->{borrowernumber},$itemnumber); - # Shouldn't MarkIssueReturned do this? - C4::Items::ModItem({ onloan => undef }, undef, $itemnumber); + my ($borrowernumber, $itemnumber, $amount, $description) = @_; + + # first make sure the borrower hasn't already been charged for this item + my $sth1=$dbh->prepare("SELECT * from accountlines + WHERE borrowernumber=? AND itemnumber=? and accounttype='L'"); + $sth1->execute($borrowernumber,$itemnumber); + my $existing_charge_hashref=$sth1->fetchrow_hashref(); + + # OK, they haven't + unless ($existing_charge_hashref) { + # This item is on issue ... add replacement cost to the borrower's record and mark it returned + # Note that we add this to the account even if there's no replacement price, allowing some other + # process (or person) to update it, since we don't handle any defaults for replacement prices. + my $accountno = getnextacctno($borrowernumber); + my $sth2=$dbh->prepare("INSERT INTO accountlines + (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber) + VALUES (?,?,now(),?,?,'L',?,?)"); + $sth2->execute($borrowernumber,$accountno,$amount, + $description,$amount,$itemnumber); + $sth2->finish; + # FIXME: Log this ? } - $sth->finish; } =head2 manualinvoice diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 47068f9..da212ed 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -59,8 +59,9 @@ BEGIN { # FIXME subs that should probably be elsewhere push @EXPORT, qw( - &FixOverduesOnReturn &barcodedecode + &LostItem + &ReturnLostItem ); # subs to deal with issuing a book @@ -2943,8 +2944,43 @@ sub DeleteBranchTransferLimits { $sth->execute(); } +sub ReturnLostItem{ + my ( $borrowernumber, $itemnum ) = @_; - 1; + MarkIssueReturned( $borrowernumber, $itemnum ); + my $borrower = C4::Members::GetMember( 'borrowernumber'=>$borrowernumber ); + my @datearr = localtime(time); + my $date = ( 1900 + $datearr[5] ) . "-" . ( $datearr[4] + 1 ) . "-" . $datearr[3]; + my $bor = "$borrower->{'firstname'} $borrower->{'surname'} $borrower->{'cardnumber'}"; + ModItem({ paidfor => "Paid for by $bor $date" }, undef, $itemnum); +} + + +sub LostItem{ + my ($itemnumber, $mark_returned) = @_; + + my $dbh = C4::Context->dbh(); + my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title + FROM issues + JOIN items USING (itemnumber) + JOIN biblio USING (biblionumber) + WHERE issues.itemnumber=?"); + $sth->execute($itemnumber); + my $issues=$sth->fetchrow_hashref(); + $sth->finish; + + # if a borrower lost the item, add a replacement cost to the their record + if ( my $borrowernumber = $issues->{borrowernumber} ){ + + C4::Accounts::chargelostitem($borrowernumber, $itemnumber, $issues->{'replacementprice'}, "Lost Item $issues->{'title'} $issues->{'barcode'}"); + #FIXME : Should probably have a way to distinguish this from an item that really was returned. + #warn " $issues->{'borrowernumber'} / $itemnumber "; + MarkIssueReturned($borrowernumber,$itemnumber) if $mark_returned; + } +} + + +1; __END__ diff --git a/C4/Items.pm b/C4/Items.pm index 9bbc607..ffc2f1e 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -397,6 +397,8 @@ Note that only columns that can be directly changed from the cataloging and serials item editors are included in this hash. +Returns item record + =cut my %default_values_for_mod_from_marc = ( @@ -446,7 +448,8 @@ sub ModItemFromMarc { } my $unlinked_item_subfields = _get_unlinked_item_subfields( $localitemmarc, $frameworkcode ); - return ModItem($item, $biblionumber, $itemnumber, $dbh, $frameworkcode, $unlinked_item_subfields); + ModItem($item, $biblionumber, $itemnumber, $dbh, $frameworkcode, $unlinked_item_subfields); + return $item; } =head2 ModItem @@ -495,6 +498,9 @@ sub ModItem { }; $item->{'itemnumber'} = $itemnumber or return undef; + + $item->{onloan} = undef if $item->{itemlost}; + _set_derived_columns_for_mod($item); _do_column_fixes_for_mod($item); # FIXME add checks diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl index e8ce20d..379c12c 100755 --- a/catalogue/updateitem.pl +++ b/catalogue/updateitem.pl @@ -26,7 +26,6 @@ use C4::Biblio; use C4::Items; use C4::Output; use C4::Circulation; -use C4::Accounts; use C4::Reserves; my $cgi= new CGI; @@ -75,6 +74,6 @@ if (defined $itemnotes) { # i.e., itemnotes parameter passed from form ModItem($item_changes, $biblionumber, $itemnumber); -C4::Accounts::chargelostitem($itemnumber) if ($itemlost==1) ; +LostItem($itemnumber, 'MARK RETURNED') if $itemlost; print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber"); diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index ff09e77..3df2549 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -200,28 +200,33 @@ sub generate_subfield_form { } } - $subfield_data{marc_value} =CGI::scrolling_list( # FIXME: factor out scrolling_list - -name => "field_value", - -values => \@authorised_values, - -default => $value, - -labels => \%authorised_lib, - -override => 1, - -size => 1, - -multiple => 0, - -tabindex => 1, - -id => "tag_".$tag."_subfield_".$subfieldtag."_".$index_subfield, - -class => "input_marceditor", - ); + if ($subfieldlib->{'hidden'}) { + $subfield_data{marc_value} = qq( $authorised_lib{$value}); + } + else { + $subfield_data{marc_value} =CGI::scrolling_list( # FIXME: factor out scrolling_list + -name => "field_value", + -values => \@authorised_values, + -default => $value, + -labels => \%authorised_lib, + -override => 1, + -size => 1, + -multiple => 0, + -tabindex => 1, + -id => "tag_".$tag."_subfield_".$subfieldtag."_".$index_subfield, + -class => "input_marceditor", + ); + } - # it's a thesaurus / authority field } + # it's a thesaurus / authority field elsif ( $subfieldlib->{authtypecode} ) { $subfield_data{marc_value} = " {authtypecode}."&index=$subfield_data{id}','$subfield_data{id}'); return false;\" title=\"Tag Editor\">... "; - # it's a plugin field } + # it's a plugin field elsif ( $subfieldlib->{value_builder} ) { # opening plugin my $plugin = C4::Context->intranetdir . "/cataloguing/value_builder/" . $subfieldlib->{'value_builder'}; @@ -484,7 +489,7 @@ if ($op eq "additem") { if ($exist_itemnumber && $exist_itemnumber != $itemnumber) { push @errors,"barcode_not_unique"; } else { - my ($oldbiblionumber,$oldbibnum,$oldbibitemnum) = ModItemFromMarc($itemtosave,$biblionumber,$itemnumber); + ModItemFromMarc($itemtosave,$biblionumber,$itemnumber); $itemnumber=""; } $nextop="additem"; @@ -590,6 +595,8 @@ if($itemrecord){ next if subfield_is_koha_internal_p($subfieldtag); next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10"); + $subfieldlib->{hidden} = 1 + if $tagslib->{$tag}->{$subfieldtag}->{authorised_value} eq 'LOST'; my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $branches, $today_iso, $biblionumber, $temp, \@loop_data, $i); push @fields, "$tag$subfieldtag"; diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl index 651b9d2..2179d10 100755 --- a/misc/cronjobs/longoverdue.pl +++ b/misc/cronjobs/longoverdue.pl @@ -35,7 +35,6 @@ BEGIN { } use C4::Context; use C4::Items; -use C4::Accounts; use Getopt::Long; my $lost; # key=lost value, value=num days. @@ -155,7 +154,7 @@ foreach my $startrange (sort keys %$lost) { printf ("Due %s: item %5s from borrower %5s to lost: %s\n", $row->{date_due}, $row->{itemnumber}, $row->{borrowernumber}, $lostvalue) if($verbose); if($confirm) { ModItem({ itemlost => $lostvalue }, $row->{'biblionumber'}, $row->{'itemnumber'}); - chargelostitem($row->{'itemnumber'}) if( $charge && $charge eq $lostvalue); + LostItem($row->{'itemnumber'}) if( $charge && $charge eq $lostvalue); } $count++; } diff --git a/t/db_dependent/lib/KohaTest/Accounts.pm b/t/db_dependent/lib/KohaTest/Accounts.pm index 703d478..ac3a78e 100644 --- a/t/db_dependent/lib/KohaTest/Accounts.pm +++ b/t/db_dependent/lib/KohaTest/Accounts.pm @@ -15,7 +15,6 @@ sub methods : Test( 1 ) { my @methods = qw( recordpayment makepayment getnextacctno - returnlost manualinvoice fixcredit refund diff --git a/t/db_dependent/lib/KohaTest/Circulation.pm b/t/db_dependent/lib/KohaTest/Circulation.pm index 7d5e69d..b3a1ff8 100644 --- a/t/db_dependent/lib/KohaTest/Circulation.pm +++ b/t/db_dependent/lib/KohaTest/Circulation.pm @@ -47,6 +47,7 @@ sub methods : Test( 1 ) { CheckSpecialHolidays CheckRepeatableSpecialHolidays CheckValidBarcode + ReturnLostItem ); can_ok( $self->testing_class, @methods ); diff --git a/tools/batchMod.pl b/tools/batchMod.pl index d9a0b76..c26def4 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -25,6 +25,7 @@ use C4::Auth; use C4::Output; use C4::Biblio; use C4::Items; +use C4::Circulation; use C4::Context; use C4::Koha; # XXX subfield_is_koha_internal_p use C4::Branch; # XXX subfield_is_koha_internal_p @@ -140,16 +141,25 @@ if ($op eq "action") { $deleted_items++; } else { $not_deleted_items++; - push @not_deleted, { biblionumber => $itemdata->{'biblionumber'}, itemnumber => $itemdata->{'itemnumber'}, barcode => $itemdata->{'barcode'}, title => $itemdata->{'title'}, $return => 1 }; + push @not_deleted, { + biblionumber => $itemdata->{'biblionumber'}, + itemnumber => $itemdata->{'itemnumber'}, + barcode => $itemdata->{'barcode'}, + title => $itemdata->{'title'}, + $return => 1 + }; } } else { if ($something_to_modify) { my $xml = TransformHtmlToXml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag, 'ITEM'); my $marcitem = MARC::Record::new_from_xml($xml, 'UTF-8'); - my $localitem = TransformMarcToKoha( $dbh, $marcitem, "", 'items' ); my $localmarcitem=Item2Marc($itemdata); UpdateMarcWith($marcitem,$localmarcitem); - eval{my ($oldbiblionumber,$oldbibnum,$oldbibitemnum) = ModItemFromMarc($localmarcitem,$itemdata->{biblionumber},$itemnumber)}; + eval{ + if ( my $item = ModItemFromMarc( $localmarcitem, $itemdata->{biblionumber}, $itemnumber ) ) { + LostItem($itemnumber, 'MARK RETURNED') if $item->{itemlost}; + } + }; } } $i++; -- 1.6.5 From Katrin.Fischer.83 at web.de Thu Oct 20 07:28:02 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Thu, 20 Oct 2011 07:28:02 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6854: Correct a double password encryption problem in import_borrowers.pl Message-ID: <1319088482-5564-1-git-send-email-Katrin.Fischer.83@web.de> From: Fr?d?rick Capovilla When the CSV file has no password column and no default value was set for the password : If we try to modify an existing user, the password from the BD is sent to ModMember, which then encrypts the already-encrypted password a second time. http://bugs.koha-community.org/show_bug.cgi?id=6854 Signed-off-by: Katrin Fischer Confirmed bug on current master. 1) Import new patron with password provided > OPAC login works 2) Overwrite patron record, password provided > OPAC login works 3) Overwrite patron record, password not provided Before patch: OPAC login broken, password in database changed After patch: OPC login works with same password as before --- tools/import_borrowers.pl | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/tools/import_borrowers.pl b/tools/import_borrowers.pl index 74a5889..a7e9142 100755 --- a/tools/import_borrowers.pl +++ b/tools/import_borrowers.pl @@ -243,6 +243,10 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) { for my $col (keys %borrower) { # use values from extant patron unless our csv file includes this column or we provided a default. # FIXME : You cannot update a field with a perl-evaluated false value using the defaults. + + # The password is always encrypted, skip it! + next if $col eq 'password'; + unless(exists($csvkeycol{$col}) || $defaults{$col}) { $borrower{$col} = $member->{$col} if($member->{$col}) ; } -- 1.7.5.4 From robin at catalyst.net.nz Thu Oct 20 08:31:59 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Thu, 20 Oct 2011 19:31:59 +1300 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_Bug_4877_-_Add_DocBook_for_m?= =?utf-8?q?issing_manual_pages?= Message-ID: <1319092319-24288-1-git-send-email-robin@catalyst.net.nz> From: Magnus Enger Add DocBook manual pages for commands that do not have a manual page yet. Also add a page for koha-common itself, listing all the available commands. Signed-off-by: Robin Sheat Minor change: I fixed a typo I spotted --- debian/docs/koha-common.xml | 206 +++++++++++++++++++++++++++++++++++ debian/docs/koha-create-dirs.xml | 43 +++++++ debian/docs/koha-disable.xml | 45 ++++++++ debian/docs/koha-dump-defaults.xml | 44 ++++++++ debian/docs/koha-dump.xml | 45 ++++++++ debian/docs/koha-email-disable.xml | 42 +++++++ debian/docs/koha-email-enable.xml | 42 +++++++ debian/docs/koha-enable.xml | 45 ++++++++ debian/docs/koha-foreach.xml | 43 +++++++ debian/docs/koha-list.xml | 73 ++++++++++++ debian/docs/koha-mysql.xml | 44 ++++++++ debian/docs/koha-rebuild-zebra.xml | 67 +++++++++++ debian/docs/koha-remove.xml | 17 ++- debian/docs/koha-reset-passwd.xml | 44 ++++++++ debian/docs/koha-restart-zebra.xml | 44 ++++++++ debian/docs/koha-restore.xml | 45 ++++++++ debian/docs/koha-start-zebra.xml | 44 ++++++++ debian/docs/koha-stop-zebra.xml | 44 ++++++++ debian/docs/koha-upgrade-schema.xml | 44 ++++++++ debian/docs/koha-upgrade-to-3.4.xml | 41 +++++++ 20 files changed, 1058 insertions(+), 4 deletions(-) create mode 100644 debian/docs/koha-common.xml create mode 100644 debian/docs/koha-create-dirs.xml create mode 100644 debian/docs/koha-disable.xml create mode 100644 debian/docs/koha-dump-defaults.xml create mode 100644 debian/docs/koha-dump.xml create mode 100644 debian/docs/koha-email-disable.xml create mode 100644 debian/docs/koha-email-enable.xml create mode 100644 debian/docs/koha-enable.xml create mode 100644 debian/docs/koha-foreach.xml create mode 100644 debian/docs/koha-list.xml create mode 100644 debian/docs/koha-mysql.xml create mode 100644 debian/docs/koha-rebuild-zebra.xml create mode 100644 debian/docs/koha-reset-passwd.xml create mode 100644 debian/docs/koha-restart-zebra.xml create mode 100644 debian/docs/koha-restore.xml create mode 100644 debian/docs/koha-start-zebra.xml create mode 100644 debian/docs/koha-stop-zebra.xml create mode 100644 debian/docs/koha-upgrade-schema.xml create mode 100644 debian/docs/koha-upgrade-to-3.4.xml diff --git a/debian/docs/koha-common.xml b/debian/docs/koha-common.xml new file mode 100644 index 0000000..0e70595 --- /dev/null +++ b/debian/docs/koha-common.xml @@ -0,0 +1,206 @@ +
    +koha-common + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-common + 8 + + + + koha-common + Create and manage Koha instances. + UNIX/Linux + + + Description + koha-common provides a number of scripts for creating and administering Koha instances. It is meant for sites that provide Koha hosting, and serves several sites from the same host. + + + Commands + The following commands are available after when koha-common has been installed. See individual manual pages for each command for optios and other details related to their usage. + + Administer instances + + + + + + Disable a Koha instance. + + + + + + + Enable a Koha instance. New instances are enabled by default. You only need this command if you have previously disabled a site with koha-disable. + + + + + + + Restore a Koha site from a dump (from koha-dump). + + + + + + + Dump all contents and configs for a Koha site. + + + + + + + Remove a Koha instance. + + + + + + Database-related + + + + + + Create default contents from an existing Koha site. + + + + + + + Upgrade the DB schema for Koha instances. Done automatically on package upgrades. + + + + + + + Reset password for a user in a Koha instance. + + + + + + + Provide an interactive mysql shell set up for the specified koha instance. + + + + + + Zebra-related + + + + + + Start Zebra for named Koha instances. + + + + + + + Restart Zebra for named Koha instances. + + + + + + + Rebuild the Zebra database for a Koha instance. + + + + + + + Stop Zebra for named Koha instances. + + + + + + E-mail + + + + + + Turn on the email for a Koha instance. + + + + + + + Turn off the email for a Koha instance. + + + + + + Misc + + + + + + Performs the necessary changes to upgrade a Koha system from 3.2 to 3.4. If no instance names are provided, this will run it on all of them. + + + + + + Utilities + + + + + + Create dirs for a Koha instance. + + + + + + + Lists Koha instances, optionally only those that are enabled or have email turned on. + + + + + + + Run a command for each Koha instance. Takes the same arguments as koha-list. + + + + + + + Bugs + The scripts are a bit fragile. If something goes wrong, they do not clean up after themselves. + Bugs can be reported here: http://bugs.koha-community.org/bugzilla3/ + + + About Koha + Koha is the first free software library automation package. In use worldwide, its development is steered by a growing community of users collaborating to achieve their technology goals. Koha?s feature set continues to evolve and expand to meet the needs of its user base. + + + + +
    diff --git a/debian/docs/koha-create-dirs.xml b/debian/docs/koha-create-dirs.xml new file mode 100644 index 0000000..9f9ddea --- /dev/null +++ b/debian/docs/koha-create-dirs.xml @@ -0,0 +1,43 @@ +
    +koha-create-dirs + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-create-dirs + 8 + + + + koha-create-dirs + Create dirs for a Koha instance. + UNIX/Linux + + + + + koha-create-dirs instancename + + + + Description + Create dirs for a Koha instance. + + + See also + + koha-foreach(8) + koha-list(8) + + + + + +
    diff --git a/debian/docs/koha-disable.xml b/debian/docs/koha-disable.xml new file mode 100644 index 0000000..8b7f729 --- /dev/null +++ b/debian/docs/koha-disable.xml @@ -0,0 +1,45 @@ +
    +koha-disable + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-disable + 8 + + + + koha-disable + Disable a Koha instance. + UNIX/Linux + + + + + koha-disable instancename + + + + Description + Disable a Koha instance. + + + See also + + koha-dump(8) + koha-enable(8) + koha-remove(8) + koha-restore(8) + + + + + +
    diff --git a/debian/docs/koha-dump-defaults.xml b/debian/docs/koha-dump-defaults.xml new file mode 100644 index 0000000..048c3e9 --- /dev/null +++ b/debian/docs/koha-dump-defaults.xml @@ -0,0 +1,44 @@ +
    +koha-dump-defaults + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-dump-defaults + 8 + + + + koha-dump-defaults + Create default contents from an existing Koha site. + UNIX/Linux + + + + + koha-dump-defaults instancename + + + + Description + Create default contents from an existing Koha site. + + + See also + + koha-mysql(8) + koha-reset-passwd(8) + koha-upgrade-schema(8) + + + + + +
    diff --git a/debian/docs/koha-dump.xml b/debian/docs/koha-dump.xml new file mode 100644 index 0000000..ec79f6e --- /dev/null +++ b/debian/docs/koha-dump.xml @@ -0,0 +1,45 @@ +
    +koha-dump + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-dump + 8 + + + + koha-dump + Dump all contents and configs for a Koha site. + UNIX/Linux + + + + + koha-dump instancename + + + + Description + Dump all contents and configs for a Koha site. + + + See also + + koha-disable(8) + koha-enable(8) + koha-remove(8) + koha-restore(8) + + + + + +
    diff --git a/debian/docs/koha-email-disable.xml b/debian/docs/koha-email-disable.xml new file mode 100644 index 0000000..83bf8ef --- /dev/null +++ b/debian/docs/koha-email-disable.xml @@ -0,0 +1,42 @@ +
    +koha-email-disable + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-email-disable + 8 + + + + koha-email-disable + Turn off the email for a Koha instance. + UNIX/Linux + + + + + koha-email-disable instancename + + + + Description + Turn off the email for a Koha instance. + + + See also + + koha-email-enable(8) + + + + + +
    diff --git a/debian/docs/koha-email-enable.xml b/debian/docs/koha-email-enable.xml new file mode 100644 index 0000000..5274f75 --- /dev/null +++ b/debian/docs/koha-email-enable.xml @@ -0,0 +1,42 @@ +
    +koha-email-enable + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-email-enable + 8 + + + + koha-email-enable + Turn on the email for a Koha instance. + UNIX/Linux + + + + + koha-email-enable instancename + + + + Description + Turn on the email for a Koha instance. + + + See also + + koha-email-disable(8) + + + + + +
    diff --git a/debian/docs/koha-enable.xml b/debian/docs/koha-enable.xml new file mode 100644 index 0000000..a2f8cc3 --- /dev/null +++ b/debian/docs/koha-enable.xml @@ -0,0 +1,45 @@ +
    +koha-enable + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-enable + 8 + + + + koha-enable + Enable a Koha instance. New instances are enabled by default. You only need this command if you have previously disabled a site with koha-disable. + UNIX/Linux + + + + + koha-enable instancename + + + + Description + Enable a Koha instance. New instances are enabled by default. You only need this command if you have previously disabled a site with koha-disable. + + + See also + + koha-disable(8) + koha-dump(8) + koha-remove(8) + koha-restore(8) + + + + + +
    diff --git a/debian/docs/koha-foreach.xml b/debian/docs/koha-foreach.xml new file mode 100644 index 0000000..869e9c7 --- /dev/null +++ b/debian/docs/koha-foreach.xml @@ -0,0 +1,43 @@ +
    +koha-foreach + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-foreach + 8 + + + + koha-foreach + Run a command for each Koha instance. Takes the same arguments as koha-list. + UNIX/Linux + + + + + koha-list | + + + + Description + Run a command for each Koha instance. Takes the same arguments as koha-list. + + + See also + + koha-create-dirs(8) + koha-list(8) + + + + + +
    diff --git a/debian/docs/koha-list.xml b/debian/docs/koha-list.xml new file mode 100644 index 0000000..9d0acf9 --- /dev/null +++ b/debian/docs/koha-list.xml @@ -0,0 +1,73 @@ +
    +koha-list + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-list + 8 + + + + koha-list + Lists Koha instances, optionally only those that are enabled or have email turned on. + UNIX/Linux + + + + + koha-list + + + + Options + The filtering options can be combined, and you probably want to do this (except --email and --noemail, that's just silly.) + + + + + Only show instances that are enabled. + + + + + + Only show instances that have email enabled. + + + + + + Only show instances that do not have email enabled. + + + + + + This help. + + + + + + Description + Lists Koha instances, optionally only those that are enabled or have email turned on. + + + See also + + koha-create-dirs(8) + koha-foreach(8) + + + + + +
    diff --git a/debian/docs/koha-mysql.xml b/debian/docs/koha-mysql.xml new file mode 100644 index 0000000..b8079ce --- /dev/null +++ b/debian/docs/koha-mysql.xml @@ -0,0 +1,44 @@ +
    +koha-mysql + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-mysql + 8 + + + + koha-mysql + Provide an interactive mysql shell set up for the specified koha instance. + UNIX/Linux + + + + + koha-mysql instancename + + + + Description + Provide an interactive mysql shell set up for the specified koha instance. + + + See also + + koha-dump-defaults(8) + koha-reset-passwd(8) + koha-upgrade-schema(8) + + + + + +
    diff --git a/debian/docs/koha-rebuild-zebra.xml b/debian/docs/koha-rebuild-zebra.xml new file mode 100644 index 0000000..e5b319c --- /dev/null +++ b/debian/docs/koha-rebuild-zebra.xml @@ -0,0 +1,67 @@ +
    +koha-rebuild-zebra + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-rebuild-zebra + 8 + + + + koha-rebuild-zebra + Rebuild the Zebra database for a Koha instance. + UNIX/Linux + + + + + koha-rebuild-zebra | | instancename + + + + Options + + + + + Runs the process as USMARC rather than the default of MARCXML. + + + + + + Does a reindex of the whole collection. + + + + + + Anything else is passed directly to rebuild_zebra. This is useful in particular for -v. + + + + + + Description + Rebuild the Zebra database for a Koha instance. + + + See also + + koha-restart-zebra(8) + koha-start-zebra(8) + koha-stop-zebra(8) + + + + + +
    diff --git a/debian/docs/koha-remove.xml b/debian/docs/koha-remove.xml index 5d5767f..ee2b266 100644 --- a/debian/docs/koha-remove.xml +++ b/debian/docs/koha-remove.xml @@ -17,20 +17,29 @@ koha-remove - Remove one or more Koha instance(s). + Remove a Koha instance. UNIX/Linux - koha-remove - instancename + koha-remove instancename Description - Remove one or more Koha instance(s). This removes all files associated with a Koha instance. + Remove a Koha instance. + + See also + + koha-disable(8) + koha-dump(8) + koha-enable(8) + koha-restore(8) + + + diff --git a/debian/docs/koha-reset-passwd.xml b/debian/docs/koha-reset-passwd.xml new file mode 100644 index 0000000..85e8443 --- /dev/null +++ b/debian/docs/koha-reset-passwd.xml @@ -0,0 +1,44 @@ +
    +koha-reset-passwd + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-reset-passwd + 8 + + + + koha-reset-passwd + Reset password for a user in a Koha instance. + UNIX/Linux + + + + + koha-reset-passwd instancename username + + + + Description + Reset password for a user in a Koha instance. + + + See also + + koha-dump-defaults(8) + koha-mysql(8) + koha-upgrade-schema(8) + + + + + +
    diff --git a/debian/docs/koha-restart-zebra.xml b/debian/docs/koha-restart-zebra.xml new file mode 100644 index 0000000..649df1e --- /dev/null +++ b/debian/docs/koha-restart-zebra.xml @@ -0,0 +1,44 @@ +
    +koha-restart-zebra + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-restart-zebra + 8 + + + + koha-restart-zebra + Restart Zebra for named Koha instances. + UNIX/Linux + + + + + koha-restart-zebra instancename + + + + Description + Restart Zebra for named Koha instances. + + + See also + + koha-rebuild-zebra(8) + koha-start-zebra(8) + koha-stop-zebra(8) + + + + + +
    diff --git a/debian/docs/koha-restore.xml b/debian/docs/koha-restore.xml new file mode 100644 index 0000000..6acb0e8 --- /dev/null +++ b/debian/docs/koha-restore.xml @@ -0,0 +1,45 @@ +
    +koha-restore + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-restore + 8 + + + + koha-restore + Restore a Koha site from a dump (from koha-dump). + UNIX/Linux + + + + + koha-restore + + + + Description + Restore a Koha site from a dump (from koha-dump). + + + See also + + koha-disable(8) + koha-dump(8) + koha-enable(8) + koha-remove(8) + + + + + +
    diff --git a/debian/docs/koha-start-zebra.xml b/debian/docs/koha-start-zebra.xml new file mode 100644 index 0000000..eb3c2ab --- /dev/null +++ b/debian/docs/koha-start-zebra.xml @@ -0,0 +1,44 @@ +
    +koha-start-zebra + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-start-zebra + 8 + + + + koha-start-zebra + Start Zebra for named Koha instances. + UNIX/Linux + + + + + koha-start-zebra instancename + + + + Description + Start Zebra for named Koha instances. + + + See also + + koha-rebuild-zebra(8) + koha-restart-zebra(8) + koha-stop-zebra(8) + + + + + +
    diff --git a/debian/docs/koha-stop-zebra.xml b/debian/docs/koha-stop-zebra.xml new file mode 100644 index 0000000..050ddd7 --- /dev/null +++ b/debian/docs/koha-stop-zebra.xml @@ -0,0 +1,44 @@ +
    +koha-stop-zebra + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-stop-zebra + 8 + + + + koha-stop-zebra + Stop Zebra for named Koha instances. + UNIX/Linux + + + + + koha-stop-zebra instancename + + + + Description + Stop Zebra for named Koha instances. + + + See also + + koha-rebuild-zebra(8) + koha-restart-zebra(8) + koha-start-zebra(8) + + + + + +
    diff --git a/debian/docs/koha-upgrade-schema.xml b/debian/docs/koha-upgrade-schema.xml new file mode 100644 index 0000000..8b5a4c4 --- /dev/null +++ b/debian/docs/koha-upgrade-schema.xml @@ -0,0 +1,44 @@ +
    +koha-upgrade-schema + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-upgrade-schema + 8 + + + + koha-upgrade-schema + Upgrade the DB schema for Koha instances. Done automatically on package upgrades. + UNIX/Linux + + + + + koha-upgrade-schema instancename + + + + Description + Upgrade the DB schema for Koha instances. Done automatically on package upgrades. + + + See also + + koha-dump-defaults(8) + koha-mysql(8) + koha-reset-passwd(8) + + + + + +
    diff --git a/debian/docs/koha-upgrade-to-3.4.xml b/debian/docs/koha-upgrade-to-3.4.xml new file mode 100644 index 0000000..c528377 --- /dev/null +++ b/debian/docs/koha-upgrade-to-3.4.xml @@ -0,0 +1,41 @@ +
    +koha-upgrade-to-3.4 + +Koha is the first free software library automation package. + + The Koha Communnity + http://koha-community.org/ + + + + + + + koha-upgrade-to-3.4 + 8 + + + + koha-upgrade-to-3.4 + Performs the necessary changes to upgrade a Koha system from 3.2 to 3.4. If no instance names are provided, this will run it on all of them. + UNIX/Linux + + + + + koha-upgrade-to-3.4 instancename + + + + Description + Performs the necessary changes to upgrade a Koha system from 3.2 to 3.4. If no instance names are provided, this will run it on all of them. + + + See also + + + + + + +
    -- 1.7.5.4 From M.de.Rooy at rijksmuseum.nl Thu Oct 20 09:32:23 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Thu, 20 Oct 2011 07:32:23 +0000 Subject: [Koha-patches] [PATCH] 6717 Documenting need_merge_authorities table Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3135B28A@S-MAIL-1B.rijksmuseum.intra> Documentation only. --- installer/data/mysql/kohastructure.sql | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e4388a4..bff0805 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1315,10 +1315,10 @@ CREATE TABLE `matchchecks` ( -- DROP TABLE IF EXISTS `need_merge_authorities`; -CREATE TABLE `need_merge_authorities` ( - `id` int NOT NULL auto_increment PRIMARY KEY, - `authid` bigint NOT NULL, - `done` tinyint DEFAULT 0 +CREATE TABLE `need_merge_authorities` ( -- keeping track of authority records still to be merged by merge_authority cron job (used only if pref dontmerge is ON) + `id` int NOT NULL auto_increment PRIMARY KEY, -- unique id + `authid` bigint NOT NULL, -- reference to authority record + `done` tinyint DEFAULT 0 -- indication whether merge has been executed (0=not done, 1= done, 2= in progress) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Thu Oct 20 10:13:52 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Thu, 20 Oct 2011 08:13:52 +0000 Subject: [Koha-patches] [PATCH] 6094 Follow up for cleanup_database Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3135B2E7@S-MAIL-1B.rijksmuseum.intra> Adds purging completed entries from need_merge_authorities table. If you set dontmerge to ON, you need to periodically remove records. --- misc/cronjobs/cleanup_database.pl | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl index 1333111..2b0cf90 100755 --- a/misc/cronjobs/cleanup_database.pl +++ b/misc/cronjobs/cleanup_database.pl @@ -38,8 +38,8 @@ use Getopt::Long; sub usage { print STDERR < \$help, @@ -63,13 +64,14 @@ GetOptions( 'v|verbose' => \$verbose, 'm|mail' => \$mail, 'zebraqueue:i' => \$zebraqueue_days, + 'merged' => \$purge_merged, ) || usage(1); if ($help) { usage(0); } -if ( !( $sessions || $zebraqueue_days || $mail ) ) { +if ( !( $sessions || $zebraqueue_days || $mail || $purge_merged) ) { print "You did not specify any cleanup work for the script to do.\n\n"; usage(1); } @@ -134,6 +136,14 @@ if ($mail) { $sth->execute() or $dbh->errstr; print "Done with purging the mail queue.\n" if ($verbose); } + +if($purge_merged) { + print "Purging completed entries from need_merge_authorities.\n" if $verbose; + $sth = $dbh->prepare("DELETE FROM need_merge_authorities WHERE done=1"); + $sth->execute() or die $dbh->errstr; + print "Done with purging need_merge_authorities.\n" if $verbose; +} + exit(0); sub RemoveOldSessions { -- 1.6.0.6 From nengard at bywatersolutions.com Thu Oct 20 01:06:46 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 19 Oct 2011 19:06:46 -0400 Subject: [Koha-patches] [PATCH] Bug 6966 Updated Patron Attribute Help File Message-ID: <1319065606-4596-1-git-send-email-nengard@bywatersolutions.com> A new patch required an additional line in this help file. --- .../en/modules/help/admin/patron-attr-types.tt | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/patron-attr-types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/patron-attr-types.tt index c068da7..1925e69 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/patron-attr-types.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/patron-attr-types.tt @@ -31,6 +31,7 @@
  • Check 'Allow password' to make it possible to associate a password with this attribute.
  • Check 'Display in OPAC' to display this attribute on a patron's details page in the OPAC.
  • Check 'Searchable' to make this attribute searchable in the staff patron search.
  • +
  • Check 'Display in check-out' to make this attribute visible in the patron's short detail display on the left of the checkout screen and other patron pages
  • Authorized value category; if one is selected, the patron record input page will only allow values to be chosen from the authorized value list.
    • You will first need to add an authorized value list for it to appear in this menu
    • -- 1.7.2.3 From oleonard at myacpl.org Thu Oct 20 17:56:17 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 20 Oct 2011 11:56:17 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6933 - Add a view of titles with a particular tag to the staff client Message-ID: <1319126177-6693-1-git-send-email-oleonard@myacpl.org> - Adds a new page to the tags moderation section for viewing all the titles tagged with a particular term. - Adds display of approved tags to the catalog detail page matching the opac view. Adding tags from the detail view not implemented. Areas for improvement: - I think it would be better to show "Also tagged with:" and exclude the current tag from the list of titles tagged with a particular tag. - It would be nice to be able to show unapproved tags (and some idication of their status) along with approved tags on the detail page if the user had TagsModeration permission. --- catalogue/detail.pl | 13 +++ .../prog/en/modules/catalogue/detail.tt | 19 ++++ .../intranet-tmpl/prog/en/modules/tags/list.tt | 103 ++++++++++++++++++++ .../intranet-tmpl/prog/en/modules/tags/review.tt | 2 +- tags/list.pl | 81 +++++++++++++++ 5 files changed, 217 insertions(+), 1 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt create mode 100755 tags/list.pl diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 580949d..c9b8321 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -35,6 +35,7 @@ use C4::Serials; use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn); use C4::External::Amazon; use C4::Search; # enabled_staff_search_views +use C4::Tags qw(get_tags); use C4::VirtualShelves; use C4::XSLT; @@ -384,4 +385,16 @@ if (C4::Context->preference('OPACBaseURL')){ $template->param( OpacUrl => C4::Context->preference('OPACBaseURL') ); } +# Displaying tags + +my $tag_quantity; +if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->preference('TagsShowOnDetail')) { + $template->param( + TagsEnabled => 1, + TagsShowOnDetail => $tag_quantity + ); + $template->param(TagLoop => get_tags({biblionumber=>$biblionumber, approved=>1, + 'sort'=>'-weight', limit=>$tag_quantity})); +} + output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index b1e225f..178b6af 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -215,9 +215,28 @@ function verify_images() {
  • [% END %] + [% IF ( TagsEnabled ) %] + [% IF ( TagsShowOnDetail ) %] + [% IF ( TagLoop ) %] +
  • Tags: +
      + [% FOREACH TagLoo IN TagLoop %] +
    • + [% IF ( CAN_user_tools_moderate_tags ) %] + [% TagLoo.term |html %] + [% ELSE %] + [% TagLoo.term |html %] + [% END %] + ([% TagLoo.weight_total %])[% IF ( loop.last ) %][% ELSE %], [% END %]
    • + [% END %] +
  • + [% END %] + [% END %] + [% END %] [% IF ( holdcount ) %]
  • Holds: [% holdcount %]
  • [% ELSE %][% END %] [% END %] +
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt new file mode 100644 index 0000000..b4a99fc --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt @@ -0,0 +1,103 @@ +[% INCLUDE 'doc-head-open.inc' %] +Koha › Tools › Tags › [% IF ( do_it ) %]Review › [% ELSE %]Review Tags[% END %] +[% INCLUDE 'doc-head-close.inc' %] + + + + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'cat-search.inc' %] + + + +
    +
    +
    +
    +[% IF ( titles ) %] +

    Titles tagged with the term [% tag %]

    +
    00 Category of materialz- Unspecified' + + _("00 Category of material") + + '' + + _("z- Unspecified") + + '
    \ \
    + + + + + + + [% FOREACH title IN titles %] + [% IF ( title.even ) %] + + [% ELSE %] + + [% END %] + + + + + [% END %] +
    TitleLocation 
    [% INCLUDE 'biblio-default-view.inc' biblionumber = title.biblionumber %][% title.title |html %][% FOREACH subtitl IN title.subtitle %] [% subtitl.subfield %][% END %] + [% title.author %] +

    [% IF ( title.publishercode ) %]- [% title.publishercode|html %] + [% IF ( title.place ) %] [% title.place %][% END %][% END %] + [% IF ( title.pages ) %] - [% title.pages %][% IF ( title.size ) %] [% title.size %] + [% END %] + [% END %]

    + [% IF ( title.notes ) %] +

    [% title.notes |html%]

    [% END %] + [% IF ( title.TagLoop ) %]

    Tagged with: [% FOREACH TagLoo IN title.TagLoop %] + [% TagLoo.term |html %] ([% TagLoo.weight_total %])[% IF ( loop.last ) %][% ELSE %], [% END %] + [% END %]

    + [% END %] +
    [% IF ( title.items ) %]
      [% FOREACH item IN title.items %] +
    • + [% item.branchname %] [% item.location_description %] + [% IF ( item.itemcallnumber ) %] + ([% item.itemcallnumber %]) + [% END %] +
    • + [% END %]
    [% ELSE %]This record has no items.[% END %] +
    +[% ELSE %] +
    There are no titles tagged with the term [% tag %]
    +[% END %] + +
    +
    + +
    +[% INCLUDE 'intranet-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt index 5dfe91a..fb77a6f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt @@ -217,7 +217,7 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; } [% ELSE %] [% END %] - [% tagloo.term %] + [% tagloo.term %] [% tagloo.weight_total %] diff --git a/tags/list.pl b/tags/list.pl new file mode 100755 index 0000000..7b16ce5 --- /dev/null +++ b/tags/list.pl @@ -0,0 +1,81 @@ +#!/usr/bin/perl + +# Copyright 2011 Athens County Public Libraries +# +# 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 warnings; +use strict; +use CGI; + +use C4::Auth qw(:DEFAULT check_cookie_auth); +use C4::Biblio; +use C4::Context; +use C4::Dates qw(format_date); +use C4::Items; +use C4::Koha; +use C4::Tags 0.03 qw(get_tags remove_tag get_tag_rows); +use C4::Output; + +my $needed_flags = { tools => 'moderate_tags' }; # FIXME: replace when more specific permission is created. + +my $query = CGI->new; +my $op = $query->param('op') || ''; +my $biblionumber = $query->param('biblionumber'); +my $tag = $query->param('tag'); +my $tag_id = $query->param('tag_id'); + +my ($template, $borrowernumber, $cookie) = get_template_and_user({ + template_name => "tags/list.tmpl", + query => $query, + type => "intranet", + debug => 1, + authnotrequired => 0, + flagsrequired => $needed_flags, +}); + +if( $op eq "del" ){ + remove_tag($tag_id); + print $query->redirect("/cgi-bin/koha/tags/list.pl?tag=$tag"); +} else { + +my $marcflavour = C4::Context->preference('marcflavour'); +my @results; + +if ($tag) { + my $taglist = get_tag_rows({term=>$tag}); + for ( @{$taglist} ) { + my $dat = &GetBiblioData($_->{biblionumber}); + my $record = &GetMarcBiblio($_->{biblionumber}); + $dat->{'subtitle'} = GetRecordValue('subtitle', $record, GetFrameworkCode($_->{biblionumber})); + my @items = GetItemsInfo( $_->{biblionumber} ); + $dat->{biblionumber} = $_->{biblionumber}; + $dat->{tag_id} = $_->{tag_id}; + $dat->{items} = \@items; + $dat->{TagLoop} = get_tags({biblionumber=>$_->{biblionumber}, 'sort'=>'-weight',limit=>10 }); + push( @results, $dat ); + } + +my $resultsarray = \@results; + +$template->param( + tag => $tag, + titles => $resultsarray, +); +} +} + +output_html_with_http_headers $query, $cookie, $template->output; -- 1.7.3 From oleonard at myacpl.org Thu Oct 20 21:59:36 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 20 Oct 2011 15:59:36 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 5280 - Fix password field so that the password is masked as it is entered Message-ID: <1319140776-12069-1-git-send-email-oleonard@myacpl.org> This patch changes the password field to a password type input on member-password.pl and adds a confirmation field to both member-password.pl and memberentry.pl requiring that the password be re-entered to confirm. Client-side and server-side validation for the two password fields has been added to both pages. Multiple error messages can now be displayed together on member-password.pl. If the user wishes for Koha to suggest a random password on member-password.pl they can click a link which will remove the password-type input fields, replace them with text-type fields, and automatically fill them with the random password suggestion. --- koha-tmpl/intranet-tmpl/prog/en/js/members.js | 11 +++ .../prog/en/modules/members/member-password.tt | 52 +++++++++++++-- .../prog/en/modules/members/memberentrygen.tt | 69 ++++++++++++++++--- members/member-password.pl | 36 +++++----- members/memberentry.pl | 2 + 5 files changed, 134 insertions(+), 36 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/members.js b/koha-tmpl/intranet-tmpl/prog/en/js/members.js index 796db0a..c4c6e6c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/members.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/members.js @@ -128,6 +128,17 @@ function check_form_borrowers(nav){ } } } + + if ( document.form.password.value != document.form.password2.value ){ + if ( message_champ != '' ){ + message_champ += "\n"; + } else { + message = ""; + } + message_champ+= MSG_PASSWORD_MISMATCH; + statut=1; + } + //patrons form to test if you checked no to the question of double if (statut!=1 && document.form.check_member.value > 0 ) { if (!(document.form_double.answernodouble.checked)){ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt index 93b1828..1269270 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt @@ -1,6 +1,25 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › [% IF ( newpassword ) %]Password Updated [% ELSE %]Update Password for [% surname %], [% firstname %][% END %] [% INCLUDE 'doc-head-close.inc' %] + [% INCLUDE 'header.inc' %] @@ -20,31 +39,50 @@ [% ELSE %] -
    + [% IF ( errormsg ) %] +
    +

    The following errors have occurred:

    +
      [% IF ( BADUSERID ) %] -
      You have entered a User ID that already exists. Please choose another one.
      +
    • You have entered a username that already exists. Please choose another one.
    • [% END %] [% IF ( SHORTPASSWORD ) %] -
      The password entered is too short. Password must be at least [% minPasswordLength %] characters.
      +
    • The password entered is too short. Password must be at least [% minPasswordLength %] characters.
    • [% END %] [% IF ( NOPERMISSION ) %] -
      You do not have permission to edit this patron's login information.
      +
    • You do not have permission to edit this patron's login information.
    • [% END %] + [% IF ( NOMATCH ) %] +
    • The passwords entered do not match. Please re-enter the new password.
    • + [% END %] +
    +
    [% END %]
    Change Username and/or Password for [% firstname %] [% surname %]
    1. -
    2. +
    3. -
      Koha cannot display existing passwords. Below is a randomly generated suggestion. Leave the field blank to leave password unchanged.
      +
      Koha cannot display existing passwords. Leave the field blank to leave password unchanged.
      [% IF ( minPasswordLength ) %]
      Minimum password length: [% minPasswordLength %]
      [% END %] -
    4. + [% IF ( NOMATCH ) %] + + + [% ELSE %] + + + [% END %] + +
    5. + + +
    Cancel
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 47ea6c9..48a9030 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -3,7 +3,7 @@ [% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] [% IF ( categoryname ) %] [% categoryname %] patron[% ELSE %][% IF ( I ) %] Organization patron[% END %][% IF ( A ) %] Adult patron[% END %][% IF ( C ) %] Child patron[% END %][% IF ( P ) %] Professional patron[% END %][% IF ( S ) %] Staff patron[% END %][% END %][% UNLESS ( opadd ) %] [% surname %], [% firstname %][% END %] [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %] - @@ -143,6 +144,9 @@ [% IF ( ERROR_short_password ) %]
  • Password must be at least [% minPasswordLength %] characters long.
  • [% END %] + [% IF ( ERROR_password_mismatch ) %] +
  • Passwords do not match.
  • + [% END %] [% IF ( ERROR_extended_unique_id_failed ) %]
  • The attribute value [% ERROR_extended_unique_id_failed %] is already is use by another patron record.
  • @@ -1069,39 +1073,82 @@ [% IF ( opadd ) %] [% IF ( NoUpdateLogin ) %] [% IF ( opduplicate ) %] - + [% ELSE %] - + [% END %] [% ELSE %] [% IF ( opduplicate ) %] - + [% ELSE %] - + [% END %] [% END %] [% ELSE %] [% IF ( password ) %] [% IF ( NoUpdateLogin ) %] - + [% ELSE %] [% IF ( opduplicate ) %] - + [% ELSE %] - + [% END %] [% END %] [% ELSE %] [% IF ( NoUpdateLogin ) %] - + [% ELSE %] - + [% END %] [% END %] [% END %] [% IF ( mandatorypassword ) %]Required[% END %][% IF ( ERROR_short_password ) %]Password is too short[% END %] [% IF ( minPasswordLength ) %]
    Minimum password length: [% minPasswordLength %]
    [% END %] - + +
  • + [% IF ( mandatorypassword ) %] +
  • +
    [% UNLESS ( opadd ) %] diff --git a/members/member-password.pl b/members/member-password.pl index 25e9551..dce3e78 100755 --- a/members/member-password.pl +++ b/members/member-password.pl @@ -40,17 +40,21 @@ $flagsrequired->{borrowers}=1; my $member=$input->param('member'); my $cardnumber = $input->param('cardnumber'); my $destination = $input->param('destination'); -my $errormsg; +my @errors; my ($bor)=GetMember('borrowernumber' => $member); if(( $member ne $loggedinuser ) && ($bor->{'category_type'} eq 'S' ) ) { - $errormsg = 'NOPERMISSION' unless($staffflags->{'superlibrarian'} || $staffflags->{'staffaccess'} ); + push(@errors,'NOPERMISSION') unless($staffflags->{'superlibrarian'} || $staffflags->{'staffaccess'} ); # need superlibrarian for koha-conf.xml fakeuser. } my $newpassword = $input->param('newpassword'); +my $newpassword2 = $input->param('newpassword2'); + +push(@errors,'NOMATCH') if ( ( $newpassword && $newpassword2 ) && ($newpassword ne $newpassword2) ); + my $minpw = C4::Context->preference('minPasswordLength'); -$errormsg = 'SHORTPASSWORD' if( $newpassword && $minpw && (length($newpassword) < $minpw ) ); +push(@errors,'SHORTPASSWORD') if( $newpassword && $minpw && (length($newpassword) < $minpw ) ); -if ( $newpassword && ! $errormsg ) { +if ( $newpassword && !scalar(@errors) ) { my $digest=md5_base64($input->param('newpassword')); my $uid = $input->param('newuserid'); my $dbh=C4::Context->dbh; @@ -62,13 +66,7 @@ if ( $newpassword && ! $errormsg ) { print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member"); } } else { - $errormsg = 'BADUSERID'; - $template->param(othernames => $bor->{'othernames'}, - surname => $bor->{'surname'}, - firstname => $bor->{'firstname'}, - userid => $bor->{'userid'}, - defaultnewpassword => $newpassword - ); + push(@errors,'BADUSERID'); } } else { my $userid = $bor->{'userid'}; @@ -79,7 +77,9 @@ if ( $newpassword && ! $errormsg ) { for (my $i=0; $i<$length; $i++) { $defaultnewpassword.=substr($chars, int(rand(length($chars))),1); } - + + $template->param( defaultnewpassword => $defaultnewpassword ); +} if ( $bor->{'category_type'} eq 'C') { my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' ); my $cnt = scalar(@$catcodes); @@ -120,15 +120,15 @@ if (C4::Context->preference('ExtendedPatronAttributes')) { userid => $bor->{'userid'}, destination => $destination, is_child => ($bor->{'category_type'} eq 'C'), - defaultnewpassword => $defaultnewpassword, + minPasswordLength => $minpw ); +if( scalar(@errors )){ + $template->param( errormsg => 1 ); + foreach my $error (@errors) { + $template->param($error) || $template->param( $error => 1); + } } -$template->param( member => $member, - errormsg => $errormsg, - $errormsg => 1 , - minPasswordLength => $minpw ); - output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/memberentry.pl b/members/memberentry.pl index f01261e..cbb479a 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -274,6 +274,8 @@ if ($op eq 'save' || $op eq 'insert'){ } my $password = $input->param('password'); + my $password2 = $input->param('password2'); + push @errors, "ERROR_password_mismatch" if ( $password ne $password2 ); push @errors, "ERROR_short_password" if( $password && $minpw && $password ne '****' && (length($password) < $minpw) ); if (C4::Context->preference('ExtendedPatronAttributes')) { -- 1.7.3 From nengard at bywatersolutions.com Thu Oct 20 12:48:58 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Thu, 20 Oct 2011 06:48:58 -0400 Subject: [Koha-patches] [PATCH] Bug 6716 Update biblio & deletedbiblio tables Message-ID: <1319107738-6859-1-git-send-email-nengard@bywatersolutions.com> The comments on the biblio and deletedbiblio table didn't mention the MARC21 subfields. This patch adds that documentation in. --- installer/data/mysql/kohastructure.sql | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e4388a4..911ccb2 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -116,16 +116,16 @@ DROP TABLE IF EXISTS `biblio`; CREATE TABLE `biblio` ( -- table that stores bibliographic information `biblionumber` int(11) NOT NULL auto_increment, -- unique identifier assigned to each bibliographic record `frameworkcode` varchar(4) NOT NULL default '', -- foriegn key from the biblio_framework table to identify which framework was used in cataloging this record - `author` mediumtext, -- statement of responsibility from MARC record (100 in MARC21) - `title` mediumtext, -- title (without the subtitle) from the MARC record (245 in MARC21) - `unititle` mediumtext, -- uniform title (without the subtitle) from the MARC record (240 in MARC21) - `notes` mediumtext, -- values from the general notes field in the MARC record (500 in MARC21) split by bar (|) + `author` mediumtext, -- statement of responsibility from MARC record (100$a in MARC21) + `title` mediumtext, -- title (without the subtitle) from the MARC record (245$a in MARC21) + `unititle` mediumtext, -- uniform title (without the subtitle) from the MARC record (240$a in MARC21) + `notes` mediumtext, -- values from the general notes field in the MARC record (500$a in MARC21) split by bar (|) `serial` tinyint(1) default NULL, -- foreign key, linking to the subscriptionid in the serial table `seriestitle` mediumtext, `copyrightdate` smallint(6) default NULL, -- publication or copyright date from the MARC record `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this record was last touched `datecreated` DATE NOT NULL, -- the date this record was added to Koha - `abstract` mediumtext, -- summary from the MARC record (520 in MARC21) + `abstract` mediumtext, -- summary from the MARC record (520$a in MARC21) PRIMARY KEY (`biblionumber`), KEY `blbnoidx` (`biblionumber`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -590,16 +590,16 @@ DROP TABLE IF EXISTS `deletedbiblio`; CREATE TABLE `deletedbiblio` ( -- stores information about bibliographic records that have been deleted `biblionumber` int(11) NOT NULL auto_increment, -- unique identifier assigned to each bibliographic record `frameworkcode` varchar(4) NOT NULL default '', -- foriegn key from the biblio_framework table to identify which framework was used in cataloging this record - `author` mediumtext, -- statement of responsibility from MARC record (100 in MARC21) - `title` mediumtext, -- title (without the subtitle) from the MARC record (245 in MARC21) - `unititle` mediumtext, -- uniform title (without the subtitle) from the MARC record (240 in MARC21) - `notes` mediumtext, -- values from the general notes field in the MARC record (500 in MARC21) split by bar (|) + `author` mediumtext, -- statement of responsibility from MARC record (100$a in MARC21) + `title` mediumtext, -- title (without the subtitle) from the MARC record (245$a in MARC21) + `unititle` mediumtext, -- uniform title (without the subtitle) from the MARC record (240$a in MARC21) + `notes` mediumtext, -- values from the general notes field in the MARC record (500$a in MARC21) split by bar (|) `serial` tinyint(1) default NULL, -- foreign key, linking to the subscriptionid in the serial table `seriestitle` mediumtext, `copyrightdate` smallint(6) default NULL, -- publication or copyright date from the MARC record `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this record was last touched `datecreated` DATE NOT NULL, -- the date this record was added to Koha - `abstract` mediumtext, -- summary from the MARC record (520 in MARC21) + `abstract` mediumtext, -- summary from the MARC record (520$a in MARC21) PRIMARY KEY (`biblionumber`), KEY `blbnoidx` (`biblionumber`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- 1.7.2.3 From oleonard at myacpl.org Fri Oct 21 16:25:35 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 21 Oct 2011 10:25:35 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 7075 - Fine in days triggered for patrons with past overdues when fine in days is set to 0 Message-ID: <1319207135-16529-1-git-send-email-oleonard@myacpl.org> Changes "WHERE finedays IS NOT NULL" to "WHERE finedays > 0" in order to accomodate 0 values in issuingrules.finedays. --- C4/Members.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 56718f0..c0165c6 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -639,7 +639,7 @@ sub IsMemberBlocked { LEFT JOIN issuingrules ON (issuingrules.itemtype=biblioitems.itemtype) }; } $strsth.= - qq{ WHERE finedays IS NOT NULL + qq{ WHERE finedays > 0 AND date_due < returndate AND borrowernumber = ? ORDER BY blockingdate DESC, blockedcount DESC -- 1.7.3 From oleonard at myacpl.org Fri Oct 21 21:07:33 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 21 Oct 2011 15:07:33 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 7077 - Add system pref to control behavior of submitting empty barcode field Message-ID: <1319224053-23737-1-git-send-email-oleonard@myacpl.org> Adds a new system preference, CircAutoPrintQuickSlip: When an empty an empty barcode field is submitted in circulation [ clear the screen | open a print quick slip window ]. --- circ/circulation.pl | 1 + installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 7 +++++++ .../en/modules/admin/preferences/circulation.pref | 7 +++++++ .../prog/en/modules/circ/circulation.tt | 12 ++++++------ 5 files changed, 22 insertions(+), 7 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index efb87da..1b22b6a 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -689,6 +689,7 @@ $template->param( circview => 1, soundon => C4::Context->preference("SoundOn"), fast_cataloging => $fast_cataloging, + CircAutoPrintQuickSlip => C4::Context->preference("CircAutoPrintQuickSlip"), ); # save stickyduedate to session diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index ae2c1cb..453c561 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -328,4 +328,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo'); - +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CircAutoPrintQuickSlip', '1', 'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window or Clear the screen.',NULL,'YesNo'); \ No newline at end of file diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9939305..efbd3dd 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4544,6 +4544,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CircAutoPrintQuickSlip', '1', 'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window or Clear the screen.',NULL,'YesNo');"); + print "Upgrade to $DBversion done (Add syspref CircAutoPrintQuickSlip to control what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window or clear the screen. )\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS 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 f4946b5..817ce57 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 @@ -91,6 +91,13 @@ Circulation: yes: Record no: "Don't record" - local use when an unissued item is checked in. + - + - When an empty an empty barcode field is submitted in circulation + - pref: CircAutoPrintQuickSlip + choices: + yes: "open a print quick slip window" + no: "clear the screen" + - . Checkout Policy: - - pref: AllowNotForLoanOverride diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 061f376..25132db 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -50,12 +50,12 @@ $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show(); } } ).attr( 'checked', false ); - [% END %] - // listen submit to trigger qslip on empty checkout - $('#mainform').bind('submit',function() { - if ($('#barcode').val() == '') { - return printx_window('qslip'); } - }); + [% END %][% IF ( CircAutoPrintQuickSlip ) %] + // listen submit to trigger qslip on empty checkout + $('#mainform').bind('submit',function() { + if ($('#barcode').val() == '') { + return printx_window('qslip'); } + });[% END %] var allcheckboxes = $(".checkboxed"); -- 1.7.3 From srdjan at catalyst.net.nz Mon Oct 24 07:55:56 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Mon, 24 Oct 2011 18:55:56 +1300 Subject: [Koha-patches] [PATCH] bug_7001: Issue and Reserve slips are notices. In-Reply-To: References: Message-ID: <1319435756-4001-1-git-send-email-srdjan@catalyst.net.nz> Branches can have their own version of notices - added branchcode to letter table. Support html notices - added is_html to letter table. GetPreparedletter() is the interface for compiling letters (notices). Sysprefs for notice and slips stylesheets. --- C4/Circulation.pm | 20 +- C4/Letters.pm | 580 +++++++++++++------- C4/Members.pm | 81 +++- C4/Message.pm | 12 +- C4/Print.pm | 139 ++---- C4/Reserves.pm | 103 +++-- C4/Suggestions.pm | 22 +- acqui/booksellers.pl | 3 +- circ/circulation.pl | 3 +- circ/hold-transfer-slip.pl | 27 +- .../data/mysql/de-DE/mandatory/sample_notices.sql | 2 +- .../data/mysql/en/mandatory/sample_notices.sql | 84 +++- .../data/mysql/es-ES/mandatory/sample_notices.sql | 2 +- .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 2 +- installer/data/mysql/it-IT/necessari/notices.sql | 2 +- installer/data/mysql/kohastructure.sql | 4 +- .../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 2 +- .../data/mysql/pl-PL/mandatory/sample_notices.sql | 2 +- .../data/mysql/ru-RU/mandatory/sample_notices.sql | 2 +- installer/data/mysql/sysprefs.sql | 3 + .../data/mysql/uk-UA/mandatory/sample_notices.sql | 2 +- installer/data/mysql/updatedatabase.pl | 98 ++++- .../prog/en/includes/circ-toolbar.inc | 4 +- .../en/modules/admin/preferences/circulation.pref | 5 + .../en/modules/admin/preferences/staff_client.pref | 5 + .../prog/en/modules/batch/print-notices.tt | 6 +- .../prog/en/modules/circ/hold-transfer-slip.tt | 54 -- .../prog/en/modules/circ/printslip.tt | 28 + .../prog/en/modules/members/moremember-receipt.tt | 76 --- .../intranet-tmpl/prog/en/modules/tools/letter.tt | 58 ++- members/memberentry.pl | 5 +- members/moremember.pl | 10 - members/printslip.pl | 89 +++ misc/cronjobs/advance_notices.pl | 78 ++-- misc/cronjobs/gather_print_notices.pl | 14 +- misc/cronjobs/overdue_notices.pl | 86 ++-- t/db_dependent/lib/KohaTest/Letters.pm | 5 +- t/db_dependent/lib/KohaTest/Letters/GetLetter.pm | 3 +- t/db_dependent/lib/KohaTest/Members.pm | 1 + t/db_dependent/lib/KohaTest/Print.pm | 5 +- t/db_dependent/lib/KohaTest/Reserves.pm | 1 + tools/letter.pl | 204 +++++--- 42 files changed, 1214 insertions(+), 718 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt create mode 100755 members/printslip.pl diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9f81773..33e5430 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2628,11 +2628,18 @@ sub SendCirculationAlert { borrowernumber => $borrower->{borrowernumber}, message_name => $message_name{$type}, }); - my $letter = C4::Letters::getletter('circulation', $type); - C4::Letters::parseletter($letter, 'biblio', $item->{biblionumber}); - C4::Letters::parseletter($letter, 'biblioitems', $item->{biblionumber}); - C4::Letters::parseletter($letter, 'borrowers', $borrower->{borrowernumber}); - C4::Letters::parseletter($letter, 'branches', $branch); + my $letter = C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $type, + branchcode => $branch, + tables => { + 'biblio' => $item->{biblionumber}, + 'biblioitems' => $item->{biblionumber}, + 'borrowers' => $borrower, + 'branches' => $branch, + } + ) or return; + my @transports = @{ $borrower_preferences->{transports} }; # warn "no transports" unless @transports; for (@transports) { @@ -2647,7 +2654,8 @@ sub SendCirculationAlert { $message->update; } } - $letter; + + return $letter; } =head2 updateWrongTransfer diff --git a/C4/Letters.pm b/C4/Letters.pm index 6846a00..8ca260f 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -26,6 +26,7 @@ use Encode; use Carp; use C4::Members; +use C4::Members::Attributes qw(GetBorrowerAttributes); use C4::Branch; use C4::Log; use C4::SMS; @@ -42,7 +43,7 @@ BEGIN { $VERSION = 3.01; @ISA = qw(Exporter); @EXPORT = qw( - &GetLetters &getletter &addalert &getalert &delalert &findrelatedto &SendAlerts GetPrintMessages + &GetLetters &GetPreparedLetter &GetWrappedLetter &addalert &getalert &delalert &findrelatedto &SendAlerts &GetPrintMessages ); } @@ -117,13 +118,26 @@ sub GetLetters (;$) { return \%letters; } -sub getletter ($$) { - my ( $module, $code ) = @_; +my %letter; +sub getletter ($$$) { + my ( $module, $code, $branchcode ) = @_; + + if (C4::Context->preference('IndependantBranches') && $branchcode){ + $$branchcode = C4::Context->userenv->{'branch'}; + } + + if ( my $l = $letter{$module}{$code}{$branchcode} ) { + return { %$l }; # deep copy + } + my $dbh = C4::Context->dbh; - my $sth = $dbh->prepare("select * from letter where module=? and code=?"); - $sth->execute( $module, $code ); - my $line = $sth->fetchrow_hashref; - return $line; + my $sth = $dbh->prepare("select * from letter where module=? and code=? and (branchcode = ? or branchcode = '') order by branchcode desc limit 1"); + $sth->execute( $module, $code, $branchcode ); + my $line = $sth->fetchrow_hashref + or return; + $line->{'content-type'} = 'text/html; charset="UTF-8"' if $line->{is_html}; + $letter{$module}{$code}{$branchcode} = $line; + return { %$line }; } =head2 addalert ($borrowernumber, $type, $externalid) @@ -178,7 +192,7 @@ sub delalert ($) { sub getalert (;$$$) { my ( $borrowernumber, $type, $externalid ) = @_; my $dbh = C4::Context->dbh; - my $query = "SELECT * FROM alert WHERE"; + my $query = "SELECT a.*, b.branchcode FROM alert a JOIN borrowers b USING(borrowernumber) WHERE"; my @bind; if ($borrowernumber and $borrowernumber =~ /^\d+$/) { $query .= " borrowernumber=? AND "; @@ -234,70 +248,65 @@ sub findrelatedto ($$) { parameters : - $type : the type of alert - $externalid : the id of the "object" to query - - $letter : the letter to send. + - $letter_code : the letter to send. send an alert to all borrowers having put an alert on a given subject. =cut sub SendAlerts { - my ( $type, $externalid, $letter ) = @_; + my ( $type, $externalid, $letter_code ) = @_; my $dbh = C4::Context->dbh; if ( $type eq 'issue' ) { - # warn "sending issues..."; - my $letter = getletter( 'serial', $letter ); - # prepare the letter... # search the biblionumber my $sth = $dbh->prepare( "SELECT biblionumber FROM subscription WHERE subscriptionid=?"); $sth->execute($externalid); - my ($biblionumber) = $sth->fetchrow; - - # parsing branch info - my $userenv = C4::Context->userenv; - parseletter( $letter, 'branches', $userenv->{branch} ); - - # parsing librarian name - $letter->{content} =~ s/<>/$userenv->{firstname}/g; - $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - - # parsing biblio information - parseletter( $letter, 'biblio', $biblionumber ); - parseletter( $letter, 'biblioitems', $biblionumber ); + my ($biblionumber) = $sth->fetchrow + or warn( "No subscription for '$externalid'" ), + return; + my %letter; # find the list of borrowers to alert my $alerts = getalert( '', 'issue', $externalid ); foreach (@$alerts) { - # and parse borrower ... - my $innerletter = $letter; my $borinfo = C4::Members::GetMember('borrowernumber' => $_->{'borrowernumber'}); - parseletter( $innerletter, 'borrowers', $_->{'borrowernumber'} ); + my $email = $borinfo->{email} or next; + + # warn "sending issues..."; + my $userenv = C4::Context->userenv; + my $letter = GetPreparedLetter ( + module => 'serial', + letter_code => $letter_code, + branchcode => $userenv->{branch}, + tables => { + 'branches' => $_->{branchcode}, + 'biblio' => $biblionumber, + 'biblioitems' => $biblionumber, + 'borrowers' => $borinfo, + }, + want_librarian => 1, + ) or return; # ... then send mail - if ( $borinfo->{email} ) { - my %mail = ( - To => $borinfo->{email}, - From => $borinfo->{email}, - Subject => "" . $innerletter->{title}, - Message => "" . $innerletter->{content}, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; - + my %mail = ( + To => $email, + From => $email, + Subject => "" . $letter->{title}, + Message => "" . $letter->{content}, + 'Content-Type' => 'text/plain; charset="utf8"', + ); + sendmail(%mail) or carp $Mail::Sendmail::error; # warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}"; - } } } elsif ( $type eq 'claimacquisition' ) { # warn "sending issues..."; - my $letter = getletter( 'claimacquisition', $letter ); # prepare the letter... # search the biblionumber @@ -307,52 +316,43 @@ sub SendAlerts { my $sthorders = $dbh->prepare($strsth); $sthorders->execute; my $dataorders = $sthorders->fetchall_arrayref( {} ); - parseletter( $letter, 'aqbooksellers', - $dataorders->[0]->{booksellerid} ); + my $sthbookseller = $dbh->prepare("select * from aqbooksellers where id=?"); $sthbookseller->execute( $dataorders->[0]->{booksellerid} ); my $databookseller = $sthbookseller->fetchrow_hashref; - # parsing branch info - my $userenv = C4::Context->userenv; - parseletter( $letter, 'branches', $userenv->{branch} ); - - # parsing librarian name - $letter->{content} =~ s/<>/$userenv->{firstname}/g; - $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - 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/; - } + my @email; + push @email, $databookseller->{bookselleremail} if $databookseller->{bookselleremail}; + push @email, $databookseller->{contemail} if $databookseller->{contemail}; + unless (@email) { + warn "Bookseller $dataorders->[0]->{booksellerid} without emails"; + return; } - $letter->{content} =~ s/<<[^>]*>>//g; - my $innerletter = $letter; + + my $userenv = C4::Context->userenv; + my $letter = GetPreparedLetter ( + module => 'claimacquisition', + letter_code => $letter_code, + branchcode => $userenv->{branch}, + tables => { + 'branches' => $userenv->{branch}, + 'aqbooksellers' => $databookseller, + }, + repeat => $dataorders, + want_librarian => 1, + ) or return; # ... then send mail - if ( $databookseller->{bookselleremail} - || $databookseller->{contemail} ) - { - my %mail = ( - To => $databookseller->{bookselleremail} - . ( - $databookseller->{contemail} - ? "," . $databookseller->{contemail} - : "" - ), - From => $userenv->{emailaddress}, - Subject => "" . $innerletter->{title}, - Message => "" . $innerletter->{content}, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; - } + my %mail = ( + To => join( ','. @email), + From => $userenv->{emailaddress}, + Subject => "" . $letter->{title}, + Message => "" . $letter->{content}, + 'Content-Type' => 'text/plain; charset="utf8"', + ); + sendmail(%mail) or carp $Mail::Sendmail::error; + if ( C4::Context->preference("LetterLog") ) { logaction( "ACQUISITION", @@ -360,16 +360,13 @@ sub SendAlerts { "", "order list : " . join( ",", @$externalid ) - . "\n$innerletter->{title}\n$innerletter->{content}" + . "\n$letter->{title}\n$letter->{content}" ); } } elsif ( $type eq 'claimissues' ) { # warn "sending issues..."; - my $letter = getletter( 'claimissues', $letter ); - - # prepare the letter... # search the biblionumber my $strsth = "select serial.*,subscription.*, biblio.* from serial LEFT JOIN subscription on serial.subscriptionid=subscription.subscriptionid LEFT JOIN biblio on serial.biblionumber=biblio.biblionumber where serial.serialid IN (" @@ -377,81 +374,76 @@ sub SendAlerts { my $sthorders = $dbh->prepare($strsth); $sthorders->execute; my $dataorders = $sthorders->fetchall_arrayref( {} ); - parseletter( $letter, 'aqbooksellers', - $dataorders->[0]->{aqbooksellerid} ); + my $sthbookseller = $dbh->prepare("select * from aqbooksellers where id=?"); $sthbookseller->execute( $dataorders->[0]->{aqbooksellerid} ); my $databookseller = $sthbookseller->fetchrow_hashref; - # parsing branch info - my $userenv = C4::Context->userenv; - parseletter( $letter, 'branches', $userenv->{branch} ); - - # parsing librarian name - $letter->{content} =~ s/<>/$userenv->{firstname}/g; - $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - 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/; - } + my @email; + push @email, $databookseller->{bookselleremail} if $databookseller->{bookselleremail}; + push @email, $databookseller->{contemail} if $databookseller->{contemail}; + unless (@email) { + warn "Bookseller $dataorders->[0]->{booksellerid} without emails"; + return; } - $letter->{content} =~ s/<<[^>]*>>//g; - my $innerletter = $letter; + + # prepare the letter... + my $userenv = C4::Context->userenv; + my $letter = GetPreparedLetter ( + module => 'claimissues', + letter_code => $letter_code, + branchcode => $userenv->{branch}, + tables => { + 'branches' => $userenv->{branch}, + 'aqbooksellers' => $databookseller, + }, + repeat => $dataorders, + want_librarian => 1, + ) or return; # ... then send mail - if ( $databookseller->{bookselleremail} - || $databookseller->{contemail} ) { - my $mail_to = $databookseller->{bookselleremail}; - if ($databookseller->{contemail}) { - if (!$mail_to) { - $mail_to = $databookseller->{contemail}; - } else { - $mail_to .= q|,|; - $mail_to .= $databookseller->{contemail}; - } - } - my $mail_subj = $innerletter->{title}; - my $mail_msg = $innerletter->{content}; - $mail_msg ||= q{}; - $mail_subj ||= q{}; + my $mail_subj = $letter->{title}; + my $mail_msg = $letter->{content}; + $mail_msg ||= q{}; + $mail_subj ||= q{}; - my %mail = ( - To => $mail_to, - From => $userenv->{emailaddress}, - Subject => $mail_subj, - Message => $mail_msg, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; - logaction( - "ACQUISITION", - "CLAIM ISSUE", - undef, - "To=" - . $databookseller->{contemail} - . " Title=" - . $innerletter->{title} - . " Content=" - . $innerletter->{content} - ) if C4::Context->preference("LetterLog"); - } + my %mail = ( + To => join( ','. @email), + From => $userenv->{emailaddress}, + Subject => $mail_subj, + Message => $mail_msg, + 'Content-Type' => 'text/plain; charset="utf8"', + ); + sendmail(%mail) or carp $Mail::Sendmail::error; + + logaction( + "ACQUISITION", + "CLAIM ISSUE", + undef, + "To=" + . $databookseller->{contemail} + . " Title=" + . $letter->{title} + . " Content=" + . $letter->{content} + ) if C4::Context->preference("LetterLog"); } # send an "account details" notice to a newly created user elsif ( $type eq 'members' ) { - # must parse the password special, before it's hashed. - $letter->{content} =~ s/<>/$externalid->{'password'}/g; - - parseletter( $letter, 'borrowers', $externalid->{'borrowernumber'}); - parseletter( $letter, 'branches', $externalid->{'branchcode'} ); - my $branchdetails = GetBranchDetail($externalid->{'branchcode'}); + my $letter = GetPreparedLetter ( + module => 'members', + letter_code => $letter_code, + branchcode => $externalid->{'branchcode'}, + tables => { + 'branches' => $branchdetails, + 'borrowers' => $externalid->{'borrowernumber'}, + }, + substitute => { 'borrowers.password' => $externalid->{'password'} }, + want_librarian => 1, + ) or return; + my %mail = ( To => $externalid->{'emailaddr'}, From => $branchdetails->{'branchemail'} || C4::Context->preference("KohaAdminEmailAddress"), @@ -463,24 +455,148 @@ sub SendAlerts { } } -=head2 parseletter($letter, $table, $pk) - - parameters : - - $letter : a hash to letter fields (title & content useful) - - $table : the Koha table to parse. - - $pk : the primary key to query on the $table table - parse all fields from a table, and replace values in title & content with the appropriate value - (not exported sub, used only internally) +=head2 GetPreparedLetter( %params ) + + %params hash: + module => letter module, mandatory + letter_code => letter code, mandatory + branchcode => for letter selection, if missing default system letter taken + tables => a hashref with table names as keys. Values are either: + - a scalar - primary key value + - an arrayref - primary key values + - a hashref - full record + substitute => custom substitution key/value pairs + repeat => records to be substituted on consecutive lines: + - an arrayref - tries to guess what needs substituting by + taking remaining << >> tokensr; not recommended + - a hashref token => @tables - replaces << >> << >> + subtemplate for each @tables row; table is a hashref as above + want_librarian => boolean, if set to true triggers librarian details + substitution from the userenv + Return value: + letter fields hashref (title & content useful) =cut -our %handles = (); -our %columns = (); +sub GetPreparedLetter { + my %params = @_; + + my $module = $params{module} or croak "No module"; + my $letter_code = $params{letter_code} or croak "No letter_code"; + my $branchcode = $params{branchcode} || ''; + + my $letter = getletter( $module, $letter_code, $branchcode ) + or warn( "No $module $letter_code letter"), + return; + + my $tables = $params{tables}; + my $substitute = $params{substitute}; + my $repeat = $params{repeat}; + $tables || $substitute || $repeat + or carp( "ERROR: nothing to substitute - both 'tables' and 'substitute' are empty" ), + return; + my $want_librarian = $params{want_librarian}; + + if ($substitute) { + while ( my ($token, $val) = each %$substitute ) { + $letter->{title} =~ s/<<$token>>/$val/g; + $letter->{content} =~ s/<<$token>>/$val/g; + } + } + + if ($want_librarian) { + # parsing librarian name + my $userenv = C4::Context->userenv; + $letter->{content} =~ s/<>/$userenv->{firstname}/go; + $letter->{content} =~ s/<>/$userenv->{surname}/go; + $letter->{content} =~ s/<>/$userenv->{emailaddress}/go; + } + + my ($repeat_no_enclosing_tags, $repeat_enclosing_tags); + + if ($repeat) { + if (ref ($repeat) eq 'ARRAY' ) { + $repeat_no_enclosing_tags = $repeat; + } else { + $repeat_enclosing_tags = $repeat; + } + } + + if ($repeat_enclosing_tags) { + while ( my ($tag, $tag_tables) = each %$repeat_enclosing_tags ) { + if ( $letter->{content} =~ m!<$tag>(.*)!s ) { + my $subcontent = $1; + my @lines = map { + my %subletter = ( title => '', content => $subcontent ); + _substitute_tables( \%subletter, $_ ); + $subletter{content}; + } @$tag_tables; + $letter->{content} =~ s!<$tag>.*!join( "\n", @lines )!se; + } + } + } + + if ($tables) { + _substitute_tables( $letter, $tables ); + } + + if ($repeat_no_enclosing_tags) { + if ( $letter->{content} =~ m/[^\n]*<<.*>>[^\n]*/so ) { + my $line = $&; + my $i = 1; + my @lines = map { + my $c = $line; + $c =~ s/<>/$i/go; + foreach my $field ( keys %{$_} ) { + $c =~ s/(<<[^\.]+.$field>>)/$_->{$field}/; + } + $i++; + $c; + } @$repeat_no_enclosing_tags; + + my $replaceby = join( "\n", @lines ); + $letter->{content} =~ s/\Q$line\E/$replaceby/s; + } + } + + $letter->{content} =~ s/<<\S*>>//go; #remove any stragglers +# $letter->{content} =~ s/<<[^>]*>>//go; + + return $letter; +} + +sub _substitute_tables { + my ( $letter, $tables ) = @_; + while ( my ($table, $param) = each %$tables ) { + next unless $param; + + my $ref = ref $param; -sub parseletter_sth { + my $values; + if ($ref && $ref eq 'HASH') { + $values = $param; + } + else { + my @pk; + my $sth = _parseletter_sth($table); + unless ($sth) { + warn "_parseletter_sth('$table') failed to return a valid sth. No substitution will be done for that table."; + return; + } + $sth->execute( $ref ? @$param : $param ); + + $values = $sth->fetchrow_hashref; + } + + _parseletter ( $letter, $table, $values ); + } +} + +my %handles = (); +sub _parseletter_sth { my $table = shift; unless ($table) { - carp "ERROR: parseletter_sth() called without argument (table)"; + carp "ERROR: _parseletter_sth() called without argument (table)"; return; } # check cache first @@ -496,8 +612,10 @@ sub parseletter_sth { ($table eq 'branches' ) ? "SELECT * FROM $table WHERE branchcode = ?" : ($table eq 'suggestions' ) ? "SELECT * FROM $table WHERE suggestionid = ?" : ($table eq 'aqbooksellers') ? "SELECT * FROM $table WHERE id = ?" : undef ; + ($table eq 'aqorders' ) ? "SELECT * FROM $table WHERE ordernumber = ?" : undef ; + ($table eq 'opac_news' ) ? "SELECT * FROM $table WHERE idnew = ?" : undef ; unless ($query) { - warn "ERROR: No parseletter_sth query for table '$table'"; + warn "ERROR: No _parseletter_sth query for table '$table'"; return; # nothing to get } unless ($handles{$table} = C4::Context->dbh->prepare($query)) { @@ -507,25 +625,21 @@ sub parseletter_sth { return $handles{$table}; # now cache is populated for that $table } -sub parseletter { - my ( $letter, $table, $pk, $pk2 ) = @_; - unless ($letter) { - carp "ERROR: parseletter() 1st argument 'letter' empty"; - return; - } - my $sth = parseletter_sth($table); - unless ($sth) { - warn "parseletter_sth('$table') failed to return a valid sth. No substitution will be done for that table."; - return; - } - if ( $pk2 ) { - $sth->execute($pk, $pk2); - } else { - $sth->execute($pk); - } +=head2 _parseletter($letter, $table, $values) - my $values = $sth->fetchrow_hashref; - + parameters : + - $letter : a hash to letter fields (title & content useful) + - $table : the Koha table to parse. + - $values : table record hashref + parse all fields from a table, and replace values in title & content with the appropriate value + (not exported sub, used only internally) + +=cut + +my %columns = (); +sub _parseletter { + my ( $letter, $table, $values ) = @_; + # TEMPORARY hack until the expirationdate column is added to reserves if ( $table eq 'reserves' && $values->{'waitingdate'} ) { my @waitingdate = split /-/, $values->{'waitingdate'}; @@ -539,16 +653,51 @@ sub parseletter { )->output(); } + if ($letter->{content} && $letter->{content} =~ /<>/) { + my @da = localtime(); + my $todaysdate = "$da[2]:$da[1] " . C4::Dates->today(); + $letter->{content} =~ s/<>/$todaysdate/go; + } # and get all fields from the table - my $columns = C4::Context->dbh->prepare("SHOW COLUMNS FROM $table"); - $columns->execute; - while ( ( my $field ) = $columns->fetchrow_array ) { - my $replacefield = "<<$table.$field>>"; - $values->{$field} =~ s/\p{P}(?=$)//g if $values->{$field}; - my $replacedby = $values->{$field} || ''; - ($letter->{title} ) and $letter->{title} =~ s/$replacefield/$replacedby/g; - ($letter->{content}) and $letter->{content} =~ s/$replacefield/$replacedby/g; +# my $columns = $columns{$table}; +# unless ($columns) { +# $columns = $columns{$table} = C4::Context->dbh->selectcol_arrayref("SHOW COLUMNS FROM $table"); +# } +# foreach my $field (@$columns) { + + while ( my ($field, $val) = each %$values ) { + my $replacetablefield = "<<$table.$field>>"; + my $replacefield = "<<$field>>"; + $val =~ s/\p{P}(?=$)//g if $val; + my $replacedby = defined ($val) ? $val : ''; + ($letter->{title} ) and do { + $letter->{title} =~ s/$replacetablefield/$replacedby/g; + $letter->{title} =~ s/$replacefield/$replacedby/g; + }; + ($letter->{content}) and do { + $letter->{content} =~ s/$replacetablefield/$replacedby/g; + $letter->{content} =~ s/$replacefield/$replacedby/g; + }; + } + + if ($table eq 'borrowers' && $letter->{content}) { + if ( my $attributes = GetBorrowerAttributes($values->{borrowernumber}) ) { + my %attr; + foreach (@$attributes) { + my $code = $_->{code}; + my $val = $_->{value_description} || $_->{value}; + $val =~ s/\p{P}(?=$)//g if $val; + next unless $val gt ''; + $attr{$code} ||= []; + push @{ $attr{$code} }, $val; + } + while ( my ($code, $val_ar) = each %attr ) { + my $replacefield = "<>"; + my $replacedby = join ',', @$val_ar; + $letter->{content} =~ s/$replacefield/$replacedby/g; + } + } } return $letter; } @@ -733,31 +882,32 @@ returns your letter object, with the content updated. sub _add_attachments { my $params = shift; - return unless 'HASH' eq ref $params; - foreach my $required_parameter (qw( letter attachments message )) { - return unless exists $params->{$required_parameter}; - } - return $params->{'letter'} unless @{ $params->{'attachments'} }; + my $letter = $params->{'letter'}; + my $attachments = $params->{'attachments'}; + return $letter unless @$attachments; + my $message = $params->{'message'}; # First, we have to put the body in as the first attachment - $params->{'message'}->attach( - Type => 'TEXT', - Data => $params->{'letter'}->{'content'}, + $message->attach( + Type => $letter->{'content-type'} || 'TEXT', + Data => $letter->{'is_html'} + ? _wrap_html($letter->{'content'}, $letter->{'title'}) + : $letter->{'content'}, ); - foreach my $attachment ( @{ $params->{'attachments'} } ) { - $params->{'message'}->attach( + foreach my $attachment ( @$attachments ) { + $message->attach( Type => $attachment->{'type'}, Data => $attachment->{'content'}, Filename => $attachment->{'filename'}, ); } # we're forcing list context here to get the header, not the count back from grep. - ( $params->{'letter'}->{'content-type'} ) = grep( /^Content-Type:/, split( /\n/, $params->{'message'}->header_as_string ) ); - $params->{'letter'}->{'content-type'} =~ s/^Content-Type:\s+//; - $params->{'letter'}->{'content'} = $params->{'message'}->body_as_string; + ( $letter->{'content-type'} ) = grep( /^Content-Type:/, split( /\n/, $params->{'message'}->header_as_string ) ); + $letter->{'content-type'} =~ s/^Content-Type:\s+//; + $letter->{'content'} = $message->body_as_string; - return $params->{'letter'}; + return $letter; } @@ -824,14 +974,17 @@ sub _send_message_by_email ($;$$$) { my $utf8 = decode('MIME-Header', $message->{'subject'} ); $message->{subject}= encode('MIME-Header', $utf8); + my $subject = encode('utf8', $message->{'subject'}); my $content = encode('utf8', $message->{'content'}); + my $content_type = $message->{'content_type'} || 'text/plain; charset="UTF-8"'; + my $is_html = $content_type =~ m/html/io; my %sendmail_params = ( To => $to_address, From => $message->{'from_address'} || C4::Context->preference('KohaAdminEmailAddress'), - Subject => encode('utf8', $message->{'subject'}), + Subject => $subject, charset => 'utf8', - Message => $content, - 'content-type' => $message->{'content_type'} || 'text/plain; charset="UTF-8"', + Message => $is_html ? _wrap_html($content, $subject) : $content, + 'content-type' => $content_type, ); $sendmail_params{'Auth'} = {user => $username, pass => $password, method => $method} if $username; if ( my $bcc = C4::Context->preference('OverdueNoticeBcc') ) { @@ -851,6 +1004,27 @@ sub _send_message_by_email ($;$$$) { } } +sub _wrap_html { + my ($content, $title) = @_; + + my $css = C4::Context->preference("NoticeCSS") || ''; + $css = qq{} if $css; + return < + + +$title + +$css + + +$content + + +EOS +} + sub _send_message_by_sms ($) { my $message = shift or return undef; my $member = C4::Members::GetMember( 'borrowernumber' => $message->{'borrowernumber'} ); diff --git a/C4/Members.pm b/C4/Members.pm index 56718f0..2abc178 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -23,7 +23,7 @@ package C4::Members; use strict; #use warnings; FIXME - Bug 2505 use C4::Context; -use C4::Dates qw(format_date_in_iso); +use C4::Dates qw(format_date_in_iso format_date); use Digest::MD5 qw(md5_base64); use Date::Calc qw/Today Add_Delta_YM/; use C4::Log; # logaction @@ -31,8 +31,10 @@ use C4::Overdues; use C4::Reserves; use C4::Accounts; use C4::Biblio; +use C4::Letters; use C4::SQLHelper qw(InsertInTable UpdateInTable SearchInTable); use C4::Members::Attributes qw(SearchIdMatchingAttribute); +use C4::NewsChannels; #get slip news our ($VERSION, at ISA, at EXPORT, at EXPORT_OK,$debug); @@ -91,6 +93,8 @@ BEGIN { &DeleteMessage &GetMessages &GetMessagesCount + + &IssueSlip ); #Modify data @@ -2243,7 +2247,80 @@ sub DeleteMessage { } -END { } # module clean-up code here (global destructor) +=head2 IssueSlip + + IssueSlip($branchcode, $borrowernumber, $quickslip) + + Returns letter hash ( see C4::Letters::GetPreparedLetter ) + + $quickslip is boolean, to indicate whether we want a quick slip + +=cut + +sub IssueSlip { + my ($branch, $borrowernumber, $quickslip) = @_; + +# return unless ( C4::Context->boolean_preference('printcirculationslips') ); + + my $today = POSIX::strftime("%Y-%m-%d", localtime); + + my $issueslist = GetPendingIssues($borrowernumber); + foreach my $it (@$issueslist){ + if ($it->{'issuedate'} eq $today) { + $it->{'today'} = 1; + } + elsif ($it->{'date_due'} le $today) { + $it->{'overdue'} = 1; + } + + $it->{'date_due'}=format_date($it->{'date_due'}); + } + my @issues = sort { $b->{'timestamp'} <=> $a->{'timestamp'} } @$issueslist; + + my ($letter_code, %repeat); + if ( $quickslip ) { + $letter_code = 'ISSUEQSLIP'; + %repeat = ( + 'checkedout' => [ map { + 'biblio' => $_, + 'items' => $_, + 'issues' => $_, + }, grep { $_->{'today'} } @issues ], + ); + } + else { + $letter_code = 'ISSUESLIP'; + %repeat = ( + 'checkedout' => [ map { + 'biblio' => $_, + 'items' => $_, + 'issues' => $_, + }, grep { !$_->{'overdue'} } @issues ], + + 'overdue' => [ map { + 'biblio' => $_, + 'items' => $_, + 'issues' => $_, + }, grep { $_->{'overdue'} } @issues ], + + 'news' => [ map { + $_->{'timestamp'} = $_->{'newdate'}; + { opac_news => $_ } + } @{ GetNewsToDisplay("slip") } ], + ); + } + + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $letter_code, + branchcode => $branch, + tables => { + 'branches' => $branch, + 'borrowers' => $borrowernumber, + }, + repeat => \%repeat, + ); +} 1; diff --git a/C4/Message.pm b/C4/Message.pm index 16272ff..4b88970 100644 --- a/C4/Message.pm +++ b/C4/Message.pm @@ -18,9 +18,15 @@ How to add a new message to the queue: use C4::Items; my $borrower = { borrowernumber => 1 }; my $item = C4::Items::GetItem(1); - my $letter = C4::Letters::getletter('circulation', 'CHECKOUT'); - C4::Letters::parseletter($letter, 'biblio', $item->{biblionumber}); - C4::Letters::parseletter($letter, 'biblioitems', $item->{biblionumber}); + my $letter = C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => 'CHECKOUT', + branchcode => $branch, + tables => { + 'biblio', $item->{biblionumber}, + 'biblioitems', $item->{biblionumber}, + }, + ); C4::Message->enqueue($letter, $borrower->{borrowernumber}, 'email'); How to update a borrower's last checkout message: diff --git a/C4/Print.pm b/C4/Print.pm index 2ba7584..2343fa4 100644 --- a/C4/Print.pm +++ b/C4/Print.pm @@ -20,8 +20,6 @@ package C4::Print; use strict; #use warnings; FIXME - Bug 2505 use C4::Context; -use C4::Members; -use C4::Dates qw(format_date); use vars qw($VERSION @ISA @EXPORT); @@ -30,7 +28,7 @@ BEGIN { $VERSION = 3.01; require Exporter; @ISA = qw(Exporter); - @EXPORT = qw(&remoteprint &printreserve &printslip); + @EXPORT = qw(&printslip); } =head1 NAME @@ -47,28 +45,48 @@ The functions in this module handle sending text to a printer. =head1 FUNCTIONS -=head2 remoteprint +=cut - &remoteprint($items, $borrower); +=comment + my $slip = <<"EOF"; +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Date: $todaysdate; -Prints the list of items in C<$items> to a printer. +ITEM RESERVED: +$itemdata->{'title'} ($itemdata->{'author'}) +barcode: $itemdata->{'barcode'} + +COLLECT AT: $branchname -C<$borrower> is a reference-to-hash giving information about a patron. -This may be gotten from C<&GetMemberDetails>. The patron's name -will be printed in the output. +BORROWER: +$bordata->{'surname'}, $bordata->{'firstname'} +card number: $bordata->{'cardnumber'} +Phone: $bordata->{'phone'} +$bordata->{'streetaddress'} +$bordata->{'suburb'} +$bordata->{'town'} +$bordata->{'emailaddress'} -C<$items> is a reference-to-list, where each element is a -reference-to-hash describing a borrowed item. C<$items> may be gotten -from C<&GetBorrowerIssues>. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +EOF =cut +=head2 printslip + + &printslip($slip) + +print a slip for the given $borrowernumber and $branchcode + +=cut + +sub printslip ($) { + my ($slip) = @_; + + return unless ( C4::Context->boolean_preference('printcirculationslips') ); + # FIXME - It'd be nifty if this could generate pretty PostScript. -sub remoteprint ($$) { - my ($items, $borrower) = @_; - (return) - unless ( C4::Context->boolean_preference('printcirculationslips') ); my $queue = ''; # FIXME - If 'queue' is undefined or empty, then presumably it should @@ -93,100 +111,13 @@ sub remoteprint ($$) { # print $queue; #open (FILE,">/tmp/$file"); - my $i = 0; - # FIXME - This is HLT-specific. Put this stuff in a customizable - # site-specific file somewhere. - print PRINTER "Horowhenua Library Trust\r\n"; - print PRINTER "Phone: 368-1953\r\n"; - print PRINTER "Fax: 367-9218\r\n"; - print PRINTER "Email: renewals\@library.org.nz\r\n\r\n\r\n"; - print PRINTER "$borrower->{'cardnumber'}\r\n"; - print PRINTER - "$borrower->{'title'} $borrower->{'initials'} $borrower->{'surname'}\r\n"; - - # FIXME - Use for ($i = 0; $items->[$i]; $i++) - # Or better yet, foreach $item (@{$items}) - while ( $items->[$i] ) { - - # print $i; - my $itemdata = $items->[$i]; - - # FIXME - This is just begging for a Perl format. - print PRINTER "$i $itemdata->{'title'}\r\n"; - print PRINTER "$itemdata->{'barcode'}"; - print PRINTER " " x 15; - print PRINTER "$itemdata->{'date_due'}\r\n"; - $i++; - } + print PRINTER $slip; print PRINTER "\r\n" x 7 ; close PRINTER; #system("lpr /tmp/$file"); } -sub printreserve { - my ( $branchname, $bordata, $itemdata ) = @_; - my $printer = ''; - (return) unless ( C4::Context->boolean_preference('printreserveslips') ); - if ( $printer eq "" || $printer eq 'nulllp' ) { - open( PRINTER, ">>/tmp/kohares" ) - or die "Could not write to /tmp/kohares"; - } - else { - open( PRINTER, "| lpr -P $printer >/dev/null" ) - or die "Couldn't write to queue:$!\n"; - } - my @da = localtime(); - my $todaysdate = "$da[2]:$da[1] " . C4::Dates->today(); - my $slip = <<"EOF"; -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Date: $todaysdate; - -ITEM RESERVED: -$itemdata->{'title'} ($itemdata->{'author'}) -barcode: $itemdata->{'barcode'} - -COLLECT AT: $branchname - -BORROWER: -$bordata->{'surname'}, $bordata->{'firstname'} -card number: $bordata->{'cardnumber'} -Phone: $bordata->{'phone'} -$bordata->{'streetaddress'} -$bordata->{'suburb'} -$bordata->{'town'} -$bordata->{'emailaddress'} - - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -EOF - print PRINTER $slip; - close PRINTER; - return $slip; -} - -=head2 printslip - - &printslip($borrowernumber) - -print a slip for the given $borrowernumber - -=cut - -#' -sub printslip ($) { - my $borrowernumber = shift; - my $borrower = GetMemberDetails($borrowernumber); - my $issueslist = GetPendingIssues($borrowernumber); - foreach my $it (@$issueslist){ - $it->{'date_due'}=format_date($it->{'date_due'}); - } - my @issues = sort { $b->{'timestamp'} <=> $a->{'timestamp'} } @$issueslist; - remoteprint(\@issues, $borrower ); -} - -END { } # module clean-up code here (global destructor) - 1; __END__ diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 4af8a85..886829e 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -120,6 +120,8 @@ BEGIN { &AlterPriority &ToggleLowestPriority + + &ReserveSlip ); @EXPORT_OK = qw( MergeHolds ); } @@ -193,32 +195,31 @@ sub AddReserve { # Send e-mail to librarian if syspref is active if(C4::Context->preference("emailLibrarianWhenHoldIsPlaced")){ my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber); - my $biblio = GetBiblioData($biblionumber); - my $letter = C4::Letters::getletter( 'reserves', 'HOLDPLACED'); - my $branchcode = $borrower->{branchcode}; - my $branch_details = C4::Branch::GetBranchDetail($branchcode); - my $admin_email_address =$branch_details->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress'); - - my %keys = (%$borrower, %$biblio); - foreach my $key (keys %keys) { - my $replacefield = "<<$key>>"; - $letter->{content} =~ s/$replacefield/$keys{$key}/g; - $letter->{title} =~ s/$replacefield/$keys{$key}/g; + my $branch_details = C4::Branch::GetBranchDetail($borrower->{branchcode}); + if ( my $letter = C4::Letters::GetPreparedLetter ( + module => 'reserves', + letter_code => 'HOLDPLACED', + branchcode => $branch, + tables => { + 'branches' => $branch_details, + 'borrowers' => $borrower, + 'biblio' => $biblionumber, + }, + ) ) { + + my $admin_email_address =$branch_details->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress'); + + C4::Letters::EnqueueLetter( + { letter => $letter, + borrowernumber => $borrowernumber, + message_transport_type => 'email', + from_address => $admin_email_address, + to_address => $admin_email_address, + } + ); } - - C4::Letters::EnqueueLetter( - { letter => $letter, - borrowernumber => $borrowernumber, - message_transport_type => 'email', - from_address => $admin_email_address, - to_address => $admin_email_address, - } - ); - - } - #} ($const eq "o" || $const eq "e") or return; # FIXME: why not have a useful return value? $query = qq/ @@ -1720,21 +1721,21 @@ sub _koha_notify_reserve { my $admin_email_address = $branch_details->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress'); - my $letter = getletter( 'reserves', $letter_code ); - die "Could not find a letter called '$letter_code' in the 'reserves' module" unless( $letter ); + my $letter = C4::Letters::GetPreparedLetter ( + module => 'reserves', + letter_code => $letter_code, + branchcode => $reserve->{branchcode}, + tables => { + 'branches' => $branch_details, + 'borrowers' => $borrower, + 'biblio' => $biblionumber, + 'reserves' => $reserve, + 'items', $reserve->{'itemnumber'}, + }, + substitute => { today => C4::Dates->new()->output() }, + ) or die "Could not find a letter called '$letter_code' in the 'reserves' module"; - C4::Letters::parseletter( $letter, 'branches', $reserve->{'branchcode'} ); - C4::Letters::parseletter( $letter, 'borrowers', $borrowernumber ); - C4::Letters::parseletter( $letter, 'biblio', $biblionumber ); - C4::Letters::parseletter( $letter, 'reserves', $borrowernumber, $biblionumber ); - if ( $reserve->{'itemnumber'} ) { - C4::Letters::parseletter( $letter, 'items', $reserve->{'itemnumber'} ); - } - my $today = C4::Dates->new()->output(); - $letter->{'title'} =~ s/<>/$today/g; - $letter->{'content'} =~ s/<>/$today/g; - $letter->{'content'} =~ s/<<[a-z0-9_]+\.[a-z0-9]+>>//g; #remove any stragglers if ( $print_mode ) { C4::Letters::EnqueueLetter( { @@ -1861,6 +1862,36 @@ sub MergeHolds { } +=head2 ReserveSlip + + ReserveSlip($branchcode, $borrowernumber, $biblionumber) + + Returns letter hash ( see C4::Letters::GetPreparedLetter ) or undef + +=cut + +sub ReserveSlip { + my ($branch, $borrowernumber, $biblionumber) = @_; + +# return unless ( C4::Context->boolean_preference('printreserveslips') ); + + my $reserve = GetReserveInfo($borrowernumber,$biblionumber ) + or return; + + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => 'RESERVESLIP', + branchcode => $branch, + tables => { + 'reserves' => $reserve, + 'branches' => $reserve->{branchcode}, + 'borrowers' => $reserve, + 'biblio' => $reserve, + 'items' => $reserve, + }, + ); +} + =head1 AUTHOR Koha Development Team diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm index 1a93f2e..8a8459b 100644 --- a/C4/Suggestions.pm +++ b/C4/Suggestions.pm @@ -371,20 +371,24 @@ sub ModSuggestion { if ($suggestion->{STATUS}) { # fetch the entire updated suggestion so that we can populate the letter my $full_suggestion = GetSuggestion($suggestion->{suggestionid}); - my $letter = C4::Letters::getletter('suggestions', $full_suggestion->{STATUS}); - if ($letter) { - C4::Letters::parseletter($letter, 'branches', $full_suggestion->{branchcode}); - C4::Letters::parseletter($letter, 'borrowers', $full_suggestion->{suggestedby}); - C4::Letters::parseletter($letter, 'suggestions', $full_suggestion->{suggestionid}); - C4::Letters::parseletter($letter, 'biblio', $full_suggestion->{biblionumber}); - my $enqueued = C4::Letters::EnqueueLetter({ + if ( my $letter = C4::Letters::GetPreparedLetter ( + module => 'suggestions', + letter_code => $full_suggestion->{STATUS}, + branchcode => $full_suggestion->{branchcode}, + tables => { + 'branches' => $full_suggestion->{branchcode}, + 'borrowers' => $full_suggestion->{suggestedby}, + 'suggestions' => $full_suggestion, + 'biblio' => $full_suggestion->{biblionumber}, + }, + ) ) { + C4::Letters::EnqueueLetter({ letter => $letter, borrowernumber => $full_suggestion->{suggestedby}, suggestionid => $full_suggestion->{suggestionid}, LibraryName => C4::Context->preference("LibraryName"), message_transport_type => 'email', - }); - if (!$enqueued){warn "can't enqueue letter $letter";} + }) or warn "can't enqueue letter $letter"; } } return $status_update_table; diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index 2b16fe4..745d040 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -111,12 +111,11 @@ for my $vendor (@suppliers) { for my $basket ( @{$baskets} ) { my $authorisedby = $basket->{authorisedby}; - my $basketbranch = GetMember( borrowernumber => $authorisedby )->{branchcode}; if ($userenv->{'flags'} & 1 || #user is superlibrarian (haspermission( $uid, { acquisition => q{*} } ) && #user has acq permissions and ($viewbaskets eq 'all' || #user is allowed to see all baskets - ($viewbaskets eq 'branch' && $authorisedby && $userbranch eq $basketbranch) || #basket belongs to user's branch + ($viewbaskets eq 'branch' && $authorisedby && $userbranch eq GetMember( borrowernumber => $authorisedby )->{branchcode}) || #basket belongs to user's branch ($basket->{authorisedby} && $viewbaskets == 'user' && $authorisedby == $loggedinuser) #user created this basket ) ) diff --git a/circ/circulation.pl b/circ/circulation.pl index efb87da..8d0abfb 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -24,7 +24,6 @@ use strict; #use warnings; FIXME - Bug 2505 use CGI; use C4::Output; -use C4::Print; use C4::Auth qw/:DEFAULT get_session/; use C4::Dates qw/format_date/; use C4::Branch; # GetBranches @@ -175,7 +174,7 @@ if ( $barcode eq '' && $query->param('charges') eq 'yes' ) { } if ( $print eq 'yes' && $borrowernumber ne '' ) { - printslip( $borrowernumber ); + PrintIssueSlip($branch, $borrowernumber); $query->param( 'borrowernumber', '' ); $borrowernumber = ''; } diff --git a/circ/hold-transfer-slip.pl b/circ/hold-transfer-slip.pl index f581464..492dac7 100755 --- a/circ/hold-transfer-slip.pl +++ b/circ/hold-transfer-slip.pl @@ -25,8 +25,6 @@ use C4::Output; use CGI; use C4::Auth; use C4::Reserves; -use C4::Branch; -use C4::Dates qw/format_date format_date_in_iso/; use vars qw($debug); @@ -41,7 +39,7 @@ my $transfer = $input->param('transfer'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => "circ/hold-transfer-slip.tmpl", + template_name => "circ/printslip.tmpl", query => $input, type => "intranet", authnotrequired => 0, @@ -50,14 +48,21 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); -my $reserveinfo = GetReserveInfo($borrowernumber,$biblionumber ); -my $pulldate = C4::Dates->new(); -$reserveinfo->{'pulldate'} = $pulldate->output(); -$reserveinfo->{'branchname'} = GetBranchName($reserveinfo->{'branchcode'}); -$reserveinfo->{'transferrequired'} = $transfer; - -$template->param( reservedata => [ $reserveinfo ] , - ); +my $userenv = C4::Context->userenv; +my ($slip, $is_html); +if ( my $letter = ReserveSlip ($userenv->{branch}, $borrowernumber, $biblionumber) ) { + $slip = $letter->{content}; + $is_html = $letter->{is_html}; +} +else { + $slip = "Reserve not found"; +} +$template->param( + slip => $slip, + plain => !$is_html, + title => "Koha -- Circulation: Transfers", + stylesheet => C4::Context->preference("SlipCSS"), +); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql index 166c36d..efdad91 100644 --- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql +++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Mahnung','Mahnung','Liebe/r < ('reserves', 'HOLD_PRINT', 'Vormerkbenachrichtigung (Print)', 'Vormerkbenachrichtigung (Print)', '<>\r\n<>\r\n<>\r\n<>\r\n<> <>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<> <>\r\n<>\r\n<>\r\n<> <>\r\n<>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nLiebe(r) <> <>,\r\n\r\nF??r Sie liegt seit dem <> eine Vormerkung zur Abholung bereit:\r\n\r\nTitel: <>\r\nVerfasser: <>\r\nSignatur: <>\r\n'), ('circulation','CHECKIN','R??ckgabequittung (Zusammenfassung)','R??ckgabequittung','Die folgenden Medien wurden zur??ckgegeben:\r\n----\r\n<>\r\n----\r\nVielen Dank.'), ('circulation','CHECKOUT','Ausleihquittung (Zusammenfassung)','Ausleihquittung','Die folgenden Medien wurden entliehen:\r\n----\r\n<>\r\n----\r\nVielen Dank f??r Ihren Besuch in <>.'), -('reserves', 'HOLDPLACED', 'Neue Vormerkung', 'Neue Vormerkung','Folgender Titel wurde vorgemerkt: <> (<<biblionumber>>) durch den Benutzer <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Neue Vormerkung', 'Neue Vormerkung','Folgender Titel wurde vorgemerkt: <<biblio.title>> (<<biblio.biblionumber>>) durch den Benutzer <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Anschaffungsvorschlag wurde angenommen', 'Ihr Anschaffungsvorschlag wurde angenommen','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> by <<suggestions.author>>.\n\nDie Bibliothek hat diesen Titel heute recherchiert und wird Ihn sobald wie m??glich im Buchhandel bestellen. Sie erhalten Nachricht, sobald die Bestellung abgeschlossen ist und sobald der Titel in der Bibliotek verf??gbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Vorgeschlagenes Medium verf??gbar', 'Das vorgeschlagene Medium ist jetzt verf??gbar','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu k??nnen, dass dieser Titel jetzt im Bestand der Bibliothek verf??gbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Vorgeschlagenes Medium bestellt', 'Das vorgeschlagene Medium wurde im Buchhandel bestellt','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlaten: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu k??nnen, dass dieser Titel jetzt im Buchhandel bestellt wurde. Nach Eintreffen wird er in unseren Bestand eingearbeitet.\n\nSie erhalten Nachricht, sobald das Medium verf??gbar ist.\n\nBei Nachfragen erreichen Sie uns unter der Emailadresse <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql index 689fa0f..8c9f4bd 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.sql +++ b/installer/data/mysql/en/mandatory/sample_notices.sql @@ -11,8 +11,90 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'); +INSERT INTO `letter` (module, code, name, title, content, is_html) +VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout> + +<h4>Overdues</h4> +<overdue> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</overdue> + +<hr> + +<h4 style="text-align: center; font-style:italic;">News</h4> +<news> +<div class="newsitem"> +<h5 style="margin-bottom: 1px; margin-top: 1px"><b><<opac_news.title>></b></h5> +<p style="margin-bottom: 1px; margin-top: 1px"><<opac_news.new>></p> +<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Posted on <<opac_news.timestamp>></p> +<hr /> +</div> +</news>', 1), +('circulation','ISSUEQSLIP','Issue Quick Slip','Issue Quick Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out Today</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout>', 1), +('circulation','RESERVESLIP','Reserve Slip','Reserve Slip', '<h5>Date: <<today>></h5> + +<h3> Transfer to/Hold in <<branches.branchname>></h3> + +<reserves> +<div> +<h3><<borrowers.surname>>, <<borrowers.firstname>></h3> + +<ul> + <li><<borrowers.cardnumber>></li> + <li><<borrowers.phone>></li> + <li> <<borrowers.address>><br /> + <<borrowers.address2>><br /> + <<borrowers.city >> <<borrowers.zipcode>> + </li> + <li><<borrowers.email>></li> +</ul> +<br /> +<h3>ITEM ON HOLD</h3> + <h4><<biblio.title>></h4> + <h5><<biblio.author>></h5> + <ul> + <li><<items.barcode>></li> + <li><<items.itemcallnumber>></li> + <li><<reserves.waitingdate>></li> + </ul> + <p>Notes: + <pre><<reserves.reservenotes>></pre> + </p> +</div> +</reserves>', 1); + diff --git a/installer/data/mysql/es-ES/mandatory/sample_notices.sql b/installer/data/mysql/es-ES/mandatory/sample_notices.sql index 689fa0f..bf3324d 100644 --- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql +++ b/installer/data/mysql/es-ES/mandatory/sample_notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql index 977e59d..acffe73 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -13,7 +13,7 @@ VALUES ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup at <<branches.branchname>>', '<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n\n\nChange Service Requested\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>>\n<<borrowers.address>>\n<<borrowers.city>> <<borrowers.zipcode>>\n\n\n\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\n\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql index 689fa0f..bf3324d 100644 --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ b/installer/data/mysql/it-IT/necessari/notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e4388a4..59ee5f3 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1166,10 +1166,12 @@ DROP TABLE IF EXISTS `letter`; CREATE TABLE `letter` ( -- table for all notice templates in Koha `module` varchar(20) NOT NULL default '', -- Koha module that triggers this notice `code` varchar(20) NOT NULL default '', -- unique identifier for this notice + `branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out `name` varchar(100) NOT NULL default '', -- plain text name for this notice + `is_html` tinyint(1) default 0, `title` varchar(200) NOT NULL default '', -- subject line of the notice `content` text, -- body text for the notice - PRIMARY KEY (`module`,`code`) + PRIMARY KEY (`module`,`code`, `branchcode`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql index cdb5529..08b452e 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql @@ -32,7 +32,7 @@ VALUES ('circulation','ODUE','Purring','Purring p?? dokument','<<borrowers.first ('reserves', 'HOLD_PRINT', 'Hentemelding (p?? papir)', 'Hentemelding', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nDu har et reservert dokument som kan hentes fra <<reserves.waitingdate>>:\r\n\r\nTittel: <<biblio.title>>\r\nForfatter: <<biblio.author>>\r\nEksemplar: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Innlevering','Melding om innlevering','F??lgende dokument har blitt innlevert:\r\n----\r\n<<biblio.title>>\r\n----\r\nVennlig hilsen\r\nBiblioteket'), ('circulation','CHECKOUT','Utl??n','Melding om utl??n','F??lgende dokument har blitt l??nt ut:\r\n----\r\n<<biblio.title>>\r\n----\r\nVennlig hilsen\r\nBiblioteket'), -('reserves', 'HOLDPLACED', 'Melding om reservasjon', 'Melding om reservasjon','F??lgende dokument har blitt reservert : <<title>> (<<biblionumber>>) av <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Melding om reservasjon', 'Melding om reservasjon','F??lgende dokument har blitt reservert : <<biblio.title>> (<<biblio.biblionumber>>) av <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Forslag godtatt', 'Innkj??psforslag godtatt','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foresl??tt at biblioteket kj??per inn <<suggestions.title>> av <<suggestions.author>>.\n\nBiblioteket har vurdert forslaget i dag. Dokumentet vil bli bestilt s?? fort det lar seg gj??re. Du vil f?? en ny melding n??r bestillingen er gjort, og n??r dokumentet ankommer biblioteket.\n\nEr det noe du lurer p??, vennligst kontakt oss p?? <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Foresl??tt dokument tilgjengelig', 'Foresl??tt dokument tilgjengelig','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foresl??tt at biblioteket kj??per inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av ?? informere deg om at dokumentet n?? er innlemmet i samlingen.\n\nEr det noe du lurer p??, vennligst kontakt oss p?? <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Innkj??psforslag i bestilling', 'Innkj??psforslag i bestilling','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foresl??tt at biblioteket kj??per inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av ?? informere deg om at dokumentet du foreslo n?? er i bestilling.\n\nDu vil f?? en ny melding n??r dokumentet er tilgjengelig.\n\nEr det noe du lurer p??, vennligst kontakt oss p?? <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql index 6be2eb8..f0844f3 100644 --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -13,7 +13,7 @@ VALUES ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql index 689fa0f..bf3324d 100644 --- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql +++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index ae2c1cb..f10a7b3 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -328,4 +328,7 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NoticeCSS','','Notices CSS url.',NULL,'free'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SlipCSS','','Slips CSS url.',NULL,'free'); + diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql index 358205b..b637343 100644 --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -10,7 +10,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD', 'Hold Available for Pickup', 'Hold Available for Pickup at <<branches.branchname>>', 'Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\nLocation: <<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress3>>\r\n<<branches.branchcity>> <<branches.branchzip>>'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index a8cd166..1151648 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4496,7 +4496,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { print "Upgrade to $DBversion done (Add 461 subfield 9 to default framework)\n"; SetVersion ($DBversion); } - } $DBversion = "3.05.00.018"; @@ -4550,6 +4549,103 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.06.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE `letter` DROP PRIMARY KEY"); + $dbh->do("ALTER TABLE `letter` ADD `branchcode` varchar(10) default NULL AFTER `code`"); + $dbh->do("ALTER TABLE `letter` ADD PRIMARY KEY (`module`,`code`, `branchcode`)"); + $dbh->do("ALTER TABLE `letter` ADD `is_html` tinyint(1) default 0 AFTER `name`"); + print "Added branchcode and is_html to letter table\n"; + + $dbh->do("INSERT INTO `letter` (module, code, name, title, content, is_html) + VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout> + +<h4>Overdues</h4> +<overdue> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</overdue> + +<hr> + +<h4 style=\"text-align: center; font-style:italic;\">News</h4> +<news> +<div class=\"newsitem\"> +<h5 style=\"margin-bottom: 1px; margin-top: 1px\"><b><<opac_news.title>></b></h5> +<p style=\"margin-bottom: 1px; margin-top: 1px\"><<opac_news.new>></p> +<p class=\"newsfooter\" style=\"font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px\">Posted on <<opac_news.timestamp>></p> +<hr /> +</div> +</news>', 1)"); + $dbh->do("INSERT INTO `letter` (module, code, name, title, content, is_html) + VALUES ('circulation','ISSUEQSLIP','Issue Quick Slip','Issue Quick Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out Today</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout>', 1)"); + $dbh->do("INSERT INTO `letter` (module, code, name, title, content, is_html) + VALUES ('circulation','RESERVESLIP','Reserve Slip','Reserve Slip', '<h5>Date: <<today>></h5> + +<h3> Transfer to/Hold in <<branches.branchname>></h3> + +<h3><<borrowers.surname>>, <<borrowers.firstname>></h3> + +<ul> + <li><<borrowers.cardnumber>></li> + <li><<borrowers.phone>></li> + <li> <<borrowers.address>><br /> + <<borrowers.address2>><br /> + <<borrowers.city >> <<borrowers.zipcode>> + </li> + <li><<borrowers.email>></li> +</ul> +<br /> +<h3>ITEM ON HOLD</h3> +<h4><<biblio.title>></h4> +<h5><<biblio.author>></h5> +<ul> + <li><<items.barcode>></li> + <li><<items.itemcallnumber>></li> + <li><<reserves.waitingdate>></li> +</ul> +<p>Notes: +<pre><<reserves.reservenotes>></pre> +</p>', 1)"); + + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NoticeCSS','','Notices CSS url.',NULL,'free')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SlipCSS','','Slips CSS url.',NULL,'free')"); + + $dbh->do("UPDATE `letter` SET content = replace(content, '<<title>>', '<<biblio.title>>') WHERE code = 'HOLDPLACED')"); + + print "Upgrade to $DBversion done (Add branchcode and is_html to letter table; Add NoticeCSS and SlipCSS sysprefs)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc index 503f954..e7e150d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc @@ -42,8 +42,10 @@ function update_child() { }); // YUI Toolbar Functions + var slip_re = /slip/; function printx_window(print_type) { - window.open("/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&print=" + print_type, "printwindow"); + var handler = print_type.match(slip_re) ? "printslip" : "moremember"; + window.open("/cgi-bin/koha/members/" + handler + ".pl?borrowernumber=[% borrowernumber %]&print=" + print_type, "printwindow"); return false; } function searchToHold(){ 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 f4946b5..b3b279c 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 @@ -91,6 +91,11 @@ Circulation: yes: Record no: "Don't record" - local use when an unissued item is checked in. + - + - Include the stylesheet at + - pref: NoticeCSS + class: url + - on Notices. (This should be a complete URL, starting with <code>http://</code>.) Checkout Policy: - - pref: AllowNotForLoanOverride diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref index df0a434..efa33a8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref @@ -83,6 +83,11 @@ Staff Client: Results: "Results page (for future use, Results XSLT not functional at this time)." Both: "Both Results and Details pages (for future use, Results XSLT not functional at this time)." - 'Note: The corresponding XSLT option must be turned on.' + - + - Include the stylesheet at + - pref: SlipCSS + class: url + - on Issue and Reserve Slips. (This should be a complete URL, starting with <code>http://</code>.) Options: - - pref: viewMARC diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt index 1904381..73f9e61 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt @@ -8,11 +8,7 @@ --> </style> [% IF ( stylesheet ) %] - <style type="text/css"> - <!-- - [% stylesheet %] - --> - </style> + <link rel="stylesheet" type="text/css" href="[% stylesheet %]"> [% END %] </head> <body> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt deleted file mode 100644 index 18d45aa..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt +++ /dev/null @@ -1,54 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %] -<title>Koha -- Circulation: Transfers -[% INCLUDE 'doc-head-close-receipt.inc' %] - - -
    - -[% FOREACH reservedat IN reservedata %] - -
    Date: [% reservedat.pulldate %]
    -

    [% IF ( reservedat.transferrequired ) %]Transfer to [% reservedat.branchname %] [% ELSE %]Hold in [% reservedat.branchname %][% END %]

    - -
    - -

    [% reservedat.surname %], [% reservedat.firstname %]

    - -
      -
    • [% reservedat.cardnumber %]
    • - [% IF ( reservedat.phone ) %] -
    • [% reservedat.phone %]
    • - [% END %] -
    • - [% reservedat.address %]
      - [% IF ( reservedat.address2 ) %][% reservedat.address2 %]
      [% END %] - [% reservedat.city %] [% reservedat.zip %] -
    • - [% IF ( reservedat.email ) %] -
    • [% reservedat.email %]
    • - [% END %] -
    -
    -

    ITEM ON HOLD

    -

    [% reservedat.title |html %]

    -
    [% reservedat.author %]
    -
      - [% IF ( reservedat.barcode ) %]
    • [% reservedat.barcode %]
    • [% END %] - [% IF ( reservedat.itemcallnumber ) %]
    • [% reservedat.itemcallnumber %]
    • [% END %] - [% IF ( reservedat.waitingdate ) %]
    • [% reservedat.waitingdate %]
    • [% END %] -
    - [% IF ( reservedat.reservenotes ) %] -

    Notes: [% reservedat.reservenotes %]

    - [% END %] - - - -[% END %] -
    -[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt new file mode 100644 index 0000000..a790069 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt @@ -0,0 +1,28 @@ +[% INCLUDE 'doc-head-open.inc' %] +[% title %] + + + +[% IF stylesheet %] + +[% END %] + + + + +
    + +[% IF plain %] +
    +[% slip %]
    +
    +[% ELSE %] +[% slip %] +[% END %] + +[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt deleted file mode 100644 index 4a85ccb..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt +++ /dev/null @@ -1,76 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %] -Print Receipt for [% cardnumber %] - - - - - - - - -
    - -

    [% LibraryName %]

    -[% IF ( branchname ) %][% branchname %]
    [% END %] -Checked out to [% firstname %] [% surname %]
    -([% cardnumber %])
    - -[% todaysdate %]
    - -[% IF ( quickslip ) %] -

    Checked Out Today

    -[% FOREACH issueloo IN issueloop %] -[% IF ( issueloo.red ) %][% ELSE %] -[% IF ( issueloo.today ) %] -

    [% issueloo.title |html %]
    -Barcode: [% issueloo.barcode %]
    -Date due: [% issueloo.date_due %]

    - [% END %] - [% END %] - [% END %] - -[% ELSE %] -

    Checked Out

    -[% FOREACH issueloo IN issueloop %] -[% IF ( issueloo.red ) %][% ELSE %] -

    [% issueloo.title |html %]
    -Barcode: [% issueloo.barcode %]
    -Date due: [% issueloo.date_due %]

    - [% END %] - [% END %] - -[% END %] - -[% IF ( quickslip ) %] -[% ELSE %] -[% IF ( overdues_exist ) %] -

    Overdues

    - [% FOREACH issueloo IN issueloop %] - [% IF ( issueloo.red ) %] -

    [% issueloo.title |html %]
    -Barcode: [% issueloo.barcode %]
    -Date due: [% issueloo.date_due %]

    -[% END %] -[% END %] -[% END %] -[% END %] - -[% IF ( koha_news_count ) %] -

    News

    - - [% FOREACH koha_new IN koha_news %] -
    [% koha_new.title %]
    -

    [% koha_new.new %]

    -

    Posted on [% koha_new.newdate %] - -


    - [% END %] -[% END %] - - -[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index 063236e..e0b411a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -10,6 +10,10 @@ $(document).ready(function() { sortList: [[0,0]], headers: { 3: {sorter:false},4: { sorter: false }} }); + + $('#branch').change(function() { + $('#selectlibrary').submit(); + }); }); [% IF ( add_form ) %] @@ -128,6 +132,20 @@ $(document).ready(function() { } //]]> + +

    + + + Select a library : + + +

    +
    @@ -135,13 +153,23 @@ $(document).ready(function() { [% IF ( search ) %]

    You Searched for [% searchfield %]

    [% END %] - [% IF ( letter ) %] + [% IF ( letter ) %] + [% select_for_copy = BLOCK %] + + [% END %] +
    + + [% FOREACH lette IN letter %] [% UNLESS ( loop.odd ) %] @@ -149,17 +177,28 @@ $(document).ready(function() { [% ELSE %] [% END %] + + @@ -183,6 +222,16 @@ $(document).ready(function() { [% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]
    1. + + + +
    2. +
    3. [% IF ( modify ) %][% END %] @@ -235,6 +284,9 @@ $(document).ready(function() {
    4. + +
    5. +
    6. diff --git a/members/memberentry.pl b/members/memberentry.pl index f01261e..195704a 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -327,10 +327,7 @@ if ((!$nok) and $nodouble and ($op eq 'insert' or $op eq 'save')){ # if we manage to find a valid email address, send notice if ($emailaddr) { $newdata{emailaddr} = $emailaddr; - my $letter = getletter ('members', "ACCTDETAILS:$newdata{'branchcode'}") ; - # if $branch notice fails, then email a default notice instead. - $letter = getletter ('members', "ACCTDETAILS") if !$letter; - SendAlerts ( 'members' , \%newdata , $letter ) if $letter + SendAlerts ( 'members', \%newdata, "ACCTDETAILS" ); } } diff --git a/members/moremember.pl b/members/moremember.pl index 9115dd1..6b7a50f 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -50,7 +50,6 @@ use C4::Biblio; use C4::Reserves; use C4::Branch; # GetBranchName use C4::Form::MessagingPreferences; -use C4::NewsChannels; #get slip news use List::MoreUtils qw/uniq/; use C4::Members::Attributes qw(GetBorrowerAttributes); @@ -473,13 +472,4 @@ $template->param( quickslip => $quickslip, ); -#Get the slip news items -my $all_koha_news = &GetNewsToDisplay("slip"); -my $koha_news_count = scalar @$all_koha_news; - -$template->param( - koha_news => $all_koha_news, - koha_news_count => $koha_news_count -); - output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/printslip.pl b/members/printslip.pl new file mode 100755 index 0000000..eba8d68 --- /dev/null +++ b/members/printslip.pl @@ -0,0 +1,89 @@ +#!/usr/bin/perl + +# Copyright 2000-2002 Katipo Communications +# Copyright 2010 BibLibre +# +# 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. + + +=head1 moremember.pl + + script to do a borrower enquiry/bring up borrower details etc + Displays all the details about a borrower + written 20/12/99 by chris at katipo.co.nz + last modified 21/1/2000 by chris at katipo.co.nz + modified 31/1/2001 by chris at katipo.co.nz + to not allow items on request to be renewed + + needs html removed and to use the C4::Output more, but its tricky + +=cut + +use strict; +#use warnings; FIXME - Bug 2505 +use CGI; +use C4::Context; +use C4::Auth; +use C4::Output; +use C4::Members; +use C4::Koha; + +#use Smart::Comments; +#use Data::Dumper; + +use vars qw($debug); + +BEGIN { + $debug = $ENV{DEBUG} || 0; +} + +my $input = new CGI; +$debug or $debug = $input->param('debug') || 0; +my $print = $input->param('print'); +my $error = $input->param('error'); + +# circ staff who process checkouts but can't edit +# patrons still need to be able to print receipts +my $flagsrequired = { circulate => "circulate_remaining_permissions" }; + +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "circ/printslip.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => $flagsrequired, + debug => 1, + } +); + +my $borrowernumber = $input->param('borrowernumber'); +my $branch=C4::Context->userenv->{'branch'}; +my ($slip, $is_html); +if (my $letter = IssueSlip ($branch, $borrowernumber, $print eq "qslip")) { + $slip = $letter->{content}; + $is_html = $letter->{is_html}; +} + +$template->param( + slip => $slip, + plain => !$is_html, + title => "Print Receipt for $borrowernumber", + stylesheet => C4::Context->preference("SlipCSS"), + error => $error, +); + +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl index 1fa358f..09c4017 100755 --- a/misc/cronjobs/advance_notices.pl +++ b/misc/cronjobs/advance_notices.pl @@ -79,13 +79,10 @@ patrons. It queues them in the message queue, which is processed by the process_message_queue.pl cronjob. See the comments in the script for directions on changing the script. This script has the following parameters : - -c Confirm and remove this help & warning - -m maximum number of days in advance to send advance notices. - -n send No mail. Instead, all mail messages are printed on screen. Usefull for testing purposes. - -v verbose - -i csv list of fields that get substituted into templates in places - of the EEitems.contentEE placeholder. Defaults to - issuedate,title,barcode,author + -c Confirm and remove this help & warning + -m maximum number of days in advance to send advance notices. + -n send No mail. Instead, all mail messages are printed on screen. Usefull for testing purposes. + -v verbose ENDUSAGE # Since advance notice options are not visible in the web-interface @@ -157,8 +154,6 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { } else { my $biblio = C4::Biblio::GetBiblioFromItemNumber( $upcoming->{'itemnumber'} ); my $letter_type = 'DUE'; - $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($upcoming->{'borrowernumber'},$upcoming->{'itemnumber'},'0'); my $titles = ""; while ( my $item_info = $sth->fetchrow_hashref()) { @@ -166,13 +161,14 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $upcoming->{'borrowernumber'}, branchcode => $upcoming->{'branchcode'}, biblionumber => $biblio->{'biblionumber'}, itemnumber => $upcoming->{'itemnumber'}, substitute => { 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; } } else { $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $upcoming->{'borrowernumber'}, @@ -189,8 +185,6 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { } else { my $biblio = C4::Biblio::GetBiblioFromItemNumber( $upcoming->{'itemnumber'} ); my $letter_type = 'PREDUE'; - $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($upcoming->{'borrowernumber'},$upcoming->{'itemnumber'},$borrower_preferences->{'days_in_advance'}); my $titles = ""; while ( my $item_info = $sth->fetchrow_hashref()) { @@ -198,13 +192,14 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $upcoming->{'borrowernumber'}, branchcode => $upcoming->{'branchcode'}, biblionumber => $biblio->{'biblionumber'}, itemnumber => $upcoming->{'itemnumber'}, substitute => { 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; } } @@ -250,8 +245,6 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$upcoming_digest ) { my $letter_type = 'PREDUEDGST'; - my $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($borrowernumber,$borrower_preferences->{'days_in_advance'}); my $titles = ""; @@ -259,12 +252,13 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$upcoming_digest ) { my @item_info = map { $_ =~ /^date|date$/ ? format_date($item_info->{$_}) : $item_info->{$_} || '' } @item_content_fields; $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + my $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $borrowernumber, substitute => { count => $count, 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; if ($nomail) { local $, = "\f"; print $letter->{'content'}; @@ -290,20 +284,19 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$due_digest ) { next PATRON unless $borrower_preferences; # how could this happen? my $letter_type = 'DUEDGST'; - my $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($borrowernumber,'0'); my $titles = ""; while ( my $item_info = $sth->fetchrow_hashref()) { my @item_info = map { $_ =~ /^date|date$/ ? format_date($item_info->{$_}) : $item_info->{$_} || '' } @item_content_fields; $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + my $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $borrowernumber, substitute => { count => $count, 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; if ($nomail) { local $, = "\f"; @@ -323,40 +316,35 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$due_digest ) { =head2 parse_letter - - =cut sub parse_letter { my $params = shift; - foreach my $required ( qw( letter borrowernumber ) ) { + foreach my $required ( qw( letter_code borrowernumber ) ) { return unless exists $params->{$required}; } - if ( $params->{'substitute'} ) { - while ( my ($key, $replacedby) = each %{$params->{'substitute'}} ) { - my $replacefield = "<<$key>>"; - - $params->{'letter'}->{title} =~ s/$replacefield/$replacedby/g; - $params->{'letter'}->{content} =~ s/$replacefield/$replacedby/g; - } - } - - C4::Letters::parseletter( $params->{'letter'}, 'borrowers', $params->{'borrowernumber'} ); + my %table_params = ( 'borrowers' => $params->{'borrowernumber'} ); - if ( $params->{'branchcode'} ) { - C4::Letters::parseletter( $params->{'letter'}, 'branches', $params->{'branchcode'} ); + if ( my $p = $params->{'branchcode'} ) { + $table_params{'branches'} = $p; } - if ( $params->{'itemnumber'} ) { - C4::Letters::parseletter( $params->{'letter'}, 'issues', $params->{'itemnumber'} ); - C4::Letters::parseletter( $params->{'letter'}, 'items', $params->{'itemnumber'} ); + if ( my $p = $params->{'itemnumber'} ) { + $table_params{'issues'} = $p; + $table_params{'items'} = $p; } - if ( $params->{'biblionumber'} ) { - C4::Letters::parseletter( $params->{'letter'}, 'biblio', $params->{'biblionumber'} ); - C4::Letters::parseletter( $params->{'letter'}, 'biblioitems', $params->{'biblionumber'} ); + if ( my $p = $params->{'biblionumber'} ) { + $table_params{'biblio'} = $p; + $table_params{'biblioitems'} = $p; } - return $params->{'letter'}; + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $params->{'letter_code'}, + branchcode => $table_params{'branches'}, + substitute => $params->{'substitute'}, + tables => \%table_params, + ); } 1; diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl index a72d6a6..165b16e 100755 --- a/misc/cronjobs/gather_print_notices.pl +++ b/misc/cronjobs/gather_print_notices.pl @@ -39,11 +39,9 @@ use Getopt::Long; sub usage { print STDERR < \$stylesheet, 'h|help' => \$help, ) || usage( 1 ); @@ -71,16 +68,9 @@ exit unless( @messages ); open OUTPUT, '>', File::Spec->catdir( $output_directory, "holdnotices-" . $today->output( 'iso' ) . ".html" ); my $template = C4::Templates::gettemplate( 'batch/print-notices.tmpl', 'intranet', new CGI ); -my $stylesheet_contents = ''; - -if ($stylesheet) { - open STYLESHEET, '<', $stylesheet; - while ( ) { $stylesheet_contents .= $_ } - close STYLESHEET; -} $template->param( - stylesheet => $stylesheet_contents, + stylesheet => C4::Context->preference("NoticeCSS"), today => $today->output(), messages => \@messages, ); diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 37774b5..a8544c6 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -459,17 +459,7 @@ END_SQL $longest_issue ) = $sth->fetchrow ) { $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has $itemcount items triggering level $i."; - - my $letter = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"} ); - - unless ($letter) { - $verbose and warn "Message '$overdue_rules->{letter$i}' content not found"; - - # might as well skip while PERIOD, no other borrowers are going to work. - # FIXME : Does this mean a letter must be defined in order to trigger a debar ? - next PERIOD; - } - + if ( $overdue_rules->{"debarred$i"} ) { #action taken is debarring @@ -494,11 +484,12 @@ END_SQL my @item_info = map { $_ =~ /^date|date$/ ? format_date( $item_info->{$_} ) : $item_info->{$_} || '' } @item_content_fields; $titles .= join("\t", @item_info) . "\n"; $itemcount++; - push @items, { itemnumber => $item_info->{'itemnumber'}, biblionumber => $item_info->{'biblionumber'} }; + push @items, $item_info; } $sth2->finish; - $letter = parse_letter( - { letter => $letter, + + my $letter = parse_letter( + { letter_code => $overdue_rules->{"letter$i"}, borrowernumber => $borrowernumber, branchcode => $branchcode, items => \@items, @@ -508,6 +499,13 @@ END_SQL } } ); + unless ($letter) { + $verbose and warn "Message '$overdue_rules->{letter$i}' content not found"; + + # might as well skip while PERIOD, no other borrowers are going to work. + # FIXME : Does this mean a letter must be defined in order to trigger a debar ? + next PERIOD; + } if ( $exceededPrintNoticesMaxLines ) { $letter->{'content'} .= "List too long for form; please check your account online for a complete list of your overdue items."; @@ -642,53 +640,55 @@ substituted keys and values. =cut -sub parse_letter { # FIXME: this code should probably be moved to C4::Letters:parseletter +sub parse_letter { my $params = shift; - foreach my $required (qw( letter borrowernumber )) { + foreach my $required (qw( letter_code borrowernumber )) { return unless exists $params->{$required}; } - my $todaysdate = C4::Dates->new()->output("syspref"); - $params->{'letter'}->{title} =~ s/<>/$todaysdate/g; - $params->{'letter'}->{content} =~ s/<>/$todaysdate/g; + my $substitute = $params->{'substitute'} || {}; + $substitute->{today} ||= C4::Dates->new()->output("syspref"); - if ( $params->{'substitute'} ) { - while ( my ( $key, $replacedby ) = each %{ $params->{'substitute'} } ) { - my $replacefield = "<<$key>>"; - $params->{'letter'}->{title} =~ s/$replacefield/$replacedby/g; - $params->{'letter'}->{content} =~ s/$replacefield/$replacedby/g; - } + my %tables = ( 'borrowers' => $params->{'borrowernumber'} ); + if ( my $p = $params->{'branchcode'} ) { + $tables{'branches'} = $p; } - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'borrowers', $params->{'borrowernumber'} ); - - if ( $params->{'branchcode'} ) { - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'branches', $params->{'branchcode'} ); + my $currency_format; + if ($params->{'letter'}->{'content'} =~ m/(.*)<\/fine>/o) { # process any fine tags... + $currency_format = $1; + $params->{'letter'}->{'content'} =~ s/.*<\/fine>/<>/o; } - if ( $params->{'items'} ) { + my @item_tables; + if ( my $i = $params->{'items'} ) { my $item_format = ''; - PROCESS_ITEMS: - while (scalar(@{$params->{'items'}}) > 0) { - my $item = shift @{$params->{'items'}}; + foreach my $item (@$i) { my $fine = GetFine($item->{'itemnumber'}, $params->{'borrowernumber'}); if (!$item_format) { $params->{'letter'}->{'content'} =~ m/(.*<\/item>)/; $item_format = $1; } - if ($params->{'letter'}->{'content'} =~ m/(.*)<\/fine>/) { # process any fine tags... - my $formatted_fine = currency_format("$1", "$fine", FMT_SYMBOL); - $params->{'letter'}->{'content'} =~ s/.*<\/fine>/$formatted_fine/; - } - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblio', $item->{'biblionumber'} ); - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblioitems', $item->{'biblionumber'} ); - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'items', $item->{'itemnumber'} ); - $params->{'letter'}->{'content'} =~ s/(.*<\/item>)/$1\n$item_format/ if scalar(@{$params->{'items'}} > 0); + $item->{'fine'} = currency_format($currency_format, "$fine", FMT_SYMBOL) + if $currency_format; + + push @item_tables, { + 'biblio' => $item->{'biblionumber'}, + 'biblioitems' => $item->{'biblionumber'}, + 'items' => $item, + }; } } - $params->{'letter'}->{'content'} =~ s/<\/{0,1}?item>//g; # strip all remaining item tags... - return $params->{'letter'}; + + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $params->{'letter_code'}, + branchcode => $params->{'branchcode'}, + tables => \%tables, + substitute => $substitute, + repeat => { item => \@item_tables }, + ); } =head2 prepare_letter_for_printing diff --git a/t/db_dependent/lib/KohaTest/Letters.pm b/t/db_dependent/lib/KohaTest/Letters.pm index 97d58fb..f2d7b0d 100644 --- a/t/db_dependent/lib/KohaTest/Letters.pm +++ b/t/db_dependent/lib/KohaTest/Letters.pm @@ -12,13 +12,12 @@ sub testing_class { 'C4::Letters' }; sub methods : Test( 1 ) { my $self = shift; - my @methods = qw( getletter - addalert + my @methods = qw( addalert delalert getalert findrelatedto SendAlerts - parseletter + GetPreparedLetter ); can_ok( $self->testing_class, @methods ); diff --git a/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm b/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm index 76b6ab4..53e5439 100644 --- a/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm +++ b/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm @@ -10,7 +10,7 @@ use Test::More; sub GetLetter : Test( 6 ) { my $self = shift; - my $letter = getletter( 'circulation', 'ODUE' ); + my $letter = getletter( 'circulation', 'ODUE', '' ); isa_ok( $letter, 'HASH' ) or diag( Data::Dumper->Dump( [ $letter ], [ 'letter' ] ) ); @@ -21,7 +21,6 @@ sub GetLetter : Test( 6 ) { ok( exists $letter->{'name'}, 'name' ); ok( exists $letter->{'title'}, 'title' ); - } 1; diff --git a/t/db_dependent/lib/KohaTest/Members.pm b/t/db_dependent/lib/KohaTest/Members.pm index 5646be1..dfde7da 100644 --- a/t/db_dependent/lib/KohaTest/Members.pm +++ b/t/db_dependent/lib/KohaTest/Members.pm @@ -52,6 +52,7 @@ sub methods : Test( 1 ) { GetBorrowersWhoHaveNeverBorrowed GetBorrowersWithIssuesHistoryOlderThan GetBorrowersNamesAndLatestIssue + IssueSlip ); can_ok( $self->testing_class, @methods ); diff --git a/t/db_dependent/lib/KohaTest/Print.pm b/t/db_dependent/lib/KohaTest/Print.pm index 02fd5fb..d35ab34 100644 --- a/t/db_dependent/lib/KohaTest/Print.pm +++ b/t/db_dependent/lib/KohaTest/Print.pm @@ -12,10 +12,7 @@ sub testing_class { 'C4::Print' }; sub methods : Test( 1 ) { my $self = shift; - my @methods = qw( remoteprint - printreserve - printslip - ); + my @methods = qw( printslip ); can_ok( $self->testing_class, @methods ); } diff --git a/t/db_dependent/lib/KohaTest/Reserves.pm b/t/db_dependent/lib/KohaTest/Reserves.pm index 5317029..70a96fc 100644 --- a/t/db_dependent/lib/KohaTest/Reserves.pm +++ b/t/db_dependent/lib/KohaTest/Reserves.pm @@ -32,6 +32,7 @@ sub methods : Test( 1 ) { GetReserveInfo _FixPriority _Findgroupreserve + ReserveSlip ); can_ok( $self->testing_class, @methods ); diff --git a/tools/letter.pl b/tools/letter.pl index f5dc0c6..7d20290 100755 --- a/tools/letter.pl +++ b/tools/letter.pl @@ -46,14 +46,34 @@ use CGI; use C4::Auth; use C4::Context; use C4::Output; +use C4::Branch; # GetBranches -# letter_exists($module, $code) -# - return true if a letter with the given $module and $code exists +# _letter_from_where($branchcode,$module, $code) +# - return FROM WHERE clause and bind args for a letter +sub _letter_from_where { + my ($branchcode, $module, $code) = @_; + my $sql = q{FROM letter WHERE branchcode = ? AND module = ? AND code = ?}; + my @args = ($branchcode || '', $module, $code); +# Mysql is retarded. cause branchcode is part of the primary key it cannot be null. How does that +# work with foreign key constraint I wonder... + +# if ($branchcode) { +# $sql .= " AND branchcode = ?"; +# push @args, $branchcode; +# } else { +# $sql .= " AND branchcode IS NULL"; +# } + + return ($sql, \@args); +} + +# letter_exists($branchcode,$module, $code) +# - return true if a letter with the given $branchcode, $module and $code exists sub letter_exists { - my ($module, $code) = @_; + my ($sql, $args) = _letter_from_where(@_); my $dbh = C4::Context->dbh; - my $letters = $dbh->selectall_arrayref(q{SELECT name FROM letter WHERE module = ? AND code = ?}, undef, $module, $code); - return @{$letters}; + my $letter = $dbh->selectrow_hashref("SELECT * $sql", undef, @$args); + return $letter; } # $protected_letters = protected_letters() @@ -67,14 +87,12 @@ sub protected_letters { my $input = new CGI; my $searchfield = $input->param('searchfield'); my $script_name = '/cgi-bin/koha/tools/letter.pl'; +my $branchcode = $input->param('branchcode'); my $code = $input->param('code'); my $module = $input->param('module'); my $content = $input->param('content'); -my $op = $input->param('op'); +my $op = $input->param('op') || ''; my $dbh = C4::Context->dbh; -if (!defined $module ) { - $module = q{}; -} my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { @@ -87,9 +105,6 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( } ); -if (!defined $op) { - $op = q{}; # silence errors from eq -} # we show only the TMPL_VAR names $op $template->param( @@ -97,22 +112,27 @@ $template->param( action => $script_name ); +if ($op eq 'copy') { + add_copy(); + $op = 'add_form'; +} + if ($op eq 'add_form') { - add_form($module, $code); + add_form($branchcode, $module, $code); } elsif ( $op eq 'add_validate' ) { add_validate(); $op = q{}; # next operation is to return to default screen } elsif ( $op eq 'delete_confirm' ) { - delete_confirm($module, $code); + delete_confirm($branchcode, $module, $code); } elsif ( $op eq 'delete_confirmed' ) { - delete_confirmed($module, $code); + delete_confirmed($branchcode, $module, $code); $op = q{}; # next operation is to return to default screen } else { - default_display($searchfield); + default_display($branchcode,$searchfield); } # Do this last as delete_confirmed resets @@ -125,23 +145,21 @@ if ($op) { output_html_with_http_headers $input, $cookie, $template->output; sub add_form { - my ($module, $code ) = @_; + my ($branchcode,$module, $code ) = @_; my $letter; # if code has been passed we can identify letter and its an update action if ($code) { - $letter = $dbh->selectrow_hashref(q{SELECT module, code, name, title, content FROM letter WHERE module=? AND code=?}, - undef, $module, $code); + $letter = letter_exists($branchcode,$module, $code); + } + if ($letter) { $template->param( modify => 1 ); $template->param( code => $letter->{code} ); } else { # initialize the new fields $letter = { - module => $module, - code => q{}, - name => q{}, - title => q{}, - content => q{}, + branchcode => $branchcode, + module => $module, }; $template->param( adding => 1 ); } @@ -173,14 +191,20 @@ sub add_form { {value => q{}, text => '---ITEMS---' }, {value => 'items.content', text => 'items.content'}, add_fields('issues','borrowers'); + if ($module eq 'circulation') { + push @{$field_selection}, add_fields('opac_news'); + } } $template->param( - name => $letter->{name}, - title => $letter->{title}, - content => $letter->{content}, - module => $module, - $module => 1, + branchcode => $letter->{branchcode}, + name => $letter->{name}, + is_html => $letter->{is_html}, + title => $letter->{title}, + content => $letter->{content}, + module => $module, + $module => 1, + branchloop => _branchloop($branchcode), SQLfieldname => $field_selection, ); return; @@ -188,37 +212,56 @@ sub add_form { sub add_validate { my $dbh = C4::Context->dbh; - my $module = $input->param('module'); - my $oldmodule = $input->param('oldmodule'); - my $code = $input->param('code'); - my $name = $input->param('name'); - my $title = $input->param('title'); - my $content = $input->param('content'); - if (letter_exists($oldmodule, $code)) { + my $oldbranchcode = $input->param('oldbranchcode'); + my $branchcode = $input->param('branchcode') || ''; + my $module = $input->param('module'); + my $oldmodule = $input->param('oldmodule'); + my $code = $input->param('code'); + my $name = $input->param('name'); + my $is_html = $input->param('is_html'); + my $title = $input->param('title'); + my $content = $input->param('content'); + if (letter_exists($oldbranchcode,$oldmodule, $code)) { $dbh->do( - q{UPDATE letter SET module = ?, code = ?, name = ?, title = ?, content = ? WHERE module = ? AND code = ?}, + q{UPDATE letter SET branchcode = ?, module = ?, name = ?, is_html = ?, title = ?, content = ? WHERE branchcode = ? AND module = ? AND code = ?}, undef, - $module, $code, $name, $title, $content, - $oldmodule, $code + $branchcode, $module, $name, $is_html || 0, $title, $content, + $oldbranchcode, $oldmodule, $code ); } else { $dbh->do( - q{INSERT INTO letter (module,code,name,title,content) VALUES (?,?,?,?,?)}, + q{INSERT INTO letter (branchcode,module,code,name,is_html,title,content) VALUES (?,?,?,?,?,?,?)}, undef, - $module, $code, $name, $title, $content + $branchcode, $module, $code, $name, $is_html || 0, $title, $content ); } # set up default display - default_display(); - return; + default_display($branchcode); +} + +sub add_copy { + my $dbh = C4::Context->dbh; + my $oldbranchcode = $input->param('oldbranchcode'); + my $branchcode = $input->param('branchcode'); + my $module = $input->param('module'); + my $code = $input->param('code'); + + return if letter_exists($branchcode,$module, $code); + + my $old_letter = letter_exists($oldbranchcode,$module, $code); + + $dbh->do( + q{INSERT INTO letter (branchcode,module,code,name,is_html,title,content) VALUES (?,?,?,?,?,?,?)}, + undef, + $branchcode, $module, $code, $old_letter->{name}, $old_letter->{is_html}, $old_letter->{title}, $old_letter->{content} + ); } sub delete_confirm { - my ($module, $code) = @_; + my ($branchcode, $module, $code) = @_; my $dbh = C4::Context->dbh; - my $letter = $dbh->selectrow_hashref(q|SELECT name FROM letter WHERE module = ? AND code = ?|, - { Slice => {} }, - $module, $code); + my $letter = letter_exists($branchcode, $module, $code); + $template->param( branchcode => $branchcode ); $template->param( code => $code ); $template->param( module => $module); $template->param( name => $letter->{name}); @@ -226,40 +269,48 @@ sub delete_confirm { } sub delete_confirmed { - my ($module, $code) = @_; + my ($branchcode, $module, $code) = @_; + my ($sql, $args) = _letter_from_where($branchcode, $module, $code); my $dbh = C4::Context->dbh; - $dbh->do('DELETE FROM letter WHERE module=? AND code=?',{},$module,$code); + $dbh->do("DELETE $sql", undef, @$args); # setup default display for screen - default_display(); + default_display($branchcode); return; } sub retrieve_letters { - my $searchstring = shift; + my ($branchcode, $searchstring) = @_; + my $dbh = C4::Context->dbh; - if ($searchstring) { - if ($searchstring=~m/(\S+)/) { - $searchstring = $1 . q{%}; - return $dbh->selectall_arrayref('SELECT module, code, name FROM letter WHERE code LIKE ? ORDER BY module, code', - { Slice => {} }, $searchstring); - } + my ($sql, @where, @args); + $sql = "SELECT branchcode, module, code, name, branchname + FROM letter + LEFT OUTER JOIN branches USING (branchcode)"; + if ($searchstring && $searchstring=~m/(\S+)/) { + $searchstring = $1 . q{%}; + push @where, 'code LIKE ?'; + push @args, $searchstring; } - else { - return $dbh->selectall_arrayref('SELECT module, code, name FROM letter ORDER BY module, code', { Slice => {} }); + elsif ($branchcode) { + push @where, 'branchcode = ?'; + push @args, $branchcode || ''; } - return; + + $sql .= " WHERE ".join(" AND ", @where) if @where; + $sql .= " ORDER BY module, code, branchcode"; +# use Data::Dumper; die Dumper($sql, \@args); + return $dbh->selectall_arrayref($sql, { Slice => {} }, @args); } sub default_display { - my $searchfield = shift; - my $results; + my ($branchcode, $searchfield) = @_; + if ( $searchfield ) { $template->param( search => 1 ); $template->param( searchfield => $searchfield ); - $results = retrieve_letters($searchfield); - } else { - $results = retrieve_letters(); } + my $results = retrieve_letters($branchcode,$searchfield); + my $loop_data = []; my $protected_letters = protected_letters(); foreach my $row (@{$results}) { @@ -267,8 +318,27 @@ sub default_display { push @{$loop_data}, $row; } - $template->param( letter => $loop_data ); - return; + + $template->param( + letter => $loop_data, + branchloop => _branchloop($branchcode), + ); +} + +sub _branchloop { + my ($branchcode) = @_; + + my $branches = GetBranches(); + my @branchloop; + for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { + push @branchloop, { + value => $thisbranch, + selected => $branchcode && $thisbranch eq $branchcode, + branchname => $branches->{$thisbranch}->{'branchname'}, + }; + } + + return \@branchloop; } sub add_fields { -- 1.6.5 From oleonard at myacpl.org Mon Oct 24 14:57:07 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 24 Oct 2011 08:57:07 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 7080 - Clean up interface on fine payment screens Message-ID: <1319461027-30036-1-git-send-email-oleonard@myacpl.org> - Move some content out of table cells - Improve table markup with
    , , and - Improve breadcrumb specificity on paycollect.pl - Add clearer messages for different actions (Pay selected fines, pay an individual fine, etc. - Add client-side warning to pay.pl when writing-off all - Correcting terminology: When a verb, "write off," when a noun: "Writeoff." --- .../intranet-tmpl/prog/en/modules/members/pay.tt | 35 ++++- .../prog/en/modules/members/paycollect.tt | 155 +++++++++----------- 2 files changed, 98 insertions(+), 92 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt index 6dfd8f9..22c82ce 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt @@ -1,6 +1,18 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Pay Fines for [% borrower.firstname %] [% borrower.surname %] [% INCLUDE 'doc-head-close.inc' %] + [% INCLUDE 'header.inc' %] @@ -30,6 +42,7 @@
    Branch Module Code Name     
    [% lette.branchname || "(All libraries)" %] [% lette.module %] [% lette.code %] [% lette.name %] - Edit + Edit + +
    + + + + + [% select_for_copy %] + +
    [% IF ( lette.protected ) %] - [% ELSE %] - Delete + Delete [% END %]
    + @@ -40,14 +53,21 @@ - + + + + + + + + [% FOREACH account_grp IN accounts %] [% FOREACH line IN account_grp.accountlines %] [% END %] [% END %] - - - - +
    Fines & Charges SelAmount Amount Outstanding
    Total Due:[% total | format('%.2f') %]
    [% IF ( line.amountoutstanding > 0 ) %] - + [% END %] @@ -81,15 +101,12 @@
    Total Due:[% total | format('%.2f') %]
    - - - + + + Cancel
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt index 08ee909..4637e32 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -57,7 +57,7 @@ function moneyFormat(textObj) { [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] - +
    @@ -102,50 +102,50 @@ function moneyFormat(textObj) { + +
    + Pay an individual fine - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + +
    DescriptionAccount TypeNotify idLevelAmountAmount Outstanding
    - [% description %] [% title %] - [% accounttype %][% notify_id %][% notify_level %][% amount | format('%.2f') %][% amountoutstanding | format('%.2f') %]
    Total Amount Payable : [% amountoutstanding | format('%.2f') %]
    Collect From Patron: +
    DescriptionAccount TypeNotify idLevelAmountAmount Outstanding
    Total amount payable:[% amountoutstanding | format('%.2f') %]
    + [% description %] [% title %] + [% accounttype %][% notify_id %][% notify_level %][% amount | format('%.2f') %][% amountoutstanding | format('%.2f') %]
    + +
      + +
    1. + - - - - - - - Cancel - - +
    2. +
    +
    - + [% ELSIF ( writeoff_individual ) %]
    +
    + Write off an individual fine @@ -157,33 +157,27 @@ function moneyFormat(textObj) { - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + +
    DescriptionAccount TypeNotify idLevelAmountAmount Outstanding
    [% description %] [% title %][% accounttype %][% notify_id %][% notify_level %][% amount | format('%.2f') %][% amountoutstanding | format('%.2f') %]
    Writeoff This Charge?
    - - Cancel -
    DescriptionAccount TypeNotify idLevelAmountAmount Outstanding
    Total amount to be written off:[% amountoutstanding | format('%.2f') %]
    [% description %] [% title %][% accounttype %][% notify_id %][% notify_level %][% amount | format('%.2f') %][% amountoutstanding | format('%.2f') %]
    +
    +
    [% ELSE %] @@ -192,27 +186,22 @@ function moneyFormat(textObj) { - - - - - - - - - - - - - - -
    Total Amount Outstanding : [% total | format('%.2f') %]
    Collect From Patron: +
    + [% IF ( selected_accts ) %]Pay an amount toward selected fines[% ELSE %]Pay an amount toward all fines[% END %] +
      +
    1. + Total amount outstanding: + [% total | format('%.2f') %] +
    2. +
    3. + -
    - - Cancel -
    + + +
    + [% END %]
    -- 1.7.3 From Katrin.Fischer.83 at web.de Mon Oct 24 15:09:49 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 24 Oct 2011 15:09:49 +0200 Subject: [Koha-patches] [PATCH] Bug 7079: Default values for German system preferences Message-ID: <1319461789-5422-1-git-send-email-Katrin.Fischer.83@web.de> Patch adds updates for system preferences to the sql file in the installer directory: - New: AmazonLocale: DE - borrowerRelationship: Vater|Mutter - BorrowersTitles: Herr|Frau - New: CurrencyFormat: FR - New: dateformat: metric - New: DefaultClassificationSource: z - New: OpacMainUserBlock: translated content - New: OpacNav: translated content - New: OpacNavBottom: translated content - New: OPACSearchForTitleIn: translated content To test: A) Do a full installation with German sample files B) Run the sql file 'system_preferences.sql' against your database Verfy values of system preferences have been changed. --- .../mysql/de-DE/mandatory/system_preferences.sql | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/installer/data/mysql/de-DE/mandatory/system_preferences.sql b/installer/data/mysql/de-DE/mandatory/system_preferences.sql index d0e08a9..0e304ed 100644 --- a/installer/data/mysql/de-DE/mandatory/system_preferences.sql +++ b/installer/data/mysql/de-DE/mandatory/system_preferences.sql @@ -16,5 +16,17 @@ -- with Koha; if not, write to the Free Software Foundation, Inc., -- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +UPDATE systempreferences SET value = 'DE' WHERE variable = 'AmazonLocale'; UPDATE systempreferences SET value = 'Vater|Mutter' WHERE variable = 'borrowerRelationship'; UPDATE systempreferences SET value = 'Herr|Frau' WHERE variable = 'BorrowersTitles'; +UPDATE systempreferences SET value = 'FR' WHERE variable = 'CurencyFormat'; +UPDATE systempreferences SET value = 'metric' WHERE variable = 'dateformat'; +UPDATE systempreferences SET value = 'z' WHERE variable = 'DefaultClassificationSource'; +UPDATE systempreferences SET value = 'Willkommen im Koha-Katalog! (OpacMainUserBlock)' WHERE variable = 'OpacMainUserBlock'; +UPDATE systempreferences SET value = 'Wichtige Links hier...(OpacNav)' WHERE variable = 'OpacNav'; +UPDATE systempreferences SET value = '...oder hier (OpacNavBottom)' WHERE variable = 'OpacNavBottom'; +UPDATE systempreferences SET value = + '
  • Andere Bibliotheken (WorldCat)
  • +
  • Google Scholar
  • +
  • Online-Buchhandel (Bookfinder.com)
  • ' + WHERE variable = 'OPACSearchForTitleIn'; -- 1.7.5.4 From oleonard at myacpl.org Mon Oct 24 17:51:13 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 24 Oct 2011 11:51:13 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 7083 - Show creator name on list of public lists Message-ID: <1319471473-14006-1-git-send-email-oleonard@myacpl.org> Show the name of the patron who created each list on the list of public lists. Also: - correcting unescaped ampersand in the template - making conditional a check on a variable that doesn't always exist, causing noisy errors in the log --- C4/VirtualShelves/Page.pm | 11 ++++++----- .../prog/en/modules/virtualshelves/shelves.tt | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index 161a7aa..58e02ec 100644 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -340,11 +340,12 @@ sub shelfpage ($$$$$) { my $owner = $shelflist->{$element}->{'owner'}; my $canmanage = ShelfPossibleAction( $loggedinuser, $element, 'manage' ); my $sortfield = $shelflist->{$element}->{'sortfield'}; - if ( $sortfield eq 'author' ) { - $shelflist->{$element}->{"authorsort"} = 'author'; - } - if ( $sortfield eq 'year' ) { - $shelflist->{$element}->{"yearsort"} = 'year'; + if ( $sortfield ){ + if ( $sortfield eq 'author' ) { + $shelflist->{$element}->{"authorsort"} = 'author'; + } elsif ( $sortfield eq 'year' ) { + $shelflist->{$element}->{"yearsort"} = 'year'; + } } $shelflist->{$element}->{"viewcategory$category"} = 1; $shelflist->{$element}->{manageshelf} = $canmanage; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index d7a34a1..d8d06ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -349,7 +349,7 @@ function placeHold () { List NameContentsSort byTypeOptions [% FOREACH shelveslooppri IN shelveslooppriv %] [% IF ( shelveslooppri.toggle ) %][% ELSE %][% END %] - [% shelveslooppri.shelfname |html %] + [% shelveslooppri.shelfname |html %] [% shelveslooppri.count %] item(s) [% IF ( shelveslooppri.authorsort ) %]Author[% ELSIF ( shelveslooppri.yearsort ) %]Year[% ELSE %]Title[% END %] [% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %] @@ -399,10 +399,11 @@ function placeHold () { [% IF ( shelvesloop ) %]
    [% pagination_bar %]
    - + [% FOREACH shelvesloo IN shelvesloop %] [% IF ( shelvesloo.toggle ) %][% ELSE %][% END %] + - [% IF ( loop_supplier.name ) %] - + [% ELSE %] - + [% END %]
    List NameContentsSort ByTypeOptions
    List NameCreated byContentsSort ByTypeOptions
    [% shelvesloo.shelfname |html %][% shelvesloo.ownername %] [% shelvesloo.count %] item(s) [% IF ( shelvesloo.authorsort ) %]Author[% ELSIF ( shelvesloo.yearsort ) %]Year[% ELSE %]Title[% END %] [% IF ( shelvesloo.viewcategory1 ) %]Private[% END %] -- 1.7.3 From Katrin.Fischer.83 at web.de Mon Oct 24 18:56:39 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 24 Oct 2011 18:56:39 +0200 Subject: [Koha-patches] [PATCH] Bug 4161: Preselect active currency for new vendors Message-ID: <1319475399-9270-1-git-send-email-Katrin.Fischer.83@web.de> Currently when creating a new vendor in acquisitions the alphabetical first currency will be preselected. For better usability and less mistakes the active curency should be preselected. To test: Check your currency settings in administration. Your active currency should not be the first in the list. 1) Create a new vendor Verify the active currency is selected for list and invoice prices. 2) Check vendor summary page Verify the correct currencies from the vendor record are shown here. 2) Edit vendor Verify the correct currencies from the vendor record are shown here. --- acqui/supplier.pl | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/acqui/supplier.pl b/acqui/supplier.pl index 2a4078a..44ff250 100755 --- a/acqui/supplier.pl +++ b/acqui/supplier.pl @@ -122,12 +122,22 @@ if ( $op eq 'display' ) { } else { my @currencies = GetCurrencies(); my $loop_currency; + my $active_currency = GetCurrency(); + my $active_listprice = $supplier->{'listprice'}; + my $active_invoiceprice = $supplier->{'invoiceprice'}; + if (!$supplier->{listprice}) { + $active_listprice = $active_currency->{currency}; + } + if (!$supplier->{invoiceprice}) { + $active_invoiceprice = $active_currency->{currency}; + } for (@currencies) { push @{$loop_currency}, - { currency => $_->{currency}, - listprice => ( $_->{currency} eq $supplier->{listprice} ), - invoiceprice => ( $_->{currency} eq $supplier->{invoiceprice} ), - }; + { + currency => $_->{currency}, + listprice => ( $_->{currency} eq $active_listprice ), + invoiceprice => ( $_->{currency} eq $active_invoiceprice ), + }; } my $default_gst_rate = (C4::Context->preference('gist') * 100) || '0.0'; -- 1.7.5.4 From lrea at nekls.org Mon Oct 24 20:28:37 2011 From: lrea at nekls.org (Liz Rea) Date: Mon, 24 Oct 2011 13:28:37 -0500 Subject: [Koha-patches] [PATCH] Bug 7084 - Adding results_summary class to New Tag to correct display inconsistency Message-ID: <1319480917-21048-1-git-send-email-lrea@nekls.org> To test: Verify that New Tag text is the same size as all of the other surrounding text. Verify that it is consistent with results that have tags. See screenshot for what it looked like before: http://screencast.com/t/hnt15kpS7SH9 Notice that the Add button and New tag text were slightly larger than the similar constructions for results with existing tags. This patch should fix that. --- .../opac-tmpl/prog/en/modules/opac-results.tt | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt index b7fbcb3..2ead1a1 100755 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -489,14 +489,16 @@ $(document).ready(function(){ [% END %] [% IF ( TagsInputOnList ) %] [% IF ( loggedinusername ) %] +
    - + New tag:
    +
    [% ELSIF ( loop.first ) %]Log in to add tags. [% END %] [% END %] -- 1.7.2.5 From lrea at nekls.org Mon Oct 24 20:51:38 2011 From: lrea at nekls.org (Liz Rea) Date: Mon, 24 Oct 2011 13:51:38 -0500 Subject: [Koha-patches] [PATCH] Bug 7084 - Adding results_summary class to New Tag to correct display inconsistency Message-ID: <1319482298-21782-1-git-send-email-lrea@nekls.org> To test: Verify that New Tag text is the same size as all of the other surrounding text. Verify that it is consistent with results that have tags. See screenshot for what it looked like before: http://screencast.com/t/hnt15kpS7SH9 Notice that the Add button and New tag text were slightly larger than the similar constructions for results with existing tags. This patch should fix that. --- .../opac-tmpl/prog/en/modules/opac-results.tt | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt index b7fbcb3..392f47b 100755 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -478,10 +478,11 @@ $(document).ready(function(){ [% END %] [% IF ( LibraryThingForLibrariesID ) %]
    [% END %] +
    + [% IF ( opacuserlogin ) %][% IF ( TagsEnabled ) %] [% IF ( TagsShowOnList ) %] [% IF ( SEARCH_RESULT.TagLoop.size ) %] -
    Tags:
      [% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]
    • [% TagLoo.term %] ([% TagLoo.weight_total %])
    • [% END %] @@ -490,13 +491,14 @@ $(document).ready(function(){ [% IF ( TagsInputOnList ) %] [% IF ( loggedinusername ) %]
      - + New tag:
      +
    [% ELSIF ( loop.first ) %]Log in to add tags. [% END %] [% END %] -- 1.7.2.5 From lrea at nekls.org Mon Oct 24 21:01:15 2011 From: lrea at nekls.org (Liz Rea) Date: Mon, 24 Oct 2011 14:01:15 -0500 Subject: [Koha-patches] [PATCH] Bug 7084 - Adding results_summary class to New Tag to correct display inconsistency In-Reply-To: <1319482298-21782-1-git-send-email-lrea@nekls.org> References: <1319482298-21782-1-git-send-email-lrea@nekls.org> Message-ID: <576009CE-2A82-4F59-AB45-2521B3DF19EC@nekls.org> I'm going to try to do this again, it's still not right. Um... Mondayitis? Yes, let's blame that. Liz Rea lrea at nekls.org -------------- next part -------------- A non-text attachment was scrubbed... Name: email_signature.jpeg Type: image/jpeg Size: 4862 bytes Desc: not available URL: -------------- next part -------------- On Oct 24, 2011, at 1:51 PM, Liz Rea wrote: > To test: > Verify that New Tag text is the same size as all of the other surrounding text. > Verify that it is consistent with results that have tags. > > See screenshot for what it looked like before: http://screencast.com/t/hnt15kpS7SH9 > Notice that the Add button and New tag text were slightly larger than the similar constructions for results with existing tags. This patch should fix that. > --- > .../opac-tmpl/prog/en/modules/opac-results.tt | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt > index b7fbcb3..392f47b 100755 > --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt > +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt > @@ -478,10 +478,11 @@ $(document).ready(function(){ > > [% END %] > [% IF ( LibraryThingForLibrariesID ) %]
    [% END %] > +
    > + > [% IF ( opacuserlogin ) %][% IF ( TagsEnabled ) %] > [% IF ( TagsShowOnList ) %] > [% IF ( SEARCH_RESULT.TagLoop.size ) %] > -
    > Tags: >
      [% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]
    • [% TagLoo.term %] ([% TagLoo.weight_total %])
    • > [% END %] > @@ -490,13 +491,14 @@ $(document).ready(function(){ > [% IF ( TagsInputOnList ) %] > [% IF ( loggedinusername ) %] >
      > - > + New tag: > > >
      > > +
    > [% ELSIF ( loop.first ) %]Log in to add tags. > [% END %] > [% END %] > -- > 1.7.2.5 > From Katrin.Fischer.83 at web.de Mon Oct 24 21:13:55 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 24 Oct 2011 21:13:55 +0200 Subject: [Koha-patches] [PATCH] Bug 6994: Wrong 'no budget defined' alert Message-ID: <1319483635-11301-1-git-send-email-Katrin.Fischer.83@web.de> When ordering from an existing record the 'no budgets and funds defined' error message was shown below the result list. To test: A) No budgets defined for this user and library Basket summary page shows a warning instead of the link for creation of orders. B) Budgets and funds are properly defined for this user and library Basket summary page shows links for order creation. Before patch: A search for an existing record had the alert at the bottom of the search result list. After patch: The links for creation of orders are shown instead. --- acqui/neworderbiblio.pl | 18 ++++++++++++++++-- .../en/includes/acquisitions-add-to-basket.inc | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/acqui/neworderbiblio.pl b/acqui/neworderbiblio.pl index c348940..5824f6b 100755 --- a/acqui/neworderbiblio.pl +++ b/acqui/neworderbiblio.pl @@ -65,6 +65,8 @@ use C4::Biblio; use C4::Auth; use C4::Output; use C4::Koha; +use C4::Members qw/ GetMember /; +use C4::Budgets qw/ GetBudgetHierarchy /; my $input = new CGI; @@ -121,10 +123,22 @@ foreach my $result ( @{$marcresults} ) { } +my $borrower= GetMember('borrowernumber' => $loggedinuser); +my $budgets = GetBudgetHierarchy(q{},$borrower->{branchcode},$borrower->{borrowernumber}); +my $has_budgets = 0; +foreach my $r (@{$budgets}) { + if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) { + next; + } + $has_budgets = 1; + last; +} + $template->param( + has_budgets => $has_budgets, basketno => $basketno, - booksellerid => $bookseller->{'id'}, - name => $bookseller->{'name'}, + booksellerid => $bookseller->{'id'}, + name => $bookseller->{'name'}, resultsloop => \@results, total => $total_hits, query => $query, diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-add-to-basket.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-add-to-basket.inc index 9fe6c05..6082637 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-add-to-basket.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-add-to-basket.inc @@ -15,4 +15,4 @@ [% ELSE %] You can't create any orders unless you first define a budget and a fund. [% END %] - \ No newline at end of file + -- 1.7.5.4 From lrea at nekls.org Mon Oct 24 22:34:05 2011 From: lrea at nekls.org (Liz Rea) Date: Mon, 24 Oct 2011 15:34:05 -0500 Subject: [Koha-patches] [PATCH] Bug 7084 - Re-arranging results_summary for tags so that it applies where it is supposed to Message-ID: <1319488445-23764-1-git-send-email-lrea@nekls.org> To test: Verify that New Tag text is the same size as all of the other surrounding text. Verify that it is consistent in size with results that have existing tags. See screenshot for what it looked like before: http://screencast.com/t/hnt15kpS7SH9 Notice that the Add button and New tag text were slightly larger than the similar constructions for results with existing tags. This patch should fix that. --- .../opac-tmpl/prog/en/modules/opac-results.tt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt index b7fbcb3..7201a82 100755 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -480,8 +480,8 @@ $(document).ready(function(){ [% IF ( LibraryThingForLibrariesID ) %]
    [% END %] [% IF ( opacuserlogin ) %][% IF ( TagsEnabled ) %] [% IF ( TagsShowOnList ) %] +
    [% IF ( SEARCH_RESULT.TagLoop.size ) %] -
    Tags:
      [% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]
    • [% TagLoo.term %] ([% TagLoo.weight_total %])
    • [% END %] @@ -490,7 +490,7 @@ $(document).ready(function(){ [% IF ( TagsInputOnList ) %] [% IF ( loggedinusername ) %]
      - + New tag:
      -- 1.7.2.5 From srdjan at catalyst.net.nz Tue Oct 25 02:44:40 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Tue, 25 Oct 2011 13:44:40 +1300 Subject: [Koha-patches] [PATCH] bug_7001: Issue and Reserve slips are notices. In-Reply-To: References: Message-ID: <1319503480-31766-1-git-send-email-srdjan@catalyst.net.nz> Branches can have their own version of notices - added branchcode to letter table. Support html notices - added is_html to letter table. GetPreparedletter() is the interface for compiling letters (notices). Sysprefs for notice and slips stylesheets. --- C4/Circulation.pm | 20 +- C4/Letters.pm | 580 +++++++++++++------- C4/Members.pm | 81 +++- C4/Message.pm | 12 +- C4/Print.pm | 139 ++---- C4/Reserves.pm | 103 +++-- C4/Suggestions.pm | 22 +- acqui/booksellers.pl | 3 +- circ/circulation.pl | 3 +- circ/hold-transfer-slip.pl | 27 +- .../data/mysql/de-DE/mandatory/sample_notices.sql | 2 +- .../data/mysql/en/mandatory/sample_notices.sql | 84 +++- .../data/mysql/es-ES/mandatory/sample_notices.sql | 2 +- .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 2 +- installer/data/mysql/it-IT/necessari/notices.sql | 2 +- installer/data/mysql/kohastructure.sql | 4 +- .../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 2 +- .../data/mysql/pl-PL/mandatory/sample_notices.sql | 2 +- .../data/mysql/ru-RU/mandatory/sample_notices.sql | 2 +- installer/data/mysql/sysprefs.sql | 3 + .../data/mysql/uk-UA/mandatory/sample_notices.sql | 2 +- installer/data/mysql/updatedatabase.pl | 98 ++++- .../prog/en/includes/circ-toolbar.inc | 4 +- .../en/modules/admin/preferences/circulation.pref | 5 + .../en/modules/admin/preferences/staff_client.pref | 5 + .../prog/en/modules/batch/print-notices.tt | 6 +- .../prog/en/modules/circ/hold-transfer-slip.tt | 54 -- .../prog/en/modules/circ/printslip.tt | 28 + .../prog/en/modules/members/moremember-receipt.tt | 76 --- .../intranet-tmpl/prog/en/modules/tools/letter.tt | 113 +++- members/memberentry.pl | 5 +- members/moremember.pl | 10 - members/printslip.pl | 89 +++ misc/cronjobs/advance_notices.pl | 78 ++-- misc/cronjobs/gather_print_notices.pl | 14 +- misc/cronjobs/overdue_notices.pl | 86 ++-- t/db_dependent/lib/KohaTest/Letters.pm | 5 +- t/db_dependent/lib/KohaTest/Letters/GetLetter.pm | 3 +- t/db_dependent/lib/KohaTest/Members.pm | 1 + t/db_dependent/lib/KohaTest/Print.pm | 5 +- t/db_dependent/lib/KohaTest/Reserves.pm | 1 + tools/letter.pl | 214 +++++--- 42 files changed, 1259 insertions(+), 738 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt create mode 100755 members/printslip.pl diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9f81773..33e5430 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2628,11 +2628,18 @@ sub SendCirculationAlert { borrowernumber => $borrower->{borrowernumber}, message_name => $message_name{$type}, }); - my $letter = C4::Letters::getletter('circulation', $type); - C4::Letters::parseletter($letter, 'biblio', $item->{biblionumber}); - C4::Letters::parseletter($letter, 'biblioitems', $item->{biblionumber}); - C4::Letters::parseletter($letter, 'borrowers', $borrower->{borrowernumber}); - C4::Letters::parseletter($letter, 'branches', $branch); + my $letter = C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $type, + branchcode => $branch, + tables => { + 'biblio' => $item->{biblionumber}, + 'biblioitems' => $item->{biblionumber}, + 'borrowers' => $borrower, + 'branches' => $branch, + } + ) or return; + my @transports = @{ $borrower_preferences->{transports} }; # warn "no transports" unless @transports; for (@transports) { @@ -2647,7 +2654,8 @@ sub SendCirculationAlert { $message->update; } } - $letter; + + return $letter; } =head2 updateWrongTransfer diff --git a/C4/Letters.pm b/C4/Letters.pm index 6846a00..8ca260f 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -26,6 +26,7 @@ use Encode; use Carp; use C4::Members; +use C4::Members::Attributes qw(GetBorrowerAttributes); use C4::Branch; use C4::Log; use C4::SMS; @@ -42,7 +43,7 @@ BEGIN { $VERSION = 3.01; @ISA = qw(Exporter); @EXPORT = qw( - &GetLetters &getletter &addalert &getalert &delalert &findrelatedto &SendAlerts GetPrintMessages + &GetLetters &GetPreparedLetter &GetWrappedLetter &addalert &getalert &delalert &findrelatedto &SendAlerts &GetPrintMessages ); } @@ -117,13 +118,26 @@ sub GetLetters (;$) { return \%letters; } -sub getletter ($$) { - my ( $module, $code ) = @_; +my %letter; +sub getletter ($$$) { + my ( $module, $code, $branchcode ) = @_; + + if (C4::Context->preference('IndependantBranches') && $branchcode){ + $$branchcode = C4::Context->userenv->{'branch'}; + } + + if ( my $l = $letter{$module}{$code}{$branchcode} ) { + return { %$l }; # deep copy + } + my $dbh = C4::Context->dbh; - my $sth = $dbh->prepare("select * from letter where module=? and code=?"); - $sth->execute( $module, $code ); - my $line = $sth->fetchrow_hashref; - return $line; + my $sth = $dbh->prepare("select * from letter where module=? and code=? and (branchcode = ? or branchcode = '') order by branchcode desc limit 1"); + $sth->execute( $module, $code, $branchcode ); + my $line = $sth->fetchrow_hashref + or return; + $line->{'content-type'} = 'text/html; charset="UTF-8"' if $line->{is_html}; + $letter{$module}{$code}{$branchcode} = $line; + return { %$line }; } =head2 addalert ($borrowernumber, $type, $externalid) @@ -178,7 +192,7 @@ sub delalert ($) { sub getalert (;$$$) { my ( $borrowernumber, $type, $externalid ) = @_; my $dbh = C4::Context->dbh; - my $query = "SELECT * FROM alert WHERE"; + my $query = "SELECT a.*, b.branchcode FROM alert a JOIN borrowers b USING(borrowernumber) WHERE"; my @bind; if ($borrowernumber and $borrowernumber =~ /^\d+$/) { $query .= " borrowernumber=? AND "; @@ -234,70 +248,65 @@ sub findrelatedto ($$) { parameters : - $type : the type of alert - $externalid : the id of the "object" to query - - $letter : the letter to send. + - $letter_code : the letter to send. send an alert to all borrowers having put an alert on a given subject. =cut sub SendAlerts { - my ( $type, $externalid, $letter ) = @_; + my ( $type, $externalid, $letter_code ) = @_; my $dbh = C4::Context->dbh; if ( $type eq 'issue' ) { - # warn "sending issues..."; - my $letter = getletter( 'serial', $letter ); - # prepare the letter... # search the biblionumber my $sth = $dbh->prepare( "SELECT biblionumber FROM subscription WHERE subscriptionid=?"); $sth->execute($externalid); - my ($biblionumber) = $sth->fetchrow; - - # parsing branch info - my $userenv = C4::Context->userenv; - parseletter( $letter, 'branches', $userenv->{branch} ); - - # parsing librarian name - $letter->{content} =~ s/<>/$userenv->{firstname}/g; - $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - - # parsing biblio information - parseletter( $letter, 'biblio', $biblionumber ); - parseletter( $letter, 'biblioitems', $biblionumber ); + my ($biblionumber) = $sth->fetchrow + or warn( "No subscription for '$externalid'" ), + return; + my %letter; # find the list of borrowers to alert my $alerts = getalert( '', 'issue', $externalid ); foreach (@$alerts) { - # and parse borrower ... - my $innerletter = $letter; my $borinfo = C4::Members::GetMember('borrowernumber' => $_->{'borrowernumber'}); - parseletter( $innerletter, 'borrowers', $_->{'borrowernumber'} ); + my $email = $borinfo->{email} or next; + + # warn "sending issues..."; + my $userenv = C4::Context->userenv; + my $letter = GetPreparedLetter ( + module => 'serial', + letter_code => $letter_code, + branchcode => $userenv->{branch}, + tables => { + 'branches' => $_->{branchcode}, + 'biblio' => $biblionumber, + 'biblioitems' => $biblionumber, + 'borrowers' => $borinfo, + }, + want_librarian => 1, + ) or return; # ... then send mail - if ( $borinfo->{email} ) { - my %mail = ( - To => $borinfo->{email}, - From => $borinfo->{email}, - Subject => "" . $innerletter->{title}, - Message => "" . $innerletter->{content}, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; - + my %mail = ( + To => $email, + From => $email, + Subject => "" . $letter->{title}, + Message => "" . $letter->{content}, + 'Content-Type' => 'text/plain; charset="utf8"', + ); + sendmail(%mail) or carp $Mail::Sendmail::error; # warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}"; - } } } elsif ( $type eq 'claimacquisition' ) { # warn "sending issues..."; - my $letter = getletter( 'claimacquisition', $letter ); # prepare the letter... # search the biblionumber @@ -307,52 +316,43 @@ sub SendAlerts { my $sthorders = $dbh->prepare($strsth); $sthorders->execute; my $dataorders = $sthorders->fetchall_arrayref( {} ); - parseletter( $letter, 'aqbooksellers', - $dataorders->[0]->{booksellerid} ); + my $sthbookseller = $dbh->prepare("select * from aqbooksellers where id=?"); $sthbookseller->execute( $dataorders->[0]->{booksellerid} ); my $databookseller = $sthbookseller->fetchrow_hashref; - # parsing branch info - my $userenv = C4::Context->userenv; - parseletter( $letter, 'branches', $userenv->{branch} ); - - # parsing librarian name - $letter->{content} =~ s/<>/$userenv->{firstname}/g; - $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - 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/; - } + my @email; + push @email, $databookseller->{bookselleremail} if $databookseller->{bookselleremail}; + push @email, $databookseller->{contemail} if $databookseller->{contemail}; + unless (@email) { + warn "Bookseller $dataorders->[0]->{booksellerid} without emails"; + return; } - $letter->{content} =~ s/<<[^>]*>>//g; - my $innerletter = $letter; + + my $userenv = C4::Context->userenv; + my $letter = GetPreparedLetter ( + module => 'claimacquisition', + letter_code => $letter_code, + branchcode => $userenv->{branch}, + tables => { + 'branches' => $userenv->{branch}, + 'aqbooksellers' => $databookseller, + }, + repeat => $dataorders, + want_librarian => 1, + ) or return; # ... then send mail - if ( $databookseller->{bookselleremail} - || $databookseller->{contemail} ) - { - my %mail = ( - To => $databookseller->{bookselleremail} - . ( - $databookseller->{contemail} - ? "," . $databookseller->{contemail} - : "" - ), - From => $userenv->{emailaddress}, - Subject => "" . $innerletter->{title}, - Message => "" . $innerletter->{content}, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; - } + my %mail = ( + To => join( ','. @email), + From => $userenv->{emailaddress}, + Subject => "" . $letter->{title}, + Message => "" . $letter->{content}, + 'Content-Type' => 'text/plain; charset="utf8"', + ); + sendmail(%mail) or carp $Mail::Sendmail::error; + if ( C4::Context->preference("LetterLog") ) { logaction( "ACQUISITION", @@ -360,16 +360,13 @@ sub SendAlerts { "", "order list : " . join( ",", @$externalid ) - . "\n$innerletter->{title}\n$innerletter->{content}" + . "\n$letter->{title}\n$letter->{content}" ); } } elsif ( $type eq 'claimissues' ) { # warn "sending issues..."; - my $letter = getletter( 'claimissues', $letter ); - - # prepare the letter... # search the biblionumber my $strsth = "select serial.*,subscription.*, biblio.* from serial LEFT JOIN subscription on serial.subscriptionid=subscription.subscriptionid LEFT JOIN biblio on serial.biblionumber=biblio.biblionumber where serial.serialid IN (" @@ -377,81 +374,76 @@ sub SendAlerts { my $sthorders = $dbh->prepare($strsth); $sthorders->execute; my $dataorders = $sthorders->fetchall_arrayref( {} ); - parseletter( $letter, 'aqbooksellers', - $dataorders->[0]->{aqbooksellerid} ); + my $sthbookseller = $dbh->prepare("select * from aqbooksellers where id=?"); $sthbookseller->execute( $dataorders->[0]->{aqbooksellerid} ); my $databookseller = $sthbookseller->fetchrow_hashref; - # parsing branch info - my $userenv = C4::Context->userenv; - parseletter( $letter, 'branches', $userenv->{branch} ); - - # parsing librarian name - $letter->{content} =~ s/<>/$userenv->{firstname}/g; - $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - 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/; - } + my @email; + push @email, $databookseller->{bookselleremail} if $databookseller->{bookselleremail}; + push @email, $databookseller->{contemail} if $databookseller->{contemail}; + unless (@email) { + warn "Bookseller $dataorders->[0]->{booksellerid} without emails"; + return; } - $letter->{content} =~ s/<<[^>]*>>//g; - my $innerletter = $letter; + + # prepare the letter... + my $userenv = C4::Context->userenv; + my $letter = GetPreparedLetter ( + module => 'claimissues', + letter_code => $letter_code, + branchcode => $userenv->{branch}, + tables => { + 'branches' => $userenv->{branch}, + 'aqbooksellers' => $databookseller, + }, + repeat => $dataorders, + want_librarian => 1, + ) or return; # ... then send mail - if ( $databookseller->{bookselleremail} - || $databookseller->{contemail} ) { - my $mail_to = $databookseller->{bookselleremail}; - if ($databookseller->{contemail}) { - if (!$mail_to) { - $mail_to = $databookseller->{contemail}; - } else { - $mail_to .= q|,|; - $mail_to .= $databookseller->{contemail}; - } - } - my $mail_subj = $innerletter->{title}; - my $mail_msg = $innerletter->{content}; - $mail_msg ||= q{}; - $mail_subj ||= q{}; + my $mail_subj = $letter->{title}; + my $mail_msg = $letter->{content}; + $mail_msg ||= q{}; + $mail_subj ||= q{}; - my %mail = ( - To => $mail_to, - From => $userenv->{emailaddress}, - Subject => $mail_subj, - Message => $mail_msg, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; - logaction( - "ACQUISITION", - "CLAIM ISSUE", - undef, - "To=" - . $databookseller->{contemail} - . " Title=" - . $innerletter->{title} - . " Content=" - . $innerletter->{content} - ) if C4::Context->preference("LetterLog"); - } + my %mail = ( + To => join( ','. @email), + From => $userenv->{emailaddress}, + Subject => $mail_subj, + Message => $mail_msg, + 'Content-Type' => 'text/plain; charset="utf8"', + ); + sendmail(%mail) or carp $Mail::Sendmail::error; + + logaction( + "ACQUISITION", + "CLAIM ISSUE", + undef, + "To=" + . $databookseller->{contemail} + . " Title=" + . $letter->{title} + . " Content=" + . $letter->{content} + ) if C4::Context->preference("LetterLog"); } # send an "account details" notice to a newly created user elsif ( $type eq 'members' ) { - # must parse the password special, before it's hashed. - $letter->{content} =~ s/<>/$externalid->{'password'}/g; - - parseletter( $letter, 'borrowers', $externalid->{'borrowernumber'}); - parseletter( $letter, 'branches', $externalid->{'branchcode'} ); - my $branchdetails = GetBranchDetail($externalid->{'branchcode'}); + my $letter = GetPreparedLetter ( + module => 'members', + letter_code => $letter_code, + branchcode => $externalid->{'branchcode'}, + tables => { + 'branches' => $branchdetails, + 'borrowers' => $externalid->{'borrowernumber'}, + }, + substitute => { 'borrowers.password' => $externalid->{'password'} }, + want_librarian => 1, + ) or return; + my %mail = ( To => $externalid->{'emailaddr'}, From => $branchdetails->{'branchemail'} || C4::Context->preference("KohaAdminEmailAddress"), @@ -463,24 +455,148 @@ sub SendAlerts { } } -=head2 parseletter($letter, $table, $pk) - - parameters : - - $letter : a hash to letter fields (title & content useful) - - $table : the Koha table to parse. - - $pk : the primary key to query on the $table table - parse all fields from a table, and replace values in title & content with the appropriate value - (not exported sub, used only internally) +=head2 GetPreparedLetter( %params ) + + %params hash: + module => letter module, mandatory + letter_code => letter code, mandatory + branchcode => for letter selection, if missing default system letter taken + tables => a hashref with table names as keys. Values are either: + - a scalar - primary key value + - an arrayref - primary key values + - a hashref - full record + substitute => custom substitution key/value pairs + repeat => records to be substituted on consecutive lines: + - an arrayref - tries to guess what needs substituting by + taking remaining << >> tokensr; not recommended + - a hashref token => @tables - replaces << >> << >> + subtemplate for each @tables row; table is a hashref as above + want_librarian => boolean, if set to true triggers librarian details + substitution from the userenv + Return value: + letter fields hashref (title & content useful) =cut -our %handles = (); -our %columns = (); +sub GetPreparedLetter { + my %params = @_; + + my $module = $params{module} or croak "No module"; + my $letter_code = $params{letter_code} or croak "No letter_code"; + my $branchcode = $params{branchcode} || ''; + + my $letter = getletter( $module, $letter_code, $branchcode ) + or warn( "No $module $letter_code letter"), + return; + + my $tables = $params{tables}; + my $substitute = $params{substitute}; + my $repeat = $params{repeat}; + $tables || $substitute || $repeat + or carp( "ERROR: nothing to substitute - both 'tables' and 'substitute' are empty" ), + return; + my $want_librarian = $params{want_librarian}; + + if ($substitute) { + while ( my ($token, $val) = each %$substitute ) { + $letter->{title} =~ s/<<$token>>/$val/g; + $letter->{content} =~ s/<<$token>>/$val/g; + } + } + + if ($want_librarian) { + # parsing librarian name + my $userenv = C4::Context->userenv; + $letter->{content} =~ s/<>/$userenv->{firstname}/go; + $letter->{content} =~ s/<>/$userenv->{surname}/go; + $letter->{content} =~ s/<>/$userenv->{emailaddress}/go; + } + + my ($repeat_no_enclosing_tags, $repeat_enclosing_tags); + + if ($repeat) { + if (ref ($repeat) eq 'ARRAY' ) { + $repeat_no_enclosing_tags = $repeat; + } else { + $repeat_enclosing_tags = $repeat; + } + } + + if ($repeat_enclosing_tags) { + while ( my ($tag, $tag_tables) = each %$repeat_enclosing_tags ) { + if ( $letter->{content} =~ m!<$tag>(.*)!s ) { + my $subcontent = $1; + my @lines = map { + my %subletter = ( title => '', content => $subcontent ); + _substitute_tables( \%subletter, $_ ); + $subletter{content}; + } @$tag_tables; + $letter->{content} =~ s!<$tag>.*!join( "\n", @lines )!se; + } + } + } + + if ($tables) { + _substitute_tables( $letter, $tables ); + } + + if ($repeat_no_enclosing_tags) { + if ( $letter->{content} =~ m/[^\n]*<<.*>>[^\n]*/so ) { + my $line = $&; + my $i = 1; + my @lines = map { + my $c = $line; + $c =~ s/<>/$i/go; + foreach my $field ( keys %{$_} ) { + $c =~ s/(<<[^\.]+.$field>>)/$_->{$field}/; + } + $i++; + $c; + } @$repeat_no_enclosing_tags; + + my $replaceby = join( "\n", @lines ); + $letter->{content} =~ s/\Q$line\E/$replaceby/s; + } + } + + $letter->{content} =~ s/<<\S*>>//go; #remove any stragglers +# $letter->{content} =~ s/<<[^>]*>>//go; + + return $letter; +} + +sub _substitute_tables { + my ( $letter, $tables ) = @_; + while ( my ($table, $param) = each %$tables ) { + next unless $param; + + my $ref = ref $param; -sub parseletter_sth { + my $values; + if ($ref && $ref eq 'HASH') { + $values = $param; + } + else { + my @pk; + my $sth = _parseletter_sth($table); + unless ($sth) { + warn "_parseletter_sth('$table') failed to return a valid sth. No substitution will be done for that table."; + return; + } + $sth->execute( $ref ? @$param : $param ); + + $values = $sth->fetchrow_hashref; + } + + _parseletter ( $letter, $table, $values ); + } +} + +my %handles = (); +sub _parseletter_sth { my $table = shift; unless ($table) { - carp "ERROR: parseletter_sth() called without argument (table)"; + carp "ERROR: _parseletter_sth() called without argument (table)"; return; } # check cache first @@ -496,8 +612,10 @@ sub parseletter_sth { ($table eq 'branches' ) ? "SELECT * FROM $table WHERE branchcode = ?" : ($table eq 'suggestions' ) ? "SELECT * FROM $table WHERE suggestionid = ?" : ($table eq 'aqbooksellers') ? "SELECT * FROM $table WHERE id = ?" : undef ; + ($table eq 'aqorders' ) ? "SELECT * FROM $table WHERE ordernumber = ?" : undef ; + ($table eq 'opac_news' ) ? "SELECT * FROM $table WHERE idnew = ?" : undef ; unless ($query) { - warn "ERROR: No parseletter_sth query for table '$table'"; + warn "ERROR: No _parseletter_sth query for table '$table'"; return; # nothing to get } unless ($handles{$table} = C4::Context->dbh->prepare($query)) { @@ -507,25 +625,21 @@ sub parseletter_sth { return $handles{$table}; # now cache is populated for that $table } -sub parseletter { - my ( $letter, $table, $pk, $pk2 ) = @_; - unless ($letter) { - carp "ERROR: parseletter() 1st argument 'letter' empty"; - return; - } - my $sth = parseletter_sth($table); - unless ($sth) { - warn "parseletter_sth('$table') failed to return a valid sth. No substitution will be done for that table."; - return; - } - if ( $pk2 ) { - $sth->execute($pk, $pk2); - } else { - $sth->execute($pk); - } +=head2 _parseletter($letter, $table, $values) - my $values = $sth->fetchrow_hashref; - + parameters : + - $letter : a hash to letter fields (title & content useful) + - $table : the Koha table to parse. + - $values : table record hashref + parse all fields from a table, and replace values in title & content with the appropriate value + (not exported sub, used only internally) + +=cut + +my %columns = (); +sub _parseletter { + my ( $letter, $table, $values ) = @_; + # TEMPORARY hack until the expirationdate column is added to reserves if ( $table eq 'reserves' && $values->{'waitingdate'} ) { my @waitingdate = split /-/, $values->{'waitingdate'}; @@ -539,16 +653,51 @@ sub parseletter { )->output(); } + if ($letter->{content} && $letter->{content} =~ /<>/) { + my @da = localtime(); + my $todaysdate = "$da[2]:$da[1] " . C4::Dates->today(); + $letter->{content} =~ s/<>/$todaysdate/go; + } # and get all fields from the table - my $columns = C4::Context->dbh->prepare("SHOW COLUMNS FROM $table"); - $columns->execute; - while ( ( my $field ) = $columns->fetchrow_array ) { - my $replacefield = "<<$table.$field>>"; - $values->{$field} =~ s/\p{P}(?=$)//g if $values->{$field}; - my $replacedby = $values->{$field} || ''; - ($letter->{title} ) and $letter->{title} =~ s/$replacefield/$replacedby/g; - ($letter->{content}) and $letter->{content} =~ s/$replacefield/$replacedby/g; +# my $columns = $columns{$table}; +# unless ($columns) { +# $columns = $columns{$table} = C4::Context->dbh->selectcol_arrayref("SHOW COLUMNS FROM $table"); +# } +# foreach my $field (@$columns) { + + while ( my ($field, $val) = each %$values ) { + my $replacetablefield = "<<$table.$field>>"; + my $replacefield = "<<$field>>"; + $val =~ s/\p{P}(?=$)//g if $val; + my $replacedby = defined ($val) ? $val : ''; + ($letter->{title} ) and do { + $letter->{title} =~ s/$replacetablefield/$replacedby/g; + $letter->{title} =~ s/$replacefield/$replacedby/g; + }; + ($letter->{content}) and do { + $letter->{content} =~ s/$replacetablefield/$replacedby/g; + $letter->{content} =~ s/$replacefield/$replacedby/g; + }; + } + + if ($table eq 'borrowers' && $letter->{content}) { + if ( my $attributes = GetBorrowerAttributes($values->{borrowernumber}) ) { + my %attr; + foreach (@$attributes) { + my $code = $_->{code}; + my $val = $_->{value_description} || $_->{value}; + $val =~ s/\p{P}(?=$)//g if $val; + next unless $val gt ''; + $attr{$code} ||= []; + push @{ $attr{$code} }, $val; + } + while ( my ($code, $val_ar) = each %attr ) { + my $replacefield = "<>"; + my $replacedby = join ',', @$val_ar; + $letter->{content} =~ s/$replacefield/$replacedby/g; + } + } } return $letter; } @@ -733,31 +882,32 @@ returns your letter object, with the content updated. sub _add_attachments { my $params = shift; - return unless 'HASH' eq ref $params; - foreach my $required_parameter (qw( letter attachments message )) { - return unless exists $params->{$required_parameter}; - } - return $params->{'letter'} unless @{ $params->{'attachments'} }; + my $letter = $params->{'letter'}; + my $attachments = $params->{'attachments'}; + return $letter unless @$attachments; + my $message = $params->{'message'}; # First, we have to put the body in as the first attachment - $params->{'message'}->attach( - Type => 'TEXT', - Data => $params->{'letter'}->{'content'}, + $message->attach( + Type => $letter->{'content-type'} || 'TEXT', + Data => $letter->{'is_html'} + ? _wrap_html($letter->{'content'}, $letter->{'title'}) + : $letter->{'content'}, ); - foreach my $attachment ( @{ $params->{'attachments'} } ) { - $params->{'message'}->attach( + foreach my $attachment ( @$attachments ) { + $message->attach( Type => $attachment->{'type'}, Data => $attachment->{'content'}, Filename => $attachment->{'filename'}, ); } # we're forcing list context here to get the header, not the count back from grep. - ( $params->{'letter'}->{'content-type'} ) = grep( /^Content-Type:/, split( /\n/, $params->{'message'}->header_as_string ) ); - $params->{'letter'}->{'content-type'} =~ s/^Content-Type:\s+//; - $params->{'letter'}->{'content'} = $params->{'message'}->body_as_string; + ( $letter->{'content-type'} ) = grep( /^Content-Type:/, split( /\n/, $params->{'message'}->header_as_string ) ); + $letter->{'content-type'} =~ s/^Content-Type:\s+//; + $letter->{'content'} = $message->body_as_string; - return $params->{'letter'}; + return $letter; } @@ -824,14 +974,17 @@ sub _send_message_by_email ($;$$$) { my $utf8 = decode('MIME-Header', $message->{'subject'} ); $message->{subject}= encode('MIME-Header', $utf8); + my $subject = encode('utf8', $message->{'subject'}); my $content = encode('utf8', $message->{'content'}); + my $content_type = $message->{'content_type'} || 'text/plain; charset="UTF-8"'; + my $is_html = $content_type =~ m/html/io; my %sendmail_params = ( To => $to_address, From => $message->{'from_address'} || C4::Context->preference('KohaAdminEmailAddress'), - Subject => encode('utf8', $message->{'subject'}), + Subject => $subject, charset => 'utf8', - Message => $content, - 'content-type' => $message->{'content_type'} || 'text/plain; charset="UTF-8"', + Message => $is_html ? _wrap_html($content, $subject) : $content, + 'content-type' => $content_type, ); $sendmail_params{'Auth'} = {user => $username, pass => $password, method => $method} if $username; if ( my $bcc = C4::Context->preference('OverdueNoticeBcc') ) { @@ -851,6 +1004,27 @@ sub _send_message_by_email ($;$$$) { } } +sub _wrap_html { + my ($content, $title) = @_; + + my $css = C4::Context->preference("NoticeCSS") || ''; + $css = qq{} if $css; + return < + + +$title + +$css + + +$content + + +EOS +} + sub _send_message_by_sms ($) { my $message = shift or return undef; my $member = C4::Members::GetMember( 'borrowernumber' => $message->{'borrowernumber'} ); diff --git a/C4/Members.pm b/C4/Members.pm index 56718f0..2abc178 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -23,7 +23,7 @@ package C4::Members; use strict; #use warnings; FIXME - Bug 2505 use C4::Context; -use C4::Dates qw(format_date_in_iso); +use C4::Dates qw(format_date_in_iso format_date); use Digest::MD5 qw(md5_base64); use Date::Calc qw/Today Add_Delta_YM/; use C4::Log; # logaction @@ -31,8 +31,10 @@ use C4::Overdues; use C4::Reserves; use C4::Accounts; use C4::Biblio; +use C4::Letters; use C4::SQLHelper qw(InsertInTable UpdateInTable SearchInTable); use C4::Members::Attributes qw(SearchIdMatchingAttribute); +use C4::NewsChannels; #get slip news our ($VERSION, at ISA, at EXPORT, at EXPORT_OK,$debug); @@ -91,6 +93,8 @@ BEGIN { &DeleteMessage &GetMessages &GetMessagesCount + + &IssueSlip ); #Modify data @@ -2243,7 +2247,80 @@ sub DeleteMessage { } -END { } # module clean-up code here (global destructor) +=head2 IssueSlip + + IssueSlip($branchcode, $borrowernumber, $quickslip) + + Returns letter hash ( see C4::Letters::GetPreparedLetter ) + + $quickslip is boolean, to indicate whether we want a quick slip + +=cut + +sub IssueSlip { + my ($branch, $borrowernumber, $quickslip) = @_; + +# return unless ( C4::Context->boolean_preference('printcirculationslips') ); + + my $today = POSIX::strftime("%Y-%m-%d", localtime); + + my $issueslist = GetPendingIssues($borrowernumber); + foreach my $it (@$issueslist){ + if ($it->{'issuedate'} eq $today) { + $it->{'today'} = 1; + } + elsif ($it->{'date_due'} le $today) { + $it->{'overdue'} = 1; + } + + $it->{'date_due'}=format_date($it->{'date_due'}); + } + my @issues = sort { $b->{'timestamp'} <=> $a->{'timestamp'} } @$issueslist; + + my ($letter_code, %repeat); + if ( $quickslip ) { + $letter_code = 'ISSUEQSLIP'; + %repeat = ( + 'checkedout' => [ map { + 'biblio' => $_, + 'items' => $_, + 'issues' => $_, + }, grep { $_->{'today'} } @issues ], + ); + } + else { + $letter_code = 'ISSUESLIP'; + %repeat = ( + 'checkedout' => [ map { + 'biblio' => $_, + 'items' => $_, + 'issues' => $_, + }, grep { !$_->{'overdue'} } @issues ], + + 'overdue' => [ map { + 'biblio' => $_, + 'items' => $_, + 'issues' => $_, + }, grep { $_->{'overdue'} } @issues ], + + 'news' => [ map { + $_->{'timestamp'} = $_->{'newdate'}; + { opac_news => $_ } + } @{ GetNewsToDisplay("slip") } ], + ); + } + + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $letter_code, + branchcode => $branch, + tables => { + 'branches' => $branch, + 'borrowers' => $borrowernumber, + }, + repeat => \%repeat, + ); +} 1; diff --git a/C4/Message.pm b/C4/Message.pm index 16272ff..4b88970 100644 --- a/C4/Message.pm +++ b/C4/Message.pm @@ -18,9 +18,15 @@ How to add a new message to the queue: use C4::Items; my $borrower = { borrowernumber => 1 }; my $item = C4::Items::GetItem(1); - my $letter = C4::Letters::getletter('circulation', 'CHECKOUT'); - C4::Letters::parseletter($letter, 'biblio', $item->{biblionumber}); - C4::Letters::parseletter($letter, 'biblioitems', $item->{biblionumber}); + my $letter = C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => 'CHECKOUT', + branchcode => $branch, + tables => { + 'biblio', $item->{biblionumber}, + 'biblioitems', $item->{biblionumber}, + }, + ); C4::Message->enqueue($letter, $borrower->{borrowernumber}, 'email'); How to update a borrower's last checkout message: diff --git a/C4/Print.pm b/C4/Print.pm index 2ba7584..2343fa4 100644 --- a/C4/Print.pm +++ b/C4/Print.pm @@ -20,8 +20,6 @@ package C4::Print; use strict; #use warnings; FIXME - Bug 2505 use C4::Context; -use C4::Members; -use C4::Dates qw(format_date); use vars qw($VERSION @ISA @EXPORT); @@ -30,7 +28,7 @@ BEGIN { $VERSION = 3.01; require Exporter; @ISA = qw(Exporter); - @EXPORT = qw(&remoteprint &printreserve &printslip); + @EXPORT = qw(&printslip); } =head1 NAME @@ -47,28 +45,48 @@ The functions in this module handle sending text to a printer. =head1 FUNCTIONS -=head2 remoteprint +=cut - &remoteprint($items, $borrower); +=comment + my $slip = <<"EOF"; +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Date: $todaysdate; -Prints the list of items in C<$items> to a printer. +ITEM RESERVED: +$itemdata->{'title'} ($itemdata->{'author'}) +barcode: $itemdata->{'barcode'} + +COLLECT AT: $branchname -C<$borrower> is a reference-to-hash giving information about a patron. -This may be gotten from C<&GetMemberDetails>. The patron's name -will be printed in the output. +BORROWER: +$bordata->{'surname'}, $bordata->{'firstname'} +card number: $bordata->{'cardnumber'} +Phone: $bordata->{'phone'} +$bordata->{'streetaddress'} +$bordata->{'suburb'} +$bordata->{'town'} +$bordata->{'emailaddress'} -C<$items> is a reference-to-list, where each element is a -reference-to-hash describing a borrowed item. C<$items> may be gotten -from C<&GetBorrowerIssues>. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +EOF =cut +=head2 printslip + + &printslip($slip) + +print a slip for the given $borrowernumber and $branchcode + +=cut + +sub printslip ($) { + my ($slip) = @_; + + return unless ( C4::Context->boolean_preference('printcirculationslips') ); + # FIXME - It'd be nifty if this could generate pretty PostScript. -sub remoteprint ($$) { - my ($items, $borrower) = @_; - (return) - unless ( C4::Context->boolean_preference('printcirculationslips') ); my $queue = ''; # FIXME - If 'queue' is undefined or empty, then presumably it should @@ -93,100 +111,13 @@ sub remoteprint ($$) { # print $queue; #open (FILE,">/tmp/$file"); - my $i = 0; - # FIXME - This is HLT-specific. Put this stuff in a customizable - # site-specific file somewhere. - print PRINTER "Horowhenua Library Trust\r\n"; - print PRINTER "Phone: 368-1953\r\n"; - print PRINTER "Fax: 367-9218\r\n"; - print PRINTER "Email: renewals\@library.org.nz\r\n\r\n\r\n"; - print PRINTER "$borrower->{'cardnumber'}\r\n"; - print PRINTER - "$borrower->{'title'} $borrower->{'initials'} $borrower->{'surname'}\r\n"; - - # FIXME - Use for ($i = 0; $items->[$i]; $i++) - # Or better yet, foreach $item (@{$items}) - while ( $items->[$i] ) { - - # print $i; - my $itemdata = $items->[$i]; - - # FIXME - This is just begging for a Perl format. - print PRINTER "$i $itemdata->{'title'}\r\n"; - print PRINTER "$itemdata->{'barcode'}"; - print PRINTER " " x 15; - print PRINTER "$itemdata->{'date_due'}\r\n"; - $i++; - } + print PRINTER $slip; print PRINTER "\r\n" x 7 ; close PRINTER; #system("lpr /tmp/$file"); } -sub printreserve { - my ( $branchname, $bordata, $itemdata ) = @_; - my $printer = ''; - (return) unless ( C4::Context->boolean_preference('printreserveslips') ); - if ( $printer eq "" || $printer eq 'nulllp' ) { - open( PRINTER, ">>/tmp/kohares" ) - or die "Could not write to /tmp/kohares"; - } - else { - open( PRINTER, "| lpr -P $printer >/dev/null" ) - or die "Couldn't write to queue:$!\n"; - } - my @da = localtime(); - my $todaysdate = "$da[2]:$da[1] " . C4::Dates->today(); - my $slip = <<"EOF"; -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Date: $todaysdate; - -ITEM RESERVED: -$itemdata->{'title'} ($itemdata->{'author'}) -barcode: $itemdata->{'barcode'} - -COLLECT AT: $branchname - -BORROWER: -$bordata->{'surname'}, $bordata->{'firstname'} -card number: $bordata->{'cardnumber'} -Phone: $bordata->{'phone'} -$bordata->{'streetaddress'} -$bordata->{'suburb'} -$bordata->{'town'} -$bordata->{'emailaddress'} - - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -EOF - print PRINTER $slip; - close PRINTER; - return $slip; -} - -=head2 printslip - - &printslip($borrowernumber) - -print a slip for the given $borrowernumber - -=cut - -#' -sub printslip ($) { - my $borrowernumber = shift; - my $borrower = GetMemberDetails($borrowernumber); - my $issueslist = GetPendingIssues($borrowernumber); - foreach my $it (@$issueslist){ - $it->{'date_due'}=format_date($it->{'date_due'}); - } - my @issues = sort { $b->{'timestamp'} <=> $a->{'timestamp'} } @$issueslist; - remoteprint(\@issues, $borrower ); -} - -END { } # module clean-up code here (global destructor) - 1; __END__ diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 4af8a85..886829e 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -120,6 +120,8 @@ BEGIN { &AlterPriority &ToggleLowestPriority + + &ReserveSlip ); @EXPORT_OK = qw( MergeHolds ); } @@ -193,32 +195,31 @@ sub AddReserve { # Send e-mail to librarian if syspref is active if(C4::Context->preference("emailLibrarianWhenHoldIsPlaced")){ my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber); - my $biblio = GetBiblioData($biblionumber); - my $letter = C4::Letters::getletter( 'reserves', 'HOLDPLACED'); - my $branchcode = $borrower->{branchcode}; - my $branch_details = C4::Branch::GetBranchDetail($branchcode); - my $admin_email_address =$branch_details->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress'); - - my %keys = (%$borrower, %$biblio); - foreach my $key (keys %keys) { - my $replacefield = "<<$key>>"; - $letter->{content} =~ s/$replacefield/$keys{$key}/g; - $letter->{title} =~ s/$replacefield/$keys{$key}/g; + my $branch_details = C4::Branch::GetBranchDetail($borrower->{branchcode}); + if ( my $letter = C4::Letters::GetPreparedLetter ( + module => 'reserves', + letter_code => 'HOLDPLACED', + branchcode => $branch, + tables => { + 'branches' => $branch_details, + 'borrowers' => $borrower, + 'biblio' => $biblionumber, + }, + ) ) { + + my $admin_email_address =$branch_details->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress'); + + C4::Letters::EnqueueLetter( + { letter => $letter, + borrowernumber => $borrowernumber, + message_transport_type => 'email', + from_address => $admin_email_address, + to_address => $admin_email_address, + } + ); } - - C4::Letters::EnqueueLetter( - { letter => $letter, - borrowernumber => $borrowernumber, - message_transport_type => 'email', - from_address => $admin_email_address, - to_address => $admin_email_address, - } - ); - - } - #} ($const eq "o" || $const eq "e") or return; # FIXME: why not have a useful return value? $query = qq/ @@ -1720,21 +1721,21 @@ sub _koha_notify_reserve { my $admin_email_address = $branch_details->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress'); - my $letter = getletter( 'reserves', $letter_code ); - die "Could not find a letter called '$letter_code' in the 'reserves' module" unless( $letter ); + my $letter = C4::Letters::GetPreparedLetter ( + module => 'reserves', + letter_code => $letter_code, + branchcode => $reserve->{branchcode}, + tables => { + 'branches' => $branch_details, + 'borrowers' => $borrower, + 'biblio' => $biblionumber, + 'reserves' => $reserve, + 'items', $reserve->{'itemnumber'}, + }, + substitute => { today => C4::Dates->new()->output() }, + ) or die "Could not find a letter called '$letter_code' in the 'reserves' module"; - C4::Letters::parseletter( $letter, 'branches', $reserve->{'branchcode'} ); - C4::Letters::parseletter( $letter, 'borrowers', $borrowernumber ); - C4::Letters::parseletter( $letter, 'biblio', $biblionumber ); - C4::Letters::parseletter( $letter, 'reserves', $borrowernumber, $biblionumber ); - if ( $reserve->{'itemnumber'} ) { - C4::Letters::parseletter( $letter, 'items', $reserve->{'itemnumber'} ); - } - my $today = C4::Dates->new()->output(); - $letter->{'title'} =~ s/<>/$today/g; - $letter->{'content'} =~ s/<>/$today/g; - $letter->{'content'} =~ s/<<[a-z0-9_]+\.[a-z0-9]+>>//g; #remove any stragglers if ( $print_mode ) { C4::Letters::EnqueueLetter( { @@ -1861,6 +1862,36 @@ sub MergeHolds { } +=head2 ReserveSlip + + ReserveSlip($branchcode, $borrowernumber, $biblionumber) + + Returns letter hash ( see C4::Letters::GetPreparedLetter ) or undef + +=cut + +sub ReserveSlip { + my ($branch, $borrowernumber, $biblionumber) = @_; + +# return unless ( C4::Context->boolean_preference('printreserveslips') ); + + my $reserve = GetReserveInfo($borrowernumber,$biblionumber ) + or return; + + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => 'RESERVESLIP', + branchcode => $branch, + tables => { + 'reserves' => $reserve, + 'branches' => $reserve->{branchcode}, + 'borrowers' => $reserve, + 'biblio' => $reserve, + 'items' => $reserve, + }, + ); +} + =head1 AUTHOR Koha Development Team diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm index 1a93f2e..8a8459b 100644 --- a/C4/Suggestions.pm +++ b/C4/Suggestions.pm @@ -371,20 +371,24 @@ sub ModSuggestion { if ($suggestion->{STATUS}) { # fetch the entire updated suggestion so that we can populate the letter my $full_suggestion = GetSuggestion($suggestion->{suggestionid}); - my $letter = C4::Letters::getletter('suggestions', $full_suggestion->{STATUS}); - if ($letter) { - C4::Letters::parseletter($letter, 'branches', $full_suggestion->{branchcode}); - C4::Letters::parseletter($letter, 'borrowers', $full_suggestion->{suggestedby}); - C4::Letters::parseletter($letter, 'suggestions', $full_suggestion->{suggestionid}); - C4::Letters::parseletter($letter, 'biblio', $full_suggestion->{biblionumber}); - my $enqueued = C4::Letters::EnqueueLetter({ + if ( my $letter = C4::Letters::GetPreparedLetter ( + module => 'suggestions', + letter_code => $full_suggestion->{STATUS}, + branchcode => $full_suggestion->{branchcode}, + tables => { + 'branches' => $full_suggestion->{branchcode}, + 'borrowers' => $full_suggestion->{suggestedby}, + 'suggestions' => $full_suggestion, + 'biblio' => $full_suggestion->{biblionumber}, + }, + ) ) { + C4::Letters::EnqueueLetter({ letter => $letter, borrowernumber => $full_suggestion->{suggestedby}, suggestionid => $full_suggestion->{suggestionid}, LibraryName => C4::Context->preference("LibraryName"), message_transport_type => 'email', - }); - if (!$enqueued){warn "can't enqueue letter $letter";} + }) or warn "can't enqueue letter $letter"; } } return $status_update_table; diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index 2b16fe4..745d040 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -111,12 +111,11 @@ for my $vendor (@suppliers) { for my $basket ( @{$baskets} ) { my $authorisedby = $basket->{authorisedby}; - my $basketbranch = GetMember( borrowernumber => $authorisedby )->{branchcode}; if ($userenv->{'flags'} & 1 || #user is superlibrarian (haspermission( $uid, { acquisition => q{*} } ) && #user has acq permissions and ($viewbaskets eq 'all' || #user is allowed to see all baskets - ($viewbaskets eq 'branch' && $authorisedby && $userbranch eq $basketbranch) || #basket belongs to user's branch + ($viewbaskets eq 'branch' && $authorisedby && $userbranch eq GetMember( borrowernumber => $authorisedby )->{branchcode}) || #basket belongs to user's branch ($basket->{authorisedby} && $viewbaskets == 'user' && $authorisedby == $loggedinuser) #user created this basket ) ) diff --git a/circ/circulation.pl b/circ/circulation.pl index efb87da..8d0abfb 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -24,7 +24,6 @@ use strict; #use warnings; FIXME - Bug 2505 use CGI; use C4::Output; -use C4::Print; use C4::Auth qw/:DEFAULT get_session/; use C4::Dates qw/format_date/; use C4::Branch; # GetBranches @@ -175,7 +174,7 @@ if ( $barcode eq '' && $query->param('charges') eq 'yes' ) { } if ( $print eq 'yes' && $borrowernumber ne '' ) { - printslip( $borrowernumber ); + PrintIssueSlip($branch, $borrowernumber); $query->param( 'borrowernumber', '' ); $borrowernumber = ''; } diff --git a/circ/hold-transfer-slip.pl b/circ/hold-transfer-slip.pl index f581464..492dac7 100755 --- a/circ/hold-transfer-slip.pl +++ b/circ/hold-transfer-slip.pl @@ -25,8 +25,6 @@ use C4::Output; use CGI; use C4::Auth; use C4::Reserves; -use C4::Branch; -use C4::Dates qw/format_date format_date_in_iso/; use vars qw($debug); @@ -41,7 +39,7 @@ my $transfer = $input->param('transfer'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => "circ/hold-transfer-slip.tmpl", + template_name => "circ/printslip.tmpl", query => $input, type => "intranet", authnotrequired => 0, @@ -50,14 +48,21 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); -my $reserveinfo = GetReserveInfo($borrowernumber,$biblionumber ); -my $pulldate = C4::Dates->new(); -$reserveinfo->{'pulldate'} = $pulldate->output(); -$reserveinfo->{'branchname'} = GetBranchName($reserveinfo->{'branchcode'}); -$reserveinfo->{'transferrequired'} = $transfer; - -$template->param( reservedata => [ $reserveinfo ] , - ); +my $userenv = C4::Context->userenv; +my ($slip, $is_html); +if ( my $letter = ReserveSlip ($userenv->{branch}, $borrowernumber, $biblionumber) ) { + $slip = $letter->{content}; + $is_html = $letter->{is_html}; +} +else { + $slip = "Reserve not found"; +} +$template->param( + slip => $slip, + plain => !$is_html, + title => "Koha -- Circulation: Transfers", + stylesheet => C4::Context->preference("SlipCSS"), +); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql index 166c36d..efdad91 100644 --- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql +++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Mahnung','Mahnung','Liebe/r < ('reserves', 'HOLD_PRINT', 'Vormerkbenachrichtigung (Print)', 'Vormerkbenachrichtigung (Print)', '<>\r\n<>\r\n<>\r\n<>\r\n<> <>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<> <>\r\n<>\r\n<>\r\n<> <>\r\n<>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nLiebe(r) <> <>,\r\n\r\nF??r Sie liegt seit dem <> eine Vormerkung zur Abholung bereit:\r\n\r\nTitel: <>\r\nVerfasser: <>\r\nSignatur: <>\r\n'), ('circulation','CHECKIN','R??ckgabequittung (Zusammenfassung)','R??ckgabequittung','Die folgenden Medien wurden zur??ckgegeben:\r\n----\r\n<>\r\n----\r\nVielen Dank.'), ('circulation','CHECKOUT','Ausleihquittung (Zusammenfassung)','Ausleihquittung','Die folgenden Medien wurden entliehen:\r\n----\r\n<>\r\n----\r\nVielen Dank f??r Ihren Besuch in <>.'), -('reserves', 'HOLDPLACED', 'Neue Vormerkung', 'Neue Vormerkung','Folgender Titel wurde vorgemerkt: <> (<<biblionumber>>) durch den Benutzer <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Neue Vormerkung', 'Neue Vormerkung','Folgender Titel wurde vorgemerkt: <<biblio.title>> (<<biblio.biblionumber>>) durch den Benutzer <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Anschaffungsvorschlag wurde angenommen', 'Ihr Anschaffungsvorschlag wurde angenommen','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> by <<suggestions.author>>.\n\nDie Bibliothek hat diesen Titel heute recherchiert und wird Ihn sobald wie m??glich im Buchhandel bestellen. Sie erhalten Nachricht, sobald die Bestellung abgeschlossen ist und sobald der Titel in der Bibliotek verf??gbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Vorgeschlagenes Medium verf??gbar', 'Das vorgeschlagene Medium ist jetzt verf??gbar','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu k??nnen, dass dieser Titel jetzt im Bestand der Bibliothek verf??gbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Vorgeschlagenes Medium bestellt', 'Das vorgeschlagene Medium wurde im Buchhandel bestellt','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlaten: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu k??nnen, dass dieser Titel jetzt im Buchhandel bestellt wurde. Nach Eintreffen wird er in unseren Bestand eingearbeitet.\n\nSie erhalten Nachricht, sobald das Medium verf??gbar ist.\n\nBei Nachfragen erreichen Sie uns unter der Emailadresse <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql index 689fa0f..8c9f4bd 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.sql +++ b/installer/data/mysql/en/mandatory/sample_notices.sql @@ -11,8 +11,90 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'); +INSERT INTO `letter` (module, code, name, title, content, is_html) +VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout> + +<h4>Overdues</h4> +<overdue> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</overdue> + +<hr> + +<h4 style="text-align: center; font-style:italic;">News</h4> +<news> +<div class="newsitem"> +<h5 style="margin-bottom: 1px; margin-top: 1px"><b><<opac_news.title>></b></h5> +<p style="margin-bottom: 1px; margin-top: 1px"><<opac_news.new>></p> +<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Posted on <<opac_news.timestamp>></p> +<hr /> +</div> +</news>', 1), +('circulation','ISSUEQSLIP','Issue Quick Slip','Issue Quick Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out Today</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout>', 1), +('circulation','RESERVESLIP','Reserve Slip','Reserve Slip', '<h5>Date: <<today>></h5> + +<h3> Transfer to/Hold in <<branches.branchname>></h3> + +<reserves> +<div> +<h3><<borrowers.surname>>, <<borrowers.firstname>></h3> + +<ul> + <li><<borrowers.cardnumber>></li> + <li><<borrowers.phone>></li> + <li> <<borrowers.address>><br /> + <<borrowers.address2>><br /> + <<borrowers.city >> <<borrowers.zipcode>> + </li> + <li><<borrowers.email>></li> +</ul> +<br /> +<h3>ITEM ON HOLD</h3> + <h4><<biblio.title>></h4> + <h5><<biblio.author>></h5> + <ul> + <li><<items.barcode>></li> + <li><<items.itemcallnumber>></li> + <li><<reserves.waitingdate>></li> + </ul> + <p>Notes: + <pre><<reserves.reservenotes>></pre> + </p> +</div> +</reserves>', 1); + diff --git a/installer/data/mysql/es-ES/mandatory/sample_notices.sql b/installer/data/mysql/es-ES/mandatory/sample_notices.sql index 689fa0f..bf3324d 100644 --- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql +++ b/installer/data/mysql/es-ES/mandatory/sample_notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql index 977e59d..acffe73 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -13,7 +13,7 @@ VALUES ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup at <<branches.branchname>>', '<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n\n\nChange Service Requested\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>>\n<<borrowers.address>>\n<<borrowers.city>> <<borrowers.zipcode>>\n\n\n\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\n\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql index 689fa0f..bf3324d 100644 --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ b/installer/data/mysql/it-IT/necessari/notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e4388a4..59ee5f3 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1166,10 +1166,12 @@ DROP TABLE IF EXISTS `letter`; CREATE TABLE `letter` ( -- table for all notice templates in Koha `module` varchar(20) NOT NULL default '', -- Koha module that triggers this notice `code` varchar(20) NOT NULL default '', -- unique identifier for this notice + `branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out `name` varchar(100) NOT NULL default '', -- plain text name for this notice + `is_html` tinyint(1) default 0, `title` varchar(200) NOT NULL default '', -- subject line of the notice `content` text, -- body text for the notice - PRIMARY KEY (`module`,`code`) + PRIMARY KEY (`module`,`code`, `branchcode`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql index cdb5529..08b452e 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql @@ -32,7 +32,7 @@ VALUES ('circulation','ODUE','Purring','Purring p?? dokument','<<borrowers.first ('reserves', 'HOLD_PRINT', 'Hentemelding (p?? papir)', 'Hentemelding', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nDu har et reservert dokument som kan hentes fra <<reserves.waitingdate>>:\r\n\r\nTittel: <<biblio.title>>\r\nForfatter: <<biblio.author>>\r\nEksemplar: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Innlevering','Melding om innlevering','F??lgende dokument har blitt innlevert:\r\n----\r\n<<biblio.title>>\r\n----\r\nVennlig hilsen\r\nBiblioteket'), ('circulation','CHECKOUT','Utl??n','Melding om utl??n','F??lgende dokument har blitt l??nt ut:\r\n----\r\n<<biblio.title>>\r\n----\r\nVennlig hilsen\r\nBiblioteket'), -('reserves', 'HOLDPLACED', 'Melding om reservasjon', 'Melding om reservasjon','F??lgende dokument har blitt reservert : <<title>> (<<biblionumber>>) av <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Melding om reservasjon', 'Melding om reservasjon','F??lgende dokument har blitt reservert : <<biblio.title>> (<<biblio.biblionumber>>) av <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Forslag godtatt', 'Innkj??psforslag godtatt','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foresl??tt at biblioteket kj??per inn <<suggestions.title>> av <<suggestions.author>>.\n\nBiblioteket har vurdert forslaget i dag. Dokumentet vil bli bestilt s?? fort det lar seg gj??re. Du vil f?? en ny melding n??r bestillingen er gjort, og n??r dokumentet ankommer biblioteket.\n\nEr det noe du lurer p??, vennligst kontakt oss p?? <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Foresl??tt dokument tilgjengelig', 'Foresl??tt dokument tilgjengelig','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foresl??tt at biblioteket kj??per inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av ?? informere deg om at dokumentet n?? er innlemmet i samlingen.\n\nEr det noe du lurer p??, vennligst kontakt oss p?? <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Innkj??psforslag i bestilling', 'Innkj??psforslag i bestilling','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foresl??tt at biblioteket kj??per inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av ?? informere deg om at dokumentet du foreslo n?? er i bestilling.\n\nDu vil f?? en ny melding n??r dokumentet er tilgjengelig.\n\nEr det noe du lurer p??, vennligst kontakt oss p?? <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql index 6be2eb8..f0844f3 100644 --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -13,7 +13,7 @@ VALUES ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql index 689fa0f..bf3324d 100644 --- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql +++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index ae2c1cb..f10a7b3 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -328,4 +328,7 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NoticeCSS','','Notices CSS url.',NULL,'free'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SlipCSS','','Slips CSS url.',NULL,'free'); + diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql index 358205b..b637343 100644 --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -10,7 +10,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD', 'Hold Available for Pickup', 'Hold Available for Pickup at <<branches.branchname>>', 'Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\nLocation: <<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress3>>\r\n<<branches.branchcity>> <<branches.branchzip>>'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index a8cd166..1151648 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4496,7 +4496,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { print "Upgrade to $DBversion done (Add 461 subfield 9 to default framework)\n"; SetVersion ($DBversion); } - } $DBversion = "3.05.00.018"; @@ -4550,6 +4549,103 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.06.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE `letter` DROP PRIMARY KEY"); + $dbh->do("ALTER TABLE `letter` ADD `branchcode` varchar(10) default NULL AFTER `code`"); + $dbh->do("ALTER TABLE `letter` ADD PRIMARY KEY (`module`,`code`, `branchcode`)"); + $dbh->do("ALTER TABLE `letter` ADD `is_html` tinyint(1) default 0 AFTER `name`"); + print "Added branchcode and is_html to letter table\n"; + + $dbh->do("INSERT INTO `letter` (module, code, name, title, content, is_html) + VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout> + +<h4>Overdues</h4> +<overdue> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</overdue> + +<hr> + +<h4 style=\"text-align: center; font-style:italic;\">News</h4> +<news> +<div class=\"newsitem\"> +<h5 style=\"margin-bottom: 1px; margin-top: 1px\"><b><<opac_news.title>></b></h5> +<p style=\"margin-bottom: 1px; margin-top: 1px\"><<opac_news.new>></p> +<p class=\"newsfooter\" style=\"font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px\">Posted on <<opac_news.timestamp>></p> +<hr /> +</div> +</news>', 1)"); + $dbh->do("INSERT INTO `letter` (module, code, name, title, content, is_html) + VALUES ('circulation','ISSUEQSLIP','Issue Quick Slip','Issue Quick Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out Today</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout>', 1)"); + $dbh->do("INSERT INTO `letter` (module, code, name, title, content, is_html) + VALUES ('circulation','RESERVESLIP','Reserve Slip','Reserve Slip', '<h5>Date: <<today>></h5> + +<h3> Transfer to/Hold in <<branches.branchname>></h3> + +<h3><<borrowers.surname>>, <<borrowers.firstname>></h3> + +<ul> + <li><<borrowers.cardnumber>></li> + <li><<borrowers.phone>></li> + <li> <<borrowers.address>><br /> + <<borrowers.address2>><br /> + <<borrowers.city >> <<borrowers.zipcode>> + </li> + <li><<borrowers.email>></li> +</ul> +<br /> +<h3>ITEM ON HOLD</h3> +<h4><<biblio.title>></h4> +<h5><<biblio.author>></h5> +<ul> + <li><<items.barcode>></li> + <li><<items.itemcallnumber>></li> + <li><<reserves.waitingdate>></li> +</ul> +<p>Notes: +<pre><<reserves.reservenotes>></pre> +</p>', 1)"); + + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NoticeCSS','','Notices CSS url.',NULL,'free')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SlipCSS','','Slips CSS url.',NULL,'free')"); + + $dbh->do("UPDATE `letter` SET content = replace(content, '<<title>>', '<<biblio.title>>') WHERE code = 'HOLDPLACED')"); + + print "Upgrade to $DBversion done (Add branchcode and is_html to letter table; Add NoticeCSS and SlipCSS sysprefs)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc index 503f954..e7e150d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc @@ -42,8 +42,10 @@ function update_child() { }); // YUI Toolbar Functions + var slip_re = /slip/; function printx_window(print_type) { - window.open("/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&print=" + print_type, "printwindow"); + var handler = print_type.match(slip_re) ? "printslip" : "moremember"; + window.open("/cgi-bin/koha/members/" + handler + ".pl?borrowernumber=[% borrowernumber %]&print=" + print_type, "printwindow"); return false; } function searchToHold(){ 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 f4946b5..b3b279c 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 @@ -91,6 +91,11 @@ Circulation: yes: Record no: "Don't record" - local use when an unissued item is checked in. + - + - Include the stylesheet at + - pref: NoticeCSS + class: url + - on Notices. (This should be a complete URL, starting with <code>http://</code>.) Checkout Policy: - - pref: AllowNotForLoanOverride diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref index df0a434..efa33a8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref @@ -83,6 +83,11 @@ Staff Client: Results: "Results page (for future use, Results XSLT not functional at this time)." Both: "Both Results and Details pages (for future use, Results XSLT not functional at this time)." - 'Note: The corresponding XSLT option must be turned on.' + - + - Include the stylesheet at + - pref: SlipCSS + class: url + - on Issue and Reserve Slips. (This should be a complete URL, starting with <code>http://</code>.) Options: - - pref: viewMARC diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt index 1904381..73f9e61 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt @@ -8,11 +8,7 @@ --> </style> [% IF ( stylesheet ) %] - <style type="text/css"> - <!-- - [% stylesheet %] - --> - </style> + <link rel="stylesheet" type="text/css" href="[% stylesheet %]"> [% END %] </head> <body> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt deleted file mode 100644 index 18d45aa..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt +++ /dev/null @@ -1,54 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %] -<title>Koha -- Circulation: Transfers -[% INCLUDE 'doc-head-close-receipt.inc' %] - - -
      - -[% FOREACH reservedat IN reservedata %] - -
      Date: [% reservedat.pulldate %]
      -

      [% IF ( reservedat.transferrequired ) %]Transfer to [% reservedat.branchname %] [% ELSE %]Hold in [% reservedat.branchname %][% END %]

      - -
      - -

      [% reservedat.surname %], [% reservedat.firstname %]

      - -
        -
      • [% reservedat.cardnumber %]
      • - [% IF ( reservedat.phone ) %] -
      • [% reservedat.phone %]
      • - [% END %] -
      • - [% reservedat.address %]
        - [% IF ( reservedat.address2 ) %][% reservedat.address2 %]
        [% END %] - [% reservedat.city %] [% reservedat.zip %] -
      • - [% IF ( reservedat.email ) %] -
      • [% reservedat.email %]
      • - [% END %] -
      -
      -

      ITEM ON HOLD

      -

      [% reservedat.title |html %]

      -
      [% reservedat.author %]
      -
        - [% IF ( reservedat.barcode ) %]
      • [% reservedat.barcode %]
      • [% END %] - [% IF ( reservedat.itemcallnumber ) %]
      • [% reservedat.itemcallnumber %]
      • [% END %] - [% IF ( reservedat.waitingdate ) %]
      • [% reservedat.waitingdate %]
      • [% END %] -
      - [% IF ( reservedat.reservenotes ) %] -

      Notes: [% reservedat.reservenotes %]

      - [% END %] - - - -[% END %] -
      -[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt new file mode 100644 index 0000000..a790069 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt @@ -0,0 +1,28 @@ +[% INCLUDE 'doc-head-open.inc' %] +[% title %] + + + +[% IF stylesheet %] + +[% END %] + + + + +
      + +[% IF plain %] +
      +[% slip %]
      +
      +[% ELSE %] +[% slip %] +[% END %] + +[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt deleted file mode 100644 index 4a85ccb..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt +++ /dev/null @@ -1,76 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %] -Print Receipt for [% cardnumber %] - - - - - - - - -
      - -

      [% LibraryName %]

      -[% IF ( branchname ) %][% branchname %]
      [% END %] -Checked out to [% firstname %] [% surname %]
      -([% cardnumber %])
      - -[% todaysdate %]
      - -[% IF ( quickslip ) %] -

      Checked Out Today

      -[% FOREACH issueloo IN issueloop %] -[% IF ( issueloo.red ) %][% ELSE %] -[% IF ( issueloo.today ) %] -

      [% issueloo.title |html %]
      -Barcode: [% issueloo.barcode %]
      -Date due: [% issueloo.date_due %]

      - [% END %] - [% END %] - [% END %] - -[% ELSE %] -

      Checked Out

      -[% FOREACH issueloo IN issueloop %] -[% IF ( issueloo.red ) %][% ELSE %] -

      [% issueloo.title |html %]
      -Barcode: [% issueloo.barcode %]
      -Date due: [% issueloo.date_due %]

      - [% END %] - [% END %] - -[% END %] - -[% IF ( quickslip ) %] -[% ELSE %] -[% IF ( overdues_exist ) %] -

      Overdues

      - [% FOREACH issueloo IN issueloop %] - [% IF ( issueloo.red ) %] -

      [% issueloo.title |html %]
      -Barcode: [% issueloo.barcode %]
      -Date due: [% issueloo.date_due %]

      -[% END %] -[% END %] -[% END %] -[% END %] - -[% IF ( koha_news_count ) %] -

      News

      - - [% FOREACH koha_new IN koha_news %] -
      [% koha_new.title %]
      -

      [% koha_new.new %]

      -

      Posted on [% koha_new.newdate %] - -


      - [% END %] -[% END %] - - -[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index 063236e..b64477e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -10,6 +10,10 @@ $(document).ready(function() { sortList: [[0,0]], headers: { 3: {sorter:false},4: { sorter: false }} }); + + $('#branch').change(function() { + $('#selectlibrary').submit(); + }); }); [% IF ( add_form ) %] @@ -114,7 +118,7 @@ $(document).ready(function() {
      - [% IF ( no_op_set ) %] +[% IF ( no_op_set ) %]
      + + [% UNLESS independant_branch %] +

      +

      + + Select a library : + +
      +

      + [% END %] +
      @@ -135,41 +155,71 @@ $(document).ready(function() { [% IF ( search ) %]

      You Searched for [% searchfield %]

      [% END %] - [% IF ( letter ) %] + [% IF ( letter && !independant_branch) %] + [% select_for_copy = BLOCK %] + + [% END %] + [% END %] +
      + + - [% FOREACH lette IN letter %] - [% UNLESS ( loop.odd ) %] + + [% FOREACH lette IN letter %] + [% can_edit = lette.branchcode || !independant_branch %] + [% UNLESS ( loop.odd ) %] - [% ELSE %] + [% ELSE %] - [% END %] + [% END %] + + - [% END %] + [% END %] +
      Branch Module Code Name     
      [% lette.branchname || "(All libraries)" %] [% lette.module %] [% lette.code %] [% lette.name %] - Edit + [% IF can_edit %] + Edit + [% END %] - [% IF ( lette.protected ) %] - - - [% ELSE %] - Delete - [% END %] + [% IF !independant_branch || !lette.branchcode %] +
      + + + + + [% IF independant_branch %] + + [% ELSE %] + [% select_for_copy %] + [% END %] + +
      + [% END %] +
      + [% IF !lette.protected && can_edit %] + Delete + [% END %]
      - [% END %] +[% END %] - [% END %] - [% IF ( add_form ) %] +[% IF ( add_form ) %]
      @@ -182,6 +232,20 @@ $(document).ready(function() {
      [% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]
        + + [% IF independant_branch %] + + [% ELSE %] +
      1. + + +
      2. + [% END %]
      3. @@ -235,6 +299,9 @@ $(document).ready(function() {
      4. + +
      5. +
      6. @@ -253,16 +320,16 @@ $(document).ready(function() {
      - [% END %] +[% END %] - [% IF ( add_validate ) %] +[% IF ( add_validate ) %] Data recorded
      - [% END %] +[% END %] - [% IF ( delete_confirm ) %] +[% IF ( delete_confirm ) %]

      Delete Notice?

      @@ -290,14 +357,14 @@ $(document).ready(function() { - [% END %] +[% END %] - [% IF ( delete_confirmed ) %] +[% IF ( delete_confirmed ) %] Data deleted - [% END %] +[% END %] diff --git a/members/memberentry.pl b/members/memberentry.pl index f01261e..195704a 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -327,10 +327,7 @@ if ((!$nok) and $nodouble and ($op eq 'insert' or $op eq 'save')){ # if we manage to find a valid email address, send notice if ($emailaddr) { $newdata{emailaddr} = $emailaddr; - my $letter = getletter ('members', "ACCTDETAILS:$newdata{'branchcode'}") ; - # if $branch notice fails, then email a default notice instead. - $letter = getletter ('members', "ACCTDETAILS") if !$letter; - SendAlerts ( 'members' , \%newdata , $letter ) if $letter + SendAlerts ( 'members', \%newdata, "ACCTDETAILS" ); } } diff --git a/members/moremember.pl b/members/moremember.pl index 9115dd1..6b7a50f 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -50,7 +50,6 @@ use C4::Biblio; use C4::Reserves; use C4::Branch; # GetBranchName use C4::Form::MessagingPreferences; -use C4::NewsChannels; #get slip news use List::MoreUtils qw/uniq/; use C4::Members::Attributes qw(GetBorrowerAttributes); @@ -473,13 +472,4 @@ $template->param( quickslip => $quickslip, ); -#Get the slip news items -my $all_koha_news = &GetNewsToDisplay("slip"); -my $koha_news_count = scalar @$all_koha_news; - -$template->param( - koha_news => $all_koha_news, - koha_news_count => $koha_news_count -); - output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/printslip.pl b/members/printslip.pl new file mode 100755 index 0000000..eba8d68 --- /dev/null +++ b/members/printslip.pl @@ -0,0 +1,89 @@ +#!/usr/bin/perl + +# Copyright 2000-2002 Katipo Communications +# Copyright 2010 BibLibre +# +# 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. + + +=head1 moremember.pl + + script to do a borrower enquiry/bring up borrower details etc + Displays all the details about a borrower + written 20/12/99 by chris at katipo.co.nz + last modified 21/1/2000 by chris at katipo.co.nz + modified 31/1/2001 by chris at katipo.co.nz + to not allow items on request to be renewed + + needs html removed and to use the C4::Output more, but its tricky + +=cut + +use strict; +#use warnings; FIXME - Bug 2505 +use CGI; +use C4::Context; +use C4::Auth; +use C4::Output; +use C4::Members; +use C4::Koha; + +#use Smart::Comments; +#use Data::Dumper; + +use vars qw($debug); + +BEGIN { + $debug = $ENV{DEBUG} || 0; +} + +my $input = new CGI; +$debug or $debug = $input->param('debug') || 0; +my $print = $input->param('print'); +my $error = $input->param('error'); + +# circ staff who process checkouts but can't edit +# patrons still need to be able to print receipts +my $flagsrequired = { circulate => "circulate_remaining_permissions" }; + +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "circ/printslip.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => $flagsrequired, + debug => 1, + } +); + +my $borrowernumber = $input->param('borrowernumber'); +my $branch=C4::Context->userenv->{'branch'}; +my ($slip, $is_html); +if (my $letter = IssueSlip ($branch, $borrowernumber, $print eq "qslip")) { + $slip = $letter->{content}; + $is_html = $letter->{is_html}; +} + +$template->param( + slip => $slip, + plain => !$is_html, + title => "Print Receipt for $borrowernumber", + stylesheet => C4::Context->preference("SlipCSS"), + error => $error, +); + +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl index 1fa358f..09c4017 100755 --- a/misc/cronjobs/advance_notices.pl +++ b/misc/cronjobs/advance_notices.pl @@ -79,13 +79,10 @@ patrons. It queues them in the message queue, which is processed by the process_message_queue.pl cronjob. See the comments in the script for directions on changing the script. This script has the following parameters : - -c Confirm and remove this help & warning - -m maximum number of days in advance to send advance notices. - -n send No mail. Instead, all mail messages are printed on screen. Usefull for testing purposes. - -v verbose - -i csv list of fields that get substituted into templates in places - of the EEitems.contentEE placeholder. Defaults to - issuedate,title,barcode,author + -c Confirm and remove this help & warning + -m maximum number of days in advance to send advance notices. + -n send No mail. Instead, all mail messages are printed on screen. Usefull for testing purposes. + -v verbose ENDUSAGE # Since advance notice options are not visible in the web-interface @@ -157,8 +154,6 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { } else { my $biblio = C4::Biblio::GetBiblioFromItemNumber( $upcoming->{'itemnumber'} ); my $letter_type = 'DUE'; - $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($upcoming->{'borrowernumber'},$upcoming->{'itemnumber'},'0'); my $titles = ""; while ( my $item_info = $sth->fetchrow_hashref()) { @@ -166,13 +161,14 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $upcoming->{'borrowernumber'}, branchcode => $upcoming->{'branchcode'}, biblionumber => $biblio->{'biblionumber'}, itemnumber => $upcoming->{'itemnumber'}, substitute => { 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; } } else { $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $upcoming->{'borrowernumber'}, @@ -189,8 +185,6 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { } else { my $biblio = C4::Biblio::GetBiblioFromItemNumber( $upcoming->{'itemnumber'} ); my $letter_type = 'PREDUE'; - $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($upcoming->{'borrowernumber'},$upcoming->{'itemnumber'},$borrower_preferences->{'days_in_advance'}); my $titles = ""; while ( my $item_info = $sth->fetchrow_hashref()) { @@ -198,13 +192,14 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $upcoming->{'borrowernumber'}, branchcode => $upcoming->{'branchcode'}, biblionumber => $biblio->{'biblionumber'}, itemnumber => $upcoming->{'itemnumber'}, substitute => { 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; } } @@ -250,8 +245,6 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$upcoming_digest ) { my $letter_type = 'PREDUEDGST'; - my $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($borrowernumber,$borrower_preferences->{'days_in_advance'}); my $titles = ""; @@ -259,12 +252,13 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$upcoming_digest ) { my @item_info = map { $_ =~ /^date|date$/ ? format_date($item_info->{$_}) : $item_info->{$_} || '' } @item_content_fields; $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + my $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $borrowernumber, substitute => { count => $count, 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; if ($nomail) { local $, = "\f"; print $letter->{'content'}; @@ -290,20 +284,19 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$due_digest ) { next PATRON unless $borrower_preferences; # how could this happen? my $letter_type = 'DUEDGST'; - my $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($borrowernumber,'0'); my $titles = ""; while ( my $item_info = $sth->fetchrow_hashref()) { my @item_info = map { $_ =~ /^date|date$/ ? format_date($item_info->{$_}) : $item_info->{$_} || '' } @item_content_fields; $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + my $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $borrowernumber, substitute => { count => $count, 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; if ($nomail) { local $, = "\f"; @@ -323,40 +316,35 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$due_digest ) { =head2 parse_letter - - =cut sub parse_letter { my $params = shift; - foreach my $required ( qw( letter borrowernumber ) ) { + foreach my $required ( qw( letter_code borrowernumber ) ) { return unless exists $params->{$required}; } - if ( $params->{'substitute'} ) { - while ( my ($key, $replacedby) = each %{$params->{'substitute'}} ) { - my $replacefield = "<<$key>>"; - - $params->{'letter'}->{title} =~ s/$replacefield/$replacedby/g; - $params->{'letter'}->{content} =~ s/$replacefield/$replacedby/g; - } - } - - C4::Letters::parseletter( $params->{'letter'}, 'borrowers', $params->{'borrowernumber'} ); + my %table_params = ( 'borrowers' => $params->{'borrowernumber'} ); - if ( $params->{'branchcode'} ) { - C4::Letters::parseletter( $params->{'letter'}, 'branches', $params->{'branchcode'} ); + if ( my $p = $params->{'branchcode'} ) { + $table_params{'branches'} = $p; } - if ( $params->{'itemnumber'} ) { - C4::Letters::parseletter( $params->{'letter'}, 'issues', $params->{'itemnumber'} ); - C4::Letters::parseletter( $params->{'letter'}, 'items', $params->{'itemnumber'} ); + if ( my $p = $params->{'itemnumber'} ) { + $table_params{'issues'} = $p; + $table_params{'items'} = $p; } - if ( $params->{'biblionumber'} ) { - C4::Letters::parseletter( $params->{'letter'}, 'biblio', $params->{'biblionumber'} ); - C4::Letters::parseletter( $params->{'letter'}, 'biblioitems', $params->{'biblionumber'} ); + if ( my $p = $params->{'biblionumber'} ) { + $table_params{'biblio'} = $p; + $table_params{'biblioitems'} = $p; } - return $params->{'letter'}; + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $params->{'letter_code'}, + branchcode => $table_params{'branches'}, + substitute => $params->{'substitute'}, + tables => \%table_params, + ); } 1; diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl index a72d6a6..165b16e 100755 --- a/misc/cronjobs/gather_print_notices.pl +++ b/misc/cronjobs/gather_print_notices.pl @@ -39,11 +39,9 @@ use Getopt::Long; sub usage { print STDERR < \$stylesheet, 'h|help' => \$help, ) || usage( 1 ); @@ -71,16 +68,9 @@ exit unless( @messages ); open OUTPUT, '>', File::Spec->catdir( $output_directory, "holdnotices-" . $today->output( 'iso' ) . ".html" ); my $template = C4::Templates::gettemplate( 'batch/print-notices.tmpl', 'intranet', new CGI ); -my $stylesheet_contents = ''; - -if ($stylesheet) { - open STYLESHEET, '<', $stylesheet; - while ( ) { $stylesheet_contents .= $_ } - close STYLESHEET; -} $template->param( - stylesheet => $stylesheet_contents, + stylesheet => C4::Context->preference("NoticeCSS"), today => $today->output(), messages => \@messages, ); diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 37774b5..a8544c6 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -459,17 +459,7 @@ END_SQL $longest_issue ) = $sth->fetchrow ) { $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has $itemcount items triggering level $i."; - - my $letter = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"} ); - - unless ($letter) { - $verbose and warn "Message '$overdue_rules->{letter$i}' content not found"; - - # might as well skip while PERIOD, no other borrowers are going to work. - # FIXME : Does this mean a letter must be defined in order to trigger a debar ? - next PERIOD; - } - + if ( $overdue_rules->{"debarred$i"} ) { #action taken is debarring @@ -494,11 +484,12 @@ END_SQL my @item_info = map { $_ =~ /^date|date$/ ? format_date( $item_info->{$_} ) : $item_info->{$_} || '' } @item_content_fields; $titles .= join("\t", @item_info) . "\n"; $itemcount++; - push @items, { itemnumber => $item_info->{'itemnumber'}, biblionumber => $item_info->{'biblionumber'} }; + push @items, $item_info; } $sth2->finish; - $letter = parse_letter( - { letter => $letter, + + my $letter = parse_letter( + { letter_code => $overdue_rules->{"letter$i"}, borrowernumber => $borrowernumber, branchcode => $branchcode, items => \@items, @@ -508,6 +499,13 @@ END_SQL } } ); + unless ($letter) { + $verbose and warn "Message '$overdue_rules->{letter$i}' content not found"; + + # might as well skip while PERIOD, no other borrowers are going to work. + # FIXME : Does this mean a letter must be defined in order to trigger a debar ? + next PERIOD; + } if ( $exceededPrintNoticesMaxLines ) { $letter->{'content'} .= "List too long for form; please check your account online for a complete list of your overdue items."; @@ -642,53 +640,55 @@ substituted keys and values. =cut -sub parse_letter { # FIXME: this code should probably be moved to C4::Letters:parseletter +sub parse_letter { my $params = shift; - foreach my $required (qw( letter borrowernumber )) { + foreach my $required (qw( letter_code borrowernumber )) { return unless exists $params->{$required}; } - my $todaysdate = C4::Dates->new()->output("syspref"); - $params->{'letter'}->{title} =~ s/<>/$todaysdate/g; - $params->{'letter'}->{content} =~ s/<>/$todaysdate/g; + my $substitute = $params->{'substitute'} || {}; + $substitute->{today} ||= C4::Dates->new()->output("syspref"); - if ( $params->{'substitute'} ) { - while ( my ( $key, $replacedby ) = each %{ $params->{'substitute'} } ) { - my $replacefield = "<<$key>>"; - $params->{'letter'}->{title} =~ s/$replacefield/$replacedby/g; - $params->{'letter'}->{content} =~ s/$replacefield/$replacedby/g; - } + my %tables = ( 'borrowers' => $params->{'borrowernumber'} ); + if ( my $p = $params->{'branchcode'} ) { + $tables{'branches'} = $p; } - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'borrowers', $params->{'borrowernumber'} ); - - if ( $params->{'branchcode'} ) { - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'branches', $params->{'branchcode'} ); + my $currency_format; + if ($params->{'letter'}->{'content'} =~ m/(.*)<\/fine>/o) { # process any fine tags... + $currency_format = $1; + $params->{'letter'}->{'content'} =~ s/.*<\/fine>/<>/o; } - if ( $params->{'items'} ) { + my @item_tables; + if ( my $i = $params->{'items'} ) { my $item_format = ''; - PROCESS_ITEMS: - while (scalar(@{$params->{'items'}}) > 0) { - my $item = shift @{$params->{'items'}}; + foreach my $item (@$i) { my $fine = GetFine($item->{'itemnumber'}, $params->{'borrowernumber'}); if (!$item_format) { $params->{'letter'}->{'content'} =~ m/(.*<\/item>)/; $item_format = $1; } - if ($params->{'letter'}->{'content'} =~ m/(.*)<\/fine>/) { # process any fine tags... - my $formatted_fine = currency_format("$1", "$fine", FMT_SYMBOL); - $params->{'letter'}->{'content'} =~ s/.*<\/fine>/$formatted_fine/; - } - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblio', $item->{'biblionumber'} ); - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblioitems', $item->{'biblionumber'} ); - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'items', $item->{'itemnumber'} ); - $params->{'letter'}->{'content'} =~ s/(.*<\/item>)/$1\n$item_format/ if scalar(@{$params->{'items'}} > 0); + $item->{'fine'} = currency_format($currency_format, "$fine", FMT_SYMBOL) + if $currency_format; + + push @item_tables, { + 'biblio' => $item->{'biblionumber'}, + 'biblioitems' => $item->{'biblionumber'}, + 'items' => $item, + }; } } - $params->{'letter'}->{'content'} =~ s/<\/{0,1}?item>//g; # strip all remaining item tags... - return $params->{'letter'}; + + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $params->{'letter_code'}, + branchcode => $params->{'branchcode'}, + tables => \%tables, + substitute => $substitute, + repeat => { item => \@item_tables }, + ); } =head2 prepare_letter_for_printing diff --git a/t/db_dependent/lib/KohaTest/Letters.pm b/t/db_dependent/lib/KohaTest/Letters.pm index 97d58fb..f2d7b0d 100644 --- a/t/db_dependent/lib/KohaTest/Letters.pm +++ b/t/db_dependent/lib/KohaTest/Letters.pm @@ -12,13 +12,12 @@ sub testing_class { 'C4::Letters' }; sub methods : Test( 1 ) { my $self = shift; - my @methods = qw( getletter - addalert + my @methods = qw( addalert delalert getalert findrelatedto SendAlerts - parseletter + GetPreparedLetter ); can_ok( $self->testing_class, @methods ); diff --git a/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm b/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm index 76b6ab4..53e5439 100644 --- a/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm +++ b/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm @@ -10,7 +10,7 @@ use Test::More; sub GetLetter : Test( 6 ) { my $self = shift; - my $letter = getletter( 'circulation', 'ODUE' ); + my $letter = getletter( 'circulation', 'ODUE', '' ); isa_ok( $letter, 'HASH' ) or diag( Data::Dumper->Dump( [ $letter ], [ 'letter' ] ) ); @@ -21,7 +21,6 @@ sub GetLetter : Test( 6 ) { ok( exists $letter->{'name'}, 'name' ); ok( exists $letter->{'title'}, 'title' ); - } 1; diff --git a/t/db_dependent/lib/KohaTest/Members.pm b/t/db_dependent/lib/KohaTest/Members.pm index 5646be1..dfde7da 100644 --- a/t/db_dependent/lib/KohaTest/Members.pm +++ b/t/db_dependent/lib/KohaTest/Members.pm @@ -52,6 +52,7 @@ sub methods : Test( 1 ) { GetBorrowersWhoHaveNeverBorrowed GetBorrowersWithIssuesHistoryOlderThan GetBorrowersNamesAndLatestIssue + IssueSlip ); can_ok( $self->testing_class, @methods ); diff --git a/t/db_dependent/lib/KohaTest/Print.pm b/t/db_dependent/lib/KohaTest/Print.pm index 02fd5fb..d35ab34 100644 --- a/t/db_dependent/lib/KohaTest/Print.pm +++ b/t/db_dependent/lib/KohaTest/Print.pm @@ -12,10 +12,7 @@ sub testing_class { 'C4::Print' }; sub methods : Test( 1 ) { my $self = shift; - my @methods = qw( remoteprint - printreserve - printslip - ); + my @methods = qw( printslip ); can_ok( $self->testing_class, @methods ); } diff --git a/t/db_dependent/lib/KohaTest/Reserves.pm b/t/db_dependent/lib/KohaTest/Reserves.pm index 5317029..70a96fc 100644 --- a/t/db_dependent/lib/KohaTest/Reserves.pm +++ b/t/db_dependent/lib/KohaTest/Reserves.pm @@ -32,6 +32,7 @@ sub methods : Test( 1 ) { GetReserveInfo _FixPriority _Findgroupreserve + ReserveSlip ); can_ok( $self->testing_class, @methods ); diff --git a/tools/letter.pl b/tools/letter.pl index f5dc0c6..7cfca55 100755 --- a/tools/letter.pl +++ b/tools/letter.pl @@ -46,14 +46,34 @@ use CGI; use C4::Auth; use C4::Context; use C4::Output; +use C4::Branch; # GetBranches -# letter_exists($module, $code) -# - return true if a letter with the given $module and $code exists +# _letter_from_where($branchcode,$module, $code) +# - return FROM WHERE clause and bind args for a letter +sub _letter_from_where { + my ($branchcode, $module, $code) = @_; + my $sql = q{FROM letter WHERE branchcode = ? AND module = ? AND code = ?}; + my @args = ($branchcode || '', $module, $code); +# Mysql is retarded. cause branchcode is part of the primary key it cannot be null. How does that +# work with foreign key constraint I wonder... + +# if ($branchcode) { +# $sql .= " AND branchcode = ?"; +# push @args, $branchcode; +# } else { +# $sql .= " AND branchcode IS NULL"; +# } + + return ($sql, \@args); +} + +# letter_exists($branchcode,$module, $code) +# - return true if a letter with the given $branchcode, $module and $code exists sub letter_exists { - my ($module, $code) = @_; + my ($sql, $args) = _letter_from_where(@_); my $dbh = C4::Context->dbh; - my $letters = $dbh->selectall_arrayref(q{SELECT name FROM letter WHERE module = ? AND code = ?}, undef, $module, $code); - return @{$letters}; + my $letter = $dbh->selectrow_hashref("SELECT * $sql", undef, @$args); + return $letter; } # $protected_letters = protected_letters() @@ -67,14 +87,12 @@ sub protected_letters { my $input = new CGI; my $searchfield = $input->param('searchfield'); my $script_name = '/cgi-bin/koha/tools/letter.pl'; +my $branchcode = $input->param('branchcode'); my $code = $input->param('code'); my $module = $input->param('module'); my $content = $input->param('content'); -my $op = $input->param('op'); +my $op = $input->param('op') || ''; my $dbh = C4::Context->dbh; -if (!defined $module ) { - $module = q{}; -} my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { @@ -87,32 +105,38 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( } ); -if (!defined $op) { - $op = q{}; # silence errors from eq -} +my $my_branch = C4::Context->preference("IndependantBranches") + ? C4::Context->userenv()->{'branch'} + : undef; # we show only the TMPL_VAR names $op $template->param( + independant_branch => $my_branch, script_name => $script_name, action => $script_name ); +if ($op eq 'copy') { + add_copy(); + $op = 'add_form'; +} + if ($op eq 'add_form') { - add_form($module, $code); + add_form($branchcode, $module, $code); } elsif ( $op eq 'add_validate' ) { add_validate(); $op = q{}; # next operation is to return to default screen } elsif ( $op eq 'delete_confirm' ) { - delete_confirm($module, $code); + delete_confirm($branchcode, $module, $code); } elsif ( $op eq 'delete_confirmed' ) { - delete_confirmed($module, $code); + delete_confirmed($branchcode, $module, $code); $op = q{}; # next operation is to return to default screen } else { - default_display($searchfield); + default_display($branchcode,$searchfield); } # Do this last as delete_confirmed resets @@ -125,23 +149,21 @@ if ($op) { output_html_with_http_headers $input, $cookie, $template->output; sub add_form { - my ($module, $code ) = @_; + my ($branchcode,$module, $code ) = @_; my $letter; # if code has been passed we can identify letter and its an update action if ($code) { - $letter = $dbh->selectrow_hashref(q{SELECT module, code, name, title, content FROM letter WHERE module=? AND code=?}, - undef, $module, $code); + $letter = letter_exists($branchcode,$module, $code); + } + if ($letter) { $template->param( modify => 1 ); $template->param( code => $letter->{code} ); } else { # initialize the new fields $letter = { - module => $module, - code => q{}, - name => q{}, - title => q{}, - content => q{}, + branchcode => $branchcode, + module => $module, }; $template->param( adding => 1 ); } @@ -173,14 +195,20 @@ sub add_form { {value => q{}, text => '---ITEMS---' }, {value => 'items.content', text => 'items.content'}, add_fields('issues','borrowers'); + if ($module eq 'circulation') { + push @{$field_selection}, add_fields('opac_news'); + } } $template->param( - name => $letter->{name}, - title => $letter->{title}, - content => $letter->{content}, - module => $module, - $module => 1, + branchcode => $letter->{branchcode}, + name => $letter->{name}, + is_html => $letter->{is_html}, + title => $letter->{title}, + content => $letter->{content}, + module => $module, + $module => 1, + branchloop => _branchloop($branchcode), SQLfieldname => $field_selection, ); return; @@ -188,37 +216,56 @@ sub add_form { sub add_validate { my $dbh = C4::Context->dbh; - my $module = $input->param('module'); - my $oldmodule = $input->param('oldmodule'); - my $code = $input->param('code'); - my $name = $input->param('name'); - my $title = $input->param('title'); - my $content = $input->param('content'); - if (letter_exists($oldmodule, $code)) { + my $oldbranchcode = $input->param('oldbranchcode'); + my $branchcode = $input->param('branchcode') || ''; + my $module = $input->param('module'); + my $oldmodule = $input->param('oldmodule'); + my $code = $input->param('code'); + my $name = $input->param('name'); + my $is_html = $input->param('is_html'); + my $title = $input->param('title'); + my $content = $input->param('content'); + if (letter_exists($oldbranchcode,$oldmodule, $code)) { $dbh->do( - q{UPDATE letter SET module = ?, code = ?, name = ?, title = ?, content = ? WHERE module = ? AND code = ?}, + q{UPDATE letter SET branchcode = ?, module = ?, name = ?, is_html = ?, title = ?, content = ? WHERE branchcode = ? AND module = ? AND code = ?}, undef, - $module, $code, $name, $title, $content, - $oldmodule, $code + $branchcode, $module, $name, $is_html || 0, $title, $content, + $oldbranchcode, $oldmodule, $code ); } else { $dbh->do( - q{INSERT INTO letter (module,code,name,title,content) VALUES (?,?,?,?,?)}, + q{INSERT INTO letter (branchcode,module,code,name,is_html,title,content) VALUES (?,?,?,?,?,?,?)}, undef, - $module, $code, $name, $title, $content + $branchcode, $module, $code, $name, $is_html || 0, $title, $content ); } # set up default display - default_display(); - return; + default_display($branchcode); +} + +sub add_copy { + my $dbh = C4::Context->dbh; + my $oldbranchcode = $input->param('oldbranchcode'); + my $branchcode = $input->param('branchcode'); + my $module = $input->param('module'); + my $code = $input->param('code'); + + return if letter_exists($branchcode,$module, $code); + + my $old_letter = letter_exists($oldbranchcode,$module, $code); + + $dbh->do( + q{INSERT INTO letter (branchcode,module,code,name,is_html,title,content) VALUES (?,?,?,?,?,?,?)}, + undef, + $branchcode, $module, $code, $old_letter->{name}, $old_letter->{is_html}, $old_letter->{title}, $old_letter->{content} + ); } sub delete_confirm { - my ($module, $code) = @_; + my ($branchcode, $module, $code) = @_; my $dbh = C4::Context->dbh; - my $letter = $dbh->selectrow_hashref(q|SELECT name FROM letter WHERE module = ? AND code = ?|, - { Slice => {} }, - $module, $code); + my $letter = letter_exists($branchcode, $module, $code); + $template->param( branchcode => $branchcode ); $template->param( code => $code ); $template->param( module => $module); $template->param( name => $letter->{name}); @@ -226,40 +273,54 @@ sub delete_confirm { } sub delete_confirmed { - my ($module, $code) = @_; + my ($branchcode, $module, $code) = @_; + my ($sql, $args) = _letter_from_where($branchcode, $module, $code); my $dbh = C4::Context->dbh; - $dbh->do('DELETE FROM letter WHERE module=? AND code=?',{},$module,$code); + $dbh->do("DELETE $sql", undef, @$args); # setup default display for screen - default_display(); + default_display($branchcode); return; } sub retrieve_letters { - my $searchstring = shift; + my ($branchcode, $searchstring) = @_; + + $branchcode = $my_branch if $branchcode && $my_branch; + my $dbh = C4::Context->dbh; - if ($searchstring) { - if ($searchstring=~m/(\S+)/) { - $searchstring = $1 . q{%}; - return $dbh->selectall_arrayref('SELECT module, code, name FROM letter WHERE code LIKE ? ORDER BY module, code', - { Slice => {} }, $searchstring); - } + my ($sql, @where, @args); + $sql = "SELECT branchcode, module, code, name, branchname + FROM letter + LEFT OUTER JOIN branches USING (branchcode)"; + if ($searchstring && $searchstring=~m/(\S+)/) { + $searchstring = $1 . q{%}; + push @where, 'code LIKE ?'; + push @args, $searchstring; } - else { - return $dbh->selectall_arrayref('SELECT module, code, name FROM letter ORDER BY module, code', { Slice => {} }); + elsif ($branchcode) { + push @where, 'branchcode = ?'; + push @args, $branchcode || ''; } - return; + elsif ($my_branch) { + push @where, "(branchcode = ? OR branchcode = '')"; + push @args, $my_branch; + } + + $sql .= " WHERE ".join(" AND ", @where) if @where; + $sql .= " ORDER BY module, code, branchcode"; +# use Data::Dumper; die Dumper($sql, \@args); + return $dbh->selectall_arrayref($sql, { Slice => {} }, @args); } sub default_display { - my $searchfield = shift; - my $results; + my ($branchcode, $searchfield) = @_; + if ( $searchfield ) { $template->param( search => 1 ); $template->param( searchfield => $searchfield ); - $results = retrieve_letters($searchfield); - } else { - $results = retrieve_letters(); } + my $results = retrieve_letters($branchcode,$searchfield); + my $loop_data = []; my $protected_letters = protected_letters(); foreach my $row (@{$results}) { @@ -267,8 +328,27 @@ sub default_display { push @{$loop_data}, $row; } - $template->param( letter => $loop_data ); - return; + + $template->param( + letter => $loop_data, + branchloop => _branchloop($branchcode), + ); +} + +sub _branchloop { + my ($branchcode) = @_; + + my $branches = GetBranches(); + my @branchloop; + for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { + push @branchloop, { + value => $thisbranch, + selected => $branchcode && $thisbranch eq $branchcode, + branchname => $branches->{$thisbranch}->{'branchname'}, + }; + } + + return \@branchloop; } sub add_fields { -- 1.6.5 From oleonard at myacpl.org Tue Oct 25 16:18:51 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 25 Oct 2011 10:18:51 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 7085 - Problems with searching for orders in acquisitions Message-ID: <1319552331-22762-1-git-send-email-oleonard@myacpl.org> Changing "if ( defined $input )" to "if ( $input )" in the section of the script which builds the order search query seems to give successful searches where they didn't exist before. Searches from the advanced order search screen work with title, author, vendor, basket number, date, etc. --- C4/Acquisition.pm | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 19c4f08..a0dda42 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1581,33 +1581,33 @@ sub GetHistory { my @query_params = (); - if ( defined $title ) { + if ( $title ) { $query .= " AND biblio.title LIKE ? "; $title =~ s/\s+/%/g; push @query_params, "%$title%"; } - if ( defined $author ) { + if ( $author ) { $query .= " AND biblio.author LIKE ? "; push @query_params, "%$author%"; } - if ( defined $isbn ) { + if ( $isbn ) { $query .= " AND biblioitems.isbn LIKE ? "; push @query_params, "%$isbn%"; } - if ( defined $name ) { + if ( $name ) { $query .= " AND aqbooksellers.name LIKE ? "; push @query_params, "%$name%"; } - if ( defined $from_placed_on ) { + if ( $from_placed_on ) { $query .= " AND creationdate >= ? "; push @query_params, $from_placed_on; } - if ( defined $to_placed_on ) { + if ( $to_placed_on ) { $query .= " AND creationdate <= ? "; push @query_params, $to_placed_on; } -- 1.7.3 From Katrin.Fischer.83 at web.de Tue Oct 25 17:45:22 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Tue, 25 Oct 2011 17:45:22 +0200 Subject: [Koha-patches] [PATCH] Bug 6894: Order from suggestion defaulting to wrong currency Message-ID: <1319557522-7274-1-git-send-email-Katrin.Fischer.83@web.de> This problem turned out to be a bit different, than I initally thought. This patch fixes the currency selections for new orders created in staff. Before this patch, the first currency in the list was selected instead of the active currency. So you needed to change it explicitly. After patch it should work like this: 1) Suggestion created in OPAC - currency defaults to NULL in database 2) Editing a suggestion created in OPAC will default to active currency. 3) Creating a new suggestion in staff will default to active currency. 4) When ordering, the currency will default to the vendor currency, if no currency is set in the suggestion. (still happens, when suggestions are accepted in batch from the list. I hope this is right - comments and testing appreciated. --- suggestion/suggestion.pl | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index d00b632..38b79b9 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -307,13 +307,21 @@ $template->param( "statusselected_$$suggestion_ref{'STATUS'}" =>1); # get currencies and rates my @rates = GetCurrencies(); my $count = scalar @rates; +my $active_currency = GetCurrency(); +my $selected_currency; +if ($$suggestion_ref{'currency'}) { + $selected_currency = $$suggestion_ref{'currency'}; +} +else { + $selected_currency = $active_currency->{currency}; +} my @loop_currency = (); for ( my $i = 0 ; $i < $count ; $i++ ) { my %line; $line{currcode} = $rates[$i]->{'currency'}; $line{rate} = $rates[$i]->{'rate'}; - $line{selected} = 1 if ($$suggestion_ref{'currency'} && $line{'currcode'} eq $$suggestion_ref{'currency'}); + $line{selected} = 1 if ($line{'currcode'} eq $selected_currency); push @loop_currency, \%line; } -- 1.7.5.4 From robin at catalyst.net.nz Wed Oct 26 04:05:43 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Wed, 26 Oct 2011 15:05:43 +1300 Subject: [Koha-patches] [PATCH] Bug 7091 - [MASTER] - update the build version for packages from master Message-ID: <1319594743-16077-1-git-send-email-robin@catalyst.net.nz> This updates the default version number that packages are build with to be 3.7. This should be applied to master only. --- debian/build-git-snapshot | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/debian/build-git-snapshot b/debian/build-git-snapshot index 91552ff..462d19b 100755 --- a/debian/build-git-snapshot +++ b/debian/build-git-snapshot @@ -30,7 +30,7 @@ use POSIX qw/strftime/; my $buildresult; my $distribution='squeeze-dev'; my $git_checks='all'; -my $version='3.5-1~git'; +my $version='3.7-1~git'; my $auto_version=1; my $need_help; my $debug; -- 1.7.5.4 From robin at catalyst.net.nz Wed Oct 26 04:12:17 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Wed, 26 Oct 2011 15:12:17 +1300 Subject: [Koha-patches] [PATCH] Bug 7091 - [MASTER/3.6.x/3.4.x] - update the changelogs for the 3.4 series Message-ID: <1319595137-16601-1-git-send-email-robin@catalyst.net.nz> This brings all the changelog entries for releases up to what has been included in the packages --- debian/changelog | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7a01bb1..bb5fed4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,28 @@ +koha (3.4.5-1) squeeze; urgency=low + + * New upstream release (3.04.05) + + -- Robin Sheat Wed, 28 Sep 2011 17:27:50 +1300 + +koha (3.4.4-1) squeeze; urgency=low + + * New upstream release (3.04.04) + + -- Robin Sheat Mon, 29 Aug 2011 18:23:45 +1200 + +koha (3.4.3-1) squeeze; urgency=low + + * New upstream release (3.04.03) + + -- Robin Sheat Wed, 27 Jul 2011 13:42:31 +1200 + +koha (3.4.2-1) squeeze; urgency=low + + * New major version (3.04.02) + * Added the koha-upgrade-to-3.4 script + + -- Robin Sheat Fri, 15 Jul 2011 15:02:54 +1200 + koha (3.2.9-1) squeeze; urgency=high * New upstream release (3.02.09) -- 1.7.5.4 From robin at catalyst.net.nz Wed Oct 26 04:14:41 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Wed, 26 Oct 2011 15:14:41 +1300 Subject: [Koha-patches] [PATCH] Bug 7091 - [3.6.x] - update the build script for 3.6 stable series Message-ID: <1319595281-16707-1-git-send-email-robin@catalyst.net.nz> --- debian/build-git-snapshot | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/build-git-snapshot b/debian/build-git-snapshot index d6f9138..86f610d 100755 --- a/debian/build-git-snapshot +++ b/debian/build-git-snapshot @@ -28,9 +28,9 @@ use Getopt::Long; use POSIX qw/strftime/; my $buildresult; -my $distribution='squeeze-dev'; +my $distribution='squeeze'; my $git_checks='all'; -my $version='3.5-1~git'; +my $version='3.6-1~git'; my $auto_version=1; my $need_help; my $debug; -- 1.7.5.4 From chris.nighswonger at gmail.com Wed Oct 26 17:32:48 2011 From: chris.nighswonger at gmail.com (Chris Nighswonger) Date: Wed, 26 Oct 2011 11:32:48 -0400 Subject: [Koha-patches] [PATCH] Fixing cut and paste error and removing the use of diag() as this does not produce output when the test is run in a harness Message-ID: <1319643168-30848-1-git-send-email-chris.nighswonger@gmail.com> --- t/00-merge-conflict-markers.t | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/t/00-merge-conflict-markers.t b/t/00-merge-conflict-markers.t index 24743ae..da11a58 100644 --- a/t/00-merge-conflict-markers.t +++ b/t/00-merge-conflict-markers.t @@ -49,8 +49,7 @@ find({ } close $fh; if ($marker_found) { - fail("$file has no merge conflict markers"); - diag("marker found in line $line"); + fail("$file contains merge conflict markers in line $line"); } else { pass("$file has no merge conflict markers"); } -- 1.7.2.5 From oleonard at myacpl.org Wed Oct 26 20:19:17 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 26 Oct 2011 14:19:17 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6880- Reason for suggestions do not save Message-ID: <1319653157-12166-1-git-send-email-oleonard@myacpl.org> The fix for Bug 1883 seems to have lacked the necessary update to the database to add the "patronreason" column to the suggestions table. This patch does so. --- installer/data/mysql/kohastructure.sql | 3 ++- installer/data/mysql/updatedatabase.pl | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e4388a4..35967ac 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1861,7 +1861,8 @@ CREATE TABLE `suggestions` ( -- purchase suggestions `isbn` varchar(30) default NULL, -- isbn of the suggested item `mailoverseeing` smallint(1) default 0, `biblionumber` int(11) default NULL, -- foreign key linking the suggestion to the biblio table after the suggestion has been ordered - `reason` text, -- reason for making the suggestion + `reason` text, -- reason for accepting or rejecting the suggestion + `patronreason` text, -- reason for making the suggestion budgetid INT(11), -- foreign key linking the suggested budget to the aqbudgets table branchcode VARCHAR(10) default NULL, -- foreign key linking the suggested branch to the branches table collectiontitle text default NULL, -- collection name for the suggested item diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index a8cd166..7d6090c 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4550,6 +4550,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.06.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE `suggestions` ADD `patronreason` TEXT NULL AFTER `reason`"); + print "Upgrade to $DBversion done (Add column to suggestions table to store patrons' reasons for submitting a suggestion. )\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) -- 1.7.3 From srdjan at catalyst.net.nz Thu Oct 27 07:06:55 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Thu, 27 Oct 2011 18:06:55 +1300 Subject: [Koha-patches] [PATCH] bug_7090: AllowItemsOnHoldCheckout syspref In-Reply-To: References: Message-ID: <1319692015-857-1-git-send-email-srdjan@catalyst.net.nz> Observe AllowItemsOnHandCheckout syspref when using self checkout --- C4/Circulation.pm | 68 ++++++++++--------- C4/SIP/ILS/Transaction/Checkout.pm | 8 ++- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 7 ++ .../en/modules/admin/preferences/circulation.pref | 6 ++ opac/sco/sco-main.pl | 16 ++++- 6 files changed, 71 insertions(+), 36 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9f81773..2140042 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -570,7 +570,7 @@ sub itemissues { =head2 CanBookBeIssued ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $borrower, - $barcode, $duedatespec, $inprocess ); + $barcode, $duedatespec, $inprocess, $ignore_reserves ); Check if a book can be issued. @@ -584,7 +584,8 @@ C<$issuingimpossible> and C<$needsconfirmation> are some hashref. =item C<$duedatespec> is a C4::Dates object. -=item C<$inprocess> +=item C<$inprocess> boolean switch +=item C<$ignore_reserves> boolean switch =back @@ -661,7 +662,7 @@ if the borrower borrows to much things =cut sub CanBookBeIssued { - my ( $borrower, $barcode, $duedate, $inprocess ) = @_; + my ( $borrower, $barcode, $duedate, $inprocess, $ignore_reserves ) = @_; my %needsconfirmation; # filled with problems that needs confirmations my %issuingimpossible; # filled with problems that causes the issue to be IMPOSSIBLE my $item = GetItem(GetItemnumberFromBarcode( $barcode )); @@ -868,37 +869,40 @@ sub CanBookBeIssued { $needsconfirmation{issued_borrowernumber} = $currborinfo->{'borrowernumber'}; } - # See if the item is on reserve. - my ( $restype, $res ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); - if ($restype) { - my $resbor = $res->{'borrowernumber'}; - my ( $resborrower ) = C4::Members::GetMember( borrowernumber => $resbor ); - my $branches = GetBranches(); - my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'}; - if ( $resbor ne $borrower->{'borrowernumber'} && $restype eq "Waiting" ) - { - # The item is on reserve and waiting, but has been - # reserved by some other patron. - $needsconfirmation{RESERVE_WAITING} = 1; - $needsconfirmation{'resfirstname'} = $resborrower->{'firstname'}; - $needsconfirmation{'ressurname'} = $resborrower->{'surname'}; - $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'}; - $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'}; - $needsconfirmation{'resbranchname'} = $branchname; - $needsconfirmation{'reswaitingdate'} = format_date($res->{'waitingdate'}); - } - elsif ( $restype eq "Reserved" ) { - # The item is on reserve for someone else. - $needsconfirmation{RESERVED} = 1; - $needsconfirmation{'resfirstname'} = $resborrower->{'firstname'}; - $needsconfirmation{'ressurname'} = $resborrower->{'surname'}; - $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'}; - $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'}; - $needsconfirmation{'resbranchname'} = $branchname; - $needsconfirmation{'resreservedate'} = format_date($res->{'reservedate'}); + unless ( $ignore_reserves ) { + # See if the item is on reserve. + my ( $restype, $res ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); + if ($restype) { + my $resbor = $res->{'borrowernumber'}; + if ( $resbor ne $borrower->{'borrowernumber'} ) { + my ( $resborrower ) = C4::Members::GetMember( borrowernumber => $resbor ); + my $branchname = GetBranchName( $res->{'branchcode'} ); + if ( $restype eq "Waiting" ) + { + # The item is on reserve and waiting, but has been + # reserved by some other patron. + $needsconfirmation{RESERVE_WAITING} = 1; + $needsconfirmation{'resfirstname'} = $resborrower->{'firstname'}; + $needsconfirmation{'ressurname'} = $resborrower->{'surname'}; + $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'}; + $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'}; + $needsconfirmation{'resbranchname'} = $branchname; + $needsconfirmation{'reswaitingdate'} = format_date($res->{'waitingdate'}); + } + elsif ( $restype eq "Reserved" ) { + # The item is on reserve for someone else. + $needsconfirmation{RESERVED} = 1; + $needsconfirmation{'resfirstname'} = $resborrower->{'firstname'}; + $needsconfirmation{'ressurname'} = $resborrower->{'surname'}; + $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'}; + $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'}; + $needsconfirmation{'resbranchname'} = $branchname; + $needsconfirmation{'resreservedate'} = format_date($res->{'reservedate'}); + } + } } } - return ( \%issuingimpossible, \%needsconfirmation ); + return ( \%issuingimpossible, \%needsconfirmation ); } =head2 AddIssue diff --git a/C4/SIP/ILS/Transaction/Checkout.pm b/C4/SIP/ILS/Transaction/Checkout.pm index 8a14877..617a4eb 100644 --- a/C4/SIP/ILS/Transaction/Checkout.pm +++ b/C4/SIP/ILS/Transaction/Checkout.pm @@ -58,7 +58,13 @@ sub do_checkout { $debug and warn "do_checkout: patron (" . $patron_barcode . ")"; my $borrower = $self->{patron}->getmemberdetails_object(); $debug and warn "do_checkout borrower: . " . Dumper $borrower; - my ($issuingimpossible,$needsconfirmation) = CanBookBeIssued( $borrower, $barcode ); + my ($issuingimpossible,$needsconfirmation) = CanBookBeIssued( + $borrower, + $barcode, + undef, + 0, + C4::Context->preference("AllowItemsOnHoldCheckout") + ); my $noerror=1; if (scalar keys %$issuingimpossible) { foreach (keys %$issuingimpossible) { diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index ae2c1cb..2608bc5 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -328,4 +328,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo'); - +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('AllowItemsOnHoldCheckout',0,'Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else. This allows self checkouts for those items.','','YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index a8cd166..7fab557 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4550,6 +4550,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.06.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('AllowItemsOnHoldCheckout',0,'Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else. This allows self checkouts for those items.','','YesNo')"); + print "Upgrade to $DBversion add 'AllowItemsOnHoldCheckout' syspref \n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) 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 f4946b5..f4fd721 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 @@ -105,6 +105,12 @@ Circulation: no: "Don't allow" - staff to manually override the renewal limit and renew a checkout when it would go over the renewal limit. - + - pref: AllowItemsOnHoldCheckout + choices: + yes: Allow + no: "Don't allow" + - checkouts of items items reserved to someone else. If allowed do not generate RESERVE_WAITING and RESERVED warning. This allows self checkouts for those items. + - - pref: AllFinesNeedOverride choices: yes: Require diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl index 427d995..8a8252b 100755 --- a/opac/sco/sco-main.pl +++ b/opac/sco/sco-main.pl @@ -116,7 +116,13 @@ elsif ( $op eq "checkout" ) { my $impossible = {}; my $needconfirm = {}; if ( !$confirmed ) { - ( $impossible, $needconfirm ) = CanBookBeIssued( $borrower, $barcode ); + ( $impossible, $needconfirm ) = CanBookBeIssuedCheckout( + $borrower, + $barcode, + undef, + 0, + C4::Context->preference("AllowItemsOnHoldCheckout") + ); } $confirm_required = scalar keys %$needconfirm; @@ -197,7 +203,13 @@ if ($borrower->{cardnumber}) { my ($issueslist) = GetPendingIssues( $borrower->{'borrowernumber'} ); foreach my $it (@$issueslist) { $it->{date_due_display} = format_date($it->{date_due}); - my ($renewokay, $renewerror) = CanBookBeIssued($borrower, $it->{'barcode'},'',''); + my ($renewokay, $renewerror) = CanBookBeIssued( + $borrower, + $it->{'barcode'}, + undef, + 0, + C4::Context->preference("AllowItemsOnHoldCheckout") + ); $it->{'norenew'} = 1 if $renewokay->{'NO_MORE_RENEWALS'}; push @issues, $it; } -- 1.6.5 From oleonard at myacpl.org Thu Oct 27 15:14:51 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 27 Oct 2011 09:14:51 -0400 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_Fix_for_Bug_6818_-_acquisiti?= =?utf-8?q?ons_basket_groups_could_use_some_design_work?= Message-ID: <1319721291-20711-1-git-send-email-oleonard@myacpl.org> I've made changes to the basket grouping interface to bring it in line with other interfaces in Koha. I think it's better to keep things following a consistent pattern. On the page which lists basket groups: - Basket groups listed in a table instead of as custom-styled lists - Buttons use standard style - Tabs are generated by jQuery On the page for managing baskets in a group: - Markup has been revised to be more consistent with established patterns. - Corrections have been made for validity On the basket view page: - Display of data has been streamlined a little bit - An option has been added to the "Basket group" dropdown for adding a new group - Markup has been corrected for validity and consistency --- .../prog/en/includes/acquisitions-search.inc | 4 +- .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 121 ++++---- .../prog/en/modules/acqui/basketgroup.tt | 343 +++++++++----------- 3 files changed, 219 insertions(+), 249 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc index ddf6f8d..b525578 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc @@ -16,8 +16,8 @@ [+] Advanced Search diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 90ddacb..180f50e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -3,7 +3,7 @@ [% INCLUDE 'doc-head-close.inc' %] [% UNLESS ( closedate ) %] - - - [% ELSE %] + [% UNLESS ( grouped ) %] +[% IF ( grouping ) %] - - - - - + [% END %] [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] - +
      - New Basket Group
      -

      Basket Grouping for [% booksellername %]

      +

      Basket Grouping for [% booksellername |html %]

      [% IF ( grouping ) %]
      -
      +
      +

      Ungrouped Baskets

        @@ -209,6 +175,7 @@ function submitForm(form) { [% END %]
      +
      @@ -216,31 +183,32 @@ function submitForm(form) {
      -
      -

      - -

      - -

      - -

      or

      -

      - -

      - -
      -

      Grouping:

      +
      +
        +
      1. +
      2. +
      3. +
      4. +
      5. +
      6. +
      7. or

      8. +
      9. +
      10. +
      11. + +
      12. +
      13. Baskets in this group:
          [% FOREACH selectedbasket IN selectedbaskets %]
        • @@ -255,105 +223,96 @@ function submitForm(form) {
        • [% END %] -
        -
      -
      Close
      - + +
    • + +
      + +
      [% IF ( basketgroupid ) %] [% END %] -
      +
      [% ELSE %] -
      -
      - -
      -
      -
        - [% FOREACH basketgroup IN basketgroups %] - [% UNLESS ( basketgroup.closed ) %] -
      • - [% IF ( basketgroup.name ) %] - [% basketgroup.name %] - [% ELSE %] - Basket Group n?[% basketgroup.id %] - [% END %] - -
      • - [% END %] - [% END %] -
      -
      -
      -
        - [% FOREACH basketgroup IN basketgroups %] - [% IF ( basketgroup.closed ) %] -
      • - [% IF ( basketgroup.name ) %] - [% basketgroup.name %] - [% ELSE %] - Basket Group n?[% basketgroup.id %] - [% END %] - -
      • - [% END %] - [% END %] -
      +
      +
      +
        + [% UNLESS ( closed ) %]
      • Open
      • + [% ELSE%]
      • Open
      • [% END %] + [% IF ( closed ) %]
      • Closed
      • + [% ELSE %]
      • Closed
      • [% END %] +
      +
      +
      + + + + + + + [% FOREACH basketgroup IN basketgroups %] + [% UNLESS ( basketgroup.closed ) %] + + + + + + + [% END %] + [% END %] + +
      Basket GroupAction
      [% IF ( basketgroup.name ) %] + [% basketgroup.name %] + [% ELSE %] + Basket group no. [% basketgroup.id %] + [% END %] + + + +
      +
      +
      +
      +
      +
      + + + + + + + + [% FOREACH basketgroup IN basketgroups %] + [% IF ( basketgroup.closed ) %] + + + + + + [% END %] + [% END %] + +
      Basket GroupAction
      + [% IF ( basketgroup.name ) %] + [% basketgroup.name %] + [% ELSE %] + Basket group no. [% basketgroup.id %] + [% END %] + +
      +
      +
      +
      -
      - -
      +
      [% END %] [% INCLUDE 'intranet-bottom.inc' %] -- 1.7.3 From christophe.croullebois at biblibre.com Thu Oct 27 15:58:39 2011 From: christophe.croullebois at biblibre.com (Christophe Croullebois) Date: Thu, 27 Oct 2011 15:58:39 +0200 Subject: [Koha-patches] [PATCH 1/1] Bug 7105: Bad request in GetSubscriptions Message-ID: <1319723919-14619-1-git-send-email-christophe.croullebois@biblibre.com> If $string or $issn is passed to GetSubscriptions, the request is false. See Bug 5864, especially the last comment from Fr?d?rick Capovilla. --- C4/Serials.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 8aa6ebc..aebc783 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -588,7 +588,7 @@ sub GetSubscriptions { $tmpstring =~ s/^AND //; push @sqlstrings, $tmpstring; } - $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "(" . join( ") OR (", @sqlstrings ) . ")"; + $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "((" . join( ") OR (", @sqlstrings ) . "))"; } if ($issn) { my @sqlstrings; @@ -601,7 +601,7 @@ sub GetSubscriptions { $tmpstring =~ s/^OR //; push @sqlstrings, $tmpstring; } - $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "(" . join( ") OR (", @sqlstrings ) . ")"; + $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "((" . join( ") OR (", @sqlstrings ) . "))"; } $sql .= "$sqlwhere ORDER BY title"; $debug and warn "GetSubscriptions query: $sql params : ", join( " ", @bind_params ); -- 1.7.0.4 From Katrin.Fischer.83 at web.de Fri Oct 28 15:57:50 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Fri, 28 Oct 2011 15:57:50 +0200 Subject: [Koha-patches] [PATCH] Bug 6089: Show creator and budget on order receive page Message-ID: <1319810270-7764-1-git-send-email-Katrin.Fischer.83@web.de> Reimplementing 3.0.x patch from Nahuel ANGELINETTI To test: 1) Create basket 2) Order something, note your fund 3) Receive title > Verify your name and selected fund display correctly --- acqui/orderreceive.pl | 15 ++++++++++++--- .../prog/en/modules/acqui/orderreceive.tt | 4 +++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index 98ba544..c3fea62 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -70,6 +70,7 @@ use C4::Auth; use C4::Output; use C4::Dates qw/format_date/; use C4::Bookseller qw/ GetBookSellerFromId /; +use C4::Budgets qw/ GetBudget /; use C4::Members; use C4::Branch; # GetBranches use C4::Items; @@ -133,6 +134,12 @@ if ( $count == 1 ) { if ( @$results[0]->{'unitprice'} == 0 ) { @$results[0]->{'unitprice'} = ''; } + + my $authorisedby = @$results[0]->{'authorisedby'}; + my $member = GetMember( borrowernumber => $authorisedby ); + + my $budget = GetBudget( @$results[0]->{'budget_id'} ); + $template->param( count => 1, biblionumber => @$results[0]->{'biblionumber'}, @@ -148,17 +155,19 @@ if ( $count == 1 ) { copyrightdate => @$results[0]->{'copyrightdate'}, isbn => @$results[0]->{'isbn'}, seriestitle => @$results[0]->{'seriestitle'}, - bookfund => @$results[0]->{'bookfundid'}, + bookfund => $budget->{budget_name}, quantity => @$results[0]->{'quantity'}, quantityreceivedplus1 => @$results[0]->{'quantityreceived'} + 1, quantityreceived => @$results[0]->{'quantityreceived'}, rrp => @$results[0]->{'rrp'}, ecost => @$results[0]->{'ecost'}, unitprice => @$results[0]->{'unitprice'}, + memberfirstname => $member->{firstname}, + membersurname => $member->{surname}, invoice => $invoice, datereceived => $datereceived->output(), - datereceived_iso => $datereceived->output('iso'), - notes => $order->{notes} + datereceived_iso => $datereceived->output('iso'), + notes => $order->{notes} ); } else { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index 7147b19..885b536 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -89,7 +89,9 @@
      Accounting details
        -
      1. [% datereceived %]
      2. +
      3. [% datereceived %]
      4. +
      5. [% bookfund %]
      6. +
      7. [% IF ( memberfirstname ) %][% memberfirstname %][% END %] [% membersurname %]
      8. [% IF ( edit ) %] -- 1.7.5.4 From martin.renvoize at ptfs-europe.com Fri Oct 28 16:43:59 2011 From: martin.renvoize at ptfs-europe.com (Martin Renvoize) Date: Fri, 28 Oct 2011 15:43:59 +0100 Subject: [Koha-patches] [PATCH] Bug7108: Intranet Language Menu Display Patch Message-ID: <1319813039-32417-1-git-send-email-martin.renvoize@ptfs-europe.com> From: Martin Renvoize --- .../intranet-tmpl/prog/en/css/staff-global.css | 6 +++++- .../prog/en/includes/intranet-bottom.inc | 2 ++ 2 files changed, 7 insertions(+), 1 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 7b38062..4e2bb3e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -1720,6 +1720,10 @@ ul#i18nMenu li.more ul li a { background-image : none; padding-right : 20px; } + +div.lang { + float:left; +} div#changelanguage{ background-color: #fff; @@ -2080,4 +2084,4 @@ div.pager input.pagedisplay { background-color : transparent; font-weight: bold; text-align : center; -} \ No newline at end of file +} 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 1873ef1..ebe7f37 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc @@ -5,6 +5,7 @@
        -- 1.7.2.5 From Katrin.Fischer.83 at web.de Fri Oct 28 17:05:14 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Fri, 28 Oct 2011 17:05:14 +0200 Subject: [Koha-patches] [PATCH] Bug 3184: Show creator and budget on order receive page Message-ID: <1319814314-8461-1-git-send-email-Katrin.Fischer.83@web.de> Reimplementing 3.0.x patch from Nahuel ANGELINETTI To test: 1) Create basket 2) Order something, note your fund 3) Receive title > Verify your name and selected fund display correctly Previous patch had wrong bug number! --- acqui/orderreceive.pl | 15 ++++++++++++--- .../prog/en/modules/acqui/orderreceive.tt | 4 +++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index 98ba544..c3fea62 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -70,6 +70,7 @@ use C4::Auth; use C4::Output; use C4::Dates qw/format_date/; use C4::Bookseller qw/ GetBookSellerFromId /; +use C4::Budgets qw/ GetBudget /; use C4::Members; use C4::Branch; # GetBranches use C4::Items; @@ -133,6 +134,12 @@ if ( $count == 1 ) { if ( @$results[0]->{'unitprice'} == 0 ) { @$results[0]->{'unitprice'} = ''; } + + my $authorisedby = @$results[0]->{'authorisedby'}; + my $member = GetMember( borrowernumber => $authorisedby ); + + my $budget = GetBudget( @$results[0]->{'budget_id'} ); + $template->param( count => 1, biblionumber => @$results[0]->{'biblionumber'}, @@ -148,17 +155,19 @@ if ( $count == 1 ) { copyrightdate => @$results[0]->{'copyrightdate'}, isbn => @$results[0]->{'isbn'}, seriestitle => @$results[0]->{'seriestitle'}, - bookfund => @$results[0]->{'bookfundid'}, + bookfund => $budget->{budget_name}, quantity => @$results[0]->{'quantity'}, quantityreceivedplus1 => @$results[0]->{'quantityreceived'} + 1, quantityreceived => @$results[0]->{'quantityreceived'}, rrp => @$results[0]->{'rrp'}, ecost => @$results[0]->{'ecost'}, unitprice => @$results[0]->{'unitprice'}, + memberfirstname => $member->{firstname}, + membersurname => $member->{surname}, invoice => $invoice, datereceived => $datereceived->output(), - datereceived_iso => $datereceived->output('iso'), - notes => $order->{notes} + datereceived_iso => $datereceived->output('iso'), + notes => $order->{notes} ); } else { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index 7147b19..885b536 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -89,7 +89,9 @@
        Accounting details
          -
        1. [% datereceived %]
        2. +
        3. [% datereceived %]
        4. +
        5. [% bookfund %]
        6. +
        7. [% IF ( memberfirstname ) %][% memberfirstname %][% END %] [% membersurname %]
        8. [% IF ( edit ) %] -- 1.7.5.4 From Katrin.Fischer.83 at web.de Fri Oct 28 17:39:10 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Fri, 28 Oct 2011 17:39:10 +0200 Subject: [Koha-patches] [PATCH] Bug 3388: Restore account number on vendor page Message-ID: <1319816350-9080-1-git-send-email-Katrin.Fischer.83@web.de> This patch makes it possible to add the account number to the vendor information. The used field aqbookseller.accountnumber was already existent in the database. To test: 1) Add a new vendor with accountnumber > Verify form has a field for accountnumber > Verify accountnumber does show up on vendor summary page 2) Edit this vendor, change accountnumber > Verify change was correctly saved and new number is displayed on vendor summary page 3) Delete accountnumber --- C4/Bookseller.pm | 15 +++++++++------ acqui/supplier.pl | 2 ++ acqui/updatesupplier.pl | 1 + .../prog/en/modules/acqui/supplier.tt | 11 ++++++++--- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/C4/Bookseller.pm b/C4/Bookseller.pm index 4ad42cb..6a91f99 100644 --- a/C4/Bookseller.pm +++ b/C4/Bookseller.pm @@ -65,7 +65,7 @@ sub GetBookSeller { $searchstring = q{%} . $searchstring . q{%}; my $query = 'select aqbooksellers.*, count(*) as basketcount from aqbooksellers left join aqbasket ' - . 'on aqbasket.booksellerid = aqbooksellers.id where name lIke ? group by aqbooksellers.id order by name'; + . 'on aqbasket.booksellerid = aqbooksellers.id where name like ? group by aqbooksellers.id order by name'; my $dbh = C4::Context->dbh; my $sth = $dbh->prepare($query); @@ -141,20 +141,22 @@ sub AddBookseller { INSERT INTO aqbooksellers ( name, address1, address2, address3, address4, - postal, phone, fax, url, contact, + postal, phone, accountnumber, fax, url, + contact, contpos, contphone, contfax, contaltphone, contemail, contnotes, active, listprice, invoiceprice, gstreg, listincgst,invoiceincgst, gstrate, discount, notes ) - VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) | + VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) | ; my $sth = $dbh->prepare($query); $sth->execute( $data->{'name'}, $data->{'address1'}, $data->{'address2'}, $data->{'address3'}, $data->{'address4'}, $data->{'postal'}, - $data->{'phone'}, $data->{'fax'}, + $data->{'phone'}, $data->{'accountnumber'}, + $data->{'fax'}, $data->{'url'}, $data->{'contact'}, $data->{'contpos'}, $data->{'contphone'}, $data->{'contfax'}, $data->{'contaltphone'}, @@ -192,7 +194,7 @@ sub ModBookseller { my $dbh = C4::Context->dbh; my $query = 'UPDATE aqbooksellers SET name=?,address1=?,address2=?,address3=?,address4=?, - postal=?,phone=?,fax=?,url=?,contact=?,contpos=?, + postal=?,phone=?,accountnumber=?,fax=?,url=?,contact=?,contpos=?, contphone=?,contfax=?,contaltphone=?,contemail=?, contnotes=?,active=?,listprice=?, invoiceprice=?, gstreg=?,listincgst=?,invoiceincgst=?, @@ -203,7 +205,8 @@ sub ModBookseller { $data->{'name'}, $data->{'address1'}, $data->{'address2'}, $data->{'address3'}, $data->{'address4'}, $data->{'postal'}, - $data->{'phone'}, $data->{'fax'}, + $data->{'phone'}, $data->{'accountnumber'}, + $data->{'fax'}, $data->{'url'}, $data->{'contact'}, $data->{'contpos'}, $data->{'contphone'}, $data->{'contfax'}, $data->{'contaltphone'}, diff --git a/acqui/supplier.pl b/acqui/supplier.pl index 2a4078a..4bfb9db 100755 --- a/acqui/supplier.pl +++ b/acqui/supplier.pl @@ -93,6 +93,7 @@ if ( $op eq 'display' ) { address3 => $supplier->{'address3'}, address4 => $supplier->{'address4'}, phone => $supplier->{'phone'}, + accountnumber => $supplier->{'accountnumber'}, fax => $supplier->{'fax'}, url => $supplier->{'url'}, contact => $supplier->{'contact'}, @@ -142,6 +143,7 @@ if ( $op eq 'display' ) { address3 => $supplier->{'address3'}, address4 => $supplier->{'address4'}, phone => $supplier->{'phone'}, + accountnumber=> $supplier->{'accountnumber'}, fax => $supplier->{'fax'}, url => $supplier->{'url'}, contact => $supplier->{'contact'}, diff --git a/acqui/updatesupplier.pl b/acqui/updatesupplier.pl index 6bc978f..bd59c6b 100755 --- a/acqui/updatesupplier.pl +++ b/acqui/updatesupplier.pl @@ -80,6 +80,7 @@ $data{'address2'}=$addresses[1]; $data{'address3'}=$addresses[2]; $data{'address4'}=$addresses[3]; $data{'phone'}=$input->param('company_phone'); +$data{'accountnumber'}=$input->param('accountnumber'); $data{'fax'}=$input->param('company_fax'); $data{'url'}=$input->param('website'); $data{'contact'}=$input->param('company_contact_name'); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt index 001bf0d..adb28ac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt @@ -53,7 +53,9 @@ if (f.company.value == "") {
        9. -
        +
      9. +
      10. +
      Contact details @@ -136,7 +138,7 @@ if (f.company.value == "") { %
    • % (leave blank for default tax of [% default_gst_rate %]%)
    • -
    • +
      [% IF ( id ) %] [% ELSE %] @@ -154,7 +156,10 @@ if (f.company.value == "") {

      Phone: [% phone %]

      Fax: [% fax %]

      [% IF ( url ) %] -

      Web site: [% url %]

      +

      Website: [% url %]

      + [% END %] + [% IF ( accountnumber ) %] +

      Account number: [% accountnumber %]

      [% END %]
      -- 1.7.5.4 From lrea at nekls.org Fri Oct 28 18:00:34 2011 From: lrea at nekls.org (Liz Rea) Date: Fri, 28 Oct 2011 11:00:34 -0500 Subject: [Koha-patches] [PATCH] Bug 7110 - Renewal messages still display in OPAC if OpacRenewalAllowed is disabled Message-ID: <1319817634-24711-1-git-send-email-lrea@nekls.org> This patch adds a check for OpacRenewalAllowed to the computation of the renewal_blocked_fines. If OpacRenewalAllowed is off, renewal_blocked_fines won't be computed, because that message shouldn't show in the OPAC anyway. This also removes the necessity to set a very high threshold on OPACFineNoRenewals to prevent the messages from showing with OpacRenewal disabled. To test: Set a patron with fines over the stated limit in OPACFineNoRenewals. With OpacRenewalAllowed set to ALLOW - log into the OPAC and verify the message that renewals are disallowed is displayed - verify that renewals are disallowed in the interface. - remove or pay the fines, verify the message goes away and that OPAC renewals are re-allowed for your patron. With OPACFineNoRenewals set to Don't Allow - verify the message is not shown, even with the patron's fines over the threshold in OPACFineNoRenewals. - remove or pay the fines, verify that renewals are still disallowed --- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 13 +++++++------ opac/opac-user.pl | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt index d9417ec..636d1c0 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -92,12 +92,13 @@ $.tablesorter.addParser({ [% IF ( BORROWER_INF.lost ) %]
    • Please note: Your library card has been marked as lost or stolen. If this is an error, please contact the library.
    • [% END %] - [% IF renewal_blocked_fines %] -
    • Please note: Since you have more than [% renewal_blocked_fines %] in fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.
    • - [% END %] -
    - [% END %] - + [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %] +
  • Please note: Since you have more than [% renewal_blocked_fines %] in fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.
  • + [% ELSE %] +
  • Please note: You have more than [% renewal_blocked_fines %] in fines.
  • + [% END %] +
    + [% END %]
    • Checked Out
    • diff --git a/opac/opac-user.pl b/opac/opac-user.pl index e99e557..ac3ff1e 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -82,7 +82,7 @@ if ( 5 >= $borr->{'amountoutstanding'} && $borr->{'amountoutstanding'} > 0 ) { my $no_renewal_amt = C4::Context->preference( 'OPACFineNoRenewals' ); $no_renewal_amt ||= 0; -if ( $borr->{amountoutstanding} > $no_renewal_amt ) { +if ( $borr->{amountoutstanding} > $no_renewal_amt && C4::Context->preference("OpacRenewalAllowed")) { $borr->{'flagged'} = 1; $template->param( renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ), -- 1.7.2.5 From oleonard at myacpl.org Fri Oct 28 22:12:38 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 28 Oct 2011 16:12:38 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 7113 - Standardize vendor id name in templates and scripts Message-ID: <1319832758-11956-1-git-send-email-oleonard@myacpl.org> --- acqui/basket.pl | 8 +++--- acqui/basketheader.pl | 4 +- acqui/booksellers.pl | 14 +++++----- acqui/finishreceive.pl | 4 +- acqui/lateorders.pl | 10 ++++---- acqui/newordersuggestion.pl | 6 ++-- acqui/orderreceive.pl | 12 +++++----- acqui/parcel.pl | 18 +++++++------- acqui/parcels.pl | 10 ++++---- acqui/supplier.pl | 18 +++++++------- .../prog/en/includes/acquisitions-toolbar.inc | 24 ++++++++++---------- .../prog/en/modules/acqui/addorderiso2709.tt | 2 +- .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 4 +- .../prog/en/modules/acqui/basketgroup.tt | 8 +++--- .../prog/en/modules/acqui/basketheader.tt | 2 +- .../prog/en/modules/acqui/booksellers.tt | 8 +++--- .../prog/en/modules/acqui/histsearch.tt | 4 +- .../prog/en/modules/acqui/lateorders.tt | 4 +- .../prog/en/modules/acqui/neworderbiblio.tt | 2 +- .../prog/en/modules/acqui/neworderempty.tt | 2 +- .../prog/en/modules/acqui/newordersuggestion.tt | 6 ++-- .../prog/en/modules/acqui/orderreceive.tt | 6 ++-- .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 24 ++++++++++---------- .../intranet-tmpl/prog/en/modules/acqui/parcels.tt | 20 ++++++++-------- .../prog/en/modules/acqui/supplier.tt | 12 +++++----- .../prog/en/modules/acqui/uncertainprice.tt | 4 +- .../prog/en/modules/acqui/z3950_search.tt | 2 +- 27 files changed, 119 insertions(+), 119 deletions(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index b836280..6726230 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -52,7 +52,7 @@ basket.pl The basket number. -=item supplierid +=item booksellerid the supplier this script have to display the basket. @@ -64,7 +64,7 @@ the supplier this script have to display the basket. my $query = new CGI; my $basketno = $query->param('basketno'); -my $booksellerid = $query->param('supplierid'); +my $booksellerid = $query->param('booksellerid'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { @@ -80,7 +80,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my $basket = GetBasket($basketno); # FIXME : what about the "discount" percentage? -# FIXME : the query->param('supplierid') below is probably useless. The bookseller is always known from the basket +# FIXME : the query->param('booksellerid') below is probably useless. The bookseller is always known from the basket # if no booksellerid in parameter, get it from basket # warn "=>".$basket->{booksellerid}; $booksellerid = $basket->{booksellerid} unless $booksellerid; @@ -162,7 +162,7 @@ if ( $op eq 'delete_confirm' ) { basketgroupid => $basketgroupid } ); print $query->redirect('/cgi-bin/koha/acqui/basketgroup.pl?booksellerid='.$booksellerid.'&closed=1'); } else { - print $query->redirect('/cgi-bin/koha/acqui/booksellers.pl?supplierid=' . $booksellerid); + print $query->redirect('/cgi-bin/koha/acqui/booksellers.pl?booksellerid=' . $booksellerid); } exit; } else { diff --git a/acqui/basketheader.pl b/acqui/basketheader.pl index d204a4e..b33e4ef 100755 --- a/acqui/basketheader.pl +++ b/acqui/basketheader.pl @@ -33,9 +33,9 @@ notes to the supplier, local notes, and the contractnumber, which identifies the =over 4 -=item supplierid +=item booksellerid -C<$supplierid> is the id of the supplier we add the basket to. +C<$booksellerid> is the id of the supplier we add the basket to. =item basketid diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index 2b16fe4..2cea6c5 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -41,7 +41,7 @@ C<$supplier> is the string with which we search for a supplier =back -=item id or supplierid +=item id or booksellerid The id of the supplier whose baskets we will display @@ -74,11 +74,11 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( #parameters my $supplier = $query->param('supplier'); -my $id = $query->param('id') || $query->param('supplierid'); +my $booksellerid = $query->param('booksellerid'); my @suppliers; -if ($id) { - push @suppliers, GetBookSellerFromId($id); +if ($booksellerid) { + push @suppliers, GetBookSellerFromId($booksellerid); } else { @suppliers = GetBookSeller($supplier); } @@ -87,7 +87,7 @@ my $supplier_count = @suppliers; if ( $supplier_count == 1 ) { $template->param( supplier_name => $suppliers[0]->{'name'}, - id => $suppliers[0]->{'id'} + booksellerid => $suppliers[0]->{'booksellerid'} ); } @@ -132,7 +132,7 @@ for my $vendor (@suppliers) { push @{$loop_suppliers}, { loop_basket => $loop_basket, - supplierid => $vendor->{id}, + booksellerid => $vendor->{id}, name => $vendor->{name}, active => $vendor->{active}, }; @@ -140,7 +140,7 @@ for my $vendor (@suppliers) { } $template->param( loop_suppliers => $loop_suppliers, - supplier => ( $id || $supplier ), + supplier => ( $booksellerid || $supplier ), count => $supplier_count, ); diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl index 71b13d6..417a872 100755 --- a/acqui/finishreceive.pl +++ b/acqui/finishreceive.pl @@ -48,7 +48,7 @@ my $datereceived=$input->param('datereceived'); my $replacement=$input->param('rrp'); my $gst=$input->param('gst'); my $freight=$input->param('freight'); -my $supplierid = $input->param('supplierid'); +my $booksellerid = $input->param('booksellerid'); my $cnt=0; my $error_url_str; my $ecost = $input->param('ecost'); @@ -114,4 +114,4 @@ if ($quantityrec > $origquantityrec ) { $datereceived = ModReceiveOrder($biblionumber,$ordernumber, $quantityrec ,$user,$unitprice,$invoiceno,$freight,$replacement,undef,$datereceived); } } - print $input->redirect("/cgi-bin/koha/acqui/parcel.pl?invoice=$invoiceno&supplierid=$supplierid&freight=$freight&gst=$gst&datereceived=$datereceived$error_url_str"); + print $input->redirect("/cgi-bin/koha/acqui/parcel.pl?invoice=$invoiceno&booksellerid=$booksellerid&freight=$freight&gst=$gst&datereceived=$datereceived$error_url_str"); diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl index 810f665..330c0db 100755 --- a/acqui/lateorders.pl +++ b/acqui/lateorders.pl @@ -29,7 +29,7 @@ given on input arg. =over 4 -=item supplierid +=item booksellerid To know on which supplier this script have to display late order. =item delay @@ -64,7 +64,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({ debug => 1, }); -my $supplierid = $input->param('supplierid') || undef; # we don't want "" or 0 +my $booksellerid = $input->param('booksellerid') || undef; # we don't want "" or 0 my $delay = $input->param('delay'); my $branch = $input->param('branch'); my $op = $input->param('op'); @@ -79,14 +79,14 @@ unless ($delay =~ /^\d{1,3}$/) { my %supplierlist = GetBooksellersWithLateOrders($delay); my (@sloopy); # supplier loop foreach (keys %supplierlist){ - push @sloopy, (($supplierid and $supplierid eq $_ ) ? + push @sloopy, (($booksellerid and $booksellerid eq $_ ) ? {id=>$_, name=>$supplierlist{$_}, selected=>1} : {id=>$_, name=>$supplierlist{$_}} ) ; } $template->param(SUPPLIER_LOOP => \@sloopy); -$template->param(Supplier=>$supplierlist{$supplierid}) if ($supplierid); +$template->param(Supplier=>$supplierlist{$booksellerid}) if ($booksellerid); -my @lateorders = GetLateOrders($delay,$supplierid,$branch); +my @lateorders = GetLateOrders($delay,$booksellerid,$branch); my $total; foreach (@lateorders){ diff --git a/acqui/newordersuggestion.pl b/acqui/newordersuggestion.pl index b65e4ea..f33d012 100755 --- a/acqui/newordersuggestion.pl +++ b/acqui/newordersuggestion.pl @@ -100,7 +100,7 @@ my $input = new CGI; # getting the CGI params my $basketno = $input->param('basketno'); -my $supplierid = $input->param('booksellerid'); +my $booksellerid = $input->param('booksellerid'); my $author = $input->param('author'); my $title = $input->param('title'); my $publishercode = $input->param('publishercode'); @@ -134,11 +134,11 @@ my $suggestions_loop = title => $title, publishercode => $publishercode, STATUS => 'ACCEPTED'}); -my $vendor = GetBookSellerFromId($supplierid); +my $vendor = GetBookSellerFromId($booksellerid); $template->param( suggestions_loop => $suggestions_loop, basketno => $basketno, - supplierid => $supplierid, + booksellerid => $booksellerid, name => $vendor->{'name'}, "op_$op" => 1, ); diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index 98ba544..69f6428 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -34,7 +34,7 @@ It permit to write a new order as 'received'. =over 4 -=item supplierid +=item booksellerid to know on what supplier this script has to display receive order. @@ -79,7 +79,7 @@ use C4::Biblio; my $input = new CGI; my $dbh = C4::Context->dbh; -my $supplierid = $input->param('supplierid'); +my $booksellerid = $input->param('booksellerid'); my $ordernumber = $input->param('ordernumber'); my $search = $input->param('receive'); my $invoice = $input->param('invoice'); @@ -89,7 +89,7 @@ my $datereceived = $input->param('datereceived'); $datereceived = $datereceived ? C4::Dates->new($datereceived, 'iso') : C4::Dates->new(); -my $bookseller = GetBookSellerFromId($supplierid); +my $bookseller = GetBookSellerFromId($booksellerid); my $input_gst = ($input->param('gst') eq '' ? undef : $input->param('gst')); my $gst= $input_gst // $bookseller->{gstrate} // C4::Context->preference("gist") // 0; my $results = SearchOrder($ordernumber,$search); @@ -138,7 +138,7 @@ if ( $count == 1 ) { biblionumber => @$results[0]->{'biblionumber'}, ordernumber => @$results[0]->{'ordernumber'}, biblioitemnumber => @$results[0]->{'biblioitemnumber'}, - supplierid => @$results[0]->{'booksellerid'}, + booksellerid => @$results[0]->{'booksellerid'}, freight => $freight, gst => $gst, name => $bookseller->{'name'}, @@ -172,13 +172,13 @@ else { $line{gst} = $gst; $line{title} = @$results[$i]->{'title'}; $line{author} = @$results[$i]->{'author'}; - $line{supplierid} = $supplierid; + $line{booksellerid} = $booksellerid; push @loop, \%line; } $template->param( loop => \@loop, - supplierid => $supplierid, + booksellerid => $booksellerid, ); } my $op = $input->param('op'); diff --git a/acqui/parcel.pl b/acqui/parcel.pl index c256c60..e5e9b51 100755 --- a/acqui/parcel.pl +++ b/acqui/parcel.pl @@ -34,7 +34,7 @@ It allows to write an order as 'received' when he arrives. =over 4 -=item supplierid +=item booksellerid To know the supplier this script has to show orders. @@ -70,8 +70,8 @@ use C4::Dates qw/format_date format_date_in_iso/; use JSON; my $input=new CGI; -my $supplierid=$input->param('supplierid'); -my $bookseller=GetBookSellerFromId($supplierid); +my $booksellerid=$input->param('booksellerid'); +my $bookseller=GetBookSellerFromId($booksellerid); my $invoice=$input->param('invoice') || ''; my $freight=$input->param('freight'); @@ -101,7 +101,7 @@ if($input->param('format') eq "json"){ my @datas; my $search = $input->param('search') || ''; - my $supplier = $input->param('supplierid') || ''; + my $supplier = $input->param('booksellerid') || ''; my $basketno = $input->param('basketno') || ''; my $orderno = $input->param('orderno') || ''; @@ -154,7 +154,7 @@ if( scalar(@rcv_err) ) { } my $cfstr = "%.2f"; # currency format string -- could get this from currency table. -my @parcelitems = GetParcel($supplierid, $invoice, $datereceived->output('iso')); +my @parcelitems = GetParcel($booksellerid, $invoice, $datereceived->output('iso')); my $countlines = scalar @parcelitems; my $totalprice = 0; my $totalfreight = 0; @@ -173,7 +173,7 @@ for (my $i = 0 ; $i < $countlines ; $i++) { $line{invoice} = $invoice; $line{gst} = $gst; $line{total} = sprintf($cfstr, $total); - $line{supplierid} = $supplierid; + $line{booksellerid} = $booksellerid; push @loop_received, \%line; $totalprice += $parcelitems[$i]->{'unitprice'}; $line{unitprice} = sprintf($cfstr, $parcelitems[$i]->{'unitprice'}); @@ -189,7 +189,7 @@ for (my $i = 0 ; $i < $countlines ; $i++) { $tototal += $total; } -my $pendingorders = GetPendingOrders($supplierid); +my $pendingorders = GetPendingOrders($booksellerid); my $countpendings = scalar @$pendingorders; # pending orders totals @@ -213,7 +213,7 @@ for (my $i = 0 ; $i < $countpendings ; $i++) { $line{invoice} = $invoice; $line{gst} = $gst; $line{total} = $total; - $line{supplierid} = $supplierid; + $line{booksellerid} = $booksellerid; $ordergrandtotal += $line{ecost} * $line{quantity}; my $biblionumber = $line{'biblionumber'}; @@ -291,7 +291,7 @@ $template->param( invoicedatereceived => $datereceived->output('iso'), formatteddatereceived => $datereceived->output(), name => $bookseller->{'name'}, - supplierid => $supplierid, + booksellerid => $booksellerid, gst => $gst, freight => $freight, invoice => $invoice, diff --git a/acqui/parcels.pl b/acqui/parcels.pl index 915b1e8..173c0c8 100755 --- a/acqui/parcels.pl +++ b/acqui/parcels.pl @@ -35,7 +35,7 @@ It allows to write an order/parcels as 'received' when he arrives. =over 4 -=item supplierid +=item booksellerid To know the supplier this script has to show orders. @@ -77,7 +77,7 @@ use C4::Acquisition; use C4::Bookseller qw/ GetBookSellerFromId /; my $input = CGI->new; -my $supplierid = $input->param('supplierid'); +my $booksellerid = $input->param('booksellerid'); my $order = $input->param('orderby') || 'datereceived desc'; my $startfrom = $input->param('startfrom'); my $code = $input->param('filter'); @@ -96,8 +96,8 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); -my $bookseller = GetBookSellerFromId($supplierid); -my @parcels = GetParcels( $supplierid, $order, $code, $datefrom, $dateto ); +my $bookseller = GetBookSellerFromId($booksellerid); +my @parcels = GetParcels( $booksellerid, $order, $code, $datefrom, $dateto ); my $count_parcels = @parcels; # multi page display gestion @@ -136,7 +136,7 @@ $template->param( name => $bookseller->{'name'}, DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), datereceived_today => C4::Dates->new()->output(), - supplierid => $supplierid, + booksellerid => $booksellerid, GST => C4::Context->preference('gist'), ); diff --git a/acqui/supplier.pl b/acqui/supplier.pl index 2a4078a..cff6a28 100755 --- a/acqui/supplier.pl +++ b/acqui/supplier.pl @@ -32,7 +32,7 @@ It allows to edit & save information about this bookseller. =over 4 -=item supplierid +=item booksellerid To know the bookseller this script has to display details. @@ -53,10 +53,10 @@ use C4::Bookseller qw( GetBookSellerFromId DelBookseller ); use C4::Budgets; my $query = CGI->new; -my $id = $query->param('supplierid'); +my $booksellerid = $query->param('booksellerid'); my $supplier = {}; -if ($id) { - $supplier = GetBookSellerFromId($id); +if ($booksellerid) { + $supplier = GetBookSellerFromId($booksellerid); } my $op = $query->param('op') || 'display'; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( @@ -77,7 +77,7 @@ $tax_rate *= 100; #build array for currencies if ( $op eq 'display' ) { - my $contracts = GetContract( { booksellerid => $id } ); + my $contracts = GetContract( { booksellerid => $booksellerid } ); for ( @{$contracts} ) { $_->{contractstartdate} = format_date( $_->{contractstartdate} ); @@ -85,7 +85,7 @@ if ( $op eq 'display' ) { } $template->param( - id => $id, + booksellerid => $booksellerid, name => $supplier->{'name'}, postal => $supplier->{'postal'}, address1 => $supplier->{'address1'}, @@ -116,7 +116,7 @@ if ( $op eq 'display' ) { contracts => $contracts, ); } elsif ( $op eq 'delete' ) { - DelBookseller($id); + DelBookseller($booksellerid); print $query->redirect('/cgi-bin/koha/acqui/acqui-home.pl'); exit; } else { @@ -134,7 +134,7 @@ if ( $op eq 'display' ) { my $gstrate = defined $supplier->{gstrate} ? $supplier->{gstrate} * 100 : ''; $template->param( - id => $id, + booksellerid => $booksellerid, name => $supplier->{'name'}, postal => $supplier->{'postal'}, address1 => $supplier->{'address1'}, @@ -153,7 +153,7 @@ if ( $op eq 'display' ) { contnotes => $supplier->{'contnotes'}, notes => $supplier->{'notes'}, # set active ON by default for supplier add (id empty for add) - active => $id ? $supplier->{'active'} : 1, + active => $booksellerid ? $supplier->{'active'} : 1, gstreg => $supplier->{'gstreg'}, listincgst => $supplier->{'listincgst'}, invoiceincgst => $supplier->{'invoiceincgst'}, diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc index f81b303..37cdf7c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc @@ -22,18 +22,18 @@ var manageorders = [ [% IF ( CAN_user_acquisition_order_manage ) %] - { text: _("New basket"), url: "/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% id %]&op=add_form"}, - { text: _("Baskets"), url: "/cgi-bin/koha/acqui/booksellers.pl?supplierid=[% id %]"}, - { text: _("Basket groups"), url: "/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% id %]"}, + { text: _("New basket"), url: "/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% booksellerid %]&op=add_form"}, + { text: _("Baskets"), url: "/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]"}, + { text: _("Basket groups"), url: "/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid %]"}, [% END %] - { text: _("Receive shipments"), url: "/cgi-bin/koha/acqui/parcels.pl?supplierid=[% id %]" }, + { text: _("Receive shipments"), url: "/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid %]" }, [% IF ( basketno ) %] - { text: _("Uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% id %]&basketno=[% basketno %]&owner=1"} + { text: _("Uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&owner=1"} [% ELSE %] - { text: _("Uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% id %]&owner=1"} + { text: _("Uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1"} [% END %] ] - [% IF ( id ) %] + [% IF ( booksellerid ) %] [% IF ( basketcount ) %] new YAHOO.widget.Button({type: "menu", label: _("Manage orders"), name: "manageorders", menu: manageorders, container: "toolbar-list"}); [% END %] @@ -43,13 +43,13 @@ //]]>
        - [% IF ( id ) %] + [% IF ( booksellerid ) %] [% IF ( CAN_user_acquisition_vendors_manage ) %] -
      • Edit
      • -
      • New Contract
      • -
      • Contracts
      • +
      • Edit
      • +
      • New Contract
      • +
      • Contracts
      • [% UNLESS ( basketcount ) %] -
      • New Basket
      • +
      • New Basket
      • [% END %] [% END %] [% ELSE %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt index dd864cf..72657eb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -24,7 +24,7 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] - +
        diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 90ddacb..e430147 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -72,7 +72,7 @@ [% INCLUDE 'acquisitions-search.inc' %] - +
        @@ -148,7 +148,7 @@

        Basket deleted

        [% ELSE %] -

        [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname %] ([% basketno %]) for [% name %]

        +

        [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname %] ([% basketno %]) for [% name %]

        [% IF ( delete_confirm ) %]

        diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt index 98eb90a..2f55fc6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -132,7 +132,7 @@ function submitForm(form) { [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] - +
        @@ -152,11 +152,11 @@ function submitForm(form) { function yuiToolbar() { var booksellermenu = [ - { text: _("Vendor"), url: "/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]" }, + { text: _("Vendor"), url: "/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]" }, { text: _("Edit vendor"), url: "/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]"}, ] var ordersbutton = [ - { text: _("Manage orders"), url: "/cgi-bin/koha/acqui/booksellers.pl?supplierid=[% booksellerid %]" }, + { text: _("Manage orders"), url: "/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]" }, { text: _("Edit uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" }, ] new YAHOO.widget.Button("newbasketgroup"); @@ -180,7 +180,7 @@ function submitForm(form) { New Basket Group
        -

        Basket Grouping for [% booksellername %]

        +

        Basket Grouping for [% booksellername %]

        [% IF ( grouping ) %]
        diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt index 0228054..160c5f6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt @@ -91,7 +91,7 @@ li.list2 {
    [% IF ( CAN_user_acquisition_order_manage ) %] [% IF ( loop_supplier.active ) %] - New basket + New basket [% ELSE %] Inactive [% END %] [% END %] Receive shipment + Receive shipment [% loop_supplier.name %][% loop_supplier.name %]NO NAMENO NAME [% IF ( loop_supplier.loop_basket ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt index 9321cf9..6e8ec75 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt @@ -78,14 +78,14 @@ - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt index 1e64e1f..e24ade0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt @@ -98,8 +98,8 @@ [% IF ( ERROR_LOO.delay_digits ) %]

    The number of days ([% ERROR_LOO.bad_delay %]) must be a number between 0 and 999.

    [% END %] [% END %]
    1. days ago
    2. -
    3. - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt index 385a9b2..c888ccb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt @@ -7,7 +7,7 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] - +
      diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index 39e9ca2..63f9a55 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -110,7 +110,7 @@ $(document).ready(function() [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] - +
      diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt index f6edc63..8629e1d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt @@ -6,7 +6,7 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'suggestions-add-search.inc' %] - +
      @@ -46,9 +46,9 @@
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index 7147b19..d90f935 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -7,7 +7,7 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] - +
    @@ -80,7 +80,7 @@ - + @@ -133,7 +133,7 @@
    [% ELSE %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index 45eb591..2e46693 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -106,8 +106,8 @@ + '
    ' + '' + '').appendTo("table#pendingt"); } @@ -118,7 +118,7 @@ }catch(e){alert(e);} } } - var transaction = YAHOO.util.Connect.asyncRequest('GET', '/cgi-bin/koha/acqui/parcel.pl?supplierid=[% supplierid %]&search='+summaryStatus+'&basketno='+basketStatus+'&orderno='+orderStatus+'&format=json', callback, null); + var transaction = YAHOO.util.Connect.asyncRequest('GET', '/cgi-bin/koha/acqui/parcel.pl?booksellerid=[% booksellerid %]&search='+summaryStatus+'&basketno='+basketStatus+'&orderno='+orderStatus+'&format=json', callback, null); return false; } @@ -235,7 +235,7 @@ [% END %] - + [% END %] - +
    [% suggestions_loo.basketname %] ([% suggestions_loo.basketno %]) [% suggestions_loo.groupname %] ([% suggestions_loo.basketgroupid %]) [% IF ( suggestions_loo.invoicenumber ) %] - [% suggestions_loo.invoicenumber %] + [% suggestions_loo.invoicenumber %] [% ELSE %]   [% END %] [% suggestions_loo.title |html %]
    [% suggestions_loo.author %]
    [% suggestions_loo.isbn %]
    [% suggestions_loo.name %][% suggestions_loo.name %] [% suggestions_loo.creationdate %] [% suggestions_loo.datereceived %] [% suggestions_loo.quantity %] [% IF ( suggestions_loo.biblionumber ) %] - Order + Order [% ELSE %] - Order + Order [% END %]
    ' + order.ecost + '' + order.ordertotal + '' - + 'Receive /' - + 'Cancel' + + 'Receive /' + + 'Cancel' + '
    [% loop_order.basketno %][% loop_order.ordernumber %][% loop_order.ordernumber %] [% loop_order.title |html %] [% IF ( loop_order.author ) %] by [% loop_order.author %][% END %] @@ -247,7 +247,7 @@ [% loop_order.ecost %] [% loop_order.ordertotal %] - Receive + Receive @@ -281,17 +281,17 @@
    [% IF ( displayprev ) %] - << Previous + << Previous [% END %] [% FOREACH number IN numbers %] [% IF ( number.highlight ) %] [% number.number %] [% ELSE %] - [% number.number %] + [% number.number %] [% END %] [% END %] [% IF ( displaynext ) %] - Next >> + Next >> [% END %]
    @@ -356,7 +356,7 @@
    [% loop_receive.basketno %][% loop_receive.ordernumber %][% loop_receive.ordernumber %] [% loop_receive.title |html %] [% IF ( loop_receive.author ) %] / [% loop_receive.author %][% END %] [% IF ( loop_receive.isbn ) %] - [% loop_receive.isbn %][% END %] @@ -375,9 +375,9 @@ [% ELSE %]There are no received orders.[% END %] - -
    - + + +
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt index a7d704d..fb937f0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt @@ -7,7 +7,7 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] - + [% IF ( count ) %]
    [% ELSE %]
    [% END %] @@ -15,7 +15,7 @@
    -

    Receive shipment from vendor [% name %]

    +

    Receive shipment from vendor [% name %]

    [% IF ( count ) %]

    [% count %] shipments

    @@ -42,7 +42,7 @@ [% searchresult.number %]
    - + [% searchresult.datereceived %] @@ -64,17 +64,17 @@
    [% IF ( displayprev ) %] - << Previous + << Previous [% END %] [% FOREACH number IN numbers %] [% IF ( number.highlight ) %] [% number.number %] [% ELSE %] - [% number.number %] + [% number.number %] [% END %] [% END %] [% IF ( displaynext ) %] - Next >> + Next >> [% END %]
    @@ -86,7 +86,7 @@ Receive a new shipment
    1. - +
    2. @@ -115,7 +115,7 @@
      [% INCLUDE 'date-format.inc' %]
    -
    Cancel
    +
    Cancel
    @@ -125,7 +125,7 @@

    Filter

      -
    1. +

    2. @@ -142,7 +142,7 @@
    -
    Clear
    +
    Clear
    [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt index 001bf0d..cfd32f3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt @@ -5,7 +5,7 @@ //HomeAcquisitions › [% IF ( enter ) %][% IF ( id ) %] [% name %] › Update: [% name %][% ELSE %]Add vendor[% END %] [% ELSE %][% name %][% END %] +
    [% IF ( enter ) %] - [% IF ( id ) %] + [% IF ( booksellerid ) %]

    Update: [% name %]

    [% ELSE %]

    Add vendor

    @@ -39,7 +39,7 @@ if (f.company.value == "") { [% IF ( enter ) %]
    - +
    Company details
    1. @@ -138,8 +138,8 @@ if (f.company.value == "") {
    -
    [% IF ( id ) %] - [% ELSE %] +
    [% IF ( booksellerid ) %] + [% ELSE %] [% END %]Cancel
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt index 89ebfa8..613153c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt @@ -14,7 +14,7 @@ function check(form) { [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] - +
    @@ -22,7 +22,7 @@ function check(form) { [% IF ( validate ) %] [% ELSE %] -

    Orders with uncertain prices for vendor [% booksellername %] (edit)

    +

    Orders with uncertain prices for vendor [% booksellername %] (edit)

    Contact information

    Address: [% booksellerpostal %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt index bbcb973..a9f631c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt @@ -63,7 +63,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] -

    +
    [% IF ( opsearch ) %] -- 1.7.3 From Katrin.Fischer.83 at web.de Mon Oct 31 00:24:45 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 31 Oct 2011 00:24:45 +0100 Subject: [Koha-patches] [PATCH] Bug 7116: White space on item form for bulk ordering from staged file Message-ID: <1320017085-4266-1-git-send-email-Katrin.Fischer.83@web.de> Same fix that was done for normal order page and receive page. Moving the style element for hiding the subfield into the li tag. AcqCreateItem = on order To recreate: 1) stage a marc file with 1 - many records 2) make sure you have an acq framework with hidden fields in 952 3) create new basket 4) order from your marc file 5) check item form below the record list for white space --- .../prog/en/modules/acqui/addorderiso2709.tt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt index dd864cf..9723094 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -125,8 +125,8 @@ [% FOREACH item IN items %]
    -
      [% FOREACH iteminformatio IN item.iteminformation %]
    1. -
      +
        [% FOREACH iteminformatio IN item.iteminformation %]
      1. +
        [% iteminformatio.marc_value %] -- 1.7.5.4 From Katrin.Fischer.83 at web.de Mon Oct 31 01:09:05 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 31 Oct 2011 01:09:05 +0100 Subject: [Koha-patches] [PATCH] Bug 7117: Bug 7117 - Small display problems when organising suggestion tabs by name Message-ID: <1320019745-5111-1-git-send-email-Katrin.Fischer.83@web.de> To test: 1) Add some suggestions 2) Go to suggestions in staff 3) Choose from filters 'suggested by' or 'managed by' 4) Compare names shown on tabs with names in list of suggestions Before patch: tab name has the wrong order, while list name is correct. After patch: all names should be consistent and correct. --- suggestion/suggestion.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index d00b632..18f71b0 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -59,7 +59,7 @@ sub GetCriteriumDesc{ if ($displayby =~/suggestedby/||$displayby =~/managedby/||$displayby =~/acceptedby/){ my $borr=C4::Members::GetMember(borrowernumber=>$criteriumvalue); return "" unless $borr; - return $$borr{firstname} . ", " . $$borr{surname}; + return $$borr{surname} . ", " . $$borr{firstname}; } if ( $displayby =~ /budgetid/) { my $budget = GetBudget($criteriumvalue); -- 1.7.5.4 From Katrin.Fischer.83 at web.de Mon Oct 31 01:47:03 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 31 Oct 2011 01:47:03 +0100 Subject: [Koha-patches] [PATCH] Bug 7118: Remove 'any' from pull downs in acquisitions Message-ID: <1320022023-5596-1-git-send-email-Katrin.Fischer.83@web.de> The filters on the suggestion page show 'Any' and an empty entry for the filters 'Suggested by', 'Accepted by' and 'Managed by'. Both do the same. It should only be 'Any' or an empty entry, but not both. To test: - check 'Any' is gone, but empty entry still shows - check you can still unset filters 'managed by', 'suggested by' and 'accepted by' --- .../prog/en/modules/suggestion/suggestion.tt | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index 47ee96a..dfaad78 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -347,7 +347,7 @@ $(document).ready(function() { calcNewsuggTotal(); }); [% IF ( statusselected_REJECTED ) %] [% ELSE %][% END %]
      2. -
      3. [% FOREACH suggestedby_loo IN suggestedby_loop %][% IF ( suggestedby_loo.selected ) %][% ELSE %][% END %][% END %]
      4. [% suggesteddate %] @@ -378,7 +378,7 @@ $(document).ready(function() { calcNewsuggTotal(); });
    -
  • [% FOREACH managedby_loo IN managedby_loop %][% IF ( managedby_loo.selected ) %][% ELSE %][% END %][% END %]
  • [% manageddate %] @@ -409,7 +409,7 @@ $(document).ready(function() { calcNewsuggTotal(); });
  • -
  • [% FOREACH acceptedby_loo IN acceptedby_loop %][% IF ( acceptedby_loo.selected ) %] [% ELSE %][% END %][% END %]
  • [% accepteddate %] -- 1.7.5.4 From oleonard at myacpl.org Mon Oct 31 15:28:26 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 31 Oct 2011 10:28:26 -0400 Subject: [Koha-patches] [PATCH] Follow-up fixes for Bug 7113, Standardize vendor id name in templates and scripts Message-ID: <1320071306-13503-1-git-send-email-oleonard@myacpl.org> Fixed: - Edit vendor: redirect after saving - redirect after saving/editing/adding contract - edit vendor from toolbar - does not open edit page --- acqui/updatesupplier.pl | 8 ++++---- admin/aqcontract.pl | 4 ++-- .../prog/en/modules/acqui/basketgroup.tt | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/acqui/updatesupplier.pl b/acqui/updatesupplier.pl index 6bc978f..981b5e5 100755 --- a/acqui/updatesupplier.pl +++ b/acqui/updatesupplier.pl @@ -69,7 +69,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user( my $supplier=$input->param('supplier'); #print startpage; my %data; -$data{'id'}=$input->param('id'); +$data{'booksellerid'}=$input->param('booksellerid'); $data{'name'}=$input->param('company'); $data{'postal'}=$input->param('company_postal'); @@ -108,13 +108,13 @@ if ($gstrate eq '') { $data{'discount'}=$input->param('discount'); $data{'active'}=$input->param('status'); if($data{'name'}) { - if ($data{'id'}){ + if ($data{'booksellerid'}){ ModBookseller(\%data); } else { - $data{id}=AddBookseller(\%data); + $data{booksellerid}=AddBookseller(\%data); } #redirect to booksellers.pl -print $input->redirect("booksellers.pl?id=".$data{id}); +print $input->redirect("booksellers.pl?booksellerid=".$data{booksellerid}); } else { print $input->redirect("supplier.pl?op=enter"); # fail silently. } diff --git a/admin/aqcontract.pl b/admin/aqcontract.pl index 7126c99..9d3f0ac 100755 --- a/admin/aqcontract.pl +++ b/admin/aqcontract.pl @@ -111,7 +111,7 @@ elsif ( $op eq 'add_validate' ) { }); } - print $input->redirect("/cgi-bin/koha/acqui/supplier.pl?supplierid=$booksellerid"); + print $input->redirect("/cgi-bin/koha/acqui/supplier.pl?booksellerid=$booksellerid"); exit; # END $OP eq ADD_VALIDATE @@ -138,7 +138,7 @@ elsif ( $op eq 'delete_confirmed' ) { DelContract( { contractnumber => $contractnumber } ); - print $input->redirect("/cgi-bin/koha/acqui/supplier.pl?supplierid=$booksellerid"); + print $input->redirect("/cgi-bin/koha/acqui/supplier.pl?booksellerid=$booksellerid"); exit; # END $OP eq DELETE_CONFIRMED diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt index 2f55fc6..1ec590d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -153,7 +153,7 @@ function submitForm(form) { function yuiToolbar() { var booksellermenu = [ { text: _("Vendor"), url: "/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]" }, - { text: _("Edit vendor"), url: "/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]"}, + { text: _("Edit vendor"), url: "/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&op=enter"}, ] var ordersbutton = [ { text: _("Manage orders"), url: "/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]" }, -- 1.7.3 From oleonard at myacpl.org Mon Oct 31 16:03:23 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 31 Oct 2011 11:03:23 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 7120 - After deleting order from order receive page redirect fails Message-ID: <1320073403-16865-1-git-send-email-oleonard@myacpl.org> The order modification script doesn't retrieve an order's basket when doing a delete, so the template must explicitly pass the basket number if we want the redirect to work. --- .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index 45eb591..eb5492e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -135,17 +135,17 @@