From oleonard at myacpl.org Fri Jul 1 19:04:54 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 1 Jul 2011 13:04:54 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6543 - Column hiding on batch item edit/delete not working Message-ID: <1309539894-12224-1-git-send-email-oleonard@myacpl.org> T:T variable name problem. --- .../prog/en/modules/tools/batchMod-del.tt | 3 ++- .../prog/en/modules/tools/batchMod-edit.tt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt index 5aed1ba..af2a239 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt @@ -12,6 +12,7 @@ // Prepare array of all column headers, incrementing each index by // two to accomodate control and title columns var allColumns = new Array([% FOREACH item_header_loo IN item_header_loop %]'[% loop.count %]'[% UNLESS ( loop.last ) %],[% END %][% END %]); +console.log(allColumns); for( x=0; xShow/hide columns: [% FOREACH item_header_loo IN item_header_loop %] - + [% END %]

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt index 05fa978..67cd6e0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt @@ -12,6 +12,7 @@ // Prepare array of all column headers, incrementing each index by // two to accomodate control and title columns var allColumns = new Array([% FOREACH item_header_loo IN item_header_loop %]'[% loop.count %]'[% UNLESS ( loop.last ) %],[% END %][% END %]); +console.log(allColumns); for( x=0; xShow/hide columns: [% FOREACH item_header_loo IN item_header_loop %] - + [% END %]

-- 1.7.3 From tdavis at uttyler.edu Fri Jul 1 20:51:42 2011 From: tdavis at uttyler.edu (Elliott Davis) Date: Fri, 1 Jul 2011 13:51:42 -0500 Subject: [Koha-patches] BUG 5079 Message-ID: <8754F6E19960C249BB9C8FFECA6277400140009D84@dogbert> Patch to bug 5079 Added system preference to display shelving location of an item on opac reults. The system preference is called OpacItemLocation. I also moved the call number to a new line called Location along with the shelving location if it is enabled. To Test: run database update script to add syspref. Enable OpacItemLocation to show locations on the opac-search page. If it is working you should see the shelving location of the item before the call number. Items that are "unavailable" should also now have their call numbers listed in red. You need both patches to test -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-BUG-5079.patch Type: application/octet-stream Size: 122949 bytes Desc: 0002-BUG-5079.patch URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Added-system-preference-to-display-shelving-location.patch Type: application/octet-stream Size: 11838 bytes Desc: 0001-Added-system-preference-to-display-shelving-location.patch URL: From chrisc at catalyst.net.nz Sat Jul 2 23:11:16 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Sun, 3 Jul 2011 09:11:16 +1200 Subject: [Koha-patches] [Signed Off] [PATCH] Bug 6518 : Fixing XSS issues on opac Message-ID: <1309641076-13289-1-git-send-email-chrisc@catalyst.net.nz> --- .../prog/en/modules/opac-addbybiblionumber.tt | 2 +- .../opac-tmpl/prog/en/modules/opac-downloadcart.tt | 2 +- .../prog/en/modules/opac-downloadshelf.tt | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt | 6 +++--- .../prog/en/modules/opac-serial-issues.tt | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-addbybiblionumber.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-addbybiblionumber.tt index dab4fda..f6479f9 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-addbybiblionumber.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-addbybiblionumber.tt @@ -66,7 +66,7 @@ - [% FOREACH biblio IN biblios %] [% END %] + [% FOREACH biblio IN biblios %] [% END %]
Cancel
[% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-downloadcart.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-downloadcart.tt index 45d5de7..8d22c4d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-downloadcart.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-downloadcart.tt @@ -19,7 +19,7 @@
- +
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-downloadshelf.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-downloadshelf.tt index 608c955..b984f5d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-downloadshelf.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-downloadshelf.tt @@ -26,7 +26,7 @@ -
+
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt index 338f174..3e69614 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt @@ -11,7 +11,7 @@ [% IF ( cgi_debug ) %]alert(_('injecting OLD comment: ')+comment);[% END %] parent.opener.$('#c[% reviewid %] p').prev("small").prev("h5").html("Your Edited Comment (preview, pending approval)"); parent.opener.$('#c[% reviewid %] p').html(comment); - parent.opener.$('#c[% reviewid %] p').append(" Edit<\/a>"); + parent.opener.$('#c[% reviewid %] p').append("Edit<\/a>"); [% END %] return 1; }; @@ -21,7 +21,7 @@ parent.opener.$('#newcomment').html( "
Your Comment (preview, pending approval)<\/h5>" + "

"+comment+"<\/p>" + - "Edit<\/a><\/p>" + "Edit<\/a><\/p>" ); parent.opener.$("#addcomment").prev("p").remove(); parent.opener.$("#addcomment").remove(); @@ -66,7 +66,7 @@ [% END %]
- +

Comments on [% title |html %] [% subtitle %][% IF ( author ) %]by [% author %][% END %]
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tt index 8d6b94b..5d45b53 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tt @@ -12,9 +12,9 @@

Issues for a subscription

[% FOREACH subscription_LOO IN subscription_LOOP %] -- 1.7.4.1 From nengard at bywatersolutions.com Fri Jul 1 08:02:36 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Fri, 1 Jul 2011 02:02:36 -0400 Subject: [Koha-patches] [PATCH] Bug 6550 - update values for OpacRenewalBranch preference Message-ID: <1309500156-8900-1-git-send-email-nengard@bywatersolutions.com> Signed-off-by: Nicole C. Engard --- .../prog/en/modules/admin/preferences/opac.pref | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) 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 0d74dd1..703a830 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 @@ -304,12 +304,12 @@ OPAC: - Use - pref: OpacRenewalBranch choices: - itemhomebranch: "The Items' home branch" - patronhomebranch: "The Patrons' home branch" - checkoutbranch: "The branch the item was checked out from" + itemhomebranch: "the item's home branch" + patronhomebranch: "the patron's home branch" + checkoutbranch: "the branch the item was checked out from" null: "NULL" - opacrenew: "OPACRenew" - - as branchcode to store in the statistics table + opacrenew: "'OPACRenew'" + - as branchcode to store in the statistics table. - - Only allow patrons to renew their own books on the OPAC if they have less than - pref: OPACFineNoRenewals -- 1.7.2.3 From chrisc at catalyst.net.nz Sun Jul 3 05:59:24 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Sun, 3 Jul 2011 15:59:24 +1200 Subject: [Koha-patches] [PATCH] Bug 6550 - update values for OpacRenewalBranch preference Message-ID: <1309665564-23300-1-git-send-email-chrisc@catalyst.net.nz> From: Nicole C. Engard Signed-off-by: Nicole C. Engard Signed-off-by: Chris Cormack --- .../prog/en/modules/admin/preferences/opac.pref | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) 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 0d74dd1..703a830 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 @@ -304,12 +304,12 @@ OPAC: - Use - pref: OpacRenewalBranch choices: - itemhomebranch: "The Items' home branch" - patronhomebranch: "The Patrons' home branch" - checkoutbranch: "The branch the item was checked out from" + itemhomebranch: "the item's home branch" + patronhomebranch: "the patron's home branch" + checkoutbranch: "the branch the item was checked out from" null: "NULL" - opacrenew: "OPACRenew" - - as branchcode to store in the statistics table + opacrenew: "'OPACRenew'" + - as branchcode to store in the statistics table. - - Only allow patrons to renew their own books on the OPAC if they have less than - pref: OPACFineNoRenewals -- 1.7.4.1 From chrisc at catalyst.net.nz Sun Jul 3 06:00:50 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Sun, 3 Jul 2011 16:00:50 +1200 Subject: [Koha-patches] [PATCH] Bug 6527 - Table striping not working on cataloguing search Message-ID: <1309665650-23464-1-git-send-email-chrisc@catalyst.net.nz> From: Liz Rea Resolves TT issue causing the results list in cataloguing search (addbooks.pl) to not be striped. To test: More -> Cataloging do a search Without patch: results will not alternate striping as originally intended. With patch: Results will be alternating white/grey. Signed-off-by: Chris Cormack --- .../prog/en/modules/cataloguing/addbooks.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt index f5e3712..a5e2a96 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt @@ -41,7 +41,7 @@ [% IF ( CAN_user_editcatalogue_edit_items ) %]
[% END %] [% FOREACH resultsloo IN resultsloop %] - [% IF ( resultsloo.even ) %] + [% IF ( loop.even ) %] [% ELSE %] -- 1.7.4.1 From chrisc at catalyst.net.nz Sun Jul 3 06:04:14 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Sun, 3 Jul 2011 16:04:14 +1200 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_bug_6538_update_letter=2Epl_?= =?utf-8?q?help_file?= Message-ID: <1309665854-23648-1-git-send-email-chrisc@catalyst.net.nz> From: Nicole C. Engard Signed-off-by: Nicole C. Engard Signed-off-by: Chris Cormack --- .../prog/en/modules/help/tools/letter.tt | 131 +++++++++++++++----- 1 files changed, 100 insertions(+), 31 deletions(-) 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 693c8e0..85f731b 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,35 +1,104 @@ [% INCLUDE 'help-top.inc' %]

Notices

+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 -

Notices are messages sent to patrons, vendors and staff to notify them at key times.

-

Add a new notice

-
    -
  • Click 'New Notice'
  • -
  • Choose a 'Koha Module' to associate your notice with from the dropdown box
  • -
  • Enter a 'Code' abbreviation for your new notice (for example: 'ODUE' for Overdue Notice)
  • -
  • Enter a 'Name' for your new notice (for example 'Overdue Notice')
  • -
  • Enter a 'Message Subject' (for example 'Item Overdue')
  • -
  • Design your 'Message Body'
  • -
-
    -
  • -
      -
    • Choose a field from the scroll down menu on the left side -
        -
      • - -TIP: For help with what each field is, see the Notices: Database Fields section of this manual
      • -
    • -
    • Click the '>>' button to insert that field into your text message where you'd like it to appear in the notice.
    • -
    • Continue adding 'field's and clicking '>>' to insert them into the notice until your message is completed.
    • -
    • Then, click 'Submit'
    • -
  • -
  • - -IMPORTANT: Currently, Koha can not reference multiple biblios in a single notice (in other words--in the example below-- there is not just ONE email sent that describes ALL currently overdue items, but an email sent for EACH overdue item)
  • -

- How do I schedule overdue notices?

To schedule overdue notices, you must use Koha's 'Notice/Status Trigger' tool.
-
    -
  • Get there: More > Tools > Overdue notice/status triggers
  • -
[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +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. +

Adding Notices

+
    +
  • To add a new notice +
      +
    • Click 'New Notice'
    • +
    • Choose the module this notice is related to
    • +
    • The Code is limited to 20 characters
    • +
    • Use the name field to expand on your Code
    • +
    • Message Subject is what will appear in the subject line of the email
    • +
    • 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. +
        +
      • 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
      • +
      • Important: Only the overdue notices take advantage of the <item></item> tags, all other notices referencing items need to use <<items.content>>
      • +
      +
    • +
    +
  • +
+

Notice Markup

+When creating your overdue notices there are two tags in addition to the various database fields that you can use in your notices. +

Important: These new tags only work on the overdue notices, not other circulation related notices at this time.

+ +
    +
  • <item></item> which should enclose all fields from the biblio, biblioitems, and items tables.
  • +
  • <fine></fine> which should be enclosed by the item tag and should enclose a currency identifier per ISO 4217. If this tag is present with a proper identifier, the fine for that item will be displayed in the proper currency format. +
      +
    • Note: ISO 4217 changes from time to time therefore all currencies may not be supported. If you find one that is not supported, please file a bug with the Locale::Currency::Format author Tan D Nguyen <tnguyen at cpan doe org>.
    • +
    +
  • +
+An example of using these two tags in a notice template might be like: +
The following item(s) is/are currently overdue:
+
+   <item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <fine>GBP</fine></item>
+Which, assuming two items were overdue, would result in a notice like: +
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
+

Existing Notices

+Among the default notices are notices for several common actions within Koha, here are some of what those notices do +
    +
  • ACCTDETAILS +
      +
    • Sent to patrons when their account is set up if the AutoEmailOPACUser preference is set to 'Send'
    • +
    +
  • +
  • ACQCLAIM (Acquisition Claim) +
      +
    • Used in the claim acquisition module
    • +
    • Get there: More > Acquisitions > Late issues
    • +
    +
  • +
  • HOLD (Hold Available for Pickup) +
      +
    • This notice is used if two criteria are met: +
        +
      • The EnhancedMessagingPreferences is set to 'Allow'
      • +
      • The patron has requested to receive this notice +
          +
        • Get there: OPAC > Login > my messaging
        • +
        • Get there: Staff Client > Patron Record > Messaging
        • +
        +
      • +
      +
    • +
    +
  • +
  • HOLDPLACED (a notice to the library staff that a hold has been placed) +
      +
    • This notice requires the emailLibrarianWhenHoldIsPlaced system preference to be set to 'Enable'
    • +
    +
  • +
  • HOLD_PRINT (Printed notice when hold available for pickup) +
      +
    • This notice is used for hold confirmation notices that are sent out in print format. This will not effect what the email notice looks like.
    • +
    +
  • +
  • ODUE (Overdue Notice) +
      +
    • This notice is used to send Overdue Notices to Patrons
    • +
    • See a Sample Overdue Notice
    • +
    • Requires that you set Overdue Notice/Status Triggers
    • +
    +
  • +
  • RLIST (Routing List) +
      +
    • Used in the serials module to notify patrons/staff of new issues of a serial +
        +
      • Get there: More > Serials > New Subscription
      • +
      +
    • +
    • You have the option to select the 'Routing List' notice when creating a new subscription (Choose from the 'Patron notification' drop down).
    • +
    • 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
    • +
    +
  • +
+[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file -- 1.7.4.1 From nengard at bywatersolutions.com Tue Jul 5 20:55:52 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Tue, 5 Jul 2011 14:55:52 -0400 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] Bug 6513 - make the routing list search work properly, and faster too. Message-ID: <1309892152-3292-1-git-send-email-nengard@bywatersolutions.com> From: Robin Sheat Signed-off-by: Nicole C. Engard --- C4/Members.pm | 71 ++++++++++++- .../prog/en/modules/serials/member-search.tt | 7 +- serials/member-search.pl | 111 ++++++++----------- 3 files changed, 119 insertions(+), 70 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 4eb9979..9da5d71 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -124,6 +124,10 @@ BEGIN { &fixup_cardnumber &checkcardnumber ); + + push @EXPORT_OK, qw( + FindByPartialName + ); } =head1 NAME @@ -285,10 +289,14 @@ C<&search_on_fields> is an array ref to the fieldnames you want to limit search C<&searchtype> is a string telling the type of search you want todo : start_with, exact or contains are allowed +C is a boolean that tells us to avoid searching the +extended attributes even if we otherwise would. + =cut sub Search { - my ( $filter, $orderby, $limit, $columns_out, $search_on_fields, $searchtype ) = @_; + my ( $filter, $orderby, $limit, $columns_out, $search_on_fields, + $searchtype, $skipExtendedAttributes ) = @_; my @filters; my %filtersmatching_record; my @finalfilter; @@ -297,7 +305,8 @@ sub Search { } else { push @filters, $filter; } - if ( C4::Context->preference('ExtendedPatronAttributes') ) { + if (!$skipExtendedAttributes && + C4::Context->preference('ExtendedPatronAttributes') ) { my $matching_records = C4::Members::Attributes::SearchIdMatchingAttribute($filter); if(scalar(@$matching_records)>0) { foreach my $matching_record (@$matching_records) { @@ -314,6 +323,64 @@ sub Search { return ($data); } +=head2 FindByPartialName + + @result = FindByPartialName('string', categorycode => 'C', branchcode => 'L' ); + +This is a simplified version of the "Search" function above. It compares what +has been entered against the surname, firstname, othernames, and email as +a prefix, a literal match against the barcode, and allows filtering by the +user's library and category. + +=head3 RETURNS + +An array of hashrefs that contain the values from the borrowers table of things +that match. + +=head3 NOTES + +Supplying all fields as blank or C will return all users. Searches that +have no result will end up in an empty list. If you get undef, there was +an error of some sort. + +=cut + +sub FindByPartialName { + my ($prefix, %options) = @_; + + my $qry_start = 'SELECT * FROM borrowers'; + my ($qry_end, @params); + if ($prefix) { + $qry_end .= <dbh; + my $sth = $dbh->prepare($query); + eval { $sth->execute(@params) }; + if ($@) { + warn $@; + return undef; + } + my $result = $sth->fetchall_arrayref( {} ); + return @$result; +} + =head2 GetMemberDetails ($borrower) = &GetMemberDetails($borrowernumber, $cardnumber); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt index 91172be..67e3614 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt @@ -24,10 +24,9 @@ function add_member(subscriptionid,borrowernumber){
- Filter : + Filter:
    -
  1. -
  2. +
 
diff --git a/serials/member-search.pl b/serials/member-search.pl index f027df5..60b19e3 100755 --- a/serials/member-search.pl +++ b/serials/member-search.pl @@ -28,7 +28,7 @@ use warnings; use CGI; use C4::Auth; # get_template_and_user use C4::Output; -use C4::Members; # BornameSearch +use C4::Members qw/ FindByPartialName /; use C4::Branch; use C4::Category; use File::Basename; @@ -38,19 +38,17 @@ my $theme = $cgi->param('theme') || "default"; my $resultsperpage = $cgi->param('resultsperpage')||C4::Context->preference("PatronsPerPage")||20; my $startfrom = $cgi->param('startfrom')||1; -my $patron = $cgi->Vars; -foreach (keys %$patron){ - delete $$patron{$_} unless($$patron{$_}); -} +my $member=$cgi->param('member'); +my $branchcode = $cgi->param('branchcode'); +my $categorycode = $cgi->param('categorycode'); my @categories=C4::Category->all; -my $branches=(defined $$patron{branchcode}?GetBranchesLoop($$patron{branchcode}):GetBranchesLoop()); -my $subscriptionid = $cgi->param('subscriptionid'); -my $searchstring = $cgi->param('member'); +my @branches=@{ GetBranchesLoop( + $branchcode || undef +) }; -my %categories_dislay; -my ($template, $loggedinuser, $cookie); - ($template, $loggedinuser, $cookie) +my %categories_display; +my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "serials/member-search.tmpl", query => $cgi, type => "intranet", @@ -63,84 +61,69 @@ foreach my $category (@categories){ category_description=>$$category{description}, category_type=>$$category{category_type} }; - $categories_dislay{$$category{categorycode}} = $hash; + $categories_display{$$category{categorycode}} = $hash; } -$template->param( - "AddPatronLists_".C4::Context->preference("AddPatronLists")=> "1", - ); if (C4::Context->preference("AddPatronLists")=~/code/){ $categories[0]->{'first'}=1; } -my $member=$cgi->param('member'); -my $orderby=$cgi->param('orderby'); -$orderby = "surname,firstname" unless $orderby; -if (defined $member) { - $member =~ s/,//g; #remove any commas from search string - $member =~ s/\*/%/g; -} -my ($count,$results); +my ($count, at results) = (0); + +my $shouldsearch = $branchcode || $categorycode || $member; if (C4::Context->preference("IndependantBranches")){ if (C4::Context->userenv && C4::Context->userenv->{flags} % 2 !=1 && C4::Context->userenv->{'branch'}){ - $$patron{branchcode}=C4::Context->userenv->{'branch'} unless (C4::Context->userenv->{'branch'} eq "insecure"); + $branchcode = C4::Context->userenv->{'branch'} unless (C4::Context->userenv->{'branch'} eq "insecure"); } } -$$patron{firstname}.="\%" if ($$patron{firstname}); -$$patron{surname}.="\%" if ($$patron{surname}); -my @searchpatron; -push @searchpatron, $member if ($member); -push @searchpatron, $patron if ( keys %$patron ); + my $from = ( $startfrom - 1 ) * $resultsperpage; my $to = $from + $resultsperpage; -if (@searchpatron) { - ($results) = Search( - \@searchpatron, - [ { surname => 0 }, { firstname => 0 } ], - undef, - undef, - [ "firstname", "surname", "email", "othernames", "cardnumber" ], - "start_with" +if ($shouldsearch) { + @results = FindByPartialName( + $member, + categorycode => $categorycode, + branchcode => $branchcode, ); } -if ($results) { - $count = scalar(@$results); +if (@results) { + $count = @results; } my @resultsdata; $to=($count>$to?$to:$count); my $index=$from; -foreach my $borrower(@$results[$from..$to-1]){ +foreach my $borrower (@results[$from..$to-1]){ # find out stats - $borrower->{'dateexpiry'}= C4::Dates->new($borrower->{'dateexpiry'},'iso')->output('syspref'); - if ($categories_dislay{$borrower->{'categorycode'}}){ + if ($categories_display{$borrower->{'categorycode'}}){ my %row = ( - count => $index++, - %$borrower, - %{$categories_dislay{$$borrower{categorycode}}}, - ); - push(@resultsdata, \%row); - } - else { - warn $borrower->{'cardnumber'} ." has a bad category code of " . $borrower->{'categorycode'} ."\n"; + count => $index++, + %$borrower, + %{$categories_display{$$borrower{categorycode}}}, + ); + push(@resultsdata, \%row); + } else { + warn $borrower->{'cardnumber'} ." has a bad category code of " . $borrower->{'categorycode'} ."\n"; } } -if ($$patron{branchcode}){ - foreach my $branch (grep{$_->{value} eq $$patron{branchcode}}@$branches){ +if ($branchcode){ + foreach my $branch (grep {$_->{value} eq $branchcode} @branches){ $$branch{selected}=1; } } -if ($$patron{categorycode}){ - foreach my $category (grep{$_->{categorycode} eq $$patron{categorycode}}@categories){ +if ($categorycode){ + foreach my $category (grep {$_->{categorycode} eq $categorycode} @categories){ $$category{selected}=1; } } -my %parameters= -( %{$patron}, - 'orderby' => $orderby, - 'resultsperpage' => $resultsperpage, - 'type'=> 'intranet'); +my %parameters=( + member => $member, + categorycode => $categorycode, + branchcode => $branchcode, + resultsperpage => $resultsperpage, + type => 'intranet' +); my $base_url = 'member-search.pl?&' . join( @@ -158,18 +141,18 @@ $template->param( to => $to, multipage => ($count != $to+1 || $startfrom!=1), ); + $template->param( - branchloop=>$branches, + branchloop=>\@branches, categoryloop=>\@categories, ); - $template->param( - searching => "1", + searching => $shouldsearch, actionname => basename($0), - %$patron, + %parameters, numresults => $count, resultsloop => \@resultsdata, - ); +); output_html_with_http_headers $cgi, $cookie, $template->output; -- 1.7.2.3 From nengard at bywatersolutions.com Tue Jul 5 20:56:10 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Tue, 5 Jul 2011 14:56:10 -0400 Subject: [Koha-patches] [PATCH 2/2] [SIGNED-OFF] Bug 6513 - ensure the subscription ID gets carried across Message-ID: <1309892170-3326-1-git-send-email-nengard@bywatersolutions.com> From: Robin Sheat Signed-off-by: Nicole C. Engard --- .../prog/en/modules/serials/member-search.tt | 2 +- serials/member-search.pl | 2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt index 67e3614..ddb8445 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt @@ -63,7 +63,7 @@ function add_member(subscriptionid,borrowernumber){ - + [% END %]
[% resultsloo.cardnumber %] [% resultsloo.surname %], [% resultsloo.firstname %] [% resultsloo.branchcode %] Add
Add
diff --git a/serials/member-search.pl b/serials/member-search.pl index 60b19e3..7f12277 100755 --- a/serials/member-search.pl +++ b/serials/member-search.pl @@ -41,6 +41,7 @@ my $startfrom = $cgi->param('startfrom')||1; my $member=$cgi->param('member'); my $branchcode = $cgi->param('branchcode'); my $categorycode = $cgi->param('categorycode'); +my $subscriptionid = $cgi->param('subscriptionid'); my @categories=C4::Category->all; my @branches=@{ GetBranchesLoop( @@ -122,6 +123,7 @@ my %parameters=( categorycode => $categorycode, branchcode => $branchcode, resultsperpage => $resultsperpage, + subscriptionid => $subscriptionid, type => 'intranet' ); my $base_url = -- 1.7.2.3 From nengard at bywatersolutions.com Tue Jul 5 21:25:06 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Tue, 5 Jul 2011 15:25:06 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6305: receiving serials does not create items Message-ID: <1309893906-3517-1-git-send-email-nengard@bywatersolutions.com> From: Ian Walls Template::Toolkit variable scope issue. Signed-off-by: Nicole C. Engard --- .../prog/en/modules/serials/serials-edit.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt index 8ffd32e..f0a55d4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt @@ -291,7 +291,7 @@ $(document).ready(function() { [% iteminformatio.marc_value %] - + -- 1.7.2.3 From sjohnson at hpplnj.org Wed Jul 6 12:00:16 2011 From: sjohnson at hpplnj.org (sjohnson at hpplnj.org) Date: Wed, 6 Jul 2011 06:00:16 -0400 Subject: [Koha-patches] Out of office Message-ID: <742f2dfdcdea49e1a21e5bcb2d93edcf@32d63f1b716748b9b7a1560e5790ed45> I will be out of the office beginning Friday July 1st and will return on Wednesday July 20th, If you need assistance please call the Highland Park Public Library at 732-572-2750. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nengard at bywatersolutions.com Wed Jul 6 06:21:00 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 6 Jul 2011 00:21:00 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6030 Allow html content in letters Message-ID: <1309926060-5423-1-git-send-email-nengard@bywatersolutions.com> From: Chris Cormack Squashed commit of the following: commit 8368e5de723ec7607402be341975014c8b7b0ea9 Author: Henri-Damien LAURENT Date: Tue Sep 21 14:41:07 2010 +0200 Bug 6030 : overdue_notices :Removing warning Two extra warnings were issued when using html commit 5984fc92772af68c51f7f5b5450fd5b27d5b6d37 Author: Henri-Damien LAURENT Date: Tue Sep 21 12:27:29 2010 +0200 Bug 6030 : Letters can be html in overdu_notices.pl Signed-off-by: Nicole C. Engard --- misc/cronjobs/overdue_notices.pl | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index bc97ecb..fecee9c 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -480,7 +480,12 @@ END_SQL $verbose and warn "STH2 PARAMS: borrowernumber = $borrowernumber, mindays = $mindays, maxdays = $maxdays"; $sth2->execute(@params); my $itemcount = 0; - my $titles = ""; + my $titles; + if ($htmlfilename) { + $titles = ""; + $titles .= ""; + } my @items = (); my $i = 0; @@ -508,9 +513,10 @@ END_SQL } } ); - - if ( $exceededPrintNoticesMaxLines ) { - $letter->{'content'} .= "List too long for form; please check your account online for a complete list of your overdue items."; + $letter->{'content-type'}="text/".($htmlfilename?"html":"plain"); + + if ($exceededPrintNoticesMaxLines) { + $letter->{'content'} .= "List too long for form; please check your account online for a complete list of your overdue items."; } my @misses = grep { /./ } map { /^([^>]*)[>]+/; ( $1 || '' ); } split /\{'content'}; -- 1.7.2.3 From nengard at bywatersolutions.com Wed Jul 6 06:25:20 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 6 Jul 2011 00:25:20 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug #6068 - New feature: capability to blanking subfields in BatchMod Message-ID: <1309926320-5542-1-git-send-email-nengard@bywatersolutions.com> From: Alex Arnaud Signed-off-by: Nicole C. Engard --- .../prog/en/modules/tools/batchMod-edit.tt | 23 +++++++++ tools/batchMod.pl | 51 +++++++++++++++---- 2 files changed, 63 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt index 67cd6e0..540b141 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt @@ -16,6 +16,27 @@ console.log(allColumns); for( x=0; x @@ -118,6 +139,7 @@ for( x=0; x

Edit Items

+
Checking the box right next the subfield label will disable the entry and delete the values of that subfield on all selected items
    [% FOREACH ite IN item %] @@ -127,6 +149,7 @@ for( x=0; x[% END %] + [% ite.marc_value %] diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 4910dbd..9d4431b 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -89,13 +89,16 @@ if ($op eq "action") { my @tags = $input->param('tag'); my @subfields = $input->param('subfield'); my @values = $input->param('field_value'); + my @disabled = $input->param('disable_input'); # build indicator hash. my @ind_tag = $input->param('ind_tag'); my @indicator = $input->param('indicator'); # Is there something to modify ? # TODO : We shall use this var to warn the user in case no modification was done to the items - my $something_to_modify = scalar(grep {!/^$/} @values); + my $values_to_modify = scalar(grep {!/^$/} @values); + my $values_to_blank = scalar(@disabled); + my $marcitem; # Once the job is done if ($completedJobID) { @@ -114,8 +117,8 @@ if ($op eq "action") { # Calling the template add_saved_job_results_to_template($template, $completedJobID); - # While the job is getting done } else { + # While the job is getting done # Job size is the number of items we have to process my $job_size = scalar(@itemnumbers); @@ -128,6 +131,24 @@ if ($op eq "action") { $callback = progress_callback($job, $dbh); } + #initializing values for updates + my ( $itemtagfield, $itemtagsubfield) = &GetMarcFromKohaField("items.itemnumber", ""); + if ($values_to_modify){ + my $xml = TransformHtmlToXml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag, 'ITEM'); + $marcitem = MARC::Record::new_from_xml($xml, 'UTF-8'); + } + if ($values_to_blank){ + foreach my $disabledsubf (@disabled){ + if ($marcitem && $marcitem->field($itemtagfield)){ + $marcitem->field($itemtagfield)->update( $disabledsubf => "" ); + } + else { + $marcitem = MARC::Record->new(); + $marcitem->append_fields( MARC::Field->new( $itemtagfield, '', '', $disabledsubf => "" ) ); + } + } + } + # For each item my $i = 1; foreach my $itemnumber(@itemnumbers){ @@ -140,16 +161,19 @@ 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)}; + if ($values_to_modify || $values_to_blank) { + my $localmarcitem = Item2Marc($itemdata); + UpdateMarcWith( $marcitem, $localmarcitem ); + eval{ my ( $oldbiblionumber, $oldbibnum, $oldbibitemnum ) = ModItemFromMarc( $localmarcitem, $itemdata->{biblionumber}, $itemnumber ) }; } } $i++; @@ -505,7 +529,12 @@ sub UpdateMarcWith { my @fields_to=$marcto->field($itemtag); foreach my $subfield ($fieldfrom->subfields()){ foreach my $field_to_update (@fields_to){ - $field_to_update->update($$subfield[0]=>$$subfield[1]) if ($$subfield[1] != '' or $$subfield[1] == '0'); + if ($subfield->[1]){ + $field_to_update->update($subfield->[0]=>$subfield->[1]); + } + else { + $field_to_update->delete_subfield(code=> $subfield->[0]); + } } } #warn "TO edited:",$marcto->as_formatted; -- 1.7.2.3 From nengard at bywatersolutions.com Wed Jul 6 06:35:34 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 6 Jul 2011 00:35:34 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6291, Cart printing truncated in Firefox Message-ID: <1309926934-5815-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard Implementing 100% width and height on
" . join( "", @$columns_def_hashref{@item_content_fields} ); + $titles .= "
, [% FOREACH to_branch_loo IN codes_loo.to_branch_loop %] - [% UNLESS ( loop.odd ) %][% END %] + [% UNLESS ( loop.odd ) %][% ELSE %][% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt index d4443f0..bc2490f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt @@ -33,8 +33,7 @@ [% FOREACH issue IN issues %] - [% UNLESS ( loop.odd ) %][% END %] + [% UNLESS ( loop.odd ) %][% ELSE %][% END %] - [% IF ( volinfo ) %] [% FOREACH issue IN issues %] - [% UNLESS ( loop.odd ) %][% ELSE %][% END %] + [% UNLESS ( loop.odd ) %][% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt index 2383599..6c2f69a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt @@ -38,9 +38,9 @@
  • Holds awaiting pickup
  • Hold ratios
  • Transfers to receive
  • - [% IF ( CAN_user_reports_execute_reports ) %]
  • Overdues +
  • Overdues - Warning: This report is very resource intensive on - systems with large numbers of overdue items.
  • [% END %] + systems with large numbers of overdue items.
  • Overdues with fines - Limited to your library. See report help for other details.
  • 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 cb03d89..afa6ec5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -207,7 +207,7 @@ function refocus(calendar) { @@ -554,7 +554,7 @@ No patron matched [% message %] [% IF ( expired ) %]
  • Expiration: Patron's card has expired. - [% IF ( expiry ) %]Patron's card expired on [% expiry %][% END %] Renew or Edit Details + Patron's card expired on [% expiry %] Renew or Edit Details
  • [% END %] 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 c511b1c..9f4ec8d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt @@ -118,7 +118,7 @@ + ([% IF ( overdueloo.phone ) %][% overdueloo.phone %][% ELSIF ( overdueloo.mobile ) %][% overdueloo.mobile %][% ELSIF ( overdueloo.phonepro ) %][% overdueloo.phonepro %][% END %]) @@ -137,11 +137,12 @@

    Filter On:

    -
    Date due:
      -
    1. - +
    2. Date due: + + -
    3. -
    4. - - + + +
    5. -
    -
    1. - +
    2. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index c02be49..620f770 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -396,7 +396,7 @@ function Dopop(link) { [% IF ( riloop ) %]

      Checked-In items

    , and as suggested by this post: http://www.piglets.org/serendipity/archives/45-Fixing-truncated-printing-with-Firefox.html Signed-off-by: Nicole C. Engard --- koha-tmpl/intranet-tmpl/prog/en/css/print.css | 9 +++++++-- koha-tmpl/opac-tmpl/prog/en/css/print.css | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/print.css b/koha-tmpl/intranet-tmpl/prog/en/css/print.css index 955b68b..d2ad905 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/print.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/print.css @@ -17,7 +17,7 @@ body { background-color : #FFF; color : #333333; font-family : arial, geneva, sans-serif; - font-size : 14px; + font-size : 12px; margin : 0px 0px 0px 0px; } @@ -94,7 +94,8 @@ table { border-left : 1px solid #CCCCCC; margin : 3px 0px 5px 0px; padding : 0px; - width : 99%; + width : 100%; + height : 100%; } table.list { @@ -114,6 +115,8 @@ td { border-left : 0; font-size : 12px; padding : 5px 5px 5px 5px; + width : 100%; + height : 100%; } td:last-child { @@ -124,6 +127,8 @@ td:last-child { border-left : 0; font-size : 12px; padding : 5px 5px 5px 5px; + width : 100%; + height : 100%; } table.list th { diff --git a/koha-tmpl/opac-tmpl/prog/en/css/print.css b/koha-tmpl/opac-tmpl/prog/en/css/print.css index 85df351..53db2bc 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/print.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/print.css @@ -17,7 +17,7 @@ body { background-color : #FFF; color : #333333; font-family : arial, geneva, sans-serif; - font-size : 14px; + font-size : 12px; margin : 0px 0px 0px 0px; } @@ -98,7 +98,8 @@ table { border-left : 0px solid #CCCCCC; margin : 3px 0px 5px 0px; padding : 0px; - width : 99%; + width : 100%; + height : 100%; } td { @@ -107,6 +108,8 @@ td { border-right : 1px solid #CCCCCC; padding : 5px 5px 5px 5px; vertical-align : top; + width : 100%; + height : 100%; } td:last-child { @@ -123,6 +126,8 @@ th { border-right : 1px solid #CCCCCC; font-weight : bold; padding : 5px 5px 5px 5px; + width: 100%; + height : 100%; } th:last-child { -- 1.7.2.3 From nengard at bywatersolutions.com Wed Jul 6 07:48:28 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 6 Jul 2011 01:48:28 -0400 Subject: [Koha-patches] [PATCH] bug 6558 correct description for IntranetNav Message-ID: <1309931308-6062-1-git-send-email-nengard@bywatersolutions.com> IntranetNav says the HTML will appear in the More menu, but it appears to the left of the More menu. This patch fixes the preference description. Signed-off-by: Nicole C. Engard --- .../en/modules/admin/preferences/staff_client.pref | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 abde94a..df0a434 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 @@ -36,7 +36,7 @@ Staff Client: type: textarea class: code - - - "Show the following HTML in the More menu at the top of each page on the staff client (should be a list of links or blank):" + - "Show the following HTML to the left of the More menu at the top of each page on the staff client (should be a list of links or blank):" - pref: IntranetNav type: textarea class: code -- 1.7.2.3 From colin.campbell at ptfs-europe.com Thu Jul 7 11:14:46 2011 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Thu, 7 Jul 2011 10:14:46 +0100 Subject: [Koha-patches] [PATCH] Bug 3638 Self Check Should Capture Hold Items Message-ID: <1310030087-14557-1-git-send-email-colin.campbell@ptfs-europe.com> Shelf Check was receiving messages saying item was wanted for a hold but the item was discharged to the shelf not associated with the hold or transited to the pickup location. The message was also being sent on discharge of items when a suitable item had already been captured. Checkin now associates the item with the hold and sets the appropriate data for a correct checkin response --- C4/SIP/ILS/Item.pm | 30 +++++++++++++++++++++--------- C4/SIP/ILS/Transaction/Checkin.pm | 16 ++++++++++++++-- C4/SIP/Sip/MsgType.pm | 9 +-------- 3 files changed, 36 insertions(+), 19 deletions(-) diff --git a/C4/SIP/ILS/Item.pm b/C4/SIP/ILS/Item.pm index b05476c..1e900bd 100644 --- a/C4/SIP/ILS/Item.pm +++ b/C4/SIP/ILS/Item.pm @@ -153,15 +153,22 @@ sub next_hold { } # hold_patron_id is NOT the barcode. It's the borrowernumber. -# That's because the reserving patron may not have a barcode, or may be from an different system entirely (ILL)! +# If a return triggers capture for a hold the borrowernumber is passed +# and saved so that other hold info can be retrieved sub hold_patron_id { - my $self = shift or return; - my $hold = $self->next_hold() or return; - return $hold->{borrowernumber}; + my $self = shift; + my $id = shift; + if ($id) { + $self->{hold}->{borrowernumber} = $id; + } + if ($self->{hold} ) { + return $self->{hold}->{borrowernumber}; + } + return; + } sub hold_patron_name { my $self = shift or return; - # return $self->{hold_patron_name} if $self->{hold_patron_name}; TODO: consider caching my $borrowernumber = (@_ ? shift: $self->hold_patron_id()) or return; my $holder = GetMember(borrowernumber=>$borrowernumber); unless ($holder) { @@ -175,7 +182,6 @@ sub hold_patron_name { "" ; # neither populated, empty string my $name = $holder->{firstname} ? $holder->{firstname} . ' ' : ''; $name .= $holder->{surname} . $extra; - # $self->{hold_patron_name} = $name; # TODO: consider caching return $name; } @@ -192,9 +198,15 @@ sub hold_patron_bcode { } sub destination_loc { - my $self = shift or return; - my $hold = $self->next_hold(); - return ($hold ? $hold->{branchcode} : ''); + my $self = shift; + my $set_loc = shift; + if ($set_loc) { + $self->{dest_loc} = $set_loc; + } + if ($self->{dest_loc} ) { + return $self->{dest_loc}; + } + return q{}; } our $AUTOLOAD; diff --git a/C4/SIP/ILS/Transaction/Checkin.pm b/C4/SIP/ILS/Transaction/Checkin.pm index d3a4700..a705f57 100644 --- a/C4/SIP/ILS/Transaction/Checkin.pm +++ b/C4/SIP/ILS/Transaction/Checkin.pm @@ -13,6 +13,7 @@ use ILS; use ILS::Transaction; use C4::Circulation; +use C4::Reserves qw( ModReserveAffect ); use C4::Debug; our @ISA = qw(ILS::Transaction); @@ -75,8 +76,19 @@ sub do_checkin { } if ($messages->{ResFound}) { $self->hold($messages->{ResFound}); - $debug and warn "Item returned at $branch reserved at $messages->{ResFound}->{branchcode}"; - $self->alert_type(($branch eq $messages->{ResFound}->{branchcode}) ? '01' : '02'); + if ($branch eq $messages->{ResFound}->{branchcode}) { + $self->alert_type('01'); + ModReserveAffect( $messages->{ResFound}->{itemnumber}, + $messages->{ResFound}->{borrowernumber}, 0); + + } else { + $self->alert_type('02'); + ModReserveAffect( $messages->{ResFound}->{itemnumber}, + $messages->{ResFound}->{borrowernumber}, 1); + + } + $self->{item}->hold_patron_id( $messages->{ResFound}->{borrowernumber} ); + $self->{item}->destination_loc( $messages->{ResFound}->{branchcode} ); } $self->alert(1) if defined $self->alert_type; # alert_type could be "00", hypothetically $self->ok($return); diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm index 508a06b..bdfd9a0 100644 --- a/C4/SIP/Sip/MsgType.pm +++ b/C4/SIP/Sip/MsgType.pm @@ -647,14 +647,7 @@ sub handle_checkin { # apparently we can't trust the returns from Checkin yet (because C4::Circulation::AddReturn is faulty) # So we reproduce the alert logic here. if (not $status->alert) { - if ($item->hold_patron_id) { - $status->alert(1); - if ($item->destination_loc and $item->destination_loc ne $current_loc) { - $status->alert_type('02'); # hold at other library - } else { - $status->alert_type('01'); # hold at this library - } - } elsif ($item->destination_loc and $item->destination_loc ne $current_loc) { + if ($item->destination_loc and $item->destination_loc ne $current_loc) { $status->alert(1); $status->alert_type('04'); # no hold, just send it } -- 1.7.6 From sjohnson at hpplnj.org Thu Jul 7 12:00:31 2011 From: sjohnson at hpplnj.org (sjohnson at hpplnj.org) Date: Thu, 7 Jul 2011 06:00:31 -0400 Subject: [Koha-patches] Out of office Message-ID: <017efc9e00d14880acdc48663fdfb4e9@a6264bd3cf9245ee88429d46fc043e0e> I will be out of the office beginning Friday July 1st and will return on Wednesday July 20th, If you need assistance please call the Highland Park Public Library at 732-572-2750. -------------- next part -------------- An HTML attachment was scrubbed... URL: From colin.campbell at ptfs-europe.com Thu Jul 7 13:40:53 2011 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Thu, 7 Jul 2011 12:40:53 +0100 Subject: [Koha-patches] [PATCH] Bug 6562: Silence runtime error in reserve/request.pl Message-ID: <1310038853-15590-1-git-send-email-colin.campbell@ptfs-europe.com> Not defining action just causes logging of noisy runtime warnings. --- reserve/request.pl | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/reserve/request.pl b/reserve/request.pl index 79ff6b5..0c952b4 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -93,6 +93,7 @@ my $messages; my $date = C4::Dates->today('iso'); my $action = $input->param('action'); +$action ||= q{}; if ( $action eq 'move' ) { my $where = $input->param('where'); -- 1.7.6 From oleonard at myacpl.org Thu Jul 7 16:04:52 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 7 Jul 2011 10:04:52 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6531 - clicking print button in opac causes 404 error Message-ID: <1310047492-16520-1-git-send-email-oleonard@myacpl.org> opac-detail and opac-ISBDdetail both use window.print(), so I've added that to opac-MARCdetail as well. I've also eliminated the "javascript:" pseudo-protocol because it's pointless. I'd prefer to have a real link for non-js users but that will have to wait for another bug. After applying this patch users with JS enabled should get a print prompt after clicking the "Print" link on opac-MARCdetail.pl --- .../opac-tmpl/prog/en/modules/opac-ISBDdetail.tt | 2 +- .../opac-tmpl/prog/en/modules/opac-MARCdetail.tt | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt index 35fffc8..f9984a7 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt @@ -62,7 +62,7 @@ [% END %] [% END %] [% END %] -
  • Print
  • +
  • Print
  • [% IF ( virtualshelves ) %] [% IF ( opacuserlogin ) %] [% IF ( loggedinusername ) %]
  • diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt index 68b0148..284154e 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt @@ -217,7 +217,7 @@ $(document).ready(function(){ [% END %] [% END %] [% END %] -
  • +
  • Print
  • [% IF ( virtualshelves ) %] 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 4866ba0..991d016 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -814,7 +814,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% END %] [% END %] [% END %] -
  • Print
  • +
  • Print
  • [% IF ( virtualshelves ) %] [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %]
  • -- 1.7.3 From tomascohen at gmail.com Thu Jul 7 19:31:49 2011 From: tomascohen at gmail.com (Tomas Cohen Arazi) Date: Thu, 7 Jul 2011 14:31:49 -0300 Subject: [Koha-patches] [PATCH] Bug 6299 - Provide a list of authorized values for Relator terms Message-ID: <1310059909-26274-1-git-send-email-tomascohen@gmail.com> That's it. I was not sure about fr-FR, please let me know if it is not correct so I fix it. This version changes the category name so it fits in the 10 chars limit the field has. Regards To+ Bug 6299 - Provide a list of authorized values for relator terms This version of the patch fixes the name of the list. --- .../mysql/de-DE/optional/marc21_relatorterms.sql | 227 ++++++++++++++++++++ .../mysql/de-DE/optional/marc21_relatorterms.txt | 1 + .../data/mysql/en/optional/marc21_relatorterms.sql | 227 ++++++++++++++++++++ .../data/mysql/en/optional/marc21_relatorterms.txt | 1 + .../mysql/fr-FR/2-Optionel/marc21_relatorterms.sql | 227 ++++++++++++++++++++ .../mysql/fr-FR/2-Optionel/marc21_relatorterms.txt | 1 + .../nb-NO/2-Valgfritt/marc21_relatorterms.sql | 227 ++++++++++++++++++++ .../nb-NO/2-Valgfritt/marc21_relatorterms.txt | 1 + .../mysql/pl-PL/optional/marc21_relatorterms.sql | 227 ++++++++++++++++++++ .../mysql/pl-PL/optional/marc21_relatorterms.txt | 1 + .../mysql/ru-RU/optional/marc21_relatorterms.sql | 227 ++++++++++++++++++++ .../mysql/ru-RU/optional/marc21_relatorterms.txt | 1 + .../mysql/uk-UA/optional/marc21_relatorterms.sql | 227 ++++++++++++++++++++ .../mysql/uk-UA/optional/marc21_relatorterms.txt | 1 + 14 files changed, 1596 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..101fbe8 --- /dev/null +++ b/installer/data/mysql/de-DE/optional/marc21_relatorterms.sql @@ -0,0 +1,227 @@ +-- 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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','app','Applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aqt','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arc','Architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ard','Artistic'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','att','Attributed'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','auc','Auctioneer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aud','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aui','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aus','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aut','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bdd','Binding'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bjd','Bookjacket'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkd','Book'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkp','Book'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','blw','Blurb'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bnd','Binder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bpd','Bookplate'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cov','Cover'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpc','Copyright'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cst','Costume'); +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'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dte','Dedicatee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtm','Data'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dto','Dedicator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dub','Dubious'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','flm','Film'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fmo','Former'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fpy','First'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','-grt','Graphic'); +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'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfp','Manufacture'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfr','Manufacturer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mdc','Metadata'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','msd','Musical'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbl','Publisher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pdr','Project'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pmn','Production'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pop','Printer'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prd','Production'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prt','Printer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pta','Patent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pte','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptf','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pth','Patent'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rbr','Rubricator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rce','Recording'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rtm','Research'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sad','Scientific'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','srv','Surveyor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','std','Set'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stl','Storyteller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stm','Stage'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stn','Standards'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','str','Stereotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tcd','Technical'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tch','Teacher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ths','Thesis'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyg','Typographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','uvp','University'); +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'); +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..101fbe8 --- /dev/null +++ b/installer/data/mysql/en/optional/marc21_relatorterms.sql @@ -0,0 +1,227 @@ +-- 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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','app','Applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aqt','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arc','Architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ard','Artistic'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','att','Attributed'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','auc','Auctioneer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aud','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aui','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aus','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aut','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bdd','Binding'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bjd','Bookjacket'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkd','Book'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkp','Book'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','blw','Blurb'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bnd','Binder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bpd','Bookplate'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cov','Cover'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpc','Copyright'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cst','Costume'); +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'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dte','Dedicatee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtm','Data'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dto','Dedicator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dub','Dubious'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','flm','Film'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fmo','Former'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fpy','First'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','-grt','Graphic'); +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'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfp','Manufacture'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfr','Manufacturer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mdc','Metadata'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','msd','Musical'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbl','Publisher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pdr','Project'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pmn','Production'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pop','Printer'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prd','Production'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prt','Printer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pta','Patent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pte','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptf','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pth','Patent'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rbr','Rubricator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rce','Recording'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rtm','Research'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sad','Scientific'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','srv','Surveyor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','std','Set'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stl','Storyteller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stm','Stage'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stn','Standards'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','str','Stereotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tcd','Technical'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tch','Teacher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ths','Thesis'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyg','Typographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','uvp','University'); +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'); +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..101fbe8 --- /dev/null +++ b/installer/data/mysql/fr-FR/2-Optionel/marc21_relatorterms.sql @@ -0,0 +1,227 @@ +-- 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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','app','Applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aqt','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arc','Architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ard','Artistic'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','att','Attributed'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','auc','Auctioneer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aud','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aui','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aus','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aut','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bdd','Binding'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bjd','Bookjacket'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkd','Book'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkp','Book'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','blw','Blurb'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bnd','Binder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bpd','Bookplate'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cov','Cover'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpc','Copyright'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cst','Costume'); +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'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dte','Dedicatee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtm','Data'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dto','Dedicator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dub','Dubious'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','flm','Film'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fmo','Former'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fpy','First'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','-grt','Graphic'); +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'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfp','Manufacture'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfr','Manufacturer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mdc','Metadata'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','msd','Musical'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbl','Publisher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pdr','Project'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pmn','Production'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pop','Printer'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prd','Production'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prt','Printer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pta','Patent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pte','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptf','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pth','Patent'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rbr','Rubricator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rce','Recording'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rtm','Research'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sad','Scientific'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','srv','Surveyor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','std','Set'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stl','Storyteller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stm','Stage'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stn','Standards'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','str','Stereotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tcd','Technical'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tch','Teacher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ths','Thesis'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyg','Typographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','uvp','University'); +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'); +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..101fbe8 --- /dev/null +++ b/installer/data/mysql/nb-NO/2-Valgfritt/marc21_relatorterms.sql @@ -0,0 +1,227 @@ +-- 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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','app','Applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aqt','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arc','Architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ard','Artistic'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','att','Attributed'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','auc','Auctioneer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aud','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aui','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aus','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aut','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bdd','Binding'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bjd','Bookjacket'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkd','Book'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkp','Book'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','blw','Blurb'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bnd','Binder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bpd','Bookplate'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cov','Cover'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpc','Copyright'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cst','Costume'); +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'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dte','Dedicatee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtm','Data'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dto','Dedicator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dub','Dubious'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','flm','Film'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fmo','Former'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fpy','First'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','-grt','Graphic'); +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'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfp','Manufacture'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfr','Manufacturer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mdc','Metadata'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','msd','Musical'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbl','Publisher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pdr','Project'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pmn','Production'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pop','Printer'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prd','Production'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prt','Printer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pta','Patent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pte','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptf','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pth','Patent'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rbr','Rubricator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rce','Recording'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rtm','Research'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sad','Scientific'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','srv','Surveyor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','std','Set'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stl','Storyteller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stm','Stage'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stn','Standards'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','str','Stereotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tcd','Technical'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tch','Teacher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ths','Thesis'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyg','Typographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','uvp','University'); +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'); +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..101fbe8 --- /dev/null +++ b/installer/data/mysql/pl-PL/optional/marc21_relatorterms.sql @@ -0,0 +1,227 @@ +-- 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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','app','Applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aqt','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arc','Architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ard','Artistic'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','att','Attributed'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','auc','Auctioneer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aud','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aui','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aus','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aut','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bdd','Binding'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bjd','Bookjacket'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkd','Book'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkp','Book'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','blw','Blurb'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bnd','Binder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bpd','Bookplate'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cov','Cover'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpc','Copyright'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cst','Costume'); +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'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dte','Dedicatee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtm','Data'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dto','Dedicator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dub','Dubious'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','flm','Film'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fmo','Former'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fpy','First'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','-grt','Graphic'); +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'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfp','Manufacture'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfr','Manufacturer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mdc','Metadata'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','msd','Musical'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbl','Publisher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pdr','Project'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pmn','Production'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pop','Printer'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prd','Production'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prt','Printer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pta','Patent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pte','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptf','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pth','Patent'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rbr','Rubricator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rce','Recording'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rtm','Research'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sad','Scientific'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','srv','Surveyor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','std','Set'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stl','Storyteller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stm','Stage'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stn','Standards'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','str','Stereotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tcd','Technical'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tch','Teacher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ths','Thesis'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyg','Typographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','uvp','University'); +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'); +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..101fbe8 --- /dev/null +++ b/installer/data/mysql/ru-RU/optional/marc21_relatorterms.sql @@ -0,0 +1,227 @@ +-- 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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','app','Applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aqt','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arc','Architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ard','Artistic'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','att','Attributed'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','auc','Auctioneer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aud','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aui','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aus','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aut','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bdd','Binding'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bjd','Bookjacket'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkd','Book'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkp','Book'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','blw','Blurb'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bnd','Binder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bpd','Bookplate'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cov','Cover'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpc','Copyright'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cst','Costume'); +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'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dte','Dedicatee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtm','Data'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dto','Dedicator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dub','Dubious'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','flm','Film'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fmo','Former'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fpy','First'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','-grt','Graphic'); +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'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfp','Manufacture'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfr','Manufacturer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mdc','Metadata'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','msd','Musical'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbl','Publisher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pdr','Project'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pmn','Production'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pop','Printer'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prd','Production'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prt','Printer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pta','Patent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pte','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptf','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pth','Patent'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rbr','Rubricator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rce','Recording'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rtm','Research'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sad','Scientific'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','srv','Surveyor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','std','Set'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stl','Storyteller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stm','Stage'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stn','Standards'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','str','Stereotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tcd','Technical'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tch','Teacher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ths','Thesis'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyg','Typographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','uvp','University'); +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'); +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..101fbe8 --- /dev/null +++ b/installer/data/mysql/uk-UA/optional/marc21_relatorterms.sql @@ -0,0 +1,227 @@ +-- 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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','app','Applicant'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aqt','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','arc','Architect'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ard','Artistic'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','att','Attributed'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','auc','Auctioneer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aud','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aui','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aus','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','aut','Author'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bdd','Binding'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bjd','Bookjacket'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkd','Book'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bkp','Book'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','blw','Blurb'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bnd','Binder'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','bpd','Bookplate'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cov','Cover'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cpc','Copyright'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','cst','Costume'); +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'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dte','Dedicatee'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dtm','Data'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dto','Dedicator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','dub','Dubious'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','flm','Film'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fmo','Former'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','fpy','First'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','-grt','Graphic'); +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'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfp','Manufacture'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mfr','Manufacturer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','mdc','Metadata'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','msd','Musical'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pbl','Publisher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pdr','Project'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pmn','Production'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pop','Printer'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prd','Production'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','prt','Printer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pta','Patent'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pte','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ptf','Plaintiff'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','pth','Patent'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rbr','Rubricator'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rce','Recording'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','rtm','Research'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','sad','Scientific'); +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'); +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'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','srv','Surveyor'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','std','Set'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stl','Storyteller'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stm','Stage'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','stn','Standards'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','str','Stereotyper'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tcd','Technical'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tch','Teacher'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','ths','Thesis'); +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'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','tyg','Typographer'); +INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RELTERMS','uvp','University'); +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'); +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 oleonard at myacpl.org Thu Jul 7 20:58:55 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 7 Jul 2011 14:58:55 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6534 - Duplicate opac renew buttons at the top of the checkouts list Message-ID: <1310065135-18248-1-git-send-email-oleonard@myacpl.org> This patch uses JS to add two links to the top of the checkouts table: renew selected and renew all. Clicking each one submits the respective form. Also added is a small validation routine to warn the user if they try to "renew selected" without having checked any boxes. --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 21 ++++++++++++++ koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 33 ++++++++++++++++++---- koha-tmpl/opac-tmpl/prog/images/check.png | Bin 0 -> 210 bytes koha-tmpl/opac-tmpl/prog/images/checks.png | Bin 0 -> 223 bytes opac/opac-user.pl | 8 ++++- 5 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 koha-tmpl/opac-tmpl/prog/images/check.png create mode 100644 koha-tmpl/opac-tmpl/prog/images/checks.png diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index b8a531f..335e091 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -2018,3 +2018,24 @@ div.ft { #opac-isbddetail #isbdcontents { margin-top: 2em; } div.bibmessage { background-color : #ffffb0; border-radius : 5px; padding : 3px; margin : 2px; } + +#renewcontrols { + float: right; + font-size: 66%; +} + +#renewcontrols a { + background-position : 3px center; + background-repeat : no-repeat; + text-decoration:none; + padding : .1em .4em; + padding-left : 18px; +} + +#renewselected_link { + background-image : url(../../images/check.png); +} + +#renewall_link { + background-image : url(../../images/checks.png); +} \ No newline at end of file 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 58c6fa5..d98d4a2 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -5,7 +5,7 @@ [% END %] [% INCLUDE 'doc-head-close.inc' %] - @@ -192,7 +211,7 @@ $.tablesorter.addParser({ [% END %]
    [% IF ( issues_count ) %] - + @@ -254,7 +273,7 @@ $.tablesorter.addParser({ [% END %] [% IF ( OpacRenewalAllowed ) %] [% UNLESS ( ISSUE.patron_flagged ) %] - @@ -269,14 +288,15 @@ $.tablesorter.addParser({ [% END %]
    [% IF ( ISSUE.status ) %]Renew ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining) + [% IF ( ISSUE.status ) %] Renew ([% 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 %]
    - + [% IF ( canrenew ) %] [% IF ( OpacRenewalAllowed ) %] [% END %] + [% END %] [% IF ( OpacRenewalAllowed ) %] - -
    + [% IF ( canrenew ) %] + [% FOREACH ISSUE IN ISSUES %] @@ -285,6 +305,7 @@ $.tablesorter.addParser({ [% UNLESS ( patron_flagged ) %][% END %]
    [% END %] + [% END %] [% ELSE %] diff --git a/koha-tmpl/opac-tmpl/prog/images/check.png b/koha-tmpl/opac-tmpl/prog/images/check.png new file mode 100644 index 0000000000000000000000000000000000000000..249805717f1de5b22c8c1f6a7e2ea415da552ea2 GIT binary patch literal 210 zcmeAS at N?(olHy`uVBq!ia0vp^oFL4>3?#4ne^UZdEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=?1^9%xns;yg|Nno0&Gg4W5vGzL zzu^B2Pq!O*0eLQ-E{-7;w~`WC7#kRp8ZI+1vZNXs7%;I2Fe@|9ICy|Vz=0=0Prw)` yFoVfZf|03%QHhm>f$<2#b$*~!!Dj|09tLg}2HUjyoo9gNF?hQAxvXoWax8 K&t;ucLK6U at T|m_U literal 0 HcmV?d00001 diff --git a/opac/opac-user.pl b/opac/opac-user.pl index a2f7d9b..3f0d6c4 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -112,6 +112,7 @@ 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 @@ -140,7 +141,10 @@ if ($issues){ # check if item is renewable my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} ); ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'}); - $issue->{'status'} = $status && C4::Context->preference("OpacRenewalAllowed"); + 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'; @@ -179,7 +183,7 @@ if ($issues){ } $template->param( ISSUES => \@issuedat ); $template->param( issues_count => $count ); - +$template->param( canrenew => $canrenew ); $template->param( OVERDUES => \@overdues ); $template->param( overdues_count => $overdues_count ); -- 1.7.3 From chrisc at catalyst.net.nz Thu Jul 7 23:06:06 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 8 Jul 2011 09:06:06 +1200 Subject: [Koha-patches] [PATCH] Bug 2809 : Rebased and Reformatted for master, please test thoroughly Message-ID: <1310072766-24721-1-git-send-email-chrisc@catalyst.net.nz> --- C4/Search.pm | 42 +++++++++++++++++++++++------------------- 1 files changed, 23 insertions(+), 19 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index c3cff65..9a66c9c 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1147,15 +1147,15 @@ sub buildQuery { # Date of Publication if ( $index eq 'yr' ) { $index .= ",st-numeric"; - $indexes_set++; - $stemming = $auto_truncation = $weight_fields = $fuzzy_enabled = $remove_stopwords = 0; +# $indexes_set++; + $stemming = $auto_truncation = $weight_fields = $fuzzy_enabled = $remove_stopwords = 0; } # Date of Acquisition elsif ( $index eq 'acqdate' ) { $index .= ",st-date-normalized"; - $indexes_set++; - $stemming = $auto_truncation = $weight_fields = $fuzzy_enabled = $remove_stopwords = 0; +# $indexes_set++; + $stemming = $auto_truncation = $weight_fields = $fuzzy_enabled = $remove_stopwords = 0; } # ISBN,ISSN,Standard Number, don't need special treatment elsif ( $index eq 'nb' || $index eq 'ns' ) { @@ -1336,21 +1336,25 @@ sub buildQuery { # Regular old limits else { - $limit .= " and " if $limit || $query; - $limit .= "$this_limit"; - $limit_cgi .= "&limit=$this_limit"; - if ($this_limit =~ /^branch:(.+)/) { - my $branchcode = $1; - my $branchname = GetBranchName($branchcode); - if (defined $branchname) { - $limit_desc .= " branch:$branchname"; - } else { - $limit_desc .= " $this_limit"; - } - } else { - $limit_desc .= " $this_limit"; - } - } + if ($this_limit){ + $limit .= " and " if $limit || $query; + $limit .= "$this_limit"; + $limit_cgi .= "&limit=$this_limit"; + if ($this_limit =~ /^branch:(.+)/) { + my $branchcode = $1; + my $branchname = GetBranchName($branchcode); + if (defined $branchname) { + $limit_desc .= " branch:$branchname"; + } + else { + $limit_desc .= " $this_limit"; + } + } + else { + $limit_desc .= " $this_limit"; + } + } + } } if ($group_OR_limits) { $limit .= " and " if ( $query || $limit ); -- 1.7.4.1 From chrisc at catalyst.net.nz Thu Jul 7 23:45:10 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 8 Jul 2011 09:45:10 +1200 Subject: [Koha-patches] [PATCH] Bug 3624 : XHTML validation, rebased for Template Toolkit Message-ID: <1310075110-26793-1-git-send-email-chrisc@catalyst.net.nz> --- .../prog/en/modules/acqui/basketgroup.tt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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 ba12d7b..0c792ed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -222,14 +222,14 @@ function submitForm(form) {

    or

    -- 1.7.4.1 From chrisc at catalyst.net.nz Fri Jul 8 00:04:42 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 8 Jul 2011 10:04:42 +1200 Subject: [Koha-patches] [PATCH] Bug 5009 : Turning off autocomplete Message-ID: <1310076282-27746-1-git-send-email-chrisc@catalyst.net.nz> Files affected koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt --- .../intranet-tmpl/prog/en/includes/cat-search.inc | 4 ++-- .../intranet-tmpl/prog/en/includes/circ-search.inc | 2 +- .../prog/en/includes/patron-search.inc | 2 +- .../prog/en/modules/circ/circulation.tt | 6 +++--- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc index a74e2fd..379cc56 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc @@ -48,7 +48,7 @@ YAHOO.util.Event.onContentReady("header_search", function() { [% IF ( CAN_user_circulate ) %]
    You have nothing checked out
    @@ -254,7 +273,7 @@ $.tablesorter.addParser({ [% END %] [% IF ( OpacRenewalAllowed ) %] [% UNLESS ( ISSUE.patron_flagged ) %] - @@ -269,14 +288,15 @@ $.tablesorter.addParser({ [% END %]
    [% IF ( ISSUE.status ) %]Renew ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining) + [% IF ( ISSUE.status ) %] Renew ([% 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 %]
    - + [% IF ( canrenew ) %] [% IF ( OpacRenewalAllowed ) %] [% END %] + [% END %] [% IF ( OpacRenewalAllowed ) %] - -
    + [% IF ( canrenew ) %] + [% FOREACH ISSUE IN ISSUES %] @@ -285,6 +305,7 @@ $.tablesorter.addParser({ [% UNLESS ( patron_flagged ) %][% END %]
    [% END %] + [% END %] [% ELSE %] diff --git a/koha-tmpl/opac-tmpl/prog/images/check.png b/koha-tmpl/opac-tmpl/prog/images/check.png new file mode 100644 index 0000000000000000000000000000000000000000..249805717f1de5b22c8c1f6a7e2ea415da552ea2 GIT binary patch literal 210 zcmeAS at N?(olHy`uVBq!ia0vp^oFL4>3?#4ne^UZdEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=?1^9%xns;yg|Nno0&Gg4W5vGzL zzu^B2Pq!O*0eLQ-E{-7;w~`WC7#kRp8ZI+1vZNXs7%;I2Fe@|9ICy|Vz=0=0Prw)` yFoVfZf|03%QHhm>f$<2#b$*~!!Dj|09tLg}2HUjyoo9gNF?hQAxvXoWax8 K&t;ucLK6U at T|m_U literal 0 HcmV?d00001 diff --git a/opac/opac-user.pl b/opac/opac-user.pl index a2f7d9b..3f0d6c4 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -112,6 +112,7 @@ 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 @@ -140,7 +141,10 @@ if ($issues){ # check if item is renewable my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} ); ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'}); - $issue->{'status'} = $status && C4::Context->preference("OpacRenewalAllowed"); + 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'; @@ -179,7 +183,7 @@ if ($issues){ } $template->param( ISSUES => \@issuedat ); $template->param( issues_count => $count ); - +$template->param( canrenew => $canrenew ); $template->param( OVERDUES => \@overdues ); $template->param( overdues_count => $overdues_count ); -- 1.7.0.4 From jonathan.druart at biblibre.com Fri Jul 8 10:45:07 2011 From: jonathan.druart at biblibre.com (Jonathan Druart) Date: Fri, 8 Jul 2011 10:45:07 +0200 Subject: [Koha-patches] [PATCH] [PATCH] Bug 6080: total is wrong in acqui-home.pl Message-ID: <1310114707-14794-1-git-send-email-jonathan.druart@biblibre.com> In Acqui-home, with hierarchic bugdets, it's a non sense to do total & sub-totals: we're adding budgets more than once. For example : Books 1000 fictions books 500 NF books 500 result in a total of 2000 ! This patch removes the total BibLibre MT5446 --- acqui/acqui-home.pl | 16 ---------------- .../prog/en/modules/acqui/acqui-home.tt | 11 ----------- 2 files changed, 0 insertions(+), 27 deletions(-) diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index 0d9c207..74d504e 100755 --- a/acqui/acqui-home.pl +++ b/acqui/acqui-home.pl @@ -82,12 +82,6 @@ my $budget_arr = GetBudgetHierarchy( '', $user->{branchcode}, $template->{param_map}->{'USER_INFO'}[0]->{'borrowernumber'} ); -my $total = 0; -my $totspent = 0; -my $totordered = 0; -my $totcomtd = 0; -my $totavail = 0; - my $total_active = 0; my $totspent_active = 0; my $totordered_active = 0; @@ -121,11 +115,6 @@ foreach my $budget ( @{$budget_arr} ) { $budget->{'budget_avail'} = $budget->{'budget_amount'} - ( $budget->{'budget_spent'} + $budget->{'budget_ordered'} ); - $total += $budget->{'budget_amount'}; - $totspent += $budget->{'budget_spent'}; - $totordered += $budget->{'budget_ordered'}; - $totavail += $budget->{'budget_avail'}; - if ($budget->{budget_period_active}){ $total_active += $budget->{'budget_amount'}; $totspent_active += $budget->{'budget_spent'}; @@ -142,11 +131,6 @@ $template->param( type => 'intranet', loop_budget => $budget_arr, branchname => $branchname, - total => $num_formatter->format_price($total), - totspent => $num_formatter->format_price($totspent), - totordered => $num_formatter->format_price($totordered), - totcomtd => $num_formatter->format_price($totcomtd), - totavail => $num_formatter->format_price($totavail), total_active => $num_formatter->format_price($total_active), totspent_active => $num_formatter->format_price($totspent_active), totordered_active => $num_formatter->format_price($totordered_active), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt index a274365..87343bf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -99,17 +99,6 @@ $(document).ready(function() { - - - - - - - - - - - [% FOREACH loop_budge IN loop_budget %] [% IF ( loop_budge.budget_period_active ) %] -- 1.7.1 From julian.maurice at biblibre.com Fri Jul 8 10:59:23 2011 From: julian.maurice at biblibre.com (Julian Maurice) Date: Fri, 8 Jul 2011 10:59:23 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Corrects the popup menu links in the z3950 search results. Message-ID: <1310115563-6768-1-git-send-email-julian.maurice@biblibre.com> From: Fr?d?rick Capovilla The popup menu's options didn't link to the correct breedingid. Signed-off-by: Julian Maurice --- .../prog/en/modules/acqui/z3950_search.tmpl | 5 +++-- .../prog/en/modules/cataloguing/z3950_search.tmpl | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl index 2219dfa..452c1f8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl @@ -38,6 +38,9 @@ $.tablesorter.addParser({ var $tgt = $(event.target); $(".linktools").hide(); $("tr").removeClass("selected"); + var row = $(this).parent(); + row.addClass("selected"); + if($tgt.is("a")||$tgt.is(":nth-child(5)")||$tgt.is(":nth-child(6)")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")){ return true; } else { @@ -46,8 +49,6 @@ $.tablesorter.addParser({ var left = position.left+5; $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); } - var row = $(this).parent(); - row.addClass("selected"); }); }); //]]> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl index d4b292f..b669d22 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl @@ -42,6 +42,9 @@ $(document).ready(function(){ var $tgt = $(event.target); $(".linktools").hide(); $("tr").removeClass("selected"); + var row = $(this).parent(); + row.addClass("selected"); + if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){ return true; } else { @@ -50,8 +53,6 @@ $(document).ready(function(){ var left = position.left+5; $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); } - var row = $(this).parent(); - row.addClass("selected"); }); $("form[name='f']").submit(function(){ if ($('input[type=checkbox]').filter(':checked').length == 0) { -- 1.7.5.4 From stephane.delaune at biblibre.com Fri Jul 8 11:13:56 2011 From: stephane.delaune at biblibre.com (=?UTF-8?q?St=C3=A9phane=20Delaune?=) Date: Fri, 8 Jul 2011 11:13:56 +0200 Subject: [Koha-patches] [PATCH][SIGNED-OFF] Bug 5871 : opac CSS new classes Message-ID: <1310116436-15960-1-git-send-email-stephane.delaune@biblibre.com> From: Paul Poulain Some new classes for OPAC css Signed-off-by: St?phane Delaune --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 35 ++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index b8a531f..0aefa86 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -2000,6 +2000,41 @@ div.ft { .searchresults .commentline.yours { background-color : rgb(239, 254, 213); background-color : rgba(239, 254, 213, 0.4); + +select.advsearch { + margin-left:5em; +} +select.advsearchoperator { + position:absolute; +} + +.authorSearch { + position: absolute; + display: none; + z-index: 2; + background-color: white; + border: 1px solid black; + padding: 4px; +} +.authorSearch li { + list-style-type: none; +} +.authorSearch ul { + padding-left: 0px; +} +.subjectSearch { + position: absolute; + display: none; + z-index: 2; + background-color: white; + border: 1px solid black; + padding: 4px; +} +.subjectSearch li { + list-style-type: none; +} +.subjectSearch ul { + padding-left: 0px; } #plainmarc table { border: 0; margin: .7em 0 0 0; font-family: monospace; font-size: 95%; } -- 1.7.0.4 From jonathan.druart at biblibre.com Fri Jul 8 11:14:30 2011 From: jonathan.druart at biblibre.com (Jonathan Druart) Date: Fri, 8 Jul 2011 11:14:30 +0200 Subject: [Koha-patches] [PATCH] [PATCH] BZ7076: acqui pdf error when marcxml wrong Message-ID: <1310116470-15641-1-git-send-email-jonathan.druart@biblibre.com> when marcxml is wrong the PDF is not generated. There is a Perl error because the biblio can't be retrieved. This can be workarounded with a eval when decoding the marc --- acqui/basketgroup.pl | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 457b616..0211c24 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -226,10 +226,13 @@ sub printbasketgrouppdf{ push(@ba_orders, \@ba_order); # Editor Number my $en; - if (C4::Context->preference("marcflavour") eq 'UNIMARC') { - $en = MARC::Record::new_from_xml($ord->{marcxml},'UTF-8')->subfield('345',"b"); - } elsif (C4::Context->preference("marcflavour") eq 'MARC21') { - $en = MARC::Record::new_from_xml($ord->{marcxml},'UTF-8')->subfield('037',"a"); + my $marcrecord=eval{MARC::Record::new_from_xml( $ord->{marcxml},'UTF-8' )}; + if ($marcrecord){ + if ( C4::Context->preference("marcflavour") eq 'UNIMARC' ) { + $en = $marcrecord->subfield( '345', "b" ); + } elsif ( C4::Context->preference("marcflavour") eq 'MARC21' ) { + $en = $marcrecord->subfield( '037', "a" ); + } } if($en){ push(@ba_order, $en); -- 1.7.1 From julian.maurice at biblibre.com Fri Jul 8 11:33:10 2011 From: julian.maurice at biblibre.com (Julian Maurice) Date: Fri, 8 Jul 2011 11:33:10 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6474 Barcode not incrementing properly in format HBYYMMINCR if HB contains - Message-ID: <1310117590-7551-1-git-send-email-julian.maurice@biblibre.com> From: Sophie Meynieux Adding - to regexp for matching branch code. Wondering if other characters should not be added too. Signed-off-by: Julian Maurice --- cataloguing/value_builder/barcode.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cataloguing/value_builder/barcode.pl b/cataloguing/value_builder/barcode.pl index c05ec48..c5e1fd3 100755 --- a/cataloguing/value_builder/barcode.pl +++ b/cataloguing/value_builder/barcode.pl @@ -102,7 +102,7 @@ sub plugin_javascript { $year = substr($year, -2); $query = "SELECT MAX(CAST(SUBSTRING(barcode,-4) AS signed)) AS number FROM items WHERE barcode REGEXP ?"; my $sth = $dbh->prepare($query); - $sth->execute("^[a-zA-Z]{1,}$year"); + $sth->execute("^[-a-zA-Z]{1,}$year"); while (my ($count)= $sth->fetchrow_array) { $nextnum = $count if $count; $nextnum = 0 if $nextnum == 9999; # this sequence only allows for cataloging 10000 books per month -- 1.7.5.4 From stephane.delaune at biblibre.com Fri Jul 8 11:55:46 2011 From: stephane.delaune at biblibre.com (=?UTF-8?q?St=C3=A9phane=20Delaune?=) Date: Fri, 8 Jul 2011 11:55:46 +0200 Subject: [Koha-patches] [PATCH 1/2][NEEDS SIGNOFF] Bug #6142 - Delete sub CanBookBeReserved Message-ID: <1310118947-23931-1-git-send-email-stephane.delaune@biblibre.com> From: Alex Arnaud Signed-off-by: St?phane Delaune --- C4/ILSDI/Utility.pm | 49 ------------------------------------------------- 1 files changed, 0 insertions(+), 49 deletions(-) diff --git a/C4/ILSDI/Utility.pm b/C4/ILSDI/Utility.pm index 8ee1224..274a266 100644 --- a/C4/ILSDI/Utility.pm +++ b/C4/ILSDI/Utility.pm @@ -67,55 +67,6 @@ sub BorrowerExists { return $sth->fetchrow; } -=head2 CanBookBeReserved - -Checks if a book (at bibliographic level) can be reserved by a borrower. - - if ( CanBookBeReserved($borrower, $biblionumber) ) { - # Do stuff - } - -=cut - -sub CanBookBeReserved { - my ( $borrower, $biblionumber ) = @_; - - my $MAXIMUM_NUMBER_OF_RESERVES = C4::Context->preference("maxreserves"); - my $MAXOUTSTANDING = C4::Context->preference("maxoutstanding"); - - my $out = 1; - - if ( $borrower->{'amountoutstanding'} > $MAXOUTSTANDING ) { - $out = undef; - } - if ( $borrower->{gonenoaddress} eq 1 ) { - $out = undef; - } - if ( $borrower->{lost} eq 1 ) { - $out = undef; - } - if ( $borrower->{debarred} eq 1 ) { - $out = undef; - } - my @reserves = GetReservesFromBorrowernumber( $borrower->{'borrowernumber'} ); - if ( $MAXIMUM_NUMBER_OF_RESERVES && scalar(@reserves) >= $MAXIMUM_NUMBER_OF_RESERVES ) { - $out = undef; - } - foreach my $res (@reserves) { - if ( $res->{'biblionumber'} == $biblionumber ) { - $out = undef; - } - } - my $issues = GetPendingIssues( $borrower->{'borrowernumber'} ); - foreach my $issue (@$issues) { - if ( $issue->{'biblionumber'} == $biblionumber ) { - $out = undef; - } - } - - return $out; -} - =head2 Availability Returns, for an itemnumber, an array containing availability information. -- 1.7.0.4 From stephane.delaune at biblibre.com Fri Jul 8 11:55:47 2011 From: stephane.delaune at biblibre.com (=?UTF-8?q?St=C3=A9phane=20Delaune?=) Date: Fri, 8 Jul 2011 11:55:47 +0200 Subject: [Koha-patches] [PATCH 2/2] Bug #6142 - Followup Delete sub CanBookBeReserved In-Reply-To: <1310118947-23931-1-git-send-email-stephane.delaune@biblibre.com> References: <1310118947-23931-1-git-send-email-stephane.delaune@biblibre.com> Message-ID: <1310118947-23931-2-git-send-email-stephane.delaune@biblibre.com> delete function's reference on @EXPORT Signed-off-by: St?phane Delaune --- C4/ILSDI/Utility.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/ILSDI/Utility.pm b/C4/ILSDI/Utility.pm index 274a266..152fb41 100644 --- a/C4/ILSDI/Utility.pm +++ b/C4/ILSDI/Utility.pm @@ -38,7 +38,7 @@ BEGIN { require Exporter; @ISA = qw(Exporter); @EXPORT = qw( - &BorrowerExists &CanBookBeReserved &Availability + &BorrowerExists &Availability ); } -- 1.7.0.4 From sjohnson at hpplnj.org Fri Jul 8 11:56:15 2011 From: sjohnson at hpplnj.org (sjohnson at hpplnj.org) Date: Fri, 8 Jul 2011 05:56:15 -0400 Subject: [Koha-patches] Out of office Message-ID: I will be out of the office beginning Friday July 1st and will return on Wednesday July 20th, If you need assistance please call the Highland Park Public Library at 732-572-2750. -------------- next part -------------- An HTML attachment was scrubbed... URL: From christophe.croullebois at biblibre.com Fri Jul 8 12:02:28 2011 From: christophe.croullebois at biblibre.com (Christophe Croullebois) Date: Fri, 8 Jul 2011 12:02:28 +0200 Subject: [Koha-patches] [PATCH 1/1] Bug 6566 Checking if DB's records are properly indexed Message-ID: <1310119348-31064-1-git-send-email-christophe.croullebois@biblibre.com> Small script that checks that each biblio in the DB is properly indexed (MT #6389) --- misc/migration_tools/checkNonIndexedBiblios.pl | 69 ++++++++++++++++++++++++ 1 files changed, 69 insertions(+), 0 deletions(-) create mode 100755 misc/migration_tools/checkNonIndexedBiblios.pl diff --git a/misc/migration_tools/checkNonIndexedBiblios.pl b/misc/migration_tools/checkNonIndexedBiblios.pl new file mode 100755 index 0000000..7bfede5 --- /dev/null +++ b/misc/migration_tools/checkNonIndexedBiblios.pl @@ -0,0 +1,69 @@ +#!/usr/bin/perl +# Small script that checks that each biblio in the DB is properly indexed + +use strict; + +use warnings; + +BEGIN { + + # find Koha's Perl modules + # test carefully before changing this + use FindBin; + eval { require "$FindBin::Bin/kohalib.pl" }; +} + +# Koha modules used +use MARC::Record; +use C4::Context; +use C4::Search; +use Time::HiRes qw(gettimeofday); + +use Getopt::Long; +my ( $input_marc_file, $number ) = ( '', 0 ); +my ( $version, $confirm, $zebraqueue, $silent ); +GetOptions( + 'c' => \$confirm, + 'h' => \$version, + 'z' => \$zebraqueue, + 's' => \$silent +); + +if ( $version || ( !$confirm ) ) { + print < shows this screen) +\t./batchCheckNonIndexedBiblios.pl -c (c like confirm => check all records (may be long) +\t-t => test only, change nothing in DB +EOF + ; + exit; +} + +my $dbh = C4::Context->dbh; +my $i = 0; +my $starttime = time(); + +$| = 1; # flushes output +$starttime = gettimeofday; + +my $sth = $dbh->prepare("SELECT biblionumber FROM biblio"); +my $sth_insert = $dbh->prepare("INSERT INTO zebraqueue (biblio_auth_number,operation,server,done) VALUES (?,'specialUpdate','biblioserver',0)"); +$sth->execute; +my ($nbhits); +while ( my ($biblionumber) = $sth->fetchrow ) { + (undef,undef,$nbhits) = SimpleSearch("Local-number=$biblionumber"); + print "biblionumber $biblionumber not indexed\n" unless $nbhits; + $sth_insert->execute($biblionumber) if $zebraqueue and !$nbhits; + $i++; + print "$i done\n" unless $i % 1000; +} + -- 1.7.0.4 From henridamien.laurent at biblibre.com Fri Jul 8 12:22:35 2011 From: henridamien.laurent at biblibre.com (Henri-Damien LAURENT) Date: Fri, 8 Jul 2011 12:22:35 +0200 Subject: [Koha-patches] [PATCH] bug 6568 problem in SQL generated Message-ID: <1310120555-1258-1-git-send-email-henridamien.laurent@biblibre.com> Problem on GetPendingIssues When no @borrowernumber sent in GetPendingIssues SQL generated is wrong. This patch is fixing that and adds some testing on relissues lists --- C4/Members.pm | 1 + circ/circulation.pl | 20 +++++++++++--------- members/moremember.pl | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 4eb9979..0c536d9 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -1032,6 +1032,7 @@ The keys include C fields except marc and marcxml. #' sub GetPendingIssues { my (@borrowernumbers) = @_; + return unless scalar(@borrowernumbers); # Borrowers part of the query my $bquery = ''; diff --git a/circ/circulation.pl b/circ/circulation.pl index c34db54..a9ac69e 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -458,18 +458,20 @@ sub build_issue_data { if ($borrower) { - # Getting borrower relatives - my @relborrowernumbers = GetMemberRelatives($borrower->{'borrowernumber'}); - #push @borrowernumbers, $borrower->{'borrowernumber'}; - # get each issue of the borrower & separate them in todayissues & previous issues my ($issueslist) = GetPendingIssues($borrower->{'borrowernumber'}); - my ($relissueslist) = GetPendingIssues(@relborrowernumbers); - build_issue_data($issueslist, 0); - build_issue_data($relissueslist, 1); - - $displayrelissues = scalar($relissueslist); + + # Getting borrower relatives + my @relborrowernumbers = GetMemberRelatives($borrower->{'borrowernumber'}); + if (scalar(@relborrowernumbers)>0){ + my $relissueslist = GetPendingIssues(@relborrowernumbers); + if ($relissueslist){ + build_issue_data($relissueslist, 1); + $displayrelissues = scalar($relissueslist); + } + } + if ( C4::Context->preference( "todaysIssuesDefaultSortOrder" ) eq 'asc' ) { @todaysissues = sort { $a->{'timestamp'} cmp $b->{'timestamp'} } @todaysissues; diff --git a/members/moremember.pl b/members/moremember.pl index b766f2f..3601669 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -244,7 +244,7 @@ my @borrowernumbers = GetMemberRelatives($borrowernumber); my $issue = GetPendingIssues($borrowernumber); my $relissue = GetPendingIssues(@borrowernumbers); my $issuecount = scalar(@$issue); -my $relissuecount = scalar(@$relissue); +my $relissuecount = ($relissue?scalar(@$relissue):0); my $roaddetails = &GetRoadTypeDetails( $data->{'streettype'} ); my $today = POSIX::strftime("%Y-%m-%d", localtime); # iso format my @issuedata; -- 1.7.1 From stephane.delaune at biblibre.com Fri Jul 8 12:34:22 2011 From: stephane.delaune at biblibre.com (=?UTF-8?q?St=C3=A9phane=20Delaune?=) Date: Fri, 8 Jul 2011 12:34:22 +0200 Subject: [Koha-patches] [PATCH] [PATCH] Bug 5983 minor fix in html to improve translatability Message-ID: <1310121262-24416-1-git-send-email-stephane.delaune@biblibre.com> Signed-off-by: St?phane Delaune --- koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt index dfa7ed9..91b03f2 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt @@ -53,7 +53,19 @@

    Sorry, the CAS login failed.

    [% END %] -

    If you have a CAS account, please click here to login.

    +

    If you have a CAS account, +[% IF ( casServerUrl ) %] + please click here to login.

    +[% END %] + +[% IF ( casServersLoop ) %] +please choose against which one you would like to authenticate:

    +

    Local Login

    If you do not have a CAS account, but a local account, you can still log in :

    -- 1.7.0.4 From f.demians at tamil.fr Fri Jul 8 13:32:35 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 8 Jul 2011 13:32:35 +0200 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_XSL_UNIMARC_Improvments?= Message-ID: <1310124755-12629-1-git-send-email-f.demians@tamil.fr> - Exclude 'marc' & 'item' prefix from UNIMARC util XSL to slim down result - Add missing NSB/NSE characters striping - 200 fields on result/detail page: show all subfields in order, link to detail page only on $a - 4xx display, more fields and more subfields, respects subfields order which matter - Improve RAMEAU authorities linkings to subdivisions (pure XSLT) - Add missing fields: 205, 500 - Add missing MARC21 syspref: - DisplayOPACiconsXSLT, not implemtable in UNIMARC - OPACURLOpenInNewWindow - URLLinkText - ShowISBD Sidenote: this should have been done by people having introduced those syspref into MARC21 XSL. Suite --- .../prog/en/xslt/UNIMARCslim2OPACDetail.xsl | 133 ++++-- .../prog/en/xslt/UNIMARCslim2OPACResults.xsl | 90 +++-- .../opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl | 475 +++++++++++--------- 3 files changed, 415 insertions(+), 283 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl index 2832b6b..5f6daa2 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl @@ -15,45 +15,89 @@ - - + + + +

    - - - - - : - - - - - - [ - - ] - - - / - - - - ; - - + + + + + + + + + [ + + ] + + + = + + + + : + + + + / + + + + ; + + + + , + + + +

    - +
    + + Normal View + + + MARC View + + + Expanded MARC View + + + + Card View (ISBD) + + +
    + + + 454 + Translation of + + + + 461 + Set Level + + + + 464 + Piece-Analytic Level + 700 @@ -85,9 +129,19 @@ Corporate Author (Secondary) + + 500 + Uniform Title + + + + 503 + Uniform Conventional Heading + + - - Language: + + Language: @@ -133,6 +187,11 @@ + + 205 + Edition Statement + + @@ -350,24 +409,30 @@ - Online Resources: + Online Resources: - + + _blank + - - 100 - y3z - Click here to access online + + + + + + Click here to access online + + diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl index 831724c..5364ded 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl @@ -18,7 +18,6 @@
    - @@ -31,42 +30,65 @@ - - -
    - - - - /cgi-bin/koha/opac-detail.pl?biblionumber= - - - - : - + + + + + + + + /cgi-bin/koha/opac-detail.pl?biblionumber= + + + + + + + [ - - - - [ - - ] - - - / - - - - ; - - - -
    + ] + + + = + + + + : + + + + / + + + + ; + + + + , + + + +
    - + + 454 + Translation of + + + + 461 + Set Level + + + + 464 + Piece-Analytic Level + @@ -77,7 +99,6 @@ - @@ -85,9 +106,6 @@ - - 100 - y3z diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl index 8eec0fd..146b88c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl @@ -2,7 +2,10 @@ ]> - + @@ -23,37 +26,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtl + + + + + + + + + + : + + + + + + + + + + + [ + + ] + + + = + + + + : + + + + / + + + + ; + + + + + , + + + + + + + ? + + + + + + + + + + + + + : + + + + + , + + + + + ? + + + + + + - Publication: + Publication: - - - , - - - - : - - - - , - - - - ? - - - - : - - - - , - - + + + + + : + + + + + + , + + + + + ? @@ -62,7 +186,7 @@ - + Description: @@ -82,219 +206,144 @@ - - - - Linked with: - - - - - - : - - - / - - - , - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - rtl - - - - - - - - - : - - - - : - - - - - - - - - - / - - - - , - - - - , - - - - , - - - - , - - - - , - + + + + + + + + + + + + , + + + + + + + + + + 1000 + + + + + + + + , + + + + + + /cgi-bin/koha/opac-search.pl?q=an: + + + + + + + -- + - + + + + + /cgi-bin/koha/opac-search.pl?q=su: + + + + + + abcdfijkmnpvxyz + ijknpxyz + -- + + + + + + + + |
    - - : - - - - - /cgi-bin/koha/opac-search.pl?q=an: - - - /cgi-bin/koha/opac-search.pl?q=su: - - - - - - abcdjpvxyz - jpxyz - -- - - + + + : + + + + - - - | - - + + - - : - - - + + + : + + + - /cgi-bin/koha/opac-search.pl?q=an: + + /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.1 From christophe.croullebois at biblibre.com Fri Jul 8 13:55:42 2011 From: christophe.croullebois at biblibre.com (Christophe Croullebois) Date: Fri, 8 Jul 2011 13:55:42 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6080: total is wrong in acqui-home.pl Message-ID: <1310126142-684-1-git-send-email-christophe.croullebois@biblibre.com> From: Jonathan Druart In Acqui-home, with hierarchic bugdets, it's a non sense to do total & sub-totals: we're adding budgets more than once. For example : Books 1000 fictions books 500 NF books 500 result in a total of 2000 ! This patch removes the total BibLibre MT5446 Signed-off-by: Christophe Croullebois --- acqui/acqui-home.pl | 16 ---------------- .../prog/en/modules/acqui/acqui-home.tt | 11 ----------- 2 files changed, 0 insertions(+), 27 deletions(-) diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index 0d9c207..74d504e 100755 --- a/acqui/acqui-home.pl +++ b/acqui/acqui-home.pl @@ -82,12 +82,6 @@ my $budget_arr = GetBudgetHierarchy( '', $user->{branchcode}, $template->{param_map}->{'USER_INFO'}[0]->{'borrowernumber'} ); -my $total = 0; -my $totspent = 0; -my $totordered = 0; -my $totcomtd = 0; -my $totavail = 0; - my $total_active = 0; my $totspent_active = 0; my $totordered_active = 0; @@ -121,11 +115,6 @@ foreach my $budget ( @{$budget_arr} ) { $budget->{'budget_avail'} = $budget->{'budget_amount'} - ( $budget->{'budget_spent'} + $budget->{'budget_ordered'} ); - $total += $budget->{'budget_amount'}; - $totspent += $budget->{'budget_spent'}; - $totordered += $budget->{'budget_ordered'}; - $totavail += $budget->{'budget_avail'}; - if ($budget->{budget_period_active}){ $total_active += $budget->{'budget_amount'}; $totspent_active += $budget->{'budget_spent'}; @@ -142,11 +131,6 @@ $template->param( type => 'intranet', loop_budget => $budget_arr, branchname => $branchname, - total => $num_formatter->format_price($total), - totspent => $num_formatter->format_price($totspent), - totordered => $num_formatter->format_price($totordered), - totcomtd => $num_formatter->format_price($totcomtd), - totavail => $num_formatter->format_price($totavail), total_active => $num_formatter->format_price($total_active), totspent_active => $num_formatter->format_price($totspent_active), totordered_active => $num_formatter->format_price($totordered_active), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt index a274365..87343bf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -99,17 +99,6 @@ $(document).ready(function() {
    - - - - - - - - - - - [% FOREACH loop_budge IN loop_budget %] [% IF ( loop_budge.budget_period_active ) %] -- 1.7.0.4 From oleonard at myacpl.org Fri Jul 8 14:12:40 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 8 Jul 2011 08:12:40 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5009 : Turning off autocomplete Message-ID: <1310127160-19056-1-git-send-email-oleonard@myacpl.org> From: Chris Cormack Files affected koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt Signed-off-by: Owen Leonard --- .../intranet-tmpl/prog/en/includes/cat-search.inc | 4 ++-- .../intranet-tmpl/prog/en/includes/circ-search.inc | 2 +- .../prog/en/includes/patron-search.inc | 2 +- .../prog/en/modules/circ/circulation.tt | 6 +++--- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc index a74e2fd..379cc56 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc @@ -48,7 +48,7 @@ YAHOO.util.Event.onContentReady("header_search", function() { [% IF ( CAN_user_circulate ) %] [% FOREACH loo IN loop %] - [% UNLESS ( loop.odd ) %] - - [% ELSE %] - [% END %] [% IF ( EnhancedMessagingPreferences ) %] - [% END %] -- 1.7.3 From nengard at bywatersolutions.com Wed Jul 13 21:45:38 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 13 Jul 2011 15:45:38 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for 6426 - messaging not showing on patron categories Message-ID: <1310586338-15170-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard T:T variable name problems were causing the problem. I used this opportunity to change the way the data is output: Now the messaging preferences are only output if there is a current setting. Also corrected the js table sorter configuration for the right columns and moved the template-based table row striping to the tablesorter plugin config. Signed-off-by: Nicole C. Engard --- .../prog/en/modules/admin/categorie.tt | 38 ++++++++++---------- 1 files changed, 19 insertions(+), 19 deletions(-) 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 a916a4b..c2e5062 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt @@ -9,7 +9,8 @@ [% INCLUDE 'calendar.inc' %] @@ -300,11 +301,7 @@ Confirm Deletion of Category [% categorycode |html %][% END %] [% FOREACH loo IN loop %] - [% UNLESS ( loop.odd ) %] - - [% ELSE %] - [% END %] [% IF ( EnhancedMessagingPreferences ) %] - [% END %] -- 1.7.2.3 From juan.sieira at xercode.es Fri Jul 15 12:00:37 2011 From: juan.sieira at xercode.es (Juan Romay Sieira) Date: Fri, 15 Jul 2011 12:00:37 +0200 Subject: [Koha-patches] [PATCH 35/35] [Bug 6590] - Removing hyphens from isbn and issn when cataloging a biblio. It removes hyphens from isbn and issn only in marcxml, not in the field isbn in biblioitems where it is in the original format Message-ID: <1310724037-15956-1-git-send-email-juan.sieira@xercode.es> --- C4/Biblio.pm | 43 ++++++++++++++++++++ C4/Search.pm | 2 +- admin/systempreferences.pl | 1 + installer/data/mysql/de-DE/mandatory/sysprefs.sql | 1 + installer/data/mysql/en/mandatory/sysprefs.sql | 1 + .../1-Obligatoire/unimarc_standard_systemprefs.sql | 1 + installer/data/mysql/it-IT/necessari/sysprefs.sql | 1 + .../data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql | 1 + installer/data/mysql/pl-PL/mandatory/sysprefs.sql | 1 + ...m_preferences_full_optimal_for_install_only.sql | 1 + ...m_preferences_full_optimal_for_install_only.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 +++ .../en/modules/admin/preferences/cataloguing.pref | 6 +++ 13 files changed, 66 insertions(+), 1 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index d797f40..c026e76 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -3461,6 +3461,49 @@ sub ModBiblioMarc { # the previous version of the record $oldRecord = GetMarcBiblio($biblionumber); } + # + if (C4::Context->preference("IsbnIssnRemoveHyphens")){ + my $isbn; + my $issn; + if ( $encoding eq 'UNIMARC' ) { + if ( my $f010 = $record->field('010') ) { + if ( $f010->subfield('a') ) { + $isbn = $f010->subfield('a'); + $isbn =~ s/-//g; + $f010->update( 'a' => $isbn ); + } + } + if ( my $f011 = $record->field('011') ) { + if ( $f011->subfield('a') ) { + $issn = $f011->subfield('a'); + $issn =~ s/-//g; + $f011->update( 'a' => $issn ); + } + } + } elsif ($encoding eq 'MARC21') { + if ( my $f020 = $record->field('020') ) { + $isbn = $f020->subfield('a'); + $isbn =~ s/-//g; + $f020->update( 'a' => $isbn ); + } + if ( my $f022 = $record->field('022') ) { + $issn = $f022->subfield('a'); + $issn =~ s/-//g; + $f022->update( 'a' => $issn ); + } + } elsif ($encoding eq 'NORMARC') { + if ( my $f020 = $record->field('020') ) { + $isbn = $f020->subfield('a'); + $isbn =~ s/-//g; + $f020->update( 'a' => $isbn ); + } + if ( my $f022 = $record->field('022') ) { + $issn = $f022->subfield('a'); + $issn =~ s/-//g; + $f022->update( 'a' => $issn ); + } + } + } $sth = $dbh->prepare("UPDATE biblioitems SET marc=?,marcxml=? WHERE biblionumber=?"); $sth->execute( $record->as_usmarc(), $record->as_xml_record($encoding), $biblionumber ); $sth->finish; diff --git a/C4/Search.pm b/C4/Search.pm index c3cff65..069c55e 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1164,7 +1164,7 @@ sub buildQuery { $weight_fields, $fuzzy_enabled, $remove_stopwords ) = ( 0, 0, 0, 0, 0 ); - + $operand =~ s/-//g if (C4::Context->preference("IsbnIssnRemoveHyphens")); } if(not $index){ diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 87ecac4..884eafb 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -153,6 +153,7 @@ $tabsysprefs{'item-level_itypes'} = "Cataloging"; $tabsysprefs{OpacSuppression} = "Cataloging"; $tabsysprefs{SpineLabelFormat} = "Cataloging"; $tabsysprefs{SpineLabelAutoPrint} = "Cataloging"; +$tabsysprefs{IsbnIssnRemoveHyphens} = "Cataloging"; # Circulation $tabsysprefs{maxoutstanding} = "Circulation"; diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql b/installer/data/mysql/de-DE/mandatory/sysprefs.sql index 6eb67a3..6fe546a 100755 --- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql +++ b/installer/data/mysql/de-DE/mandatory/sysprefs.sql @@ -314,3 +314,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems' ,'','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O pacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index 0abf9d8..3b26b1a 100755 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -314,3 +314,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql index 59a258f..cc59963 100755 --- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql @@ -315,3 +315,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/it-IT/necessari/sysprefs.sql b/installer/data/mysql/it-IT/necessari/sysprefs.sql index dcdf0ee..35b2790 100755 --- a/installer/data/mysql/it-IT/necessari/sysprefs.sql +++ b/installer/data/mysql/it-IT/necessari/sysprefs.sql @@ -301,3 +301,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O pacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql index ca71769..1fbc993 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql @@ -321,3 +321,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','','free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql index 58ba035..0493267 100755 --- a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql +++ b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql @@ -313,3 +313,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql index 54c533c..53fb173 100755 --- a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -368,3 +368,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql index 9f095ab..0dbebe1 100755 --- a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -393,3 +393,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O pacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 8fb9656..975b64f 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4370,6 +4370,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`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo');"); + print "Upgrade to $DBversion done (Add SysPref to remove hyphens or not into isbn and issn)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref index 4fc1305..0632cab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref @@ -84,6 +84,12 @@ Cataloging: annual: generated in the form <year>-0001, <year>-0002. hbyymmincr: generated in the form <branchcode>yymm0001. "OFF": not generated automatically. + - + - pref: IsbnIssnRemoveHyphens + choices: + yes: "Remove" + no: "Don't remove" + - hyphens from ISBN and ISSN Display: - - 'Separate multiple displayed authors, series or subjects with ' -- 1.7.1 From magnus at enger.priv.no Sat Jul 16 01:27:59 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Sat, 16 Jul 2011 01:27:59 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] [Combined patch] Bug 5436: Extended patron attributes display improvements Message-ID: <1310772479-22805-1-git-send-email-magnus@enger.priv.no> From: Henri-Damien LAURENT This patch combines the changes pushed to new/awaiting_qa/bug_5436 with this follow-up patch: http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=4608 (MT #2262) member search improving if only one member is found, go directly to his details. change borrower link in return.pl go to circulation.pl instead of moremembers.pl (MT #2262) Show extended attributes in borrower toolbar This made some modifications to be more generic, and to show extended attributes in borrower "toolbar". It hide by default the borrower address, and the user have a toggle link to show/hide the user address. (bug #MT2262) don't show all attributes this hide non-active extended attributes in circulation. (MT2262) Followup : Enhancement to extended attributes display View/Hide address improvement in moremember.pl Signed-off-by: Henri-Damien LAURENT Bug 5436 Followup : expiry message was badly displayed This patch assigns the comment expressed Signed-off-by: Magnus Enger --- C4/Members.pm | 46 ++++++++- C4/Members/AttributeTypes.pm | 31 +++++- C4/Members/Attributes.pm | 3 +- admin/patron-attr-types.pl | 9 ++- circ/circulation.pl | 15 +-- .../0009-patron-attr-display-checkout.pl | 7 ++ installer/data/mysql/kohastructure.sql | 1 + .../intranet-tmpl/prog/en/css/staff-global.css | 35 ++++++- .../intranet-tmpl/prog/en/includes/circ-menu.inc | 108 +++++++++++++------- .../prog/en/modules/admin/patron-attr-types.tt | 5 + .../prog/en/modules/circ/circulation.tt | 2 +- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 7 +- .../prog/en/modules/members/moremember.tt | 48 +++++---- .../intranet-tmpl/prog/img/more-right-arrow.gif | Bin 0 -> 81 bytes members/member.pl | 6 + members/moremember.pl | 4 +- 16 files changed, 242 insertions(+), 85 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/0009-patron-attr-display-checkout.pl create mode 100644 koha-tmpl/intranet-tmpl/prog/img/more-right-arrow.gif diff --git a/C4/Members.pm b/C4/Members.pm index 670042f..7fb14a7 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -26,12 +26,13 @@ use C4::Dates qw(format_date_in_iso); use Digest::MD5 qw(md5_base64); use Date::Calc qw/Today Add_Delta_YM/; use C4::Log; # logaction +use C4::Branch; use C4::Overdues; use C4::Reserves; use C4::Accounts; use C4::Biblio; use C4::SQLHelper qw(InsertInTable UpdateInTable SearchInTable); -use C4::Members::Attributes qw(SearchIdMatchingAttribute); +use C4::Members::Attributes qw(SearchIdMatchingAttribute GetBorrowerAttributes); our ($VERSION, at ISA, at EXPORT, at EXPORT_OK,$debug); @@ -91,6 +92,8 @@ BEGIN { &DeleteMessage &GetMessages &GetMessagesCount + + &SetMemberInfosInTemplate ); #Modify data @@ -1725,6 +1728,47 @@ sub DelMember { return $sth->rows; } +=head2 SetMemberInfosInTemplate + &SetMemberInfosInTemplate($borrowernumber, $template) + + +Settings borrower informations for template user + +=cut + +sub SetMemberInfosInTemplate { + my ($borrowernumber, $template) = @_; + + my $borrower = GetMemberDetails( $borrowernumber, 0 ); + foreach my $key (keys %$borrower){ + $template->param($key => $borrower->{$key}); + } + + # Computes full borrower address + my (undef, $roadttype_hashref) = &GetRoadTypes(); + my $address = $borrower->{'streetnumber'}.' '.$roadttype_hashref->{$borrower->{'streettype'}}.' '.$borrower->{'address'}; + $template->param(is_child => ($borrower->{'category_type'} eq 'C'), + address => $address, + branchname => GetBranchName($borrower->{'branchcode'}), + ); + + foreach (qw(dateenrolled dateexpiry dateofbirth)) { + my $userdate = $borrower->{$_}; + unless ($userdate) { + $borrower->{$_} = ''; + next; + } + $userdate = C4::Dates->new($userdate,'iso')->output('syspref'); + $borrower->{$_} = $userdate || ''; + $template->param( $_ => $userdate ); + } + + my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + extendedattributes => $attributes, + ); +} + =head2 ExtendMemberSubscriptionTo (OUEST-PROVENCE) $date = ExtendMemberSubscriptionTo($borrowerid, $date); diff --git a/C4/Members/AttributeTypes.pm b/C4/Members/AttributeTypes.pm index 3a05268..e36557b 100644 --- a/C4/Members/AttributeTypes.pm +++ b/C4/Members/AttributeTypes.pm @@ -118,6 +118,7 @@ sub new { $self->{'opac_display'} = 0; $self->{'password_allowed'} = 0; $self->{'staff_searchable'} = 0; + $self->{'display_checkout'} = 0; $self->{'authorised_value_category'} = ''; bless $self, $class; @@ -152,6 +153,7 @@ sub fetch { $self->{'opac_display'} = $row->{'opac_display'}; $self->{'password_allowed'} = $row->{'password_allowed'}; $self->{'staff_searchable'} = $row->{'staff_searchable'}; + $self->{'display_checkout'} = $row->{'display_checkout'}; $self->{'authorised_value_category'} = $row->{'authorised_value_category'}; bless $self, $class; @@ -182,14 +184,15 @@ sub store { opac_display = ?, password_allowed = ?, staff_searchable = ?, - authorised_value_category = ? + authorised_value_category = ?, + display_checkout = ? WHERE code = ?"); } else { $sth = $dbh->prepare_cached("INSERT INTO borrower_attribute_types (description, repeatable, unique_id, opac_display, password_allowed, - staff_searchable, authorised_value_category, code) + staff_searchable, authorised_value_category, display_checkout, code) VALUES (?, ?, ?, ?, ?, - ?, ?, ?)"); + ?, ?, ?, ?)"); } $sth->bind_param(1, $self->{'description'}); $sth->bind_param(2, $self->{'repeatable'}); @@ -198,7 +201,8 @@ sub store { $sth->bind_param(5, $self->{'password_allowed'}); $sth->bind_param(6, $self->{'staff_searchable'}); $sth->bind_param(7, $self->{'authorised_value_category'}); - $sth->bind_param(8, $self->{'code'}); + $sth->bind_param(8, $self->{'display_checkout'}); + $sth->bind_param(9, $self->{'code'}); $sth->execute; } @@ -304,6 +308,25 @@ sub staff_searchable { @_ ? $self->{'staff_searchable'} = ((shift) ? 1 : 0) : $self->{'staff_searchable'}; } +=head2 display_checkout + +=over 4 + +my $display_checkout = $attr_type->display_checkout(); +$attr_type->display_checkout($display_checkout); + +=back + +Accessor. The C<$display_checkout> argument +is interpreted as a Perl boolean. + +=cut + +sub display_checkout { + my $self = shift; + @_ ? $self->{'display_checkout'} = ((shift) ? 1 : 0) : $self->{'display_checkout'}; +} + =head2 authorised_value_category my $authorised_value_category = $attr_type->authorised_value_category(); diff --git a/C4/Members/Attributes.pm b/C4/Members/Attributes.pm index 35d6702..29a31e6 100644 --- a/C4/Members/Attributes.pm +++ b/C4/Members/Attributes.pm @@ -72,7 +72,7 @@ sub GetBorrowerAttributes { my $opac_only = @_ ? shift : 0; my $dbh = C4::Context->dbh(); - my $query = "SELECT code, description, attribute, lib, password + my $query = "SELECT code, description, attribute, lib, password, display_checkout FROM borrower_attributes JOIN borrower_attribute_types USING (code) LEFT JOIN authorised_values ON (category = authorised_value_category AND attribute = authorised_value) @@ -89,6 +89,7 @@ sub GetBorrowerAttributes { value => $row->{'attribute'}, value_description => $row->{'lib'}, password => $row->{'password'}, + display_checkout => $row->{'display_checkout'}, } } return \@results; diff --git a/admin/patron-attr-types.pl b/admin/patron-attr-types.pl index 1dfe442..c32b6c2 100755 --- a/admin/patron-attr-types.pl +++ b/admin/patron-attr-types.pl @@ -106,6 +106,9 @@ sub error_add_attribute_type_form { if ($input->param('staff_searchable')) { $template->param(staff_searchable_checked => 'checked="checked"'); } + if ($input->param('display_checkout')) { + $template->param(display_checkout_checked => 'checked="checked"'); + } $template->param( attribute_type_form => 1, @@ -147,6 +150,8 @@ sub add_update_attribute_type { $attr_type->authorised_value_category($authorised_value_category); my $password_allowed = $input->param('password_allowed'); $attr_type->password_allowed($password_allowed); + my $display_checkout = $input->param('display_checkout'); + $attr_type->display_checkout($display_checkout); if ($op eq 'edit') { $template->param(edited_attribute_type => $attr_type->code()); @@ -222,7 +227,9 @@ sub edit_attribute_type_form { if ($attr_type->staff_searchable()) { $template->param(staff_searchable_checked => 'checked="checked"'); } - + if ($attr_type->display_checkout()) { + $template->param(display_checkout_checked => 'checked="checked"'); + } authorised_value_category_list($template, $attr_type->authorised_value_category()); $template->param( diff --git a/circ/circulation.pl b/circ/circulation.pl index c34db54..1e19261 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -220,8 +220,8 @@ if ($borrowernumber) { # Warningdate is the date that the warning starts appearing my ( $today_year, $today_month, $today_day) = Today(); - my ($warning_year, $warning_month, $warning_day) = split /-/, $borrower->{'dateexpiry'}; - my ( $enrol_year, $enrol_month, $enrol_day) = split /-/, $borrower->{'dateenrolled'}; + my ($warning_year, $warning_month, $warning_day) = split (/-/, $borrower->{'dateexpiry'}); + my ( $enrol_year, $enrol_month, $enrol_day) = split (/-/, $borrower->{'dateenrolled'}); # Renew day is calculated by adding the enrolment period to today my ( $renew_year, $renew_month, $renew_day); if ($enrol_year*$enrol_month*$enrol_day>0) { @@ -622,10 +622,6 @@ if($lib_messages_loop){ $template->param(flagged => 1 ); } my $bor_messages_loop = GetMessages( $borrowernumber, 'B', $branch ); if($bor_messages_loop){ $template->param(flagged => 1 ); } -# Computes full borrower address -my (undef, $roadttype_hashref) = &GetRoadTypes(); -my $address = $borrower->{'streetnumber'}.' '.$roadttype_hashref->{$borrower->{'streettype'}}.' '.$borrower->{'address'}; - my $fast_cataloging = 0; if (defined getframeworkinfo('FA')) { $fast_cataloging = 1 @@ -644,11 +640,9 @@ $template->param( printername => $printer, firstname => $borrower->{'firstname'}, surname => $borrower->{'surname'}, - dateexpiry => format_date($newexpiry), + newexpiry => format_date($newexpiry), expiry => format_date($borrower->{'dateexpiry'}), - categorycode => $borrower->{'categorycode'}, categoryname => $borrower->{description}, - address => $address, address2 => $borrower->{'address2'}, email => $borrower->{'email'}, emailpro => $borrower->{'emailpro'}, @@ -658,7 +652,6 @@ $template->param( zipcode => $borrower->{'zipcode'}, country => $borrower->{'country'}, phone => $borrower->{'phone'} || $borrower->{'mobile'}, - cardnumber => $borrower->{'cardnumber'}, amountold => $amountold, barcode => $barcode, stickyduedate => $stickyduedate, @@ -681,6 +674,8 @@ $template->param( fast_cataloging => $fast_cataloging, ); +SetMemberInfosInTemplate($borrowernumber, $template); + # save stickyduedate to session if ($stickyduedate) { $session->param( 'stickyduedate', $duedatespec ); diff --git a/installer/data/mysql/atomicupdate/0009-patron-attr-display-checkout.pl b/installer/data/mysql/atomicupdate/0009-patron-attr-display-checkout.pl new file mode 100644 index 0000000..44cfcfa --- /dev/null +++ b/installer/data/mysql/atomicupdate/0009-patron-attr-display-checkout.pl @@ -0,0 +1,7 @@ +#! /usr/bin/perl +use strict; +use warnings; +use C4::Context; +my $dbh=C4::Context->dbh; +$dbh->do("ALTER TABLE borrower_attribute_types ADD COLUMN `display_checkout` TINYINT(1) NOT NULL DEFAULT '0';"); +print "Upgrade done (Added a display_checkout field in borrower_attribute_types table)\n"; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e3c6f42..ba22027 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -284,6 +284,7 @@ CREATE TABLE `borrower_attribute_types` ( `password_allowed` tinyint(1) NOT NULL default 0, `staff_searchable` tinyint(1) NOT NULL default 0, `authorised_value_category` varchar(10) default NULL, + `display_checkout` tinyint(1) NOT NULL default 0, PRIMARY KEY (`code`), KEY `auth_val_cat_idx` (`authorised_value_category`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 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 9c97db1..d4be5ae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -1953,6 +1953,38 @@ ul.budget_hierarchy li:last-child:after { ul.budget_hierarchy li:first-child:after { content: ""; } +#cartmenulink img { + background-image : none; + display : inline; + padding : 3px 6px 0 0; +} + +* html #cartmenulink { + border : 1px solid #336600; +} + +* html #listsmenulink { + border : 1px solid #006699; +} + +#collapsedaddress { + border: solid 1px #eee; + margin-right: 10px; + overflow: hidden; +} +#toggleaddress { + display: block; + padding: 2px 2px 2px 12px; + margin-right: 10px; + cursor: pointer; +} +.toggleaddress { + background: #eee url(../../img/more-right-arrow.gif) 0 50% no-repeat; +} +.toggleaddress2 { + background: #eee url(../../img/more-up-arrow.gif) 0 50% no-repeat; +} + .holdcount { font-size : 105%; line-height : 200%; } .holdcount a { border : 1px solid #a4bedd; background-color : #e4ecf5; font-weight : bold; -moz-border-radius: 4px; padding : .1em .4em; text-decoration : none; } .holdcount a:hover { background-color : #ebeff7; } @@ -2048,4 +2080,5 @@ fieldset.rows+h3 {clear:both;padding-top:.5em;} border : 1px solid #EEE; padding : 0.3em 0.4em; } - \ No newline at end of file + + 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 129bd66..2e84f2c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -4,6 +4,19 @@ +
      [% IF ( patronimages ) %] [% IF ( picture ) %] @@ -12,45 +25,64 @@
    • [% firstname %] [% surname %] ([% cardnumber %])
    • [% END %] [% END %] -
    • [% IF ( address ) %] - [% address %] - [% ELSE %] - No address stored. - [% END %]
    • - [% IF ( address2 ) %] -
    • [% address2 %]
    • - [% END %]
    • - [% IF ( city ) %] - [% city %][% IF ( state ) %], [% state %][% END %] - [% zipcode %][% IF ( country ) %], [% country %][% END %] - [% ELSE %] - No city stored. - [% END %]
    • -
    • [% IF ( phone ) %] - [% phone %] - [% ELSE %] - [% IF ( mobile ) %] - [% mobile %] - [% ELSE %] - [% IF ( phonepro ) %] - [% phonepro %] - [% ELSE %] - No phone stored. - [% END %] - [% END %] - [% END %]
    • - [% IF ( email ) %] - - [% ELSE %] - [% IF ( emailpro ) %] - - [% ELSE %] -
    • No email stored.
    • - [% END %] +
    • [% categoryname %] ([% categorycode %])
    • +
    • [% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]
    • + [% 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 %] -
    • Category: [% categoryname %] ([% categorycode %])
    • -
    • Home Library: [% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]
    • -
    +
  • +
    +

    + [% IF ( address ) %] + [% address %] + [% ELSE %] + No address stored. + [% END %] + [% IF ( address2 ) %] + [% address2 %] + [% END %] + [% IF ( city ) %] + [% city %] + [% zipcode %] + [% IF ( country ) %], [% country %][% END %] + [% ELSE %] + No city stored. + [% END %] +

    +

    + [% IF ( phone ) %] + [% phone %] + [% ELSE %] + [% IF ( mobile ) %] + [% mobile %] + [% ELSE %] + [% IF ( phonepro ) %] + [% phonepro %] + [% ELSE %] + No phone stored. + [% END %] + [% END %] + [% END %] +

    + [% IF ( email ) %] + [% email %] + [% ELSE %] + [% IF ( emailpro ) %] + [% emailpro %] + [% ELSE %] + No email stored. + [% END %] + [% END %] +

    +
    + View/Hide address +
  • + +
    You have nothing checked out
    Avail
    Total  [% total_active %][% totordered_active %][% totspent_active %][% totavail_active %]
    Avail
    Total  [% total_active %][% totordered_active %][% totspent_active %][% totavail_active %]
     
    [% loo.categorycode |html %] [% loo.description |html %] @@ -332,22 +329,25 @@ Confirm Deletion of Category [% categorycode |html %][% END %] [% IF ( loo.hidelostitems ) %]Hidden[% ELSE %]Shown[% END %] [% loo.reservefee %] + [% IF ( loo.messaging_prefs ) %] - [% IF ( messaging_preference.Item_Due ) %]Item Due - [% ELSIF ( messaging_preference.Advance_Notice ) %]Advance Notice - [% ELSIF ( messaging_preference.Upcoming_Events ) %]Upcoming Events - [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold Filled - [% ELSIF ( messaging_preference.Item_Check_in ) %]Item Check-in - [% ELSIF ( messaging_preference.Item_Checkout ) %]Item Checkout - [% ELSE %]Unknown - [% END %] : - [% FOREACH transport IN messaging_pref.transports %] - [% transport.transport %] - [% END %] -
    + [% FOREACH prefs IN loo.messaging_prefs %] + [% FOREACH transport IN prefs.transports %] + [% IF ( transport.transport ) %] + [% IF ( prefs.Item_Due ) %]Item Due + [% ELSIF ( prefs.Advance_Notice ) %]Advance Notice + [% ELSIF ( prefs.Upcoming_Events ) %]Upcoming Events + [% ELSIF ( prefs.Hold_Filled ) %]Hold Filled + [% ELSIF ( prefs.Item_Check_in ) %]Item Check-in + [% ELSIF ( prefs.Item_Checkout ) %]Item Checkout + [% ELSE %]Unknown + [% END %]: + [% transport.transport %]
    + [% ELSE %]None
    [% END %] + [% END %] + [% END %] [% ELSE %] - none + None [% END %]
     
    [% loo.categorycode |html %] [% loo.description |html %] @@ -332,22 +329,25 @@ Confirm Deletion of Category [% categorycode |html %][% END %] [% IF ( loo.hidelostitems ) %]Hidden[% ELSE %]Shown[% END %] [% loo.reservefee %] + [% IF ( loo.messaging_prefs ) %] - [% IF ( messaging_preference.Item_Due ) %]Item Due - [% ELSIF ( messaging_preference.Advance_Notice ) %]Advance Notice - [% ELSIF ( messaging_preference.Upcoming_Events ) %]Upcoming Events - [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold Filled - [% ELSIF ( messaging_preference.Item_Check_in ) %]Item Check-in - [% ELSIF ( messaging_preference.Item_Checkout ) %]Item Checkout - [% ELSE %]Unknown - [% END %] : - [% FOREACH transport IN messaging_pref.transports %] - [% transport.transport %] - [% END %] -
    + [% FOREACH prefs IN loo.messaging_prefs %] + [% FOREACH transport IN prefs.transports %] + [% IF ( transport.transport ) %] + [% IF ( prefs.Item_Due ) %]Item Due + [% ELSIF ( prefs.Advance_Notice ) %]Advance Notice + [% ELSIF ( prefs.Upcoming_Events ) %]Upcoming Events + [% ELSIF ( prefs.Hold_Filled ) %]Hold Filled + [% ELSIF ( prefs.Item_Check_in ) %]Item Check-in + [% ELSIF ( prefs.Item_Checkout ) %]Item Checkout + [% ELSE %]Unknown + [% END %]: + [% transport.transport %]
    + [% ELSE %]None
    [% END %] + [% END %] + [% END %] [% ELSE %] - none + None [% END %]
    - + [% FOREACH riloo IN riloop %] @@ -412,11 +412,10 @@ function Dopop(link) { [% riloo.itemtitle |html %] - 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 6287611..40bc3ab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -179,7 +179,7 @@ function validate1(date) { [% UNLESS ( I ) %][% IF ( othernames ) %]“[% othernames %]”[% END %] -

    [% streetnumber %] +

    [% IF ( roaddetails ) %] [% roaddetails %], [% END %] @@ -212,9 +212,7 @@ function validate1(date) { [% END %]

  • Initials: [% initials %]
  • Date of birth:[% dateofbirth %]
  • -
  • Gender: - [% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %] -
  • [% END %] +
  • Sex:[% sex %]
  • [% END %] [% IF ( printethnicityline ) %]
  • Ethnicity:[% ethnicity %]
  • Ethnicity notes: [% ethnotes %]
  • @@ -341,8 +339,8 @@ function validate1(date) { [% END %] [% IF ( sort1 ) %]
  • Sort field 1:[% lib1 %]
  • [% END %] [% IF ( sort2 ) %]
  • Sort field 2:[% lib2 %]
  • [% END %] -
  • Username: [% userid %]
  • -
  • Password: +
  • OPAC login: [% userid %]
  • +
  • OPAC password: [% IF ( password ) %] ******* [% ELSE %] @@ -399,7 +397,7 @@ function validate1(date) {
  • [% ELSE %] - [% IF ( issueloo.norenew_reason_on_reserve ) %] - - [% ELSE %] - [% END %] [% END %] [% END %] @@ -524,17 +518,21 @@ function validate1(date) { [% IF ( relissuecount ) %]
    +

    Relatives issues

    Due DateTitle Author BarcodeShelving LocationCall NumberType PatronNote
    Due DateTitle Author BarcodeCall NumberType PatronNote
    [% riloo.itemauthor %] [% riloo.barcode %][% riloo.location %] [% riloo.itemcallnumber %] [% riloo.itemtype %] [% riloo.ccode %] [% IF ( riloo.duedate ) %] - + [% riloo.borsurname %], [% riloo.borfirstname %] ([% riloo.borcategorycode %]) [% ELSE %]Not checked out[% END %] Checkin FailedOn Hold
    + + + - + + - @@ -553,13 +551,16 @@ function validate1(date) { [% relissueloo.itemdamaged %] [% END %] - + + + + - - - - + + + + [% END %] @@ -609,15 +610,18 @@ function validate1(date) { - + [% END %]
    Due date TitleCollectionStock numberBarcode Item Type Checked out onCall noBorrowerCall no Charge PricePatron
    [% relissueloo.title |html %][% IF relissueloo.author %], by [% relissueloo.author %][% END %] [% IF relissueloo.publishercode %]; [% relissueloo.publishercode %] [% END %] [% IF relissueloo.publicationyear %], [% relissueloo.publicationyear %][% END %] [% relissueloo.barcode %][% relissueloo.title |html %][% IF ( relissueloo.author ) %], by [% relissueloo.author %][% END %] [% IF ( relissueloo.publishercode ) %]; [% relissueloo.publishercode %] [% END %] [% IF ( relissueloo.publicationyear ) %], [% relissueloo.publicationyear %][% END %][% relissueloo.collection %][% relissueloo.stocknumber %][% relissueloo.barcode %] [% UNLESS ( noItemTypeImages ) %] [% IF ( relissueloo.itemtype_image ) %][% END %][% END %][% relissueloo.itemtype_description %] [% relissueloo.issuedate %][% relissueloo.itemcallnumber %][% relissueloo.charge %][% relissueloo.replacementprice %][% relissueloo.borrowername %] ([% relissueloo.cardnumber %])[% relissueloo.borrowername %][% relissueloo.itemcallnumber %][% relissueloo.charge %][% relissueloo.replacementprice %]
    -
    - - [% ELSE %]

    Patron has nothing on hold.

    [% END %] +
    + + +
    + [% ELSE %]

    Patron has nothing checked out.

    [% END %] +
    diff --git a/koha-tmpl/intranet-tmpl/prog/img/more-right-arrow.gif b/koha-tmpl/intranet-tmpl/prog/img/more-right-arrow.gif new file mode 100644 index 0000000000000000000000000000000000000000..1729fafa7cb9d8d01a37a4dc55558255f3619549 GIT binary patch literal 81 zcmZ?wbhEHbredirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=" . @$results[0]->{borrowernumber}); + exit; +} + my @resultsdata; $to=($count>$to?$to:$count); my $index=$from; diff --git a/members/moremember.pl b/members/moremember.pl index b766f2f..e8e1d1c 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -146,7 +146,6 @@ foreach (qw(dateenrolled dateexpiry dateofbirth)) { $data->{$_} = $userdate || ''; $template->param( $_ => $userdate ); } -$data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' ); for (qw(debarred gonenoaddress lost borrowernotes)) { $data->{$_} and $template->param(flagged => 1) and last; @@ -427,7 +426,8 @@ $template->param( picture => 1 ) if $picture; my $branch=C4::Context->userenv->{'branch'}; -$template->param(%$data); +SetMemberInfosInTemplate($borrowernumber, $template); + if (C4::Context->preference('ExtendedPatronAttributes')) { $template->param(ExtendedPatronAttributes => 1); -- 1.7.4.1 From Katrin.Fischer.83 at web.de Sat Jul 16 22:35:10 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sat, 16 Jul 2011 22:35:10 +0200 Subject: [Koha-patches] [PATCH] Bug 6589: Adding supplements broken Message-ID: <1310848510-11683-1-git-send-email-Katrin.Fischer.83@web.de> To test: - add a new subscription, choose 'create items on receive' - receive some issues and create items > should work ok - create a supplement, alone or at the same time as receiving a normal issue - check if item was created and attached to the biblio record Without patch this should give you an error message. Although supplement will be created, no item will be added to the bibliogrpahic record. With patch applied there should be no error message and the item should be created and attached to the proper record. --- .../prog/en/modules/serials/serials-edit.tt | 2 +- serials/serials-edit.pl | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt index 83df447..304c6ca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt @@ -394,7 +394,7 @@ $(document).ready(function() { [% iteminformatio.marc_value %] - + diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl index fbf9ad5..db7620c 100755 --- a/serials/serials-edit.pl +++ b/serials/serials-edit.pl @@ -176,6 +176,7 @@ foreach my $subscriptionid (@subscriptionids) { $cell->{serialsadditems} = 1; } $cell->{'subscriptionid'} = $subscriptionid; + $cell->{biblionumber} = $serialdatalist[0]->{'biblionumber'}; $cell->{'itemid'} = 'NNEW'; $cell->{'serialid'} = 'NEW'; $cell->{'issuesatonce'} = 1; -- 1.7.4.1 From nengard at bywatersolutions.com Thu Jul 14 10:02:46 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Thu, 14 Jul 2011 04:02:46 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6589: Adding supplements broken Message-ID: <1310630566-17400-1-git-send-email-nengard@bywatersolutions.com> From: Katrin Fischer To test: - add a new subscription, choose 'create items on receive' - receive some issues and create items > should work ok - create a supplement, alone or at the same time as receiving a normal issue - check if item was created and attached to the biblio record Without patch this should give you an error message. Although supplement will be created, no item will be added to the bibliogrpahic record. With patch applied there should be no error message and the item should be created and attached to the proper record. Signed-off-by: Nicole C. Engard --- .../prog/en/modules/serials/serials-edit.tt | 2 +- serials/serials-edit.pl | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt index 83df447..304c6ca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt @@ -394,7 +394,7 @@ $(document).ready(function() { [% iteminformatio.marc_value %] - + diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl index fbf9ad5..db7620c 100755 --- a/serials/serials-edit.pl +++ b/serials/serials-edit.pl @@ -176,6 +176,7 @@ foreach my $subscriptionid (@subscriptionids) { $cell->{serialsadditems} = 1; } $cell->{'subscriptionid'} = $subscriptionid; + $cell->{biblionumber} = $serialdatalist[0]->{'biblionumber'}; $cell->{'itemid'} = 'NNEW'; $cell->{'serialid'} = 'NEW'; $cell->{'issuesatonce'} = 1; -- 1.7.2.3 From Katrin.Fischer.83 at web.de Sun Jul 17 00:33:48 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sun, 17 Jul 2011 00:33:48 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] 6584: Enable searching on Zebra's Bib-level index Message-ID: <1310855628-16278-1-git-send-email-Katrin.Fischer.83@web.de> From: Marcel de Rooy Bib-level is already indexed in MARC21 record.abs. But you cannot search this index, because it is commented in ccl.properties and not listed in getIndexes of Search.pm. This very simple patch does only do those two things. Signed-off-by: Katrin Fischer --- C4/Search.pm | 1 + etc/zebradb/ccl.properties | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index c3cff65..343058a 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -842,6 +842,7 @@ sub getIndexes{ 'Authority-Number', 'authtype', 'bc', + 'Bib-level', 'biblionumber', 'bio', 'biography', diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties index ee2553c..890b364 100644 --- a/etc/zebradb/ccl.properties +++ b/etc/zebradb/ccl.properties @@ -219,7 +219,7 @@ callnum Local-classification # bibliographic level such as # monograph, serial or collection # of the record. -#Bib-level 1=1021 +Bib-level 1=1021 # #Code-geographic-area 55 A code that indicates the 043 # geographic area(s) that appear -- 1.7.4.1 From Katrin.Fischer.83 at web.de Sun Jul 17 13:10:45 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sun, 17 Jul 2011 13:10:45 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] 5662: Show control number without organization code in OPAC URLs Message-ID: <1310901045-6341-1-git-send-email-Katrin.Fischer.83@web.de> From: Marcel de Rooy OPAC detail xsl adjusted at four places: 773 when leader19=c, 775, 780, 785. Enable the pref UseControlNumber when testing this patch. And set pref OPACXSLTDetailsDisplay to using XSLT stylesheets. Test by adding a control number ($w) in abovementioned fields. Go to opac detail and check if the links work. Add some orgcode between parentheses or brackets in front of the control number. Test again in opac detail if the links still work. Signed-off-by: Katrin Fischer Works with and without orgCode in front of $w now. No change to current behaviour, but closer to MARC21 standard. --- .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl index 1e0855f..d4f763f 100755 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -314,7 +314,7 @@ - /cgi-bin/koha/opac-search.pl?q=Control-number: + /cgi-bin/koha/opac-search.pl?q=Control-number: /cgi-bin/koha/opac-search.pl?q=Title: @@ -735,7 +735,7 @@ - /cgi-bin/koha/opac-search.pl?q=Control-number: + /cgi-bin/koha/opac-search.pl?q=Control-number: /cgi-bin/koha/opac-search.pl?q=Title: @@ -791,7 +791,7 @@ - + /cgi-bin/koha/opac-search.pl?q=Control-number: @@ -854,7 +854,7 @@ - + /cgi-bin/koha/opac-search.pl?q=Control-number: -- 1.7.4.1 From Katrin.Fischer.83 at web.de Sun Jul 17 14:08:30 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sun, 17 Jul 2011 14:08:30 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Populate ISBN in Z39.50 from search Message-ID: <1310904510-8276-1-git-send-email-Katrin.Fischer.83@web.de> From: Peter Lorimer When searching the catalogue, if I get no results then hit the Z39.50 search the title field in the pop up window is populated with what I searched for. If I search for a valid ISBN number and hit the Z39.50 search, the title field is populated with the ISBN number I searched for. This number should populate the ISBN field and not the title field. http://bugs.koha-community.org/show_bug.cgi?id=6539 Signed-off-by: Katrin Fischer To test: - Search new ISBN using ISBN search from advanced search page - 0 results - click on Z39.50 search - Z30.50 form will have your ISBN in ISBN search option I am signing off on this, because it's an improvement over the current behaviour. I see some problems though that should perhaps be addressed in a separate bug or as a follow-up: If you use th catalog search field and search for an ISBN or a keyword the right fields of the Z39.50 search form will be populated, but the search index will be put in front: ISBN: kw,wrdl: 9783492251495 or Title: kw,wrdl: koha testing If you search for ISBN as keyword on the advanced search page, it will still populate the Title search. --- C4/Search.pm | 26 +++++++++++++++++++++----- 1 files changed, 21 insertions(+), 5 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index c3cff65..d8d2ec5 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -33,6 +33,7 @@ use C4::Debug; use C4::Items; use YAML; use URI::Escape; +use Business::ISBN; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG); @@ -1423,7 +1424,7 @@ sub searchResults { #find branchname #get branch information..... my %branches; - my $bsth =$dbh->prepare("SELECT branchcode,branchname FROM branches"); # FIXME : use C4::Branch::GetBranches + my $bsth =$dbh->prepare("SELECT branchcode,branchname FROM branches "); $bsth->execute(); while ( my $bdata = $bsth->fetchrow_hashref ) { $branches{ $bdata->{'branchcode'} } = $bdata->{'branchname'}; @@ -1671,7 +1672,7 @@ sub searchResults { ($reservestatus, $reserveitem) = C4::Reserves::CheckReserves($item->{itemnumber}); } - # item is withdrawn, lost, damaged, not for loan, reserved or in transit + # item is withdrawn, lost or damaged if ( $item->{wthdrawn} || $item->{itemlost} || $item->{damaged} @@ -1686,8 +1687,8 @@ sub searchResults { $item_in_transit_count++ if $transfertwhen ne ''; $item_onhold_count++ if $reservestatus eq 'Waiting'; $item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan}; - - # can place hold on item ? + + # can place hold on item ? if ((!$item->{damaged} || C4::Context->preference('AllowHoldsOnDamagedItems')) && !$item->{itemlost} && !$item->{withdrawn} @@ -1695,6 +1696,7 @@ sub searchResults { $can_place_holds = 1; } + $other_count++; my $key = $prefix . $item->{status}; @@ -2599,9 +2601,20 @@ $template->param ( MYLOOP => C4::Search::z3950_search_args($searchscalar) ) =cut + + + sub z3950_search_args { my $bibrec = shift; - $bibrec = { title => $bibrec } if !ref $bibrec; + my $isbn = Business::ISBN->new($bibrec); + + if (defined $isbn && $isbn->is_valid) + { + $bibrec = { isbn => $bibrec } if !ref $bibrec; +} +else { + $bibrec = { title => $bibrec } if !ref $bibrec; +} my $array = []; for my $field (qw/ lccn isbn issn title author dewey subject /) { @@ -2641,6 +2654,9 @@ OR adds a new authority record =cut + + + sub BiblioAddAuthorities{ my ( $record, $frameworkcode ) = @_; my $dbh=C4::Context->dbh; -- 1.7.4.1 From Katrin.Fischer.83 at web.de Sun Jul 17 16:27:05 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sun, 17 Jul 2011 16:27:05 +0200 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_Bug_6595=3A_Add_German_trans?= =?utf-8?q?lation_of_purchase_suggestion_mails?= Message-ID: <1310912825-10338-1-git-send-email-Katrin.Fischer.83@web.de> Translates the purchase suggestion mails in sample_notices.sql from English to German. --- .../data/mysql/de-DE/mandatory/sample_notices.sql | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql index 6bb636a..84bdca6 100644 --- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql +++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql @@ -12,7 +12,7 @@ VALUES ('circulation','ODUE','Mahnung','Mahnung','Liebe/r < ('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>>).'), -('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>>'); +('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>>'), +('suggestions','REJECTED','Anschaffungsvorschlag nicht angenommen', 'Ihr Anschaffungsvorschlag wurde nicht angenommen','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haven der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> von <<suggestions.author>>.\n\nDie Bibliothek hat diesen Titel heute recherchiert und sich gegen eine Anschaffung entschieden.\n\nBegr?ndung: <<suggestions.reason>>\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'); -- 1.7.4.1 From Katrin.Fischer.83 at web.de Sun Jul 17 17:20:52 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sun, 17 Jul 2011 17:20:52 +0200 Subject: [Koha-patches] =?utf-8?q?=5BPATCH_2/2=5D_Bug_6595=3A_Fixing_Germa?= =?utf-8?q?n_translation_and_address_formatting_=28HOLD=5FPRINT=29?= Message-ID: <1310916052-11477-1-git-send-email-Katrin.Fischer.83@web.de> Patch fixes some translation issues and address formatting for printed hold notices. --- .../data/mysql/de-DE/mandatory/sample_notices.sql | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql index 84bdca6..166c36d 100644 --- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql +++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql @@ -8,7 +8,7 @@ VALUES ('circulation','ODUE','Mahnung','Mahnung','Liebe/r <<borrowers.firstname> ('circulation','PREDUE','Erinnerungsbenachrichtigung','Erinnerungsbenachrichtigung','Liebe/r <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nFolgende Ausleihe wird bald f?llig:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)'), ('circulation','PREDUEDGST','Erinnerungsbenachrichtigung (Zusammenfassung)','Erinnerungsbenachrichtigung','Sie haben <<count>> Ausleihen, die bald f?llig werden.'), ('reserves', 'HOLD', 'Vormerkbenachrichtigung', 'Vormerkung abholbereit in <<branches.branchname>>', 'Liebe/r <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nF?r Sie liegt seit <<reserves.waitingdate>> eine Vormerkung zur Abholung bereit:\r\n\r\nTitel: <<biblio.title>>\r\nVerfasser: <<biblio.author>>\r\nExemplar: <<items.copynumber>>\r\nStandort: <<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress3>>\r\n<<branches.branchcity>> <<branches.branchzip>>'), -('reserves', 'HOLD_PRINT', 'Vormerkbenachrichtigung (gedruckte Benachrichtigung)', 'Vormerkung abholbereit (gedruckte Benachrichtigung)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\n?nderung angefra\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\nF?r Sie liegt seit dem <<reserves.waitingdate>> eine Vormerkung zur Abholung bereit:\r\n\r\nTitel: <<biblio.title>>\r\nVerfasser: <<biblio.author>>\r\nExemplar: <<items.copynumber>>\r\n'), +('reserves', 'HOLD_PRINT', 'Vormerkbenachrichtigung (Print)', 'Vormerkbenachrichtigung (Print)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchzip>> <<branches.branchcity>>\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.address2>>\r\n<<borrowers.zipcode>> <<borrowers.city>>\r\n<<borrowers.country>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nLiebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nF?r Sie liegt seit dem <<reserves.waitingdate>> eine Vormerkung zur Abholung bereit:\r\n\r\nTitel: <<biblio.title>>\r\nVerfasser: <<biblio.author>>\r\nSignatur: <<items.itemcallnumber>>\r\n'), ('circulation','CHECKIN','R?ckgabequittung (Zusammenfassung)','R?ckgabequittung','Die folgenden Medien wurden zur?ckgegeben:\r\n----\r\n<<biblio.title>>\r\n----\r\nVielen Dank.'), ('circulation','CHECKOUT','Ausleihquittung (Zusammenfassung)','Ausleihquittung','Die folgenden Medien wurden entliehen:\r\n----\r\n<<biblio.title>>\r\n----\r\nVielen Dank f?r Ihren Besuch in <<branches.branchname>>.'), ('reserves', 'HOLDPLACED', 'Neue Vormerkung', 'Neue Vormerkung','Folgender Titel wurde vorgemerkt: <<title>> (<<biblionumber>>) durch den Benutzer <<firstname>> <<surname>> (<<cardnumber>>).'), -- 1.7.4.1 From Katrin.Fischer.83 at web.de Sun Jul 17 20:58:15 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sun, 17 Jul 2011 20:58:15 +0200 Subject: [Koha-patches] [PATCH] Bug 4497: Make tabs for managing suggestions translatable Message-ID: <1310929095-19637-1-git-send-email-Katrin.Fischer.83@web.de> This patch makes the tabs on the manage suggestion page translatable. To test: - Create some suggestions in intranet or opac and manage them to make the different status tabs appear: accecpted, pending, checked, rejected - Apply patch, run 'perl translate update <languagecode>' - Check po file for string '%s %sPending %sAccepted %sChecked %sRejected %sAvailable %sOrdered%s %s%s %sNo name%s (%s)' - Translate it, save and run 'perl translate install <languagecode>' Tabs should now appear translated. --- .../prog/en/modules/suggestion/suggestion.tt | 10 +++++++++- 1 files changed, 9 insertions(+), 1 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 8bcf5cb..38d784f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -204,7 +204,15 @@ $(document).ready(function() { calcNewsuggTotal(); }); <div id="suggestiontabs" class="toptabs"> <ul class="ui-tabs-nav"> [% FOREACH suggestion IN suggestions %] -[% IF ( suggestion.first ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="suggestion.pl#[% suggestion.suggestiontype %]">[% IF ( suggestion.suggestiontypelabel ) %][% suggestion.suggestiontypelabel %][% ELSE %]No name[% END %] ([% suggestion.suggestionscount %])</a></li> +[% IF ( suggestion.first ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="suggestion.pl#[% suggestion.suggestiontype %]">[% IF ( suggestion.suggestiontypelabel ) %] + [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending + [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted + [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked + [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected + [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available + [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered[% ELSE %] + [% suggestion.suggestiontypelabel %][% END %] + [% ELSE %]No name[% END %] ([% suggestion.suggestionscount %])</a></li> [% END %] </ul> </div> -- 1.7.4.1 From Katrin.Fischer.83 at web.de Sun Jul 17 22:48:15 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sun, 17 Jul 2011 22:48:15 +0200 Subject: [Koha-patches] [PATCH] Bug 4433: Small display problem for topical subjects Message-ID: <1310935695-21916-1-git-send-email-Katrin.Fischer.83@web.de> This removes the subfield codes shown for topical subject authorities only. To test: - Add different authority records and at least one for a topical subject. - Use search in intranet and opac (turn on opacauthorities) to serch for your subjects. - All headings will show without the subfield codes (at least $a in front), except the topical subject. This patch removes the subfield codes for the topical headings. --- C4/AuthoritiesMarc.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index fa2ef00..e206d25 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -1075,8 +1075,8 @@ sub BuildSummary{ } elsif ($record->field('148')) { $heading.= $field->as_string('abvxyz68'); } elsif ($record->field('150')) { - # $heading.= $field->as_string('abvxyz68'); - $heading.= $field->as_formatted(); + $heading.= $field->as_string('abvxyz68'); + #$heading.= $field->as_formatted(); my $tag=$field->tag(); $heading=~s /^$tag//g; $heading =~s /\_/\$/g; -- 1.7.4.1 From magnus at enger.priv.no Sun Jul 17 23:27:43 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Sun, 17 Jul 2011 23:27:43 +0200 Subject: [Koha-patches] [PATCH] Bug 6540 - Make ZEBRA_MARC_FORMAT and ZEBRA_LANGUAGE configurable for koha-create Message-ID: <1310938063-31714-1-git-send-email-magnus@enger.priv.no> --- debian/scripts/koha-create | 4 ++++ debian/templates/zebra-authorities-dom-site.cfg.in | 2 +- debian/templates/zebra-authorities-site.cfg.in | 2 +- debian/templates/zebra-biblios-site.cfg.in | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index e3c73fc..c3bd465 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -36,6 +36,8 @@ generate_config_file() { -e "s/__OPACSERVER__/$domain/g" \ -e "s/__INTRASERVER__/$intradomain/g" \ -e "s/__ZEBRA_PASS__/$zebrapwd/g" \ + -e "s/__ZEBRA_MARC_FORMAT__/$ZEBRA_MARC_FORMAT/g" \ + -e "s/__ZEBRA_LANGUAGE__/$ZEBRA_LANGUAGE/g" \ -e "s/__DB_NAME__/$mysqldb/g" \ -e "s/__DB_HOST__/$mysqlhost/g" \ -e "s/__DB_USER__/$mysqluser/g" \ @@ -65,6 +67,8 @@ INTRAPORT="8080" INTRAPREFIX="" INTRASUFFIX="" DEFAULTSQL="" +ZEBRA_MARC_FORMAT="marc21" +ZEBRA_LANGUAGE="en" if [ -e /etc/koha/koha-sites.conf ] then . /etc/koha/koha-sites.conf diff --git a/debian/templates/zebra-authorities-dom-site.cfg.in b/debian/templates/zebra-authorities-dom-site.cfg.in index 5b8fd7a..524e4fb 100644 --- a/debian/templates/zebra-authorities-dom-site.cfg.in +++ b/debian/templates/zebra-authorities-dom-site.cfg.in @@ -4,7 +4,7 @@ # $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $ # # Where are the config files located? -profilePath:/etc/koha/zebradb/authorities/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/marc21/authorities:/etc/koha/zebradb/lang_defs/en:/etc/koha/zebradb/xsl +profilePath:/etc/koha/zebradb/authorities/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/__ZEBRA_MARC_FORMAT__/authorities:/etc/koha/zebradb/lang_defs/__ZEBRA_LANGUAGE__:/etc/koha/zebradb/xsl encoding: UTF-8 # modulePath - where to look for loadable zebra modules diff --git a/debian/templates/zebra-authorities-site.cfg.in b/debian/templates/zebra-authorities-site.cfg.in index 01cd347..dc67a19 100644 --- a/debian/templates/zebra-authorities-site.cfg.in +++ b/debian/templates/zebra-authorities-site.cfg.in @@ -4,7 +4,7 @@ # $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $ # # Where are the config files located? -profilePath:/etc/koha/zebradb/authorities/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/marc21/authorities:/etc/koha/zebradb/lang_defs/en +profilePath:/etc/koha/zebradb/authorities/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/__ZEBRA_MARC_FORMAT__/authorities:/etc/koha/zebradb/lang_defs/__ZEBRA_LANGUAGE__ encoding: UTF-8 # modulePath - where to look for loadable zebra modules diff --git a/debian/templates/zebra-biblios-site.cfg.in b/debian/templates/zebra-biblios-site.cfg.in index fea467f..f1cfb07 100644 --- a/debian/templates/zebra-biblios-site.cfg.in +++ b/debian/templates/zebra-biblios-site.cfg.in @@ -3,7 +3,7 @@ # $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $ # # Where are the config files located? -profilePath:/etc/koha/zebradb/biblios/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/marc21/biblios:/etc/koha/zebradb/lang_defs/en +profilePath:/etc/koha/zebradb/biblios/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/__ZEBRA_MARC_FORMAT__/biblios:/etc/koha/zebradb/lang_defs/__ZEBRA_LANGUAGE__ # modulePath - where to look for loadable zebra modules modulePath: /usr/lib/idzebra-2.0/modules -- 1.7.4.1 From Katrin.Fischer.83 at web.de Sun Jul 17 23:43:55 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sun, 17 Jul 2011 23:43:55 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5263 - Add support for including fields from the ISSUES table in advanced due notices Message-ID: <1310939035-22951-1-git-send-email-Katrin.Fischer.83@web.de> From: Chris Nighswonger <cnighswonger at foundations.edu> Adding support for including fields from the Issues table in advanced due notices. This is primarily to allow the inclusion of the due date for each item in the advanced due notice, but will allow the inclusion of any field from the ISSUES table. This also adds code to exclude timestamp fields as these are irrelevant to the end user in this context. Note: Documentation should be updated to reflect the availability of the additional fields in all circulation notices. Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de> --- C4/Letters.pm | 2 ++ misc/cronjobs/advance_notices.pl | 7 ++++++- tools/letter.pl | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index cb47c7e..6846a00 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -489,6 +489,8 @@ sub parseletter_sth { ($table eq 'biblio' ) ? "SELECT * FROM $table WHERE biblionumber = ?" : ($table eq 'biblioitems' ) ? "SELECT * FROM $table WHERE biblionumber = ?" : ($table eq 'items' ) ? "SELECT * FROM $table WHERE itemnumber = ?" : + ($table eq 'issues' ) ? "SELECT * FROM $table WHERE itemnumber = ?" : + ($table eq 'suggestions' ) ? "SELECT * FROM $table WHERE borrowernumber = ? and biblionumber = ?" : ($table eq 'reserves' ) ? "SELECT * FROM $table WHERE borrowernumber = ? and biblionumber = ?" : ($table eq 'borrowers' ) ? "SELECT * FROM $table WHERE borrowernumber = ?" : ($table eq 'branches' ) ? "SELECT * FROM $table WHERE branchcode = ?" : diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl index a573e96..3ca4835 100755 --- a/misc/cronjobs/advance_notices.pl +++ b/misc/cronjobs/advance_notices.pl @@ -170,6 +170,7 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { borrowernumber => $upcoming->{'borrowernumber'}, branchcode => $upcoming->{'branchcode'}, biblionumber => $biblio->{'biblionumber'}, + itemnumber => $upcoming->{'itemnumber'}, substitute => { 'items.content' => $titles } } ); } @@ -201,6 +202,7 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { borrowernumber => $upcoming->{'borrowernumber'}, branchcode => $upcoming->{'branchcode'}, biblionumber => $biblio->{'biblionumber'}, + itemnumber => $upcoming->{'itemnumber'}, substitute => { 'items.content' => $titles } } ); } @@ -345,10 +347,13 @@ sub parse_letter { if ( $params->{'branchcode'} ) { C4::Letters::parseletter( $params->{'letter'}, 'branches', $params->{'branchcode'} ); } - + if ( $params->{'itemnumber'} ) { + C4::Letters::parseletter( $params->{'letter'}, 'issues', $params->{'itemnumber'} ); + } if ( $params->{'biblionumber'} ) { C4::Letters::parseletter( $params->{'letter'}, 'biblio', $params->{'biblionumber'} ); C4::Letters::parseletter( $params->{'letter'}, 'biblioitems', $params->{'biblionumber'} ); + C4::Letters::parseletter( $params->{'letter'}, 'items', $params->{'biblionumber'} ); } return $params->{'letter'}; diff --git a/tools/letter.pl b/tools/letter.pl index ab6039c..39c2ffb 100755 --- a/tools/letter.pl +++ b/tools/letter.pl @@ -172,7 +172,7 @@ sub add_form { push @{$field_selection}, add_fields('biblio','biblioitems'), {value => q{}, text => '---ITEMS---' }, {value => 'items.content', text => 'items.content'}, - add_fields('borrowers'); + add_fields('issues','borrowers'); } $template->param( @@ -309,6 +309,7 @@ sub get_columns_for { my $table_prefix = $table . q|.|; my $rows = C4::Context->dbh->selectall_arrayref($sql, { Slice => {} }); for my $row (@{$rows}) { + next if $row->{'Field'} eq 'timestamp'; # this is really an irrelevant field and there may be other common fields that should be excluded from the list push @fields, { value => $table_prefix . $row->{Field}, text => $table_prefix . $row->{Field}, -- 1.7.4.1 From M.de.Rooy at rijksmuseum.nl Mon Jul 18 09:07:52 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 18 Jul 2011 07:07:52 +0000 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 4433: Small display problem for topical subjects Message-ID: <809BE39CD64BFD4EB9036172EBCCFA312EFF2A@S-MAIL-1B.rijksmuseum.intra> From: Katrin Fischer <Katrin.Fischer.83 at web.de> This removes the subfield codes shown for topical subject authorities only. To test: - Add different authority records and at least one for a topical subject. - Use search in intranet and opac (turn on opacauthorities) to serch for your subjects. - All headings will show without the subfield codes (at least $a in front), except the topical subject. This patch removes the subfield codes for the topical headings. Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl> Works as advertised in opac and staff. (July 18, 2011) --- C4/AuthoritiesMarc.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index fa2ef00..e206d25 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -1075,8 +1075,8 @@ sub BuildSummary{ } elsif ($record->field('148')) { $heading.= $field->as_string('abvxyz68'); } elsif ($record->field('150')) { - # $heading.= $field->as_string('abvxyz68'); - $heading.= $field->as_formatted(); + $heading.= $field->as_string('abvxyz68'); + #$heading.= $field->as_formatted(); my $tag=$field->tag(); $heading=~s /^$tag//g; $heading =~s /\_/\$/g; -- 1.6.0.6 From colin.campbell at ptfs-europe.com Mon Jul 18 13:50:42 2011 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Mon, 18 Jul 2011 12:50:42 +0100 Subject: [Koha-patches] [PATCH] Bug 6598 : ensure OPACFineRenewals can prevent opac renewals Message-ID: <1310989842-13393-1-git-send-email-colin.campbell@ptfs-europe.com> patron_flagged was being passed at global scope to the template but being checked as an element in other structures Also although items could not be selected the Renew Selected button was displayed, it too should check the flag Amended the preference text which incorrectly suggested the option could be turned off. (leading to the opposite to what the user might expect) In the script have explicitly assigned the value to a inumeric variable rather than making an implicit conversion as it may be that readers were missing that sleight of hand --- .../prog/en/modules/admin/preferences/opac.pref | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 24 ++++++++++--------- opac/opac-user.pl | 6 +++- 3 files changed, 18 insertions(+), 14 deletions(-) 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 f4be568..56f479e 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 @@ -320,7 +320,7 @@ OPAC: - Only allow patrons to renew their own books on the OPAC if they have less than - pref: OPACFineNoRenewals class: currency - - '[% local_currency %] in fines (leave blank to disable).' + - '[% local_currency %] in fines (set a large value to always allow renewal).' - - pref: OPACViewOthersSuggestions choices: 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 e6a44a8..f8b8063 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -110,8 +110,8 @@ $.tablesorter.addParser({ [% IF ( BORROWER_INF.lost ) %] <li><strong>Please note: </strong> Your library card has been marked as lost or stolen. If this is an error, please contact the library.</li> [% END %] - [% IF ( BORROWER_INF.renewal_blocked_fines ) %] - <li><strong>Please note: </strong> Since you have <a href="/cgi-bin/koha/opac-account.pl">more than [% BORROWER_INF.renewal_blocked_fines %]</a> in fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.</li> + [% IF renewal_blocked_fines %] + <li><strong>Please note: </strong> Since you have <a href="/cgi-bin/koha/opac-account.pl">more than [% renewal_blocked_fines %]</a> in fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.</li> [% END %] </ul></div> [% END %] @@ -205,7 +205,7 @@ $.tablesorter.addParser({ <th>Call No.</th> <th>Due</th> [% IF ( OpacRenewalAllowed ) %] - [% UNLESS ( patron_flagged ) %]<th>Renew</th>[% END %] + [% UNLESS patron_flagged %]<th>Renew</th>[% END %] [% END %] [% IF ( OPACFinesTab ) %] <th>Fines</th> @@ -253,7 +253,7 @@ $.tablesorter.addParser({ <td>[% ISSUE.date_due %]</td> [% END %] [% IF ( OpacRenewalAllowed ) %] - [% UNLESS ( ISSUE.patron_flagged ) %] + [% UNLESS patron_flagged %] <td>[% IF ( ISSUE.status ) %]<input type="checkbox" name="item" value="[% ISSUE.itemnumber %]"/><a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&item=[% ISSUE.itemnumber %]&borrowernumber=[% ISSUE.borrowernumber %]">Renew</a> <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span> [% ELSE %] Not renewable[% IF ( ISSUE.too_many ) %] <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>[% ELSE %][% IF ( ISSUE.on_reserve ) %] <span class="renewals">(On hold)</span>[% END %][% END %] @@ -269,10 +269,12 @@ $.tablesorter.addParser({ </tr> [% END %]</tbody> </table> - - [% IF ( OpacRenewalAllowed ) %] - <input type="submit" value="Renew Selected" /> - [% END %] + + [% IF OpacRenewalAllowed %] + [% UNLESS patron_flagged %] + <input type="submit" value="Renew Selected" /> + [% END %] + [% END %] </form> [% IF ( OpacRenewalAllowed ) %] @@ -282,7 +284,7 @@ $.tablesorter.addParser({ [% FOREACH ISSUE IN ISSUES %] <input type="hidden" name="item" value="[% ISSUE.itemnumber %]" /> [% END %] - [% UNLESS ( patron_flagged ) %]<input type="submit" value="Renew All" />[% END %] + [% UNLESS patron_flagged %]<input type="submit" value="Renew All" />[% END %] </form> [% END %] [% ELSE %] @@ -304,7 +306,7 @@ $.tablesorter.addParser({ <th>Call No.</th> <th>Due</th> [% IF ( OpacRenewalAllowed ) %] - [% UNLESS ( patron_flagged ) %]<th>Renew</th>[% END %][% END %] + [% UNLESS patron_flagged %]<th>Renew</th>[% END %][% END %] [% IF ( OPACFinesTab ) %] <th>Fines</th> [% END %] @@ -336,7 +338,7 @@ $.tablesorter.addParser({ <td>[% OVERDUE.itemcallnumber %]</td> <td>[% OVERDUE.date_due %]</td> [% IF ( OpacRenewalAllowed ) %] - [% UNLESS ( OVERDUE.patron_flagged ) %] + [% UNLESS patron_flagged %] <td> [% IF ( OVERDUE.debarred ) %]Account Frozen [% ELSIF ( OVERDUE.status ) %] diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 2c31ce7..97574b1 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -79,11 +79,13 @@ if ( $borr->{'amountoutstanding'} > 5 ) { if ( 5 >= $borr->{'amountoutstanding'} && $borr->{'amountoutstanding'} > 0 ) { $borr->{'amountoverzero'} = 1; } +my $no_renewal_amt = C4::Context->preference( 'OPACFineNoRenewals' ); +$no_renewal_amt ||= 0; -if ( $borr->{'amountoutstanding'} > C4::Context->preference( 'OPACFineNoRenewals' ) ) { +if ( $borr->{amountoutstanding} > $no_renewal_amt ) { $borr->{'flagged'} = 1; $template->param( - renewal_blocked_fines => sprintf( "%.02f", C4::Context->preference( 'OPACFineNoRenewals' ) ), + renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ), ); } -- 1.7.6 From nengard at bywatersolutions.com Thu Jul 14 12:58:59 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Thu, 14 Jul 2011 06:58:59 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6598 : ensure OPACFineRenewals can prevent opac renewals Message-ID: <1310641139-18293-1-git-send-email-nengard@bywatersolutions.com> From: Colin Campbell <colin.campbell at ptfs-europe.com> patron_flagged was being passed at global scope to the template but being checked as an element in other structures Also although items could not be selected the Renew Selected button was displayed, it too should check the flag Amended the preference text which incorrectly suggested the option could be turned off. (leading to the opposite to what the user might expect) In the script have explicitly assigned the value to a inumeric variable rather than making an implicit conversion as it may be that readers were missing that sleight of hand Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com> --- .../prog/en/modules/admin/preferences/opac.pref | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 24 ++++++++++--------- opac/opac-user.pl | 6 +++- 3 files changed, 18 insertions(+), 14 deletions(-) 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 f4be568..56f479e 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 @@ -320,7 +320,7 @@ OPAC: - Only allow patrons to renew their own books on the OPAC if they have less than - pref: OPACFineNoRenewals class: currency - - '[% local_currency %] in fines (leave blank to disable).' + - '[% local_currency %] in fines (set a large value to always allow renewal).' - - pref: OPACViewOthersSuggestions choices: 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 e6a44a8..f8b8063 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -110,8 +110,8 @@ $.tablesorter.addParser({ [% IF ( BORROWER_INF.lost ) %] <li><strong>Please note: </strong> Your library card has been marked as lost or stolen. If this is an error, please contact the library.</li> [% END %] - [% IF ( BORROWER_INF.renewal_blocked_fines ) %] - <li><strong>Please note: </strong> Since you have <a href="/cgi-bin/koha/opac-account.pl">more than [% BORROWER_INF.renewal_blocked_fines %]</a> in fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.</li> + [% IF renewal_blocked_fines %] + <li><strong>Please note: </strong> Since you have <a href="/cgi-bin/koha/opac-account.pl">more than [% renewal_blocked_fines %]</a> in fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.</li> [% END %] </ul></div> [% END %] @@ -205,7 +205,7 @@ $.tablesorter.addParser({ <th>Call No.</th> <th>Due</th> [% IF ( OpacRenewalAllowed ) %] - [% UNLESS ( patron_flagged ) %]<th>Renew</th>[% END %] + [% UNLESS patron_flagged %]<th>Renew</th>[% END %] [% END %] [% IF ( OPACFinesTab ) %] <th>Fines</th> @@ -253,7 +253,7 @@ $.tablesorter.addParser({ <td>[% ISSUE.date_due %]</td> [% END %] [% IF ( OpacRenewalAllowed ) %] - [% UNLESS ( ISSUE.patron_flagged ) %] + [% UNLESS patron_flagged %] <td>[% IF ( ISSUE.status ) %]<input type="checkbox" name="item" value="[% ISSUE.itemnumber %]"/><a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&item=[% ISSUE.itemnumber %]&borrowernumber=[% ISSUE.borrowernumber %]">Renew</a> <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span> [% ELSE %] Not renewable[% IF ( ISSUE.too_many ) %] <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>[% ELSE %][% IF ( ISSUE.on_reserve ) %] <span class="renewals">(On hold)</span>[% END %][% END %] @@ -269,10 +269,12 @@ $.tablesorter.addParser({ </tr> [% END %]</tbody> </table> - - [% IF ( OpacRenewalAllowed ) %] - <input type="submit" value="Renew Selected" /> - [% END %] + + [% IF OpacRenewalAllowed %] + [% UNLESS patron_flagged %] + <input type="submit" value="Renew Selected" /> + [% END %] + [% END %] </form> [% IF ( OpacRenewalAllowed ) %] @@ -282,7 +284,7 @@ $.tablesorter.addParser({ [% FOREACH ISSUE IN ISSUES %] <input type="hidden" name="item" value="[% ISSUE.itemnumber %]" /> [% END %] - [% UNLESS ( patron_flagged ) %]<input type="submit" value="Renew All" />[% END %] + [% UNLESS patron_flagged %]<input type="submit" value="Renew All" />[% END %] </form> [% END %] [% ELSE %] @@ -304,7 +306,7 @@ $.tablesorter.addParser({ <th>Call No.</th> <th>Due</th> [% IF ( OpacRenewalAllowed ) %] - [% UNLESS ( patron_flagged ) %]<th>Renew</th>[% END %][% END %] + [% UNLESS patron_flagged %]<th>Renew</th>[% END %][% END %] [% IF ( OPACFinesTab ) %] <th>Fines</th> [% END %] @@ -336,7 +338,7 @@ $.tablesorter.addParser({ <td>[% OVERDUE.itemcallnumber %]</td> <td>[% OVERDUE.date_due %]</td> [% IF ( OpacRenewalAllowed ) %] - [% UNLESS ( OVERDUE.patron_flagged ) %] + [% UNLESS patron_flagged %] <td> [% IF ( OVERDUE.debarred ) %]Account Frozen [% ELSIF ( OVERDUE.status ) %] diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 2c31ce7..97574b1 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -79,11 +79,13 @@ if ( $borr->{'amountoutstanding'} > 5 ) { if ( 5 >= $borr->{'amountoutstanding'} && $borr->{'amountoutstanding'} > 0 ) { $borr->{'amountoverzero'} = 1; } +my $no_renewal_amt = C4::Context->preference( 'OPACFineNoRenewals' ); +$no_renewal_amt ||= 0; -if ( $borr->{'amountoutstanding'} > C4::Context->preference( 'OPACFineNoRenewals' ) ) { +if ( $borr->{amountoutstanding} > $no_renewal_amt ) { $borr->{'flagged'} = 1; $template->param( - renewal_blocked_fines => sprintf( "%.02f", C4::Context->preference( 'OPACFineNoRenewals' ) ), + renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ), ); } -- 1.7.2.3 From oleonard at myacpl.org Mon Jul 18 14:40:56 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 18 Jul 2011 08:40:56 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF]Bug 4497: Make tabs for managing suggestions translatable Message-ID: <1310992856-4069-1-git-send-email-oleonard@myacpl.org> From: Katrin Fischer <Katrin.Fischer.83 at web.de> This patch makes the tabs on the manage suggestion page translatable. To test: - Create some suggestions in intranet or opac and manage them to make the different status tabs appear: accecpted, pending, checked, rejected - Apply patch, run 'perl translate update <languagecode>' - Check po file for string '%s %sPending %sAccepted %sChecked %sRejected %sAvailable %sOrdered%s %s%s %sNo name%s (%s)' - Translate it, save and run 'perl translate install <languagecode>' Tabs should now appear translated. Signed-off-by: Owen Leonard <oleonard at myacpl.org> --- .../prog/en/modules/suggestion/suggestion.tt | 10 +++++++++- 1 files changed, 9 insertions(+), 1 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 8bcf5cb..38d784f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -204,7 +204,15 @@ $(document).ready(function() { calcNewsuggTotal(); }); <div id="suggestiontabs" class="toptabs"> <ul class="ui-tabs-nav"> [% FOREACH suggestion IN suggestions %] -[% IF ( suggestion.first ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="suggestion.pl#[% suggestion.suggestiontype %]">[% IF ( suggestion.suggestiontypelabel ) %][% suggestion.suggestiontypelabel %][% ELSE %]No name[% END %] ([% suggestion.suggestionscount %])</a></li> +[% IF ( suggestion.first ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="suggestion.pl#[% suggestion.suggestiontype %]">[% IF ( suggestion.suggestiontypelabel ) %] + [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending + [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted + [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked + [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected + [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available + [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered[% ELSE %] + [% suggestion.suggestiontypelabel %][% END %] + [% ELSE %]No name[% END %] ([% suggestion.suggestionscount %])</a></li> [% END %] </ul> </div> -- 1.7.3 From oleonard at myacpl.org Mon Jul 18 15:38:56 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 18 Jul 2011 09:38:56 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6596 - Acq framework has white space for hidden fields Message-ID: <1310996336-4644-1-git-send-email-oleonard@myacpl.org> Moving the "hidden" style from the <div> inside the <li> to the <li> itself. --- .../prog/en/modules/acqui/neworderempty.tt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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 dd15658..d6044fc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -278,8 +278,8 @@ $(document).ready(function() [% FOREACH item IN items %] <div id="outeritemblock"> <div id="itemblock"> - <ol>[% FOREACH iteminformatio IN item.iteminformation %]<li> - <div class="subfield_line" style="[% iteminformatio.hidden %];" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]"> + <ol>[% FOREACH iteminformatio IN item.iteminformation %]<li style="[% iteminformatio.hidden %];"> + <div class="subfield_line" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]"> <label>[% iteminformatio.subfield %] - [% IF ( iteminformatio.mandatory ) %]<b>[% END %][% iteminformatio.marc_lib %][% IF ( iteminformatio.mandatory ) %] *</b>[% END %]</label> [% iteminformatio.marc_value %] -- 1.7.3 From magnus at enger.priv.no Mon Jul 18 15:38:00 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Mon, 18 Jul 2011 15:38:00 +0200 Subject: [Koha-patches] [PATCH 2/2] Bug 6540 - Followup patch adding command line options Message-ID: <1310996280-15609-1-git-send-email-magnus@enger.priv.no> This adds the --marcflavor and --zebralang commandline options, as well as short versions of all options. --- debian/scripts/koha-create | 36 +++++++++++++++++++++++------------- 1 files changed, 23 insertions(+), 13 deletions(-) diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index c3bd465..08f4baf 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -19,13 +19,11 @@ set -e - die() { echo "$@" 1>&2 exit 1 } - generate_config_file() { touch "$2" chown "root:$username" "$2" @@ -60,7 +58,6 @@ getinstancemysqlpassword() { "/etc/koha/sites/$1/koha-conf.xml" } - # Set defaults and read config file, if it exists. DOMAIN="" INTRAPORT="8080" @@ -74,18 +71,31 @@ then . /etc/koha/koha-sites.conf fi +[ $# -ge 2 ] && [ $# -le 6 ] || + die "Usage: $0 [--create-db|--request-db|--populate-db] \ +[--marcflavor marc21|normarc|unimarc] \ +[--zebralang en|fr|nb] instancename" + +TEMP=`getopt -o crpm:l: -l create-db,request-db,populate-db,marcflavor:,zebralang: \ + -n "$0" -- "$@"` + +# Note the quotes around `$TEMP': they are essential! +eval set -- "$TEMP" + +while true ; do + case "$1" in + -c|--create-db) op=create ; shift ;; + -r|--request-db) op=request ; shift ;; + -p|--populate-db) op=populate ; shift ;; + -m|--marcflavor) ZEBRA_MARC_FORMAT="$2" ; shift 2 ;; + -l|--zebralang) ZEBRA_LANGUAGE="$2" ; shift 2 ;; + --) shift ; break ;; + *) die "Internal error! " ;; + esac +done -# Parse command line. -[ "$#" = 2 ] || - die "Usage: $0 [--create-db|--request-db|--populate-db] instancename" -case "$1" in - --create-db) op=create ;; - --request-db) op=request ;; - --populate-db) op=populate ;; - *) die "Usage: $0 [--create-db|--request-db|--populate-db] instancename" ;; -esac +name="$1" -name="$2" domain="$name$DOMAIN" if [ "$INTRAPORT" = 80 ] || [ "$INTRAPORT" = "" ] then -- 1.7.4.1 From nengard at bywatersolutions.com Thu Jul 14 16:08:34 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Thu, 14 Jul 2011 10:08:34 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6596 - Acq framework has white space for hidden fields Message-ID: <1310652514-18924-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard <oleonard at myacpl.org> Moving the "hidden" style from the <div> inside the <li> to the <li> itself. Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com> --- .../prog/en/modules/acqui/neworderempty.tt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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 dd15658..d6044fc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -278,8 +278,8 @@ $(document).ready(function() [% FOREACH item IN items %] <div id="outeritemblock"> <div id="itemblock"> - <ol>[% FOREACH iteminformatio IN item.iteminformation %]<li> - <div class="subfield_line" style="[% iteminformatio.hidden %];" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]"> + <ol>[% FOREACH iteminformatio IN item.iteminformation %]<li style="[% iteminformatio.hidden %];"> + <div class="subfield_line" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]"> <label>[% iteminformatio.subfield %] - [% IF ( iteminformatio.mandatory ) %]<b>[% END %][% iteminformatio.marc_lib %][% IF ( iteminformatio.mandatory ) %] *</b>[% END %]</label> [% iteminformatio.marc_value %] -- 1.7.2.3 From oleonard at myacpl.org Mon Jul 18 18:42:47 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 18 Jul 2011 12:42:47 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6599 - Don't show dictionary definition table if there are no definitions Message-ID: <1311007367-6120-1-git-send-email-oleonard@myacpl.org> --- .../prog/en/modules/reports/dictionary.tt | 94 ++++++++++---------- 1 files changed, 47 insertions(+), 47 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt index 23505ad..c4a8da5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt @@ -19,55 +19,55 @@ [% END %] <h1>Dictionary</h1> [% IF ( start_dictionary ) %] -<p>Use the dictionary to define custom criteria for reporting.</p> + <p>Use the dictionary to define custom criteria for reporting.</p> - -<h2>Current Terms</h2> -<form action="/cgi-bin/koha/reports/dictionary.pl" method="post"> -<input type="hidden" name="phase" value="View Dictionary" /> -Filter by area <select name="areas"> -<option value="">All</option> -[% FOREACH area IN areas %] - [% IF ( area.selected ) %] - <option value="[% area.id %]" selected="selected" >[% area.name %]</option> - [% ELSE %] - <option value="[% area.id %]">[% area.name %]</option> - [% END %] -[% END %] -</select> -<input name="submit" value="Go" type="submit" /> -</form> -<br /> -<table border="1" cellspacing="0" cellpadding="5"> -<tr> -<th>Name</th> -<th>Description</th> -<th>Area</th> -<th>Definition</th> -<th> </th> -</tr> -[% IF ( definitions ) %] -[% FOREACH definition IN definitions %] -[% UNLESS ( loop.odd ) %] -<tr class="highlight" valign="top"> -[% ELSE %] -<tr valign="top"> -[% END %] -<td>[% definition.name %]</td> -<td>[% definition.description %]</td> -<td>[% definition.areaname %]</td> -<td>[% definition.saved_sql %]</td> -<td><form method="post" action="/cgi-bin/koha/reports/dictionary.pl"> -<input type="hidden" name="id" value="[% definition.id %]" /> -<input type="hidden" name="phase" value="Delete Definition" /> -<input type="submit" name="submit" value="Delete Definition" /> -</form></td> -</tr> -[% END %] + [% IF ( definitions ) %] + <h2>Current Terms</h2> + <form action="/cgi-bin/koha/reports/dictionary.pl" method="post"> + <input type="hidden" name="phase" value="View Dictionary" /> + [% IF ( areas ) %] + Filter by area <select name="areas"> + <option value="">All</option> + [% FOREACH area IN areas %] + [% IF ( area.selected ) %] + <option value="[% area.id %]" selected="selected" >[% area.name %]</option> + [% ELSE %] + <option value="[% area.id %]">[% area.name %]</option> + [% END %] + [% END %] + </select> + <input name="submit" value="Go" type="submit" /> + </form> + <br /> + [% END %] + <table border="1" cellspacing="0" cellpadding="5"> + <tr> + <th>Name</th> + <th>Description</th> + <th>Area</th> + <th>Definition</th> + <th> </th> + </tr> + [% FOREACH definition IN definitions %] + [% UNLESS ( loop.odd ) %] + <tr class="highlight" valign="top"> + [% ELSE %] + <tr valign="top"> + [% END %] + <td>[% definition.name %]</td> + <td>[% definition.description %]</td> + <td>[% definition.areaname %]</td> + <td>[% definition.saved_sql %]</td> + <td><form method="post" action="/cgi-bin/koha/reports/dictionary.pl"> + <input type="hidden" name="id" value="[% definition.id %]" /> + <input type="hidden" name="phase" value="Delete Definition" /> + <input type="submit" name="submit" value="Delete Definition" /> + </form></td> + </tr> + [% END %] + </table> + [% END %] [% END %] -</table> -[% END %] - [% IF ( new_dictionary ) %] <form action="/cgi-bin/koha/reports/dictionary.pl" method="post"> -- 1.7.3 From nengard at bywatersolutions.com Mon Jul 18 19:03:32 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Mon, 18 Jul 2011 13:03:32 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6599 - Don't show dictionary definition table if there are no definitions Message-ID: <1311008612-1730-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard <oleonard at myacpl.org> Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com> --- .../prog/en/modules/reports/dictionary.tt | 94 ++++++++++---------- 1 files changed, 47 insertions(+), 47 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt index 23505ad..c4a8da5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt @@ -19,55 +19,55 @@ [% END %] <h1>Dictionary</h1> [% IF ( start_dictionary ) %] -<p>Use the dictionary to define custom criteria for reporting.</p> + <p>Use the dictionary to define custom criteria for reporting.</p> - -<h2>Current Terms</h2> -<form action="/cgi-bin/koha/reports/dictionary.pl" method="post"> -<input type="hidden" name="phase" value="View Dictionary" /> -Filter by area <select name="areas"> -<option value="">All</option> -[% FOREACH area IN areas %] - [% IF ( area.selected ) %] - <option value="[% area.id %]" selected="selected" >[% area.name %]</option> - [% ELSE %] - <option value="[% area.id %]">[% area.name %]</option> - [% END %] -[% END %] -</select> -<input name="submit" value="Go" type="submit" /> -</form> -<br /> -<table border="1" cellspacing="0" cellpadding="5"> -<tr> -<th>Name</th> -<th>Description</th> -<th>Area</th> -<th>Definition</th> -<th> </th> -</tr> -[% IF ( definitions ) %] -[% FOREACH definition IN definitions %] -[% UNLESS ( loop.odd ) %] -<tr class="highlight" valign="top"> -[% ELSE %] -<tr valign="top"> -[% END %] -<td>[% definition.name %]</td> -<td>[% definition.description %]</td> -<td>[% definition.areaname %]</td> -<td>[% definition.saved_sql %]</td> -<td><form method="post" action="/cgi-bin/koha/reports/dictionary.pl"> -<input type="hidden" name="id" value="[% definition.id %]" /> -<input type="hidden" name="phase" value="Delete Definition" /> -<input type="submit" name="submit" value="Delete Definition" /> -</form></td> -</tr> -[% END %] + [% IF ( definitions ) %] + <h2>Current Terms</h2> + <form action="/cgi-bin/koha/reports/dictionary.pl" method="post"> + <input type="hidden" name="phase" value="View Dictionary" /> + [% IF ( areas ) %] + Filter by area <select name="areas"> + <option value="">All</option> + [% FOREACH area IN areas %] + [% IF ( area.selected ) %] + <option value="[% area.id %]" selected="selected" >[% area.name %]</option> + [% ELSE %] + <option value="[% area.id %]">[% area.name %]</option> + [% END %] + [% END %] + </select> + <input name="submit" value="Go" type="submit" /> + </form> + <br /> + [% END %] + <table border="1" cellspacing="0" cellpadding="5"> + <tr> + <th>Name</th> + <th>Description</th> + <th>Area</th> + <th>Definition</th> + <th> </th> + </tr> + [% FOREACH definition IN definitions %] + [% UNLESS ( loop.odd ) %] + <tr class="highlight" valign="top"> + [% ELSE %] + <tr valign="top"> + [% END %] + <td>[% definition.name %]</td> + <td>[% definition.description %]</td> + <td>[% definition.areaname %]</td> + <td>[% definition.saved_sql %]</td> + <td><form method="post" action="/cgi-bin/koha/reports/dictionary.pl"> + <input type="hidden" name="id" value="[% definition.id %]" /> + <input type="hidden" name="phase" value="Delete Definition" /> + <input type="submit" name="submit" value="Delete Definition" /> + </form></td> + </tr> + [% END %] + </table> + [% END %] [% END %] -</table> -[% END %] - [% IF ( new_dictionary ) %] <form action="/cgi-bin/koha/reports/dictionary.pl" method="post"> -- 1.7.2.3 From oleonard at myacpl.org Mon Jul 18 21:42:33 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 18 Jul 2011 15:42:33 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6602 - Reports dictionary doesn't properly recognize text columns Message-ID: <1311018153-7266-1-git-send-email-oleonard@myacpl.org> Reports dictionary won't let you set a comparison for MEDIUMTEXT columns. To test, choose a MEDIUMTEXT column like borrowers.surname in Step 3 of adding a new dictionary definition. Before the patch, in Step 4 you would not see any kind of form field for entering a comparison. After patching Step 4 will offer you a field labeled "Search string matches." --- reports/dictionary.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/reports/dictionary.pl b/reports/dictionary.pl index 393c917..4f94d69 100755 --- a/reports/dictionary.pl +++ b/reports/dictionary.pl @@ -115,7 +115,7 @@ elsif ($phase eq 'New Term step 4'){ if ($type eq 'DATE' || $type eq 'DATETIME'){ $tmp_hash{'date'}=1; } - if ($type eq 'TEXT'){ + if ($type eq 'TEXT' || $type eq 'MEDIUMTEXT'){ $tmp_hash{'text'}=1; } # else { -- 1.7.3 From nengard at bywatersolutions.com Tue Jul 19 00:06:00 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Mon, 18 Jul 2011 18:06:00 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] BZ6412 : spaces in note Message-ID: <1311026760-2959-1-git-send-email-nengard@bywatersolutions.com> From: Paul Poulain <paul.poulain at biblibre.com> There was an improper T::T <input> construction: the note value contained spaces. This patch fixes the problem by using a correct [% IF %] construction Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com> --- .../intranet-tmpl/prog/en/modules/members/pay.tt | 6 +++--- 1 files changed, 3 insertions(+), 3 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 4f04ba7..ddc3d41 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt @@ -64,10 +64,10 @@ <td>[% loop_pa.description %] [% loop_pa.title |html %]</td> <td> [% IF ( loop_pa.net_balance ) %] - <input type="text" name="note[% loop_pa.i %]" value=" + <input type="text" name="note[% loop_pa.i %]" value="[% loop_pa.note %]" /> + [% ELSE %] + [% loop_pa.note %] [% END %] - [% loop_pa.note %] - [% IF ( loop_pa.net_balance ) %]" />[% END %] </td> <td>[% loop_pa.accounttype %]</td> <td>[% loop_pa.notify_id %]</td> -- 1.7.2.3 From juan.sieira at xercode.es Tue Jul 19 13:45:13 2011 From: juan.sieira at xercode.es (Juan Romay Sieira) Date: Tue, 19 Jul 2011 13:45:13 +0200 Subject: [Koha-patches] [PATCH 35/35] [Bug 6590] - Removing hyphens from isbn and issn. It removes hyphens from isbn and issn when zebra operations are executed and with rebuild_zebra.pl Message-ID: <1311075913-11835-1-git-send-email-juan.sieira@xercode.es> --- C4/Search.pm | 2 +- admin/systempreferences.pl | 1 + installer/data/mysql/de-DE/mandatory/sysprefs.sql | 1 + installer/data/mysql/en/mandatory/sysprefs.sql | 1 + .../1-Obligatoire/unimarc_standard_systemprefs.sql | 1 + installer/data/mysql/it-IT/necessari/sysprefs.sql | 1 + .../data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql | 1 + installer/data/mysql/pl-PL/mandatory/sysprefs.sql | 1 + ...m_preferences_full_optimal_for_install_only.sql | 1 + ...m_preferences_full_optimal_for_install_only.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 ++ .../en/modules/admin/preferences/cataloguing.pref | 6 ++ misc/bin/zebraqueue_daemon.pl | 33 ++++++++++ misc/cronjobs/zebraqueue_start.pl | 33 ++++++++++ misc/migration_tools/rebuild_zebra.pl | 63 ++++++++++++++++++++ .../xsl/RemoveISBN-ISSNHyphensMARC21.xsl | 56 +++++++++++++++++ .../xsl/RemoveISBN-ISSNHyphensUNIMARC.xsl | 56 +++++++++++++++++ 17 files changed, 264 insertions(+), 1 deletions(-) create mode 100644 misc/migration_tools/xsl/RemoveISBN-ISSNHyphensMARC21.xsl create mode 100644 misc/migration_tools/xsl/RemoveISBN-ISSNHyphensUNIMARC.xsl diff --git a/C4/Search.pm b/C4/Search.pm index c3cff65..069c55e 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1164,7 +1164,7 @@ sub buildQuery { $weight_fields, $fuzzy_enabled, $remove_stopwords ) = ( 0, 0, 0, 0, 0 ); - + $operand =~ s/-//g if (C4::Context->preference("IsbnIssnRemoveHyphens")); } if(not $index){ diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 87ecac4..884eafb 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -153,6 +153,7 @@ $tabsysprefs{'item-level_itypes'} = "Cataloging"; $tabsysprefs{OpacSuppression} = "Cataloging"; $tabsysprefs{SpineLabelFormat} = "Cataloging"; $tabsysprefs{SpineLabelAutoPrint} = "Cataloging"; +$tabsysprefs{IsbnIssnRemoveHyphens} = "Cataloging"; # Circulation $tabsysprefs{maxoutstanding} = "Circulation"; diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql b/installer/data/mysql/de-DE/mandatory/sysprefs.sql index 6eb67a3..6fe546a 100755 --- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql +++ b/installer/data/mysql/de-DE/mandatory/sysprefs.sql @@ -314,3 +314,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems' ,'','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O pacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index 0abf9d8..3b26b1a 100755 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -314,3 +314,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql index 59a258f..cc59963 100755 --- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql @@ -315,3 +315,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/it-IT/necessari/sysprefs.sql b/installer/data/mysql/it-IT/necessari/sysprefs.sql index dcdf0ee..35b2790 100755 --- a/installer/data/mysql/it-IT/necessari/sysprefs.sql +++ b/installer/data/mysql/it-IT/necessari/sysprefs.sql @@ -301,3 +301,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O pacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql index ca71769..1fbc993 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql @@ -321,3 +321,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','','free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql index 58ba035..0493267 100755 --- a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql +++ b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql @@ -313,3 +313,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql index 54c533c..53fb173 100755 --- a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -368,3 +368,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql index 9f095ab..0dbebe1 100755 --- a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -393,3 +393,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O pacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice'); +INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 8fb9656..975b64f 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4370,6 +4370,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`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo');"); + print "Upgrade to $DBversion done (Add SysPref to remove hyphens or not into isbn and issn)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref index 4fc1305..0632cab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref @@ -84,6 +84,12 @@ Cataloging: annual: generated in the form <year>-0001, <year>-0002. hbyymmincr: generated in the form <branchcode>yymm0001. "OFF": not generated automatically. + - + - pref: IsbnIssnRemoveHyphens + choices: + yes: "Remove" + no: "Don't remove" + - hyphens from ISBN and ISSN Display: - - 'Separate multiple displayed authors, series or subjects with ' diff --git a/misc/bin/zebraqueue_daemon.pl b/misc/bin/zebraqueue_daemon.pl index 6181a94..4529584 100755 --- a/misc/bin/zebraqueue_daemon.pl +++ b/misc/bin/zebraqueue_daemon.pl @@ -227,6 +227,39 @@ sub process_update { my $marcxml; if ($server eq "biblioserver") { my $marc = GetMarcBiblio($record_number); + # + if ($marc && C4::Context->preference("IsbnIssnRemoveHyphens")){ + my $isbn; + my $issn; + my $encoding = C4::Context->preference("marcflavour"); + if ( $encoding eq 'UNIMARC' ) { + foreach my $f010 ($marc->field('010')) { + if ( $f010->subfield('a') ) { + $isbn = $f010->subfield('a'); + $isbn =~ s/-//g; + $f010->update( 'a' => $isbn ); + } + } + foreach my $f011 ($marc->field('011')) { + if ( $f011->subfield('a') ) { + $issn = $f011->subfield('a'); + $issn =~ s/-//g; + $f011->update( 'a' => $issn ); + } + } + } elsif ($encoding eq 'MARC21' || $encoding eq 'NORMARC') { + foreach my $f020 ($marc->field('020')) { + $isbn = $f020->subfield('a'); + $isbn =~ s/-//g; + $f020->update( 'a' => $isbn ); + } + foreach my $f022 ($marc->field('022')) { + $issn = $f022->subfield('a'); + $issn =~ s/-//g; + $f022->update( 'a' => $issn ); + } + } + } $marcxml = $marc->as_xml_record() if $marc; } elsif ($server eq "authorityserver") { diff --git a/misc/cronjobs/zebraqueue_start.pl b/misc/cronjobs/zebraqueue_start.pl index ea84156..99c62e8 100755 --- a/misc/cronjobs/zebraqueue_start.pl +++ b/misc/cronjobs/zebraqueue_start.pl @@ -58,6 +58,39 @@ while (($id,$biblionumber,$operation,$server)=$readsth->fetchrow){ # get the XML if ($server eq "biblioserver") { my $marc = GetMarcBiblio($biblionumber); + # + if ($marc && C4::Context->preference("IsbnIssnRemoveHyphens")){ + my $isbn; + my $issn; + my $encoding = C4::Context->preference("marcflavour"); + if ( $encoding eq 'UNIMARC' ) { + foreach my $f010 ($marc->field('010')) { + if ( $f010->subfield('a') ) { + $isbn = $f010->subfield('a'); + $isbn =~ s/-//g; + $f010->update( 'a' => $isbn ); + } + } + foreach my $f011 ($marc->field('011')) { + if ( $f011->subfield('a') ) { + $issn = $f011->subfield('a'); + $issn =~ s/-//g; + $f011->update( 'a' => $issn ); + } + } + } elsif ($encoding eq 'MARC21' || $encoding eq 'NORMARC') { + foreach my $f020 ($marc->field('020')) { + $isbn = $f020->subfield('a'); + $isbn =~ s/-//g; + $f020->update( 'a' => $isbn ); + } + foreach my $f022 ($marc->field('022')) { + $issn = $f022->subfield('a'); + $issn =~ s/-//g; + $f022->update( 'a' => $issn ); + } + } + } $marcxml = $marc->as_xml_record() if $marc; } elsif ($server eq "authorityserver") { $marcxml =C4::AuthoritiesMarc::GetAuthorityXML($biblionumber); diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl index dadf43f..193f03b 100755 --- a/misc/migration_tools/rebuild_zebra.pl +++ b/misc/migration_tools/rebuild_zebra.pl @@ -320,6 +320,7 @@ sub export_marc_records_from_sth { ? GetXmlBiblio( $record_number ) : GetAuthorityXML( $record_number ); if ($record_type eq 'biblio'){ + $marcxml = fix_isbn_hyphens($marcxml, 1) if C4::Context->preference("IsbnIssnRemoveHyphens"); my @items = GetItemsInfo($record_number); if (@items){ my $record = MARC::Record->new; @@ -433,6 +434,7 @@ sub get_corrected_marc_record { if (defined $marc) { fix_leader($marc); + $marc = fix_isbn_hyphens($marc, 0) if C4::Context->preference("IsbnIssnRemoveHyphens"); if ($record_type eq 'biblio') { my $succeeded = fix_biblio_ids($marc, $record_number); return unless $succeeded; @@ -572,6 +574,67 @@ sub fix_unimarc_100 { } } +sub fix_isbn_hyphens { + my $data = shift; + my $isxml = shift; + + my $isbn; + my $issn; + my $encoding = C4::Context->preference("marcflavour"); + + if ( $encoding eq 'UNIMARC' ) { + unless ($isxml){ + foreach my $f010 ($data->field('010')) { + $isbn = $f010->subfield('a'); + $isbn =~ s/-//g; + $f010->update( 'a' => $isbn ); + } + foreach my $f011 ($data->field('011')) { + if ( $f011->subfield('a') ) { + $issn = $f011->subfield('a'); + $issn =~ s/-//g; + $f011->update( 'a' => $issn ); + } + } + }else{ + my $parser = XML::LibXML->new(); + $parser->recover_silently(1); + my $xslt = XML::LibXSLT->new(); + my $source = $parser->parse_string($data); + + my $style_doc = $parser->parse_file("$kohadir/misc/migration_tools/xsl/RemoveISBN-ISSNHyphensUNIMARC.xsl"); + my $stylesheet = $xslt->parse_stylesheet($style_doc); + my $result_parse = $stylesheet->transform($source); + $data = $stylesheet->output_string($result_parse); + } + } elsif ($encoding eq 'MARC21' || $encoding eq 'NORMARC') { + unless ($isxml){ + foreach my $f020 ($data->field('020')) { + $isbn = $f020->subfield('a'); + $isbn =~ s/-//g; + $f020->update( 'a' => $isbn ); + } + foreach my $f022 ($data->field('022')) { + $issn = $f022->subfield('a'); + $issn =~ s/-//g; + $f022->update( 'a' => $issn ); + } + }else{ + my $parser = XML::LibXML->new(); + $parser->recover_silently(1); + my $xslt = XML::LibXSLT->new(); + my $source = $parser->parse_string($data); + + my $style_doc = $parser->parse_file("$kohadir/misc/migration_tools/xsl/RemoveISBN-ISSNHyphensMARC21.xsl"); + my $stylesheet = $xslt->parse_stylesheet($style_doc); + my $result_parse = $stylesheet->transform($source); + $data = $stylesheet->output_string($result_parse); + } + } + + return $data; +} + sub do_indexing { my ($record_type, $op, $record_dir, $reset_index, $noshadow, $record_format, $zebraidx_log_opt) = @_; diff --git a/misc/migration_tools/xsl/RemoveISBN-ISSNHyphensMARC21.xsl b/misc/migration_tools/xsl/RemoveISBN-ISSNHyphensMARC21.xsl new file mode 100644 index 0000000..c8a7eb5 --- /dev/null +++ b/misc/migration_tools/xsl/RemoveISBN-ISSNHyphensMARC21.xsl @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pz="http://www.indexdata.com/pazpar2/1.0" xmlns:marc="http://www.loc.gov/MARC21/slim"> + <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/> + + <xsl:template name="replace-string"> + <xsl:param name="text" /> + <xsl:param name="from" /> + <xsl:param name="to" /> + + <xsl:choose> + <xsl:when test="contains($text, $from)"> + <xsl:variable name="before" select="substring-before($text, $from)" /> + <xsl:variable name="after" select="substring-after($text, $from)" /> + <xsl:variable name="prefix" select="concat($before, $to)" /> + <xsl:value-of select="$before" /> + <xsl:value-of select="$to" /> + <xsl:call-template name="replace-string"> + <xsl:with-param name="text" select="$after" /> + <xsl:with-param name="from" select="$from" /> + <xsl:with-param name="to" select="$to" /> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$text" /> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match="node()|@*"> + <xsl:copy> + <xsl:apply-templates select="node()|@*"/> + </xsl:copy> + </xsl:template> + + <xsl:template match="marc:record/marc:datafield[@tag='020']/marc:subfield[@code='a']"> + <xsl:copy> + <xsl:attribute name="code">a</xsl:attribute> + <xsl:call-template name="replace-string"> + <xsl:with-param name="text" select="text()"/> + <xsl:with-param name="from" select="'-'"/> + <xsl:with-param name="to" select="''"/> + </xsl:call-template> + </xsl:copy> + </xsl:template> + + <xsl:template match="marc:record/marc:datafield[@tag='022']/marc:subfield[@code='a']"> + <xsl:copy> + <xsl:attribute name="code">a</xsl:attribute> + <xsl:call-template name="replace-string"> + <xsl:with-param name="text" select="text()"/> + <xsl:with-param name="from" select="'-'"/> + <xsl:with-param name="to" select="''"/> + </xsl:call-template> + </xsl:copy> + </xsl:template> +</xsl:stylesheet> \ No newline at end of file diff --git a/misc/migration_tools/xsl/RemoveISBN-ISSNHyphensUNIMARC.xsl b/misc/migration_tools/xsl/RemoveISBN-ISSNHyphensUNIMARC.xsl new file mode 100644 index 0000000..fe50382 --- /dev/null +++ b/misc/migration_tools/xsl/RemoveISBN-ISSNHyphensUNIMARC.xsl @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pz="http://www.indexdata.com/pazpar2/1.0" xmlns:marc="http://www.loc.gov/MARC21/slim"> + <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/> + + <xsl:template name="replace-string"> + <xsl:param name="text" /> + <xsl:param name="from" /> + <xsl:param name="to" /> + + <xsl:choose> + <xsl:when test="contains($text, $from)"> + <xsl:variable name="before" select="substring-before($text, $from)" /> + <xsl:variable name="after" select="substring-after($text, $from)" /> + <xsl:variable name="prefix" select="concat($before, $to)" /> + <xsl:value-of select="$before" /> + <xsl:value-of select="$to" /> + <xsl:call-template name="replace-string"> + <xsl:with-param name="text" select="$after" /> + <xsl:with-param name="from" select="$from" /> + <xsl:with-param name="to" select="$to" /> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$text" /> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match="node()|@*"> + <xsl:copy> + <xsl:apply-templates select="node()|@*"/> + </xsl:copy> + </xsl:template> + + <xsl:template match="marc:record/marc:datafield[@tag='010']/marc:subfield[@code='a']"> + <xsl:copy> + <xsl:attribute name="code">a</xsl:attribute> + <xsl:call-template name="replace-string"> + <xsl:with-param name="text" select="text()"/> + <xsl:with-param name="from" select="'-'"/> + <xsl:with-param name="to" select="''"/> + </xsl:call-template> + </xsl:copy> + </xsl:template> + + <xsl:template match="marc:record/marc:datafield[@tag='011']/marc:subfield[@code='a']"> + <xsl:copy> + <xsl:attribute name="code">a</xsl:attribute> + <xsl:call-template name="replace-string"> + <xsl:with-param name="text" select="text()"/> + <xsl:with-param name="from" select="'-'"/> + <xsl:with-param name="to" select="''"/> + </xsl:call-template> + </xsl:copy> + </xsl:template> +</xsl:stylesheet> \ No newline at end of file -- 1.7.1 From oleonard at myacpl.org Tue Jul 19 15:19:23 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 19 Jul 2011 09:19:23 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6600, Library name linking wrong if current location is different Message-ID: <1311081563-2367-1-git-send-email-oleonard@myacpl.org> GetItemsInfo in Items.pm includes this join: LEFT JOIN branches ON items.homebranch = branches.branchcode This means that the branch URL (from the branches table) comes out as the URL for items.homebranch, thus the URL in the holdings output is the item's home branch even though the display might be showing a different current location. This patch changes the join to use items.holdingbranch. The join was originally added to fix Bug 3702, and based on the description of that feature I'm assuming this change is not harmful to other usages. However, it does make the assumption that the item's current (holding) branch is the branch we want to see information about. --- C4/Items.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 9342564..ed0a460 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1175,7 +1175,7 @@ sub GetItemsInfo { itemtypes.notforloan as notforloan_per_itemtype, branchurl FROM items - LEFT JOIN branches ON items.homebranch = branches.branchcode + LEFT JOIN branches ON items.holdingbranch = branches.branchcode LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber LEFT JOIN itemtypes ON itemtypes.itemtype = " -- 1.7.3 From nengard at bywatersolutions.com Tue Jul 19 01:59:10 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Mon, 18 Jul 2011 19:59:10 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6600, Library name linking wrong if current location is different Message-ID: <1311033550-3379-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard <oleonard at myacpl.org> GetItemsInfo in Items.pm includes this join: LEFT JOIN branches ON items.homebranch = branches.branchcode This means that the branch URL (from the branches table) comes out as the URL for items.homebranch, thus the URL in the holdings output is the item's home branch even though the display might be showing a different current location. This patch changes the join to use items.holdingbranch. The join was originally added to fix Bug 3702, and based on the description of that feature I'm assuming this change is not harmful to other usages. However, it does make the assumption that the item's current (holding) branch is the branch we want to see information about. Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com> --- C4/Items.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 9342564..ed0a460 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1175,7 +1175,7 @@ sub GetItemsInfo { itemtypes.notforloan as notforloan_per_itemtype, branchurl FROM items - LEFT JOIN branches ON items.homebranch = branches.branchcode + LEFT JOIN branches ON items.holdingbranch = branches.branchcode LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber LEFT JOIN itemtypes ON itemtypes.itemtype = " -- 1.7.2.3 From oleonard at myacpl.org Tue Jul 19 20:46:33 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 19 Jul 2011 14:46:33 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6601 - dictionary items not adding to query Message-ID: <1311101193-6604-1-git-send-email-oleonard@myacpl.org> T:T variable scope error. --- .../en/modules/reports/guided_reports_start.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 04cfb43..0c1767b 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 @@ -392,7 +392,7 @@ canned reports and writing custom SQL reports.</p> [% IF ( definitions ) %] <fieldset><legend>Dictionary Definitions</legend><table> [% FOREACH definition IN definitions %] - <tr><td><input type="checkbox" name="definition" value="[% id %]" /> [% definition.name %]</td></tr> + <tr><td><input type="checkbox" name="definition" value="[% definition.id %]" /> [% definition.name %]</td></tr> [% END %] </table> [% END %] -- 1.7.3 From nengard at bywatersolutions.com Tue Jul 19 07:27:07 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Tue, 19 Jul 2011 01:27:07 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6601 - dictionary items not adding to query Message-ID: <1311053227-4531-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard <oleonard at myacpl.org> T:T variable scope error. Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com> --- .../en/modules/reports/guided_reports_start.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 04cfb43..0c1767b 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 @@ -392,7 +392,7 @@ canned reports and writing custom SQL reports.</p> [% IF ( definitions ) %] <fieldset><legend>Dictionary Definitions</legend><table> [% FOREACH definition IN definitions %] - <tr><td><input type="checkbox" name="definition" value="[% id %]" /> [% definition.name %]</td></tr> + <tr><td><input type="checkbox" name="definition" value="[% definition.id %]" /> [% definition.name %]</td></tr> [% END %] </table> [% END %] -- 1.7.2.3 From oleonard at myacpl.org Tue Jul 19 21:44:08 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 19 Jul 2011 15:44:08 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6608 - Date-pickers broken on guided reports pages Message-ID: <1311104648-7011-1-git-send-email-oleonard@myacpl.org> Template variable scope errors. --- .../prog/en/modules/reports/dictionary.tt | 4 ++-- .../en/modules/reports/guided_reports_start.tt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt index c4a8da5..f6d48ba 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt @@ -214,7 +214,7 @@ <script type="text/javascript"> Calendar.setup({ inputField : "[% column.name %]_start_value", -ifFormat : "[% column.DHTMLcalendar_dateformat %]", +ifFormat : "[% DHTMLcalendar_dateformat %]", button : "buttonfrom1", align : "Tl" }); @@ -230,7 +230,7 @@ align : "Tl" <script type="text/javascript"> Calendar.setup({ inputField : "[% column.name %]_end_value", -ifFormat : "[% column.DHTMLcalendar_dateformat %]", +ifFormat : "[% DHTMLcalendar_dateformat %]", button : "buttonfrom2", align : "Tl" }); 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 04cfb43..d478926 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 @@ -331,7 +331,7 @@ canned reports and writing custom SQL reports.</p> <script type="text/javascript"> Calendar.setup({ inputField : "[% criteri.name %]_value", - ifFormat : "[% criteri.DHTMLcalendar_dateformat %]", + ifFormat : "[% DHTMLcalendar_dateformat %]", button : "buttonfrom[% criteri.name %]", align : "Tl" }); @@ -354,7 +354,7 @@ canned reports and writing custom SQL reports.</p> <script type="text/javascript"> Calendar.setup({ inputField : "from_[% criteri.name %]_value", - ifFormat : "[% criteri.DHTMLcalendar_dateformat %]", + ifFormat : "[% DHTMLcalendar_dateformat %]", button : "buttonfromfrom_[% criteri.name %]", align : "Tl" }); @@ -365,7 +365,7 @@ canned reports and writing custom SQL reports.</p> <script type="text/javascript"> Calendar.setup({ inputField : "to_[% criteri.name %]_value", - ifFormat : "[% criteri.DHTMLcalendar_dateformat %]", + ifFormat : "[% DHTMLcalendar_dateformat %]", button : "buttonfromto_[% criteri.name %]", align : "Tl" }); -- 1.7.3 From nengard at bywatersolutions.com Tue Jul 19 08:08:52 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Tue, 19 Jul 2011 02:08:52 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6608 - Date-pickers broken on guided reports pages Message-ID: <1311055732-4736-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard <oleonard at myacpl.org> Template variable scope errors. Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com> --- .../prog/en/modules/reports/dictionary.tt | 4 ++-- .../en/modules/reports/guided_reports_start.tt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt index c4a8da5..f6d48ba 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt @@ -214,7 +214,7 @@ <script type="text/javascript"> Calendar.setup({ inputField : "[% column.name %]_start_value", -ifFormat : "[% column.DHTMLcalendar_dateformat %]", +ifFormat : "[% DHTMLcalendar_dateformat %]", button : "buttonfrom1", align : "Tl" }); @@ -230,7 +230,7 @@ align : "Tl" <script type="text/javascript"> Calendar.setup({ inputField : "[% column.name %]_end_value", -ifFormat : "[% column.DHTMLcalendar_dateformat %]", +ifFormat : "[% DHTMLcalendar_dateformat %]", button : "buttonfrom2", align : "Tl" }); 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 04cfb43..d478926 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 @@ -331,7 +331,7 @@ canned reports and writing custom SQL reports.</p> <script type="text/javascript"> Calendar.setup({ inputField : "[% criteri.name %]_value", - ifFormat : "[% criteri.DHTMLcalendar_dateformat %]", + ifFormat : "[% DHTMLcalendar_dateformat %]", button : "buttonfrom[% criteri.name %]", align : "Tl" }); @@ -354,7 +354,7 @@ canned reports and writing custom SQL reports.</p> <script type="text/javascript"> Calendar.setup({ inputField : "from_[% criteri.name %]_value", - ifFormat : "[% criteri.DHTMLcalendar_dateformat %]", + ifFormat : "[% DHTMLcalendar_dateformat %]", button : "buttonfromfrom_[% criteri.name %]", align : "Tl" }); @@ -365,7 +365,7 @@ canned reports and writing custom SQL reports.</p> <script type="text/javascript"> Calendar.setup({ inputField : "to_[% criteri.name %]_value", - ifFormat : "[% criteri.DHTMLcalendar_dateformat %]", + ifFormat : "[% DHTMLcalendar_dateformat %]", button : "buttonfromto_[% criteri.name %]", align : "Tl" }); -- 1.7.2.3 From srdjan at catalyst.net.nz Wed Jul 20 09:20:13 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Wed, 20 Jul 2011 19:20:13 +1200 Subject: [Koha-patches] [PATCH 1/1] bug_4415: Copy parent contact details to child when adding In-Reply-To: <bug 4415> References: <bug 4415> Message-ID: <1311146413-24250-1-git-send-email-srdjan@catalyst.net.nz> --- members/memberentry.pl | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index f6ca2c1..63ee154 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -211,13 +211,14 @@ if ( ( $op eq 'insert' ) and !$nodouble ) { if ( $guarantorid and ( $category_type eq 'C' || $category_type eq 'P' )) { if (my $guarantordata=GetMember(borrowernumber => $guarantorid)) { $guarantorinfo=$guarantordata->{'surname'}." , ".$guarantordata->{'firstname'}; - if ( !defined($data{'contactname'}) or $data{'contactname'} eq '' or - $data{'contactname'} ne $guarantordata->{'surname'} ) { - $newdata{'contactfirstname'}= $guarantordata->{'firstname'}; - $newdata{'contactname'} = $guarantordata->{'surname'}; - $newdata{'contacttitle'} = $guarantordata->{'title'}; + $newdata{'contactfirstname'}= $guarantordata->{'firstname'}; + $newdata{'contactname'} = $guarantordata->{'surname'}; + $newdata{'contacttitle'} = $guarantordata->{'title'}; + if ( $op eq 'add' ) { foreach (qw(streetnumber address streettype address2 - zipcode country city phone phonepro mobile fax email emailpro branchcode)) { + zipcode country city state phone phonepro mobile fax email emailpro branchcode + B_streetnumber B_streettype B_address B_address2 + B_city B_state B_zipcode B_country B_email B_phone)) { $newdata{$_} = $guarantordata->{$_}; } } @@ -225,12 +226,10 @@ if ( $guarantorid and ( $category_type eq 'C' || $category_type eq 'P' )) { } ###############test to take the right zipcode, country and city name ############## -if (!defined($guarantorid) or $guarantorid eq '' or $guarantorid eq '0') { - # set only if parameter was passed from the form - $newdata{'city'} = $input->param('city') if defined($input->param('city')); - $newdata{'zipcode'} = $input->param('zipcode') if defined($input->param('zipcode')); - $newdata{'country'} = $input->param('country') if defined($input->param('country')); -} +# set only if parameter was passed from the form +$newdata{'city'} = $input->param('city') if defined($input->param('city')); +$newdata{'zipcode'} = $input->param('zipcode') if defined($input->param('zipcode')); +$newdata{'country'} = $input->param('country') if defined($input->param('country')); #builds default userid if ( (defined $newdata{'userid'}) && ($newdata{'userid'} eq '')){ @@ -677,7 +676,7 @@ $template->param(CGIbranch=>$CGIbranch) if ($CGIbranch); $template->param( nodouble => $nodouble, borrowernumber => $borrowernumber, #register number - guarantorid => (($borrower_data->{'guarantorid'})) ? $borrower_data->{'guarantorid'} : $guarantorid, + guarantorid => ($borrower_data->{'guarantorid'} || $guarantorid), ethcatpopup => $ethcatpopup, relshiploop => \@relshipdata, city_loop => $city_arrayref, -- 1.6.5 From oleonard at myacpl.org Wed Jul 20 15:14:33 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 20 Jul 2011 09:14:33 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6612 - Sort pulldown for messages in alphabetical order Message-ID: <1311167673-9400-1-git-send-email-oleonard@myacpl.org> The values in the menu come straight out of GetAuthorisedValues(), which sorts its results by "category, lib, lib_opac." Rather than trying to re-sort the data in circulation.pl this patch changes the template to show 'lib,' the description, instead of the authorised_value. That will make the output match the column which is being sorted. --- .../prog/en/modules/circ/circulation.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 d2f6405..cb03d89 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -207,7 +207,7 @@ function refocus(calendar) { <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;"> <option value="">Select Note</option> [% FOREACH canned_bor_notes_loo IN canned_bor_notes_loop %] - <option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.authorised_value %]</option> + <option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.lib %]</option> [% END %] </select> </li> -- 1.7.3 From oleonard at myacpl.org Wed Jul 20 15:25:23 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 20 Jul 2011 09:25:23 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6609, Clean up guided reports dictionary entry process Message-ID: <1311168323-9777-1-git-send-email-oleonard@myacpl.org> Some general interface cleanup tasks with the guided reports dictionary entry process: - Improving the breadcrumb links - Eliminating the tabs in favor of more descriptive <legend> labels - Clarifying some labels - Correcting form markup according to established patterns (Undertaken primarily because the tabs translated poorly when trying to re-implement them for Bug 5481, Replace YUI JS libraries with Jquery UI) --- .../prog/en/modules/reports/dictionary.tt | 197 +++++++++----------- 1 files changed, 88 insertions(+), 109 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt index f6d48ba..e11b598 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt @@ -2,12 +2,19 @@ <title>Koha › Reports › Guided Reports › Dictionary [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %] + [% INCLUDE 'header.inc' %] [% INCLUDE 'circ-search.inc' %] - +
    @@ -70,17 +77,9 @@ [% END %] [% IF ( new_dictionary ) %] +

    Add New Definition

    - -
    -
      -
    • Step 1: Name
    • -
    • Step 2: Area
    • -
    • Step 3: Columns
    • -
    • Step 4: Values
    • -
    -
    -
    Add New Definition
      +
      Step 1 of 5: Name the new definition
      1. @@ -93,23 +92,14 @@
        -
    -
    [% END %] [% IF ( step_2 ) %] -
    -
      -
    • Step 1: Name
    • -
    • Step 2: Area
    • -
    • Step 3: Columns
    • -
    • Step 4: Values
    • -
    -
    +

    Add New Definition

    -Add New Definition +Step 2 of 5: Choose the area
    1. @@ -122,28 +112,21 @@
    -
    -
    [% END %] [% IF ( step_3 ) %] -

    Add New Definition

    -
    -
      -
    • Step 1: Name
    • -
    • Step 2: Area
    • -
    • Step 3: Columns
    • -
    • Step 4: Values
    • -
    -
    +

    Add New Definition

    +
    +Step 3 of 5: Choose columns -
    + - + + +


    -
    - - - - -
    -
    + +
    + [% END %] [% IF ( step_4 ) %] -

    Add New Definition

    -
    -
      -
    • Step 1: Name
    • -
    • Step 2: Area
    • -
    • Step 3: Columns
    • -
    • Step 4: Values
    • -
    -
    +

    Add New Definition

    +
    +Step 4 of 5: Specify a value @@ -192,78 +167,82 @@ [% FOREACH column IN columns %] -[% column.name %] +
    1. Column: [% column.name %]
    2. [% IF ( column.distinct ) %] - +
    3. [% END %] [% IF ( column.date ) %] - - - - - - -
      All datesORDate range
      - - - - - - - - - -
      Start of date range - - -
      [% INCLUDE 'date-format.inc' %]
      -
      End of date range - - - -
      [% INCLUDE 'date-format.inc' %]
      -
      +
    4. Choose: + + + + + +
      All datesORDate range
      + + + + + + + + + +
      Start of date range + + +
      [% INCLUDE 'date-format.inc' %]
      +
      End of date range + + + +
      [% INCLUDE 'date-format.inc' %]
      +
    5. [% END %] [% IF ( column.text ) %] -

      Search string matches

      +
    6. [% END %] [% END %] +
    - +
    +
    + +
    -
    -
    [% END %] [% IF ( step_5 ) %] -
    + -

    Confirm Definition

    +

    Add New Definition

    -
    1. +
      +Step 5 of 5: Confirm details +
      1. Name: [% definition_name %]
      2. @@ -274,9 +253,9 @@ align : "Tl"
      3. Area: [% areaname %] -
      - -
      1. +
      2. +
      3. +Data: -- 1.7.3 From nengard at bywatersolutions.com Tue Jul 19 11:05:13 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Tue, 19 Jul 2011 05:05:13 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6612 - Sort pulldown for messages in alphabetical order Message-ID: <1311066313-5564-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard The values in the menu come straight out of GetAuthorisedValues(), which sorts its results by "category, lib, lib_opac." Rather than trying to re-sort the data in circulation.pl this patch changes the template to show 'lib,' the description, instead of the authorised_value. That will make the output match the column which is being sorted. Signed-off-by: Nicole C. Engard --- .../prog/en/modules/circ/circulation.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 d2f6405..cb03d89 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -207,7 +207,7 @@ function refocus(calendar) { -- 1.7.2.3 From nengard at bywatersolutions.com Tue Jul 19 11:09:01 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Tue, 19 Jul 2011 05:09:01 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6609, Clean up guided reports dictionary entry process Message-ID: <1311066541-5742-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard Some general interface cleanup tasks with the guided reports dictionary entry process: - Improving the breadcrumb links - Eliminating the tabs in favor of more descriptive labels - Clarifying some labels - Correcting form markup according to established patterns (Undertaken primarily because the tabs translated poorly when trying to re-implement them for Bug 5481, Replace YUI JS libraries with Jquery UI) Signed-off-by: Nicole C. Engard --- .../prog/en/modules/reports/dictionary.tt | 197 +++++++++----------- 1 files changed, 88 insertions(+), 109 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt index f6d48ba..e11b598 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt @@ -2,12 +2,19 @@ Koha › Reports › Guided Reports › Dictionary [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %] + [% INCLUDE 'header.inc' %] [% INCLUDE 'circ-search.inc' %] - +
        @@ -70,17 +77,9 @@ [% END %] [% IF ( new_dictionary ) %] +

        Add New Definition

        - -
        -
          -
        • Step 1: Name
        • -
        • Step 2: Area
        • -
        • Step 3: Columns
        • -
        • Step 4: Values
        • -
        -
        -
        Add New Definition
          +
          Step 1 of 5: Name the new definition
          1. @@ -93,23 +92,14 @@
            -
        -
        [% END %] [% IF ( step_2 ) %] -
        -
          -
        • Step 1: Name
        • -
        • Step 2: Area
        • -
        • Step 3: Columns
        • -
        • Step 4: Values
        • -
        -
        +

        Add New Definition

        -Add New Definition +Step 2 of 5: Choose the area
        1. @@ -122,28 +112,21 @@
        -
        -
        [% END %] [% IF ( step_3 ) %] -

        Add New Definition

        -
        -
          -
        • Step 1: Name
        • -
        • Step 2: Area
        • -
        • Step 3: Columns
        • -
        • Step 4: Values
        • -
        -
        +

        Add New Definition

        +
        +Step 3 of 5: Choose columns -
        Columns
        + - + + +


        -
        - - - - -
    - + +
    + [% END %] [% IF ( step_4 ) %] -

    Add New Definition

    -
    -
      -
    • Step 1: Name
    • -
    • Step 2: Area
    • -
    • Step 3: Columns
    • -
    • Step 4: Values
    • -
    -
    +

    Add New Definition

    +
    +Step 4 of 5: Specify a value @@ -192,78 +167,82 @@ [% FOREACH column IN columns %] -[% column.name %] +
    1. Column: [% column.name %]
    2. [% IF ( column.distinct ) %] - +
    3. [% END %] [% IF ( column.date ) %] - - - - - - -
      All datesORDate range
      - - - - - - - - - -
      Start of date range - - -
      [% INCLUDE 'date-format.inc' %]
      -
      End of date range - - - -
      [% INCLUDE 'date-format.inc' %]
      -
      +
    4. Choose: + + + + + +
      All datesORDate range
      + + + + + + + + + +
      Start of date range + + +
      [% INCLUDE 'date-format.inc' %]
      +
      End of date range + + + +
      [% INCLUDE 'date-format.inc' %]
      +
    5. [% END %] [% IF ( column.text ) %] -

      Search string matches

      +
    6. [% END %] [% END %] +
    - +
    +
    + +
    -
    -
    [% END %] [% IF ( step_5 ) %] -
    + -

    Confirm Definition

    +

    Add New Definition

    -
    1. +
      +Step 5 of 5: Confirm details +
      1. Name: [% definition_name %]
      2. @@ -274,9 +253,9 @@ align : "Tl"
      3. Area: [% areaname %] -
      - -
      1. +
      2. +
      3. +Data: -- 1.7.2.3 From magnus at enger.priv.no Wed Jul 20 16:15:13 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Wed, 20 Jul 2011 16:15:13 +0200 Subject: [Koha-patches] [PATCH 3/3] Bug 6540 - Add defaultsql command line option Message-ID: <1311171313-3799-1-git-send-email-magnus@enger.priv.no> This will override the setting in /etc/koha/koha-sites.conf. --- debian/scripts/koha-create | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index 08f4baf..85b208b 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -89,6 +89,7 @@ while true ; do -p|--populate-db) op=populate ; shift ;; -m|--marcflavor) ZEBRA_MARC_FORMAT="$2" ; shift 2 ;; -l|--zebralang) ZEBRA_LANGUAGE="$2" ; shift 2 ;; + -d|--defaultsql) DEFAULTSQL="$2" ; shift 2 ;; --) shift ; break ;; *) die "Internal error! " ;; esac -- 1.7.4.1 From magnus at enger.priv.no Wed Jul 20 19:05:21 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Wed, 20 Jul 2011 19:05:21 +0200 Subject: [Koha-patches] [PATCH 4/4] Bug 6540 - Add config file as command line option for koha-create Message-ID: <1311181522-9585-1-git-send-email-magnus@enger.priv.no> Order of precedence for config options, from lowest to highest: 1. The defaults set in koha-create itself 2. /etc/koha/koha-sites.conf 3. Config file specified with --configfile 4. Individual options set with --marcflavor, --zebralang, --defaultsql --- debian/scripts/koha-create | 48 +++++++++++++++++++++++++++++++++++-------- 1 files changed, 39 insertions(+), 9 deletions(-) diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index 85b208b..5c742e1 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -19,6 +19,11 @@ set -e +usage="Usage: $0 [--create-db|--request-db|--populate-db] \ +[--marcflavor marc21|normarc|unimarc] \ +[--zebralang en|fr|nb] [--defaultsql /path/to/some.sql] +[--configfile /path/to/config] instancename" + die() { echo "$@" 1>&2 exit 1 @@ -71,30 +76,55 @@ then . /etc/koha/koha-sites.conf fi -[ $# -ge 2 ] && [ $# -le 6 ] || - die "Usage: $0 [--create-db|--request-db|--populate-db] \ -[--marcflavor marc21|normarc|unimarc] \ -[--zebralang en|fr|nb] instancename" +[ $# -ge 2 ] && [ $# -le 10 ] || die $usage -TEMP=`getopt -o crpm:l: -l create-db,request-db,populate-db,marcflavor:,zebralang: \ +TEMP=`getopt -o crpm:l: -l create-db,request-db,populate-db,marcflavor:,zebralang:,configfile: \ -n "$0" -- "$@"` # Note the quotes around `$TEMP': they are essential! eval set -- "$TEMP" +# Temporary variables for the command line options +CLO_ZEBRA_MARC_FORMAT="" +CLO_ZEBRA_LANGUAGE="" +CLO_DEFAULTSQL="" + while true ; do case "$1" in -c|--create-db) op=create ; shift ;; -r|--request-db) op=request ; shift ;; -p|--populate-db) op=populate ; shift ;; - -m|--marcflavor) ZEBRA_MARC_FORMAT="$2" ; shift 2 ;; - -l|--zebralang) ZEBRA_LANGUAGE="$2" ; shift 2 ;; - -d|--defaultsql) DEFAULTSQL="$2" ; shift 2 ;; + -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 ;; --) shift ; break ;; - *) die "Internal error! " ;; + *) die $usage ;; esac done +# Load the configfile given on the command line +if [ -e "$configfile" ] +then + . "$configfile" +else + die "$configfile does not exist."; +fi + +# Make sure options from the command line get the highest precedence +if [ "$CLO_ZEBRA_MARC_FORMAT" != "" ] +then + ZEBRA_MARC_FORMAT="$CLO_ZEBRA_MARC_FORMAT" +fi +if [ "$CLO_ZEBRA_LANGUAGE" != "" ] +then + ZEBRA_LANGUAGE="$CLO_ZEBRA_LANGUAGE" +fi +if [ "$CLO_DEFAULTSQL" != "" ] +then + DEFAULTSQL="$CLO_DEFAULTSQL" +fi + name="$1" domain="$name$DOMAIN" -- 1.7.4.1 From oleonard at myacpl.org Wed Jul 20 20:29:23 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 20 Jul 2011 14:29:23 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6616 - Move common table pager markup to include Message-ID: <1311186563-11642-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 | 39 ++++++-------------- .../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, 55 insertions(+), 190 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..b39e183 --- /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..8b3965b 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' %] +
        Columns
        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..3107b7d 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 a1b6fa2..3235809 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 @@ @@ -92,32 +97,11 @@

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

        Check All | Uncheck All

        - - -
         page(s) : - - - - - - , entries/page : - - -
        -
        +
        + [% INCLUDE 'table-pager.inc' perpage='20' %] +
        +
        @@ -127,8 +111,7 @@ [% FOREACH to_branch_loo IN codes_loo.to_branch_loop %] - [% UNLESS ( loop.odd ) %][% END %] + [% UNLESS ( loop.odd ) %][% ELSE %][% END %] 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 b92ad52..56e48c0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -163,24 +163,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 c2e5062..579bcc8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt @@ -265,24 +265,9 @@ Confirm Deletion of Category [% categorycode |html %][% END %] [% IF ( searchfield ) %] You Searched for [% searchfield %] [% END %] - -
         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 2e9bdd2..d5382bb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt @@ -114,24 +114,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..ada7952 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..762cea8 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..3f142c1 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 e3df4e2..c9211a8 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 oleonard at myacpl.org Wed Jul 20 20:45:13 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 20 Jul 2011 14:45:13 -0400 Subject: [Koha-patches] [PATCH] [Revised] Fix for Bug 6616 - Move common table pager markup to include Message-ID: <1311187513-11949-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 | 39 ++++++-------------- .../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, 55 insertions(+), 190 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 a1b6fa2..167a717 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 @@ @@ -92,32 +97,11 @@

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

        Check All | Uncheck All

        - - -
         page(s) : - - - - - - , entries/page : - - -
        -
        +
        + [% INCLUDE 'table-pager.inc' perpage='20' %] +
        +
        @@ -127,8 +111,7 @@ [% FOREACH to_branch_loo IN codes_loo.to_branch_loop %] - [% UNLESS ( loop.odd ) %][% END %] + [% UNLESS ( loop.odd ) %][% ELSE %][% END %] 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 b92ad52..7b79aa8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -163,24 +163,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 c2e5062..7a98164 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt @@ -265,24 +265,9 @@ Confirm Deletion of Category [% categorycode |html %][% END %] [% IF ( searchfield ) %] You Searched for [% searchfield %] [% END %] - -
         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 2e9bdd2..9a90923 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt @@ -114,24 +114,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 e3df4e2..88b52c5 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 chrisc at catalyst.net.nz Thu Jul 21 00:24:25 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Thu, 21 Jul 2011 10:24:25 +1200 Subject: [Koha-patches] [PATCH] Bug 6611 : With the change to making cardnumber a nullable field, we need to pass it around when we are updating borrowers, to make sure we don't null it Message-ID: <1311200665-9120-1-git-send-email-chrisc@catalyst.net.nz> --- .../prog/en/modules/members/memberentrygen.tt | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) 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 6d60917..f96c27f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -162,7 +162,18 @@ [% IF ( step ) %][% END %] -[% IF ( opadd ) %][% ELSIF ( opduplicate ) %][% ELSE %][% END %] +[% IF ( opadd ) %] +[% ELSIF ( opduplicate ) %] + +[% ELSE %] + +[% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %] +[%# Only put the cardnumber if we arent showing it in the form later %] +[% IF cardnumber %] + +[% END %] +[% END %] +[% END %] [% IF ( step_1 ) %]
        -- 1.7.4.1 From srdjan at catalyst.net.nz Thu Jul 21 06:01:23 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Thu, 21 Jul 2011 16:01:23 +1200 Subject: [Koha-patches] [PATCH 1/1] bug_5911: Transport Cost Matrix Moved code from .pl scripts to HoldsQueue.pm In-Reply-To: References: Message-ID: <1311220883-18138-1-git-send-email-srdjan@catalyst.net.nz> --- C4/Context.pm | 3 + C4/HoldsQueue.pm | 630 ++++++++++++++++++++ admin/systempreferences.pl | 1 + admin/transport-cost-matrix.pl | 122 ++++ circ/view_holdsqueue.pl | 33 +- installer/data/mysql/en/mandatory/sysprefs.sql | 2 + installer/data/mysql/kohastructure.sql | 16 + installer/data/mysql/updatedatabase.pl | 20 + .../prog/en/modules/admin/admin-home.tt | 2 + .../prog/en/modules/admin/transport-cost-matrix.tt | 126 ++++ misc/cronjobs/holds/build_holds_queue.pl | 382 +------------ t/db_dependent/HoldsQueue.t | 161 +++++ 12 files changed, 1086 insertions(+), 412 deletions(-) create mode 100755 C4/HoldsQueue.pm create mode 100755 admin/transport-cost-matrix.pl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt create mode 100755 t/db_dependent/HoldsQueue.t diff --git a/C4/Context.pm b/C4/Context.pm index 85d1c18..b90c069 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -459,6 +459,9 @@ with this method. # flushing the caching mechanism. my %sysprefs; +sub _flush_preferences { + %sysprefs = (); +} sub preference { my $self = shift; diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm new file mode 100755 index 0000000..fbb6340 --- /dev/null +++ b/C4/HoldsQueue.pm @@ -0,0 +1,630 @@ +package C4::HoldsQueue; + +# Copyright 2011 Catalyst IT +# +# 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. + +# FIXME: expand perldoc, explain intended logic + +use strict; +use warnings; + +use C4::Context; +use C4::Search; +use C4::Items; +use C4::Branch; +use C4::Circulation; +use C4::Members; +use C4::Biblio; +use C4::Dates qw/format_date/; + +use List::Util qw(shuffle); +use Data::Dumper; + +use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); +BEGIN { + $VERSION = 3.03; + require Exporter; + @ISA = qw(Exporter); + @EXPORT_OK = qw( + &CreateQueue + &GetHoldsQueueItems + + &SetUseTransportCostMatrix + &TransportCostMatrix + &UpdateTransportCostMatrix + ); +} + +# XXX This is not safe in a persistant environment +my $dbh = C4::Context->dbh; + +=head1 FUNCTIONS + +=head2 SetUseTransportCostMatrix + + SetUseTransportCostMatrix($true_false); + +Updates UseTransportCostMatrix syspref + +=cut + +sub SetUseTransportCostMatrix { + my ($bool) = @_; + + $dbh->do("UPDATE systempreferences SET value=? WHERE variable='UseTransportCostMatrix'", undef, $bool ? '1' : '0'); +} + +=head2 TransportCostMatrix + + TransportCostMatrix(); + +Returns Transport Cost Matrix as a hashref => => cost + +=cut + +sub TransportCostMatrix { + my $transport_costs = $dbh->selectall_arrayref("SELECT * FROM transport_cost",{ Slice => {} }); + + my %transport_cost_matrix; + foreach (@$transport_costs) { + my $from = $_->{frombranch}; + my $to = $_->{tobranch}; + my $cost = $_->{cost}; + my $disabled = $_->{disable_transfer}; + $transport_cost_matrix{$to}{$from} = { cost => $cost, disable_transfer => $disabled }; + } + return \%transport_cost_matrix; +} + +=head2 UpdateTransportCostMatrix + + UpdateTransportCostMatrix($records); + +Updates full Transport Cost Matrix table. $records is an arrayref of records. +Records: { frombranch => , tobranch => , cost =>
        , disable_transfer => <0,1> } + +=cut + +sub UpdateTransportCostMatrix { + my ($records) = @_; + + my $sth = $dbh->prepare("INSERT INTO transport_cost (frombranch, tobranch, cost, disable_transfer) VALUES (?, ?, ?, ?)"); + + $dbh->do("TRUNCATE TABLE transport_cost"); + foreach (@$records) { + my $cost = $_->{cost}; + my $from = $_->{frombranch}; + my $to = $_->{tobranch}; + if ( !defined ($cost) || ($cost !~ m/0(\.[0.9]*)?|1(.0*)?/o) ) { + warn "Invalid $from -> $to cost $cost - nust be a decimal number in 0 to 1 range, forcing to 1"; + $cost = 1; + } + $sth->execute( $from, $to, $cost, $_->{disable_transfer} ? 1 : 0 ); + } +} + +=head2 GetHoldsQueueItems + + GetHoldsQueueItems($branch); + +Returns hold queue for a holding branch. If branch is omitted, then whole queue is returned + +=cut + +sub GetHoldsQueueItems { + my ($branchlimit) = @_; + + my @bind_params = (); + my $query = q/SELECT tmp_holdsqueue.*, biblio.author, items.ccode, items.location, items.enumchron, items.cn_sort, biblioitems.publishercode,biblio.copyrightdate,biblioitems.publicationyear,biblioitems.pages,biblioitems.size,biblioitems.publicationyear,biblioitems.isbn + FROM tmp_holdsqueue + JOIN biblio USING (biblionumber) + LEFT JOIN biblioitems USING (biblionumber) + LEFT JOIN items USING ( itemnumber) + /; + if ($branchlimit) { + $query .=" WHERE tmp_holdsqueue.holdingbranch = ?"; + push @bind_params, $branchlimit; + } + $query .= " ORDER BY ccode, location, cn_sort, author, title, pickbranch, reservedate"; + my $sth = $dbh->prepare($query); + $sth->execute(@bind_params); + my $items = []; + while ( my $row = $sth->fetchrow_hashref ){ + $row->{reservedate} = format_date($row->{reservedate}); + my $record = GetMarcBiblio($row->{biblionumber}); + if ($record){ + $row->{subtitle} = GetRecordValue('subtitle',$record,'')->[0]->{subfield}; + $row->{parts} = GetRecordValue('parts',$record,'')->[0]->{subfield}; + $row->{numbers} = GetRecordValue('numbers',$record,'')->[0]->{subfield}; + } + push @$items, $row; + } + return $items; +} + +=head2 CreateQueue + + CreateQueue(); + +Top level function that turns reserves into tmp_holdsqueue and hold_fill_targets. + +=cut + +sub CreateQueue { + + $dbh->do("DELETE FROM tmp_holdsqueue"); # clear the old table for new info + $dbh->do("DELETE FROM hold_fill_targets"); + + my $total_bibs = 0; + my $total_requests = 0; + my $total_available_items = 0; + my $num_items_mapped = 0; + + my $branches_to_use; + my $transport_cost_matrix; + my $use_transport_cost_matrix = C4::Context->preference("UseTransportCostMatrix"); + if ($use_transport_cost_matrix) { + debug( "Using cost matrix" ); + $transport_cost_matrix = TransportCostMatrix(); + unless (keys %$transport_cost_matrix) { + warn "UseTransportCostMatrix set to yes, but matrix not populated"; + undef $transport_cost_matrix; + } + } + unless ($transport_cost_matrix) { + debug( "Not using cost matrix" ); + $branches_to_use = load_branches_to_pull_from(); + } + + my $bibs_with_pending_requests = GetBibsWithPendingHoldRequests(); + debug( "bibs_with_pending_requests: ".Dumper($bibs_with_pending_requests) ); + + foreach my $biblionumber (@$bibs_with_pending_requests) { + $total_bibs++; + my $hold_requests = GetPendingHoldRequestsForBib($biblionumber); + my $available_items = GetItemsAvailableToFillHoldRequestsForBib($biblionumber, $branches_to_use); + $total_requests += scalar(@$hold_requests); + $total_available_items += scalar(@$available_items); + + my $item_map = MapItemsToHoldRequests($hold_requests, $available_items, $branches_to_use, $transport_cost_matrix); + $item_map or next; + my $item_map_size = scalar(keys %$item_map) + or next;; + + $num_items_mapped += $item_map_size; + CreatePicklistFromItemMap($item_map); + AddToHoldTargetMap($item_map); + if (($item_map_size < scalar(@$hold_requests )) and + ($item_map_size < scalar(@$available_items))) { + # DOUBLE CHECK, but this is probably OK - unfilled item-level requests + # FIXME + #warn "unfilled requests for $biblionumber"; + #warn Dumper($hold_requests), Dumper($available_items), Dumper($item_map); + } + } +} + +=head2 GetBibsWithPendingHoldRequests + + my $biblionumber_aref = GetBibsWithPendingHoldRequests(); + +Return an arrayref of the biblionumbers of all bibs +that have one or more unfilled hold requests. + +=cut + +sub GetBibsWithPendingHoldRequests { + my $dbh = C4::Context->dbh; + + my $bib_query = "SELECT DISTINCT biblionumber + FROM reserves + WHERE found IS NULL + AND priority > 0 + AND reservedate <= CURRENT_DATE()"; + my $sth = $dbh->prepare($bib_query); + + $sth->execute(); + my $biblionumbers = $sth->fetchall_arrayref(); + + return [ map { $_->[0] } @$biblionumbers ]; +} + +=head2 GetPendingHoldRequestsForBib + + my $requests = GetPendingHoldRequestsForBib($biblionumber); + +Returns an arrayref of hashrefs to pending, unfilled hold requests +on the bib identified by $biblionumber. The following keys +are present in each hashref: + + biblionumber + borrowernumber + itemnumber + priority + branchcode + reservedate + reservenotes + borrowerbranch + +The arrayref is sorted in order of increasing priority. + +=cut + +sub GetPendingHoldRequestsForBib { + my $biblionumber = shift; + + my $dbh = C4::Context->dbh; + + my $request_query = "SELECT biblionumber, borrowernumber, itemnumber, priority, reserves.branchcode, + reservedate, reservenotes, borrowers.branchcode AS borrowerbranch + FROM reserves + JOIN borrowers USING (borrowernumber) + WHERE biblionumber = ? + AND found IS NULL + AND priority > 0 + AND reservedate <= CURRENT_DATE() + ORDER BY priority"; + my $sth = $dbh->prepare($request_query); + $sth->execute($biblionumber); + + my $requests = $sth->fetchall_arrayref({}); + return $requests; + +} + +=head2 GetItemsAvailableToFillHoldRequestsForBib + + my $available_items = GetItemsAvailableToFillHoldRequestsForBib($biblionumber, $branches_ar); + +Returns an arrayref of items available to fill hold requests +for the bib identified by C<$biblionumber>. An item is available +to fill a hold request if and only if: + + * it is not on loan + * it is not withdrawn + * it is not marked notforloan + * it is not currently in transit + * it is not lost + * it is not sitting on the hold shelf + +=cut + +sub GetItemsAvailableToFillHoldRequestsForBib { + my ($biblionumber, $branches_to_use) = @_; + + my $dbh = C4::Context->dbh; + my $items_query = "SELECT itemnumber, homebranch, holdingbranch, itemtypes.itemtype AS itype + FROM items "; + + if (C4::Context->preference('item-level_itypes')) { + $items_query .= "LEFT JOIN itemtypes ON (itemtypes.itemtype = items.itype) "; + } else { + $items_query .= "JOIN biblioitems USING (biblioitemnumber) + LEFT JOIN itemtypes USING (itemtype) "; + } + $items_query .= "WHERE items.notforloan = 0 + AND holdingbranch IS NOT NULL + AND itemlost = 0 + AND wthdrawn = 0 + AND items.onloan IS NULL + AND (itemtypes.notforloan IS NULL OR itemtypes.notforloan = 0) + AND itemnumber NOT IN ( + SELECT itemnumber + FROM reserves + WHERE biblionumber = ? + AND itemnumber IS NOT NULL + AND (found IS NOT NULL OR priority = 0) + ) + AND items.biblionumber = ?"; + $items_query .= " AND damaged = 0 " + unless C4::Context->preference('AllowHoldsOnDamagedItems'); + + my @params = ($biblionumber, $biblionumber); + if ($branches_to_use && @$branches_to_use) { + $items_query .= " AND holdingbranch IN (" . join (",", map { "?" } @$branches_to_use) . ")"; + push @params, @$branches_to_use; + } + my $sth = $dbh->prepare($items_query); + $sth->execute(@params); + + my $items = $sth->fetchall_arrayref({}); + $items = [ grep { my @transfers = GetTransfers($_->{itemnumber}); $#transfers == -1; } @$items ]; + map { my $rule = GetBranchItemRule($_->{homebranch}, $_->{itype}); $_->{holdallowed} = $rule->{holdallowed}; $rule->{holdallowed} != 0 } @$items; + return [ grep { $_->{holdallowed} != 0 } @$items ]; +} + +=head2 MapItemsToHoldRequests + + MapItemsToHoldRequests($hold_requests, $available_items, $branches, $transport_cost_matrix) + +=cut + +sub MapItemsToHoldRequests { + my ($hold_requests, $available_items, $branches_to_use, $transport_cost_matrix) = @_; + + # handle trival cases + return unless scalar(@$hold_requests) > 0; + return unless scalar(@$available_items) > 0; + + debug( "MapItemsToHoldRequests() for ".Dumper($hold_requests, $available_items, $branches_to_use, $transport_cost_matrix) ); + my $automatic_return = C4::Context->preference("AutomaticItemReturn"); + + # identify item-level requests + my %specific_items_requested = map { $_->{itemnumber} => 1 } + grep { defined($_->{itemnumber}) } + @$hold_requests; + + # group available items by itemnumber + my %items_by_itemnumber = map { $_->{itemnumber} => $_ } @$available_items; + + # items already allocated + my %allocated_items = (); + + # map of items to hold requests + my %item_map = (); + + # figure out which item-level requests can be filled + my $num_items_remaining = scalar(@$available_items); + foreach my $request (@$hold_requests) { + last if $num_items_remaining == 0; + + # is this an item-level request? + if (defined($request->{itemnumber})) { + # fill it if possible; if not skip it + if (exists $items_by_itemnumber{$request->{itemnumber}} and + not exists $allocated_items{$request->{itemnumber}}) { + $item_map{$request->{itemnumber}} = { + borrowernumber => $request->{borrowernumber}, + biblionumber => $request->{biblionumber}, + holdingbranch => $items_by_itemnumber{$request->{itemnumber}}->{holdingbranch}, + pickup_branch => $request->{branchcode} || $request->{borrowerbranch}, + item_level => 1, + reservedate => $request->{reservedate}, + reservenotes => $request->{reservenotes}, + }; + $allocated_items{$request->{itemnumber}}++; + $num_items_remaining--; + } + } else { + # it's title-level request that will take up one item + $num_items_remaining--; + } + } + + # group available items by branch + my %items_by_branch = (); + foreach my $item (@$available_items) { + next unless $item->{holdallowed}; + + push @{ $items_by_branch{ $automatic_return ? $item->{homebranch} + : $item->{holdingbranch} } }, $item + unless exists $allocated_items{ $item->{itemnumber} }; + } + return unless keys %items_by_branch; + + # now handle the title-level requests + $num_items_remaining = scalar(@$available_items) - scalar(keys %allocated_items); + my $pull_branches; + foreach my $request (@$hold_requests) { + last if $num_items_remaining == 0; + next if defined($request->{itemnumber}); # already handled these + + # look for local match first + my $pickup_branch = $request->{branchcode} || $request->{borrowerbranch}; + my ($itemnumber, $holdingbranch); + + my $holding_branch_items = $automatic_return ? undef : $items_by_branch{$pickup_branch}; + if ( $holding_branch_items ) { + foreach my $item (@$holding_branch_items) { + if ( $request->{borrowerbranch} eq $item->{homebranch} ) { + $itemnumber = $item->{itemnumber}; + last; + } + } + $holdingbranch = $pickup_branch; + $itemnumber ||= $holding_branch_items->[0]->{itemnumber}; + } + elsif ($transport_cost_matrix) { + $pull_branches = [keys %items_by_branch]; + $holdingbranch = least_cost_branch( $pickup_branch, $pull_branches, $transport_cost_matrix ); + if ( $holdingbranch ) { + + my $holding_branch_items = $items_by_branch{$holdingbranch}; + foreach my $item (@$holding_branch_items) { + next if $request->{borrowerbranch} ne $item->{homebranch}; + + $itemnumber = $item->{itemnumber}; + last; + } + $itemnumber ||= $holding_branch_items->[0]->{itemnumber}; + } + else { + warn "No transport costs for $pickup_branch"; + } + } + + unless ($itemnumber) { + # not found yet, fall back to basics + if ($branches_to_use) { + $pull_branches = $branches_to_use; + } else { + $pull_branches = [keys %items_by_branch]; + } + PULL_BRANCHES: + foreach my $branch (@$pull_branches) { + my $holding_branch_items = $items_by_branch{$branch} + or next; + + $holdingbranch ||= $branch; + foreach my $item (@$holding_branch_items) { + next if $pickup_branch ne $item->{homebranch}; + + $itemnumber = $item->{itemnumber}; + $holdingbranch = $branch; + last PULL_BRANCHES; + } + } + $itemnumber ||= $items_by_branch{$holdingbranch}->[0]->{itemnumber} + if $holdingbranch; + } + + if ($itemnumber) { + my $holding_branch_items = $items_by_branch{$holdingbranch} + or die "Have $itemnumber, $holdingbranch, but no items!"; + @$holding_branch_items = grep { $_->{itemnumber} != $itemnumber } @$holding_branch_items; + delete $items_by_branch{$holdingbranch} unless @$holding_branch_items; + + $item_map{$itemnumber} = { + borrowernumber => $request->{borrowernumber}, + biblionumber => $request->{biblionumber}, + holdingbranch => $holdingbranch, + pickup_branch => $pickup_branch, + item_level => 0, + reservedate => $request->{reservedate}, + reservenotes => $request->{reservenotes}, + }; + $num_items_remaining--; + } + } + return \%item_map; +} + +=head2 CreatePickListFromItemMap + +=cut + +sub CreatePicklistFromItemMap { + my $item_map = shift; + + my $dbh = C4::Context->dbh; + + my $sth_load=$dbh->prepare(" + INSERT INTO tmp_holdsqueue (biblionumber,itemnumber,barcode,surname,firstname,phone,borrowernumber, + cardnumber,reservedate,title, itemcallnumber, + holdingbranch,pickbranch,notes, item_level_request) + VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) + "); + + foreach my $itemnumber (sort keys %$item_map) { + my $mapped_item = $item_map->{$itemnumber}; + my $biblionumber = $mapped_item->{biblionumber}; + my $borrowernumber = $mapped_item->{borrowernumber}; + my $pickbranch = $mapped_item->{pickup_branch}; + my $holdingbranch = $mapped_item->{holdingbranch}; + my $reservedate = $mapped_item->{reservedate}; + my $reservenotes = $mapped_item->{reservenotes}; + my $item_level = $mapped_item->{item_level}; + + my $item = GetItem($itemnumber); + my $barcode = $item->{barcode}; + my $itemcallnumber = $item->{itemcallnumber}; + + my $borrower = GetMember('borrowernumber'=>$borrowernumber); + my $cardnumber = $borrower->{'cardnumber'}; + my $surname = $borrower->{'surname'}; + my $firstname = $borrower->{'firstname'}; + my $phone = $borrower->{'phone'}; + + my $bib = GetBiblioData($biblionumber); + my $title = $bib->{title}; + + $sth_load->execute($biblionumber, $itemnumber, $barcode, $surname, $firstname, $phone, $borrowernumber, + $cardnumber, $reservedate, $title, $itemcallnumber, + $holdingbranch, $pickbranch, $reservenotes, $item_level); + } +} + +=head2 AddToHoldTargetMap + +=cut + +sub AddToHoldTargetMap { + my $item_map = shift; + + my $dbh = C4::Context->dbh; + + my $insert_sql = q( + INSERT INTO hold_fill_targets (borrowernumber, biblionumber, itemnumber, source_branchcode, item_level_request) + VALUES (?, ?, ?, ?, ?) + ); + my $sth_insert = $dbh->prepare($insert_sql); + + foreach my $itemnumber (keys %$item_map) { + my $mapped_item = $item_map->{$itemnumber}; + $sth_insert->execute($mapped_item->{borrowernumber}, $mapped_item->{biblionumber}, $itemnumber, + $mapped_item->{holdingbranch}, $mapped_item->{item_level}); + } +} + +# Helper functions, not part of any interface + +sub debug { +# warn @_; +} + +sub load_branches_to_pull_from { + my $static_branch_list = C4::Context->preference("StaticHoldsQueueWeight") + or return; + + my @branches_to_use = map { s/^\s+//; s/\s+$//; $_; } split /,/, $static_branch_list; + + @branches_to_use = shuffle(@branches_to_use) if C4::Context->preference("RandomizeHoldsQueueWeight"); + + return \@branches_to_use; +} + +sub least_cost_branch { + + #$from - arrayref + my ($to, $from, $transport_cost_matrix) = @_; + +# Nothing really spectacular: supply to branch, a list of potential from branches +# and find the minimum from - to value from the transport_cost_matrix + return $from->[0] if @$from == 1; + + my ($least_cost, @branch); + foreach (@$from) { + my $cell = $transport_cost_matrix->{$to}{$_}; + next if $cell->{disable_transfer}; + + my $cost = $cell->{cost}; + + unless (defined $least_cost) { + $least_cost = $cost; + push @branch, $_; + next; + } + + next if $cost > $least_cost; + + if ($cost == $least_cost) { + push @branch, $_; + next; + } + + @branch = ($_); + $least_cost = $cost; + } + + return $branch[0]; + + # XXX return a random @branch with minimum cost instead of the first one; + # return $branch[0] if @branch == 1; +} + + +1; diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 87ecac4..34e7540 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -202,6 +202,7 @@ $tabsysprefs{DisplayClearScreenButton} = "Circulation"; $tabsysprefs{AllowAllMessageDeletion} = "Circulation"; $tabsysprefs{OverdueNoticeBcc} = "Circulation"; $tabsysprefs{OverduesBlockCirc} = "Circulation"; +$tabsysprefs{UseTransportCostMatrix} = "Circulation"; # Staff Client diff --git a/admin/transport-cost-matrix.pl b/admin/transport-cost-matrix.pl new file mode 100755 index 0000000..08865c2 --- /dev/null +++ b/admin/transport-cost-matrix.pl @@ -0,0 +1,122 @@ +#!/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. + +use strict; +use warnings; +use CGI; +use C4::Context; +use C4::Output; +use C4::Auth; +use C4::Koha; +use C4::Debug; +use C4::Branch; # GetBranches +use C4::HoldsQueue qw(TransportCostMatrix UpdateTransportCostMatrix SetUseTransportCostMatrix); + +use Data::Dumper; + +my $input = new CGI; + +my ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "admin/transport-cost-matrix.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => {parameters => 1}, + debug => 1, + }); + +my $update = $input->param('op') eq 'set-cost-matrix'; +my $use_transport_cost_matrix = $input->param('UseTransportCostMatrix') || 0; + +my ($cost_matrix, $have_matrix); +unless ($update) { + $cost_matrix = TransportCostMatrix(); + $have_matrix = keys %$cost_matrix if $cost_matrix; + $use_transport_cost_matrix = C4::Context->preference("UseTransportCostMatrix"); +} + +my $branches = GetBranches(); +my @branchloop = map { code => $_, + name => $branches->{$_}->{'branchname'} }, + sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } + keys %$branches; +my (@branchfromloop, @cost, @errors); +foreach my $branchfrom ( @branchloop ) { + my $fromcode = $branchfrom->{code}; + + my %from_row = ( code => $fromcode, name => $branchfrom->{name} ); + foreach my $branchto ( @branchloop ) { + my $tocode = $branchto->{code}; + + my %from_to_input_def = ( code => $tocode, name => $branchto->{name} ); + push @{ $from_row{branchtoloop} }, \%from_to_input_def; + + if ($fromcode eq $tocode) { + $from_to_input_def{skip} = 1; + next; + } + + (my $from_to = "${fromcode}_${tocode}") =~ s/\W//go; + $from_to_input_def{id} = $from_to; + my $input_name = "cost_$from_to"; + my $disable_name = "disable_$from_to"; + + if ($update) { + $from_to_input_def{disabled} = 1 if $input->param($disable_name); + my $value = $from_to_input_def{value} = $input->param($input_name); + push @errors, "Invalid value for $from_row{name} -> $from_to_input_def{name}" + unless $value >= 0.0 && $value <= 1.0; + } + else { + if ($have_matrix) { + if ( my $cell = $cost_matrix->{$tocode}{$fromcode} ) { + $from_to_input_def{value} = $cell->{cost}; + $from_to_input_def{disabled} = 1 if $cell->{disable_transfer}; + } + } else { + $from_to_input_def{value} = 0.5; + } + } + } + +# die Dumper(\%from_row); + push @branchfromloop, \%from_row; +} + +if ($update && !@errors) { + my @update_recs = map { + my $from = $_->{code}; + map { frombranch => $from, tobranch => $_->{code}, cost => $_->{value}, disable_transfer => $_->{disabled} || 0 }, + grep { $_->{code} ne $from } + @{ $_->{branchtoloop} }; + } @branchfromloop; + + UpdateTransportCostMatrix(\@update_recs); + SetUseTransportCostMatrix($use_transport_cost_matrix); +} + +$template->param( + branchloop => \@branchloop, + branchfromloop => \@branchfromloop, + UseTransportCostMatrix => $use_transport_cost_matrix, +); +output_html_with_http_headers $input, $cookie, $template->output; + +exit 0; + diff --git a/circ/view_holdsqueue.pl b/circ/view_holdsqueue.pl index 3023cdf..5ba6761 100755 --- a/circ/view_holdsqueue.pl +++ b/circ/view_holdsqueue.pl @@ -31,7 +31,7 @@ use C4::Biblio; use C4::Items; use C4::Koha; # GetItemTypes use C4::Branch; # GetBranches -use C4::Dates qw/format_date/; +use C4::HoldsQueue qw(GetHoldsQueueItems); my $query = new CGI; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( @@ -76,36 +76,5 @@ $template->param( itemtypeloop => \@itemtypesloop, ); -sub GetHoldsQueueItems { - my ($branchlimit,$itemtypelimit) = @_; - my $dbh = C4::Context->dbh; - - my @bind_params = (); - my $query = q/SELECT tmp_holdsqueue.*, biblio.author, items.ccode, items.location, items.enumchron, items.cn_sort, biblioitems.publishercode,biblio.copyrightdate,biblioitems.publicationyear,biblioitems.pages,biblioitems.size,biblioitems.publicationyear,biblioitems.isbn - FROM tmp_holdsqueue - JOIN biblio USING (biblionumber) - LEFT JOIN biblioitems USING (biblionumber) - LEFT JOIN items USING ( itemnumber) - /; - if ($branchlimit) { - $query .=" WHERE tmp_holdsqueue.holdingbranch = ?"; - push @bind_params, $branchlimit; - } - $query .= " ORDER BY ccode, location, cn_sort, author, title, pickbranch, reservedate"; - my $sth = $dbh->prepare($query); - $sth->execute(@bind_params); - my $items = []; - while ( my $row = $sth->fetchrow_hashref ){ - $row->{reservedate} = format_date($row->{reservedate}); - my $record = GetMarcBiblio($row->{biblionumber}); - if ($record){ - $row->{subtitle} = GetRecordValue('subtitle',$record,'')->[0]->{subfield}; - $row->{parts} = GetRecordValue('parts',$record,'')->[0]->{subfield}; - $row->{numbers} = GetRecordValue('numbers',$record,'')->[0]->{subfield}; - } - push @$items, $row; - } - return $items; -} # writing the template output_html_with_http_headers $query, $cookie, $template->output; diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index 0abf9d8..d9de938 100755 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -300,6 +300,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('UseTransportCostMatrix',0,"Use Transport Cost Matrix when filling holds",'','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxRecordsForFacets', '20', NULL, NULL, 'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowPurchaseSuggestionBranchChoice', 0, 'Allow user to choose branch when making a purchase suggestion','1','YesNo'); @@ -314,3 +315,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('UseTransportCostMatrix',0,"Use Transport Cost Matrix when filling holds",'','YesNo'); diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e3c6f42..80ff8fe 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2610,6 +2610,22 @@ CREATE TABLE `fieldmapping` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- +-- Table structure for table `transport_cost` +-- + +DROP TABLE IF EXISTS `transport_cost`; +CREATE TABLE `transport_cost` ( + `frombranch` varchar(10) NOT NULL, + `tobranch` varchar(10) NOT NULL, + `cost` decimal(4,3) NOT NULL, + `disable_transfer` tinyint(1) NOT NULL DEFAULT 0, + CHECK ( `frombranch` <> `tobranch` ), -- a dud check, mysql does not support that + CHECK ( cost >= 0.0 AND cost <= 1.0), -- a dud check, mysql does not support that + PRIMARY KEY (`frombranch`, `tobranch`), + CONSTRAINT `transport_cost_ibfk_1` FOREIGN KEY (`frombranch`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `transport_cost_ibfk_2` FOREIGN KEY (`tobranch`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE +) 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 9cbc8db..ab4d322 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4370,6 +4370,26 @@ 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('UseTransportCostMatrix',0,'Use Transport Cost Matrix when filling holds','','YesNo')"); + + $dbh->do("CREATE TABLE `transport_cost` ( + `frombranch` varchar(10) NOT NULL, + `tobranch` varchar(10) NOT NULL, + `cost` decimal(4,3) NOT NULL, + `disable_transfer` tinyint(1) NOT NULL DEFAULT 0, + CHECK ( `frombranch` <> `tobranch` ), -- a dud check, mysql does not support that + CHECK ( cost >= 0.0 AND cost <= 1.0), -- a dud check, mysql does not support that + PRIMARY KEY (`frombranch`, `tobranch`), + CONSTRAINT `transport_cost_ibfk_1` FOREIGN KEY (`frombranch`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `transport_cost_ibfk_2` FOREIGN KEY (`tobranch`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8"); + + print "Upgrade to $DBversion done (creating `transport_cost` table; adding UseTransportCostMatrix systempref, in circulation)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt index fe76ae8..9913663 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt @@ -53,6 +53,8 @@
        Define circulation and fines rules for combinations of libraries, patron categories, and item types
        Library Transfer Limits
        Limit the ability to transfer items between libraries based on the library sending, the library receiving, and the item type involved. These rules only go into effect if the preference UseBranchTransferLimits is set to ON.
        +
        Transport Cost Matrix
        +
        Define transport costs between branches
        Item Circulation Alerts
        Define rules for check-in and checkout notifications for combinations of libraries, patron categories, and item types
        diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt new file mode 100644 index 0000000..c426e16 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt @@ -0,0 +1,126 @@ +[% INCLUDE 'doc-head-open.inc' %] +Koha › Administration › Transport Cost Matrix +[% INCLUDE 'doc-head-close.inc' %] + + + + + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'cat-search.inc' %] + + + +
        + +
        +
        +
        +

        + Defining transport costs between libraries +

        +
        +
        + +

        Use Transport Cost Matrix +

        +
        +

        Costs are normalised decimal values 0 to 1, 0 being minimum (no) cost, 1 maximum.

        +

        Red cells signify no transfer allowed

        +

        Click on the cell to edit

        +
        +
        + + + [% FOR b IN branchloop %] + + [% END %] + + [% FOR bf IN branchfromloop %] + + + [% FOR bt IN bf.branchtoloop %] + + [% END %] + + [% END %] +
        From \ To[% b.name %]
        [% bf.name %] + [% IF bt.skip %] +   + [% ELSE %] +
        +
        [% bt.value %]
        + + [% IF bt.disabled %] + + [% END %] +
        + [% END %] +
        + + + + + + +
        +[% INCLUDE 'admin-menu.inc' %] +
        + +[% INCLUDE 'intranet-bottom.inc' %] diff --git a/misc/cronjobs/holds/build_holds_queue.pl b/misc/cronjobs/holds/build_holds_queue.pl index f01153e..9ec9825 100755 --- a/misc/cronjobs/holds/build_holds_queue.pl +++ b/misc/cronjobs/holds/build_holds_queue.pl @@ -5,7 +5,6 @@ #----------------------------------- # FIXME: add command-line options for verbosity and summary # FIXME: expand perldoc, explain intended logic -# FIXME: refactor all subroutines into C4 for testability use strict; use warnings; @@ -16,384 +15,7 @@ BEGIN { eval { require "$FindBin::Bin/../kohalib.pl" }; } -use C4::Context; -use C4::Search; -use C4::Items; -use C4::Branch; -use C4::Circulation; -use C4::Members; -use C4::Biblio; +use C4::HoldsQueue qw(CreateQueue); -use List::Util qw(shuffle); +CreateQueue(); -my $bibs_with_pending_requests = GetBibsWithPendingHoldRequests(); - -my $dbh = C4::Context->dbh; -$dbh->do("DELETE FROM tmp_holdsqueue"); # clear the old table for new info -$dbh->do("DELETE FROM hold_fill_targets"); - -my $total_bibs = 0; -my $total_requests = 0; -my $total_available_items = 0; -my $num_items_mapped = 0; - -my @branches_to_use = _get_branches_to_pull_from(); - -foreach my $biblionumber (@$bibs_with_pending_requests) { - $total_bibs++; - my $hold_requests = GetPendingHoldRequestsForBib($biblionumber); - my $available_items = GetItemsAvailableToFillHoldRequestsForBib($biblionumber, @branches_to_use); - $total_requests += scalar(@$hold_requests); - $total_available_items += scalar(@$available_items); - my $item_map = MapItemsToHoldRequests($hold_requests, $available_items, @branches_to_use); - - (defined($item_map)) or next; - - my $item_map_size = scalar(keys %$item_map); - $num_items_mapped += $item_map_size; - CreatePicklistFromItemMap($item_map); - AddToHoldTargetMap($item_map); - if (($item_map_size < scalar(@$hold_requests )) and - ($item_map_size < scalar(@$available_items))) { - # DOUBLE CHECK, but this is probably OK - unfilled item-level requests - # FIXME - #warn "unfilled requests for $biblionumber"; - #warn Dumper($hold_requests), Dumper($available_items), Dumper($item_map); - } -} - -exit 0; - -=head1 FUNCTIONS - -=head2 GetBibsWithPendingHoldRequests - - my $biblionumber_aref = GetBibsWithPendingHoldRequests(); - -Return an arrayref of the biblionumbers of all bibs -that have one or more unfilled hold requests. - -=cut - -sub GetBibsWithPendingHoldRequests { - my $dbh = C4::Context->dbh; - - my $bib_query = "SELECT DISTINCT biblionumber - FROM reserves - WHERE found IS NULL - AND priority > 0 - AND reservedate <= CURRENT_DATE()"; - my $sth = $dbh->prepare($bib_query); - - $sth->execute(); - my $biblionumbers = $sth->fetchall_arrayref(); - - return [ map { $_->[0] } @$biblionumbers ]; -} - -=head2 GetPendingHoldRequestsForBib - - my $requests = GetPendingHoldRequestsForBib($biblionumber); - -Returns an arrayref of hashrefs to pending, unfilled hold requests -on the bib identified by $biblionumber. The following keys -are present in each hashref: - - biblionumber - borrowernumber - itemnumber - priority - branchcode - reservedate - reservenotes - borrowerbranch - -The arrayref is sorted in order of increasing priority. - -=cut - -sub GetPendingHoldRequestsForBib { - my $biblionumber = shift; - - my $dbh = C4::Context->dbh; - - my $request_query = "SELECT biblionumber, borrowernumber, itemnumber, priority, reserves.branchcode, - reservedate, reservenotes, borrowers.branchcode AS borrowerbranch - FROM reserves - JOIN borrowers USING (borrowernumber) - WHERE biblionumber = ? - AND found IS NULL - AND priority > 0 - AND reservedate <= CURRENT_DATE() - ORDER BY priority"; - my $sth = $dbh->prepare($request_query); - $sth->execute($biblionumber); - - my $requests = $sth->fetchall_arrayref({}); - return $requests; - -} - -=head2 GetItemsAvailableToFillHoldRequestsForBib - - my $available_items = GetItemsAvailableToFillHoldRequestsForBib($biblionumber); - -Returns an arrayref of items available to fill hold requests -for the bib identified by C<$biblionumber>. An item is available -to fill a hold request if and only if: - - * it is not on loan - * it is not withdrawn - * it is not marked notforloan - * it is not currently in transit - * it is not lost - * it is not sitting on the hold shelf - -=cut - -sub GetItemsAvailableToFillHoldRequestsForBib { - my $biblionumber = shift; - my @branches_to_use = @_; - - my $dbh = C4::Context->dbh; - my $items_query = "SELECT itemnumber, homebranch, holdingbranch, itemtypes.itemtype AS itype - FROM items "; - - if (C4::Context->preference('item-level_itypes')) { - $items_query .= "LEFT JOIN itemtypes ON (itemtypes.itemtype = items.itype) "; - } else { - $items_query .= "JOIN biblioitems USING (biblioitemnumber) - LEFT JOIN itemtypes USING (itemtype) "; - } - $items_query .= "WHERE items.notforloan = 0 - AND holdingbranch IS NOT NULL - AND itemlost = 0 - AND wthdrawn = 0"; - $items_query .= " AND damaged = 0 " unless C4::Context->preference('AllowHoldsOnDamagedItems'); - $items_query .= " AND items.onloan IS NULL - AND (itemtypes.notforloan IS NULL OR itemtypes.notforloan = 0) - AND itemnumber NOT IN ( - SELECT itemnumber - FROM reserves - WHERE biblionumber = ? - AND itemnumber IS NOT NULL - AND (found IS NOT NULL OR priority = 0) - ) - AND items.biblionumber = ?"; - my @params = ($biblionumber, $biblionumber); - if ($#branches_to_use > -1) { - $items_query .= " AND holdingbranch IN (" . join (",", map { "?" } @branches_to_use) . ")"; - push @params, @branches_to_use; - } - my $sth = $dbh->prepare($items_query); - $sth->execute(@params); - - my $items = $sth->fetchall_arrayref({}); - $items = [ grep { my @transfers = GetTransfers($_->{itemnumber}); $#transfers == -1; } @$items ]; - map { my $rule = GetBranchItemRule($_->{homebranch}, $_->{itype}); $_->{holdallowed} = $rule->{holdallowed}; $rule->{holdallowed} != 0 } @$items; - return [ grep { $_->{holdallowed} != 0 } @$items ]; -} - -=head2 MapItemsToHoldRequests - - MapItemsToHoldRequests($hold_requests, $available_items); - -=cut - -sub MapItemsToHoldRequests { - my $hold_requests = shift; - my $available_items = shift; - my @branches_to_use = @_; - - # handle trival cases - return unless scalar(@$hold_requests) > 0; - return unless scalar(@$available_items) > 0; - - # identify item-level requests - my %specific_items_requested = map { $_->{itemnumber} => 1 } - grep { defined($_->{itemnumber}) } - @$hold_requests; - - # group available items by itemnumber - my %items_by_itemnumber = map { $_->{itemnumber} => $_ } @$available_items; - - # items already allocated - my %allocated_items = (); - - # map of items to hold requests - my %item_map = (); - - # figure out which item-level requests can be filled - my $num_items_remaining = scalar(@$available_items); - foreach my $request (@$hold_requests) { - last if $num_items_remaining == 0; - - # is this an item-level request? - if (defined($request->{itemnumber})) { - # fill it if possible; if not skip it - if (exists $items_by_itemnumber{$request->{itemnumber}} and - not exists $allocated_items{$request->{itemnumber}}) { - $item_map{$request->{itemnumber}} = { - borrowernumber => $request->{borrowernumber}, - biblionumber => $request->{biblionumber}, - holdingbranch => $items_by_itemnumber{$request->{itemnumber}}->{holdingbranch}, - pickup_branch => $request->{branchcode}, - item_level => 1, - reservedate => $request->{reservedate}, - reservenotes => $request->{reservenotes}, - }; - $allocated_items{$request->{itemnumber}}++; - $num_items_remaining--; - } - } else { - # it's title-level request that will take up one item - $num_items_remaining--; - } - } - - # group available items by branch - my %items_by_branch = (); - foreach my $item (@$available_items) { - push @{ $items_by_branch{ $item->{holdingbranch} } }, $item unless exists $allocated_items{ $item->{itemnumber} }; - } - - # now handle the title-level requests - $num_items_remaining = scalar(@$available_items) - scalar(keys %allocated_items); - foreach my $request (@$hold_requests) { - last if $num_items_remaining <= 0; - next if defined($request->{itemnumber}); # already handled these - - # look for local match first - my $pickup_branch = $request->{branchcode}; - if (exists $items_by_branch{$pickup_branch} and - not ($items_by_branch{$pickup_branch}->[0]->{holdallowed} == 1 and - $request->{borrowerbranch} ne $items_by_branch{$pickup_branch}->[0]->{homebranch}) - ) { - my $item = pop @{ $items_by_branch{$pickup_branch} }; - delete $items_by_branch{$pickup_branch} if scalar(@{ $items_by_branch{$pickup_branch} }) == 0; - $item_map{$item->{itemnumber}} = { - borrowernumber => $request->{borrowernumber}, - biblionumber => $request->{biblionumber}, - holdingbranch => $pickup_branch, - pickup_branch => $pickup_branch, - item_level => 0, - reservedate => $request->{reservedate}, - reservenotes => $request->{reservenotes}, - }; - $num_items_remaining--; - } else { - my @pull_branches = (); - if ($#branches_to_use > -1) { - @pull_branches = @branches_to_use; - } else { - @pull_branches = sort keys %items_by_branch; - } - foreach my $branch (@pull_branches) { - next unless exists $items_by_branch{$branch} and - not ($items_by_branch{$branch}->[0]->{holdallowed} == 1 and - $request->{borrowerbranch} ne $items_by_branch{$branch}->[0]->{homebranch}); - my $item = pop @{ $items_by_branch{$branch} }; - delete $items_by_branch{$branch} if scalar(@{ $items_by_branch{$branch} }) == 0; - $item_map{$item->{itemnumber}} = { - borrowernumber => $request->{borrowernumber}, - biblionumber => $request->{biblionumber}, - holdingbranch => $branch, - pickup_branch => $pickup_branch, - item_level => 0, - reservedate => $request->{reservedate}, - reservenotes => $request->{reservenotes}, - }; - $num_items_remaining--; - last; - } - } - } - return \%item_map; -} - -=head2 CreatePickListFromItemMap - -=cut - -sub CreatePicklistFromItemMap { - my $item_map = shift; - - my $dbh = C4::Context->dbh; - - my $sth_load=$dbh->prepare(" - INSERT INTO tmp_holdsqueue (biblionumber,itemnumber,barcode,surname,firstname,phone,borrowernumber, - cardnumber,reservedate,title, itemcallnumber, - holdingbranch,pickbranch,notes, item_level_request) - VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) - "); - - foreach my $itemnumber (sort keys %$item_map) { - my $mapped_item = $item_map->{$itemnumber}; - my $biblionumber = $mapped_item->{biblionumber}; - my $borrowernumber = $mapped_item->{borrowernumber}; - my $pickbranch = $mapped_item->{pickup_branch}; - my $holdingbranch = $mapped_item->{holdingbranch}; - my $reservedate = $mapped_item->{reservedate}; - my $reservenotes = $mapped_item->{reservenotes}; - my $item_level = $mapped_item->{item_level}; - - my $item = GetItem($itemnumber); - my $barcode = $item->{barcode}; - my $itemcallnumber = $item->{itemcallnumber}; - - my $borrower = GetMember('borrowernumber'=>$borrowernumber); - my $cardnumber = $borrower->{'cardnumber'}; - my $surname = $borrower->{'surname'}; - my $firstname = $borrower->{'firstname'}; - my $phone = $borrower->{'phone'}; - - my $bib = GetBiblioData($biblionumber); - my $title = $bib->{title}; - - $sth_load->execute($biblionumber, $itemnumber, $barcode, $surname, $firstname, $phone, $borrowernumber, - $cardnumber, $reservedate, $title, $itemcallnumber, - $holdingbranch, $pickbranch, $reservenotes, $item_level); - } -} - -=head2 AddToHoldTargetMap - -=cut - -sub AddToHoldTargetMap { - my $item_map = shift; - - my $dbh = C4::Context->dbh; - - my $insert_sql = q( - INSERT INTO hold_fill_targets (borrowernumber, biblionumber, itemnumber, source_branchcode, item_level_request) - VALUES (?, ?, ?, ?, ?) - ); - my $sth_insert = $dbh->prepare($insert_sql); - - foreach my $itemnumber (keys %$item_map) { - my $mapped_item = $item_map->{$itemnumber}; - $sth_insert->execute($mapped_item->{borrowernumber}, $mapped_item->{biblionumber}, $itemnumber, - $mapped_item->{holdingbranch}, $mapped_item->{item_level}); - } -} - -=head2 _get_branches_to_pull_from - -Query system preferences to get ordered list of -branches to use to fill hold requests. - -=cut - -sub _get_branches_to_pull_from { - my @branches_to_use = (); - - my $static_branch_list = C4::Context->preference("StaticHoldsQueueWeight"); - if ($static_branch_list) { - @branches_to_use = map { s/^\s+//; s/\s+$//; $_; } split /,/, $static_branch_list; - } - - @branches_to_use = shuffle(@branches_to_use) if C4::Context->preference("RandomizeHoldsQueueWeight"); - - return @branches_to_use; -} diff --git a/t/db_dependent/HoldsQueue.t b/t/db_dependent/HoldsQueue.t new file mode 100755 index 0000000..6cce4d9 --- /dev/null +++ b/t/db_dependent/HoldsQueue.t @@ -0,0 +1,161 @@ +#!/usr/bin/perl + +# Test C4::HoldsQueue::CreateQueue() for both transport cost matrix +# and StaticHoldsQueueWeight array (no RandomizeHoldsQueueWeight, no point) +# Wraps tests in transaction that's rolled back, so no data is destroyed +# MySQL WARNING: This makes sense only if your tables are InnoDB, otherwise +# transactions are not supported and mess is left behind + +use strict; +use warnings; +use C4::Context; + +use Data::Dumper; + +use Test::More tests => 15; + +BEGIN { + use FindBin; + use lib $FindBin::Bin; + use_ok('C4::Reserves'); + use_ok('C4::HoldsQueue'); +} + +my $TITLE = "Test Holds Queue XXX"; +# Pick a plausible borrower. Easier than creating one. +my $BORROWER_QRY = <dbh; +my $borrower = $dbh->selectrow_hashref($BORROWER_QRY); +my $borrowernumber = $borrower->{borrowernumber}; +# Set special (for this test) branches +my $borrower_branchcode = $borrower->{branchcode}; +my @other_branches = grep { $_ ne $borrower_branchcode } @{ $dbh->selectcol_arrayref("SELECT branchcode FROM branches") }; +my $least_cost_branch_code = pop @other_branches + or BAIL_OUT("No point testing only one branch..."); + +# Start transaction +$dbh->{AutoCommit} = 0; +$dbh->{RaiseError} = 1; + +#Set up the stage +# Sysprefs and cost matrix +$dbh->do("UPDATE systempreferences SET value = ? WHERE variable = 'StaticHoldsQueueWeight'", undef, + join( ',', @other_branches, $borrower_branchcode, $least_cost_branch_code)); +$dbh->do("UPDATE systempreferences SET value = '0' WHERE variable = 'RandomizeHoldsQueueWeight'"); + +$dbh->do("DELETE FROM transport_cost"); +my $transport_cost_insert_sth = $dbh->prepare("insert into transport_cost (frombranch, tobranch, cost) values (?, ?, ?)"); +# Favour $least_cost_branch_code +$transport_cost_insert_sth->execute($borrower_branchcode, $least_cost_branch_code, 0.2); +$transport_cost_insert_sth->execute($least_cost_branch_code, $borrower_branchcode, 0.2); +my @b = @other_branches; +while ( my $b1 = shift @b ) { + foreach my $b2 ($borrower_branchcode, $least_cost_branch_code, @b) { + $transport_cost_insert_sth->execute($b1, $b2, 0.5); + $transport_cost_insert_sth->execute($b2, $b1, 0.5); + } +} + + +# Loanable items - all possible combinations of homebranch and holdingbranch +$dbh->do("INSERT INTO biblio (frameworkcode, author, title, datecreated) + VALUES ('SER', 'Koha test', '$TITLE', '2011-02-01')"); +my $biblionumber = $dbh->selectrow_array("SELECT biblionumber FROM biblio WHERE title = '$TITLE'") + or BAIL_OUT("Cannot find newly created biblio record"); +$dbh->do("INSERT INTO biblioitems (biblionumber, marcxml) + VALUES ($biblionumber, '')"); +my $biblioitemnumber = $dbh->selectrow_array("SELECT biblioitemnumber FROM biblioitems WHERE biblionumber = $biblionumber") + or BAIL_OUT("Cannot find newly created biblioitems record"); + +my $items_insert_sth = $dbh->prepare("INSERT INTO items (biblionumber, biblioitemnumber, barcode, homebranch, holdingbranch, notforloan, damaged, itemlost, wthdrawn, onloan) + VALUES ($biblionumber, $biblioitemnumber, ?, ?, ?, 0, 0, 0, 0, NULL)"); # CURRENT_DATE - 3)"); +my $first_barcode = int(rand(1000000000000)); # XXX +my $barcode = $first_barcode; +foreach ( $borrower_branchcode, $least_cost_branch_code, @other_branches ) { + $items_insert_sth->execute($barcode++, $borrower_branchcode, $_); + $items_insert_sth->execute($barcode++, $_, $_); + $items_insert_sth->execute($barcode++, $_, $borrower_branchcode); +} + +# Remove existing reserves, makes debugging easier +$dbh->do("DELETE FROM reserves"); +my $constraint = undef; +my $bibitems = undef; +my $priority = 1; +# Make a reserve +AddReserve ( $borrower_branchcode, $borrowernumber, $biblionumber, $constraint, $bibitems, $priority ); +# $resdate, $expdate, $notes, $title, $checkitem, $found +$dbh->do("UPDATE reserves SET reservedate = reservedate - 1"); + +# Tests +my $use_cost_matrix_sth = $dbh->prepare("UPDATE systempreferences SET value = ? WHERE variable = 'UseTransportCostMatrix'"); +my $test_sth = $dbh->prepare("SELECT * FROM hold_fill_targets + JOIN tmp_holdsqueue USING (borrowernumber, biblionumber, itemnumber) + JOIN items USING (itemnumber) + WHERE borrowernumber = $borrowernumber"); + +# We have a book available homed in borrower branch +test_queue ('take from homebranch', 0, $borrower_branchcode, $borrower_branchcode); +test_queue ('take from homebranch', 1, $borrower_branchcode, $borrower_branchcode); + +$dbh->do("DELETE FROM tmp_holdsqueue"); +$dbh->do("DELETE FROM hold_fill_targets"); +$dbh->do("DELETE FROM issues WHERE itemnumber IN (SELECT itemnumber FROM items WHERE homebranch = '$borrower_branchcode')"); +$dbh->do("DELETE FROM items WHERE homebranch = '$borrower_branchcode'"); +# We have a book available held in borrower branch +test_queue ('take from holdingbranch', 0, $borrower_branchcode, $borrower_branchcode); +test_queue ('take from holdingbranch', 1, $borrower_branchcode, $borrower_branchcode); + +$dbh->do("DELETE FROM tmp_holdsqueue"); +$dbh->do("DELETE FROM hold_fill_targets"); +$dbh->do("DELETE FROM issues WHERE itemnumber IN (SELECT itemnumber FROM items WHERE holdingbranch = '$borrower_branchcode')"); +$dbh->do("DELETE FROM items WHERE holdingbranch = '$borrower_branchcode'"); +# No book available in borrower branch, pick according to the rules +# Frst branch from StaticHoldsQueueWeight +test_queue ('take from lowest cost branch', 0, $borrower_branchcode, $other_branches[0]); +test_queue ('take from lowest cost branch', 1, $borrower_branchcode, $least_cost_branch_code); +my $queue = C4::HoldsQueue::GetHoldsQueueItems($least_cost_branch_code) || []; +my $queue_item = $queue->[0]; +ok( $queue_item + && $queue_item->{pickbranch} eq $borrower_branchcode + && $queue_item->{holdingbranch} eq $least_cost_branch_code, "GetHoldsQueueItems" ) + or diag( "Expected item for pick $borrower_branchcode, hold $least_cost_branch_code, got ".Dumper($queue_item) ); + +# XXX All this tests are for borrower branch pick-up. +# Maybe needs expanding to homebranch or holdingbranch pick-up. + +# Cleanup +$dbh->rollback; + +exit; + +sub test_queue { + my ($test_name, $use_cost_matrix, $pick_branch, $hold_branch) = @_; + + $test_name = "$test_name (".($use_cost_matrix ? "" : "don't")." use cost matrix)"; + + $use_cost_matrix_sth->execute($use_cost_matrix); + C4::Context->_flush_preferences(); + C4::HoldsQueue::CreateQueue(); + + my $results = $dbh->selectall_arrayref($test_sth, { Slice => {} }); # should be only one + my $r = $results->[0]; + + my $ok = is( $r->{pickbranch}, $pick_branch, "$test_name pick up branch"); + $ok &&= is( $r->{holdingbranch}, $hold_branch, "$test_name holding branch") + if $hold_branch; + + diag( "Wrong pick-up/hold: ". Dumper ($pick_branch,, $hold_branch, map dump_records($_), qw(reserves hold_fill_targets tmp_holdsqueue)) ) + unless $ok; +} + +sub dump_records { + my ($tablename) = @_; + return $dbh->selectall_arrayref("SELECT * from $tablename where borrowernumber = ?", { Slice => {} }, $borrowernumber); +} + + -- 1.6.5 From robin at catalyst.net.nz Thu Jul 21 07:40:47 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Thu, 21 Jul 2011 17:40:47 +1200 Subject: [Koha-patches] [PATCH 3/5] Bug 6540 - Add defaultsql command line option In-Reply-To: <1311226849-9042-1-git-send-email-robin@catalyst.net.nz> References: <1311226849-9042-1-git-send-email-robin@catalyst.net.nz> Message-ID: <1311226849-9042-3-git-send-email-robin@catalyst.net.nz> From: Magnus Enger This will override the setting in /etc/koha/koha-sites.conf. Signed-off-by: Robin Sheat --- debian/scripts/koha-create | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index 08f4baf..85b208b 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -89,6 +89,7 @@ while true ; do -p|--populate-db) op=populate ; shift ;; -m|--marcflavor) ZEBRA_MARC_FORMAT="$2" ; shift 2 ;; -l|--zebralang) ZEBRA_LANGUAGE="$2" ; shift 2 ;; + -d|--defaultsql) DEFAULTSQL="$2" ; shift 2 ;; --) shift ; break ;; *) die "Internal error! " ;; esac -- 1.7.4.1 From robin at catalyst.net.nz Thu Jul 21 07:40:49 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Thu, 21 Jul 2011 17:40:49 +1200 Subject: [Koha-patches] [PATCH 5/5] Bug 6540 - fix some command-line args issues In-Reply-To: <1311226849-9042-1-git-send-email-robin@catalyst.net.nz> References: <1311226849-9042-1-git-send-email-robin@catalyst.net.nz> Message-ID: <1311226849-9042-5-git-send-email-robin@catalyst.net.nz> --- debian/scripts/koha-create | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index 5c742e1..d039e94 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -20,9 +20,10 @@ set -e usage="Usage: $0 [--create-db|--request-db|--populate-db] \ -[--marcflavor marc21|normarc|unimarc] \ -[--zebralang en|fr|nb] [--defaultsql /path/to/some.sql] -[--configfile /path/to/config] instancename" + [--marcflavor marc21|normarc|unimarc] \ + [--zebralang en|nb|fr] \ + [--defaultsql /path/to/some.sql] \ + [--configfile /path/to/config] instancename" die() { echo "$@" 1>&2 @@ -78,7 +79,7 @@ fi [ $# -ge 2 ] && [ $# -le 10 ] || die $usage -TEMP=`getopt -o crpm:l: -l create-db,request-db,populate-db,marcflavor:,zebralang:,configfile: \ +TEMP=`getopt -o crpm:l:d:f: -l create-db,request-db,populate-db,marcflavor:,zebralang:,defaultsql:,configfile: \ -n "$0" -- "$@"` # Note the quotes around `$TEMP': they are essential! @@ -99,7 +100,7 @@ while true ; do -d|--defaultsql) CLO_DEFAULTSQL="$2" ; shift 2 ;; -f|--configfile) configfile="$2" ; shift 2 ;; --) shift ; break ;; - *) die $usage ;; + *) die "Internal error processing command line arguments" ;; esac done -- 1.7.4.1 From robin at catalyst.net.nz Thu Jul 21 07:40:45 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Thu, 21 Jul 2011 17:40:45 +1200 Subject: [Koha-patches] [PATCH 1/5] Bug 6540 - Make ZEBRA_MARC_FORMAT and ZEBRA_LANGUAGE configurable for koha-create Message-ID: <1311226849-9042-1-git-send-email-robin@catalyst.net.nz> From: Magnus Enger Signed-off-by: Robin Sheat --- debian/scripts/koha-create | 4 ++++ debian/templates/zebra-authorities-dom-site.cfg.in | 2 +- debian/templates/zebra-authorities-site.cfg.in | 2 +- debian/templates/zebra-biblios-site.cfg.in | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index e3c73fc..c3bd465 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -36,6 +36,8 @@ generate_config_file() { -e "s/__OPACSERVER__/$domain/g" \ -e "s/__INTRASERVER__/$intradomain/g" \ -e "s/__ZEBRA_PASS__/$zebrapwd/g" \ + -e "s/__ZEBRA_MARC_FORMAT__/$ZEBRA_MARC_FORMAT/g" \ + -e "s/__ZEBRA_LANGUAGE__/$ZEBRA_LANGUAGE/g" \ -e "s/__DB_NAME__/$mysqldb/g" \ -e "s/__DB_HOST__/$mysqlhost/g" \ -e "s/__DB_USER__/$mysqluser/g" \ @@ -65,6 +67,8 @@ INTRAPORT="8080" INTRAPREFIX="" INTRASUFFIX="" DEFAULTSQL="" +ZEBRA_MARC_FORMAT="marc21" +ZEBRA_LANGUAGE="en" if [ -e /etc/koha/koha-sites.conf ] then . /etc/koha/koha-sites.conf diff --git a/debian/templates/zebra-authorities-dom-site.cfg.in b/debian/templates/zebra-authorities-dom-site.cfg.in index 5b8fd7a..524e4fb 100644 --- a/debian/templates/zebra-authorities-dom-site.cfg.in +++ b/debian/templates/zebra-authorities-dom-site.cfg.in @@ -4,7 +4,7 @@ # $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $ # # Where are the config files located? -profilePath:/etc/koha/zebradb/authorities/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/marc21/authorities:/etc/koha/zebradb/lang_defs/en:/etc/koha/zebradb/xsl +profilePath:/etc/koha/zebradb/authorities/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/__ZEBRA_MARC_FORMAT__/authorities:/etc/koha/zebradb/lang_defs/__ZEBRA_LANGUAGE__:/etc/koha/zebradb/xsl encoding: UTF-8 # modulePath - where to look for loadable zebra modules diff --git a/debian/templates/zebra-authorities-site.cfg.in b/debian/templates/zebra-authorities-site.cfg.in index 01cd347..dc67a19 100644 --- a/debian/templates/zebra-authorities-site.cfg.in +++ b/debian/templates/zebra-authorities-site.cfg.in @@ -4,7 +4,7 @@ # $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $ # # Where are the config files located? -profilePath:/etc/koha/zebradb/authorities/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/marc21/authorities:/etc/koha/zebradb/lang_defs/en +profilePath:/etc/koha/zebradb/authorities/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/__ZEBRA_MARC_FORMAT__/authorities:/etc/koha/zebradb/lang_defs/__ZEBRA_LANGUAGE__ encoding: UTF-8 # modulePath - where to look for loadable zebra modules diff --git a/debian/templates/zebra-biblios-site.cfg.in b/debian/templates/zebra-biblios-site.cfg.in index fea467f..f1cfb07 100644 --- a/debian/templates/zebra-biblios-site.cfg.in +++ b/debian/templates/zebra-biblios-site.cfg.in @@ -3,7 +3,7 @@ # $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $ # # Where are the config files located? -profilePath:/etc/koha/zebradb/biblios/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/marc21/biblios:/etc/koha/zebradb/lang_defs/en +profilePath:/etc/koha/zebradb/biblios/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/__ZEBRA_MARC_FORMAT__/biblios:/etc/koha/zebradb/lang_defs/__ZEBRA_LANGUAGE__ # modulePath - where to look for loadable zebra modules modulePath: /usr/lib/idzebra-2.0/modules -- 1.7.4.1 From robin at catalyst.net.nz Thu Jul 21 07:40:46 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Thu, 21 Jul 2011 17:40:46 +1200 Subject: [Koha-patches] [PATCH 2/5] Bug 6540 - Followup patch adding command line options In-Reply-To: <1311226849-9042-1-git-send-email-robin@catalyst.net.nz> References: <1311226849-9042-1-git-send-email-robin@catalyst.net.nz> Message-ID: <1311226849-9042-2-git-send-email-robin@catalyst.net.nz> From: Magnus Enger This adds the --marcflavor and --zebralang commandline options, as well as short versions of all options. Signed-off-by: Robin Sheat --- debian/scripts/koha-create | 36 +++++++++++++++++++++++------------- 1 files changed, 23 insertions(+), 13 deletions(-) diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index c3bd465..08f4baf 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -19,13 +19,11 @@ set -e - die() { echo "$@" 1>&2 exit 1 } - generate_config_file() { touch "$2" chown "root:$username" "$2" @@ -60,7 +58,6 @@ getinstancemysqlpassword() { "/etc/koha/sites/$1/koha-conf.xml" } - # Set defaults and read config file, if it exists. DOMAIN="" INTRAPORT="8080" @@ -74,18 +71,31 @@ then . /etc/koha/koha-sites.conf fi +[ $# -ge 2 ] && [ $# -le 6 ] || + die "Usage: $0 [--create-db|--request-db|--populate-db] \ +[--marcflavor marc21|normarc|unimarc] \ +[--zebralang en|fr|nb] instancename" + +TEMP=`getopt -o crpm:l: -l create-db,request-db,populate-db,marcflavor:,zebralang: \ + -n "$0" -- "$@"` + +# Note the quotes around `$TEMP': they are essential! +eval set -- "$TEMP" + +while true ; do + case "$1" in + -c|--create-db) op=create ; shift ;; + -r|--request-db) op=request ; shift ;; + -p|--populate-db) op=populate ; shift ;; + -m|--marcflavor) ZEBRA_MARC_FORMAT="$2" ; shift 2 ;; + -l|--zebralang) ZEBRA_LANGUAGE="$2" ; shift 2 ;; + --) shift ; break ;; + *) die "Internal error! " ;; + esac +done -# Parse command line. -[ "$#" = 2 ] || - die "Usage: $0 [--create-db|--request-db|--populate-db] instancename" -case "$1" in - --create-db) op=create ;; - --request-db) op=request ;; - --populate-db) op=populate ;; - *) die "Usage: $0 [--create-db|--request-db|--populate-db] instancename" ;; -esac +name="$1" -name="$2" domain="$name$DOMAIN" if [ "$INTRAPORT" = 80 ] || [ "$INTRAPORT" = "" ] then -- 1.7.4.1 From robin at catalyst.net.nz Thu Jul 21 07:40:48 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Thu, 21 Jul 2011 17:40:48 +1200 Subject: [Koha-patches] [PATCH 4/5] Bug 6540 - Add config file as command line option for koha-create In-Reply-To: <1311226849-9042-1-git-send-email-robin@catalyst.net.nz> References: <1311226849-9042-1-git-send-email-robin@catalyst.net.nz> Message-ID: <1311226849-9042-4-git-send-email-robin@catalyst.net.nz> From: Magnus Enger Order of precedence for config options, from lowest to highest: 1. The defaults set in koha-create itself 2. /etc/koha/koha-sites.conf 3. Config file specified with --configfile 4. Individual options set with --marcflavor, --zebralang, --defaultsql Signed-off-by: Robin Sheat --- debian/scripts/koha-create | 48 +++++++++++++++++++++++++++++++++++-------- 1 files changed, 39 insertions(+), 9 deletions(-) diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index 85b208b..5c742e1 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -19,6 +19,11 @@ set -e +usage="Usage: $0 [--create-db|--request-db|--populate-db] \ +[--marcflavor marc21|normarc|unimarc] \ +[--zebralang en|fr|nb] [--defaultsql /path/to/some.sql] +[--configfile /path/to/config] instancename" + die() { echo "$@" 1>&2 exit 1 @@ -71,30 +76,55 @@ then . /etc/koha/koha-sites.conf fi -[ $# -ge 2 ] && [ $# -le 6 ] || - die "Usage: $0 [--create-db|--request-db|--populate-db] \ -[--marcflavor marc21|normarc|unimarc] \ -[--zebralang en|fr|nb] instancename" +[ $# -ge 2 ] && [ $# -le 10 ] || die $usage -TEMP=`getopt -o crpm:l: -l create-db,request-db,populate-db,marcflavor:,zebralang: \ +TEMP=`getopt -o crpm:l: -l create-db,request-db,populate-db,marcflavor:,zebralang:,configfile: \ -n "$0" -- "$@"` # Note the quotes around `$TEMP': they are essential! eval set -- "$TEMP" +# Temporary variables for the command line options +CLO_ZEBRA_MARC_FORMAT="" +CLO_ZEBRA_LANGUAGE="" +CLO_DEFAULTSQL="" + while true ; do case "$1" in -c|--create-db) op=create ; shift ;; -r|--request-db) op=request ; shift ;; -p|--populate-db) op=populate ; shift ;; - -m|--marcflavor) ZEBRA_MARC_FORMAT="$2" ; shift 2 ;; - -l|--zebralang) ZEBRA_LANGUAGE="$2" ; shift 2 ;; - -d|--defaultsql) DEFAULTSQL="$2" ; shift 2 ;; + -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 ;; --) shift ; break ;; - *) die "Internal error! " ;; + *) die $usage ;; esac done +# Load the configfile given on the command line +if [ -e "$configfile" ] +then + . "$configfile" +else + die "$configfile does not exist."; +fi + +# Make sure options from the command line get the highest precedence +if [ "$CLO_ZEBRA_MARC_FORMAT" != "" ] +then + ZEBRA_MARC_FORMAT="$CLO_ZEBRA_MARC_FORMAT" +fi +if [ "$CLO_ZEBRA_LANGUAGE" != "" ] +then + ZEBRA_LANGUAGE="$CLO_ZEBRA_LANGUAGE" +fi +if [ "$CLO_DEFAULTSQL" != "" ] +then + DEFAULTSQL="$CLO_DEFAULTSQL" +fi + name="$1" domain="$name$DOMAIN" -- 1.7.4.1 From magnus at enger.priv.no Thu Jul 21 11:04:04 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Thu, 21 Jul 2011 11:04:04 +0200 Subject: [Koha-patches] [PATCH 5/5] Bug 6540 - [SIGNED-OFF] fix some command-line args issues Message-ID: <1311239044-2442-1-git-send-email-magnus@enger.priv.no> From: Robin Sheat Signed-off-by: Magnus Enger --- debian/scripts/koha-create | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index 5c742e1..d039e94 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -20,9 +20,10 @@ set -e usage="Usage: $0 [--create-db|--request-db|--populate-db] \ -[--marcflavor marc21|normarc|unimarc] \ -[--zebralang en|fr|nb] [--defaultsql /path/to/some.sql] -[--configfile /path/to/config] instancename" + [--marcflavor marc21|normarc|unimarc] \ + [--zebralang en|nb|fr] \ + [--defaultsql /path/to/some.sql] \ + [--configfile /path/to/config] instancename" die() { echo "$@" 1>&2 @@ -78,7 +79,7 @@ fi [ $# -ge 2 ] && [ $# -le 10 ] || die $usage -TEMP=`getopt -o crpm:l: -l create-db,request-db,populate-db,marcflavor:,zebralang:,configfile: \ +TEMP=`getopt -o crpm:l:d:f: -l create-db,request-db,populate-db,marcflavor:,zebralang:,defaultsql:,configfile: \ -n "$0" -- "$@"` # Note the quotes around `$TEMP': they are essential! @@ -99,7 +100,7 @@ while true ; do -d|--defaultsql) CLO_DEFAULTSQL="$2" ; shift 2 ;; -f|--configfile) configfile="$2" ; shift 2 ;; --) shift ; break ;; - *) die $usage ;; + *) die "Internal error processing command line arguments" ;; esac done -- 1.7.4.1 From colin.campbell at ptfs-europe.com Thu Jul 21 13:30:21 2011 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Thu, 21 Jul 2011 12:30:21 +0100 Subject: [Koha-patches] [PATCH] Bug 6620 Ensure autoflush is set on output filehandles Message-ID: <1311247821-24700-1-git-send-email-colin.campbell@ptfs-europe.com> stdout is by default buffered and a flush is only guaranteed on CR Sip responses are not CR terminated so we need to ensure autoflush is switched on so that the filehandle is flushed after a print Otherwise this can manifest as self checks running slow or failing due to timeout (although in the log we see the response) --- C4/SIP/Sip.pm | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/C4/SIP/Sip.pm b/C4/SIP/Sip.pm index 8a0f067..337cc0e 100644 --- a/C4/SIP/Sip.pm +++ b/C4/SIP/Sip.pm @@ -12,6 +12,7 @@ use Exporter; use Sys::Syslog qw(syslog); use POSIX qw(strftime); use Socket qw(:crlf); +use IO::Handle; use Sip::Constants qw(SIP_DATETIME); use Sip::Checksum qw(checksum); @@ -230,9 +231,11 @@ sub write_msg { if ($file) { + $file->autoflush(1); print $file "$msg\r"; } else { - print "$msg\r"; + STDOUT->autoflush(1); + print $msg, "\r"; syslog("LOG_INFO", "OUTPUT MSG: '$msg'"); } -- 1.7.6 From nengard at bywatersolutions.com Thu Jul 21 05:17:10 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 20 Jul 2011 23:17:10 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Follow-up fixes for Bug 5917, Switch Koha to use Template::Toolkit Message-ID: <1311218230-1906-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard While fixing Bug 6395 I found a few other instances of leftover TMPL usage. Signed-off-by: Nicole C. Engard --- .../en/modules/admin/branch_transfer_limits.tt | 3 +-- .../prog/en/modules/catalogue/issuehistory.tt | 3 +-- .../prog/en/modules/serials/serials-recieve.tt | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) 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 a1b6fa2..cf7ada3 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 @@ -127,8 +127,7 @@
  • [% issue.surname %][% IF ( issue.firstname ) %], [% issue.firstname %][% END %] [% IF ( issue.barcode ) %] [% issue.barcode %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tt index 33f267a..f45ffeb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tt @@ -4,8 +4,7 @@ - [% INCLUDE 'calendar.inc' %] @@ -458,7 +457,7 @@ No patron matched [% message %]
    [% IF ( DisplayClearScreenButton ) %] - + x [% END %] -- 1.7.3 From nengard at bywatersolutions.com Thu Jul 21 17:16:08 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Thu, 21 Jul 2011 11:16:08 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF} Fix for Bug 6623 - Nicer style for "clear screen" button Message-ID: <1311261368-4644-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard This patch replaces the
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt index ba22e9c..cda1191 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt @@ -31,7 +31,7 @@ function jumpfull(page) [% IF ( number.highlight ) %] [% number.number %] [% ELSE %] - + [% number.number %] [% END %] [% END %] @@ -72,7 +72,7 @@ function jumpfull(page)
    [% IF ( resul.repets ) %] [% FOREACH repet IN resul.repets %] - [% repet.repet %] + [% repet.repet %] [% END %] [% ELSE %] choose @@ -94,7 +94,7 @@ function jumpfull(page) [% IF ( number.highlight ) %] [% number.number %] [% ELSE %] - + [% number.number %] [% END %] [% END %] 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..84504b4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt @@ -132,7 +132,7 @@ function placeHold () { [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]

    - [% IF ( print_basket ) %] + [% IF ( BIBLIO_RESULT.print_basket ) %] [% BIBLIO_RESULT.title |html %] [% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %] [% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author %][% END %] @@ -301,7 +301,7 @@ function placeHold () {

    - [% UNLESS ( print_basket ) %][% END %] + @@ -313,7 +313,7 @@ function placeHold () { [% ELSE %] [% END %] - [% UNLESS ( print_basket ) %] [% END %] @@ -347,9 +347,13 @@ function placeHold () {
       Title Item Type Location
    + [% UNLESS ( BIBLIO_RESULT.print_basket ) %]
    [% END %] +[% IF ( print_basket ) %] +<< Back to Cart +[% ELSE %]
    +[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt index 7e6b5ad..bfa5179 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt @@ -43,8 +43,8 @@ [% IF ( outer_servers_loop ) %] -
    - Select remote databases +
    + Select remote databases: [% FOREACH outer_servers_loo IN outer_servers_loop %] [% IF ( outer_servers_loo.checked ) %][% ELSE %][% END %] @@ -54,8 +54,8 @@ [% END %] -
    - Search For +
    + Search For: [% FOREACH search_box IN search_boxes_loop %] [% IF ( search_boxes_label ) %]
    [% ELSE %]
    [% END %] [% IF ( expanded_options ) %] @@ -74,7 +74,7 @@ [+] [% END %] [% IF ( search_box.scan_index ) %] - + [% END %] [% END %]
    @@ -83,19 +83,20 @@ -
    +

    [% IF ( expanded_options ) %] [Fewer Options] [% ELSE %] [More options] [% END %] [New search] -

    +

    +
    -
    - Limit to any of the following +
    + Limit to any of the following: [% FOREACH itemtypeloo IN itemtypeloop %] @@ -112,21 +113,23 @@
    +
    [% IF ( expanded_options ) %] +
    -
    - Limits -
    +
    + Limits: +

    -   (format: yyyy-yyyy)

    +   (format: yyyy-yyyy)

    -
    -
    +
    +

    - [% FOREACH search_languages_loo IN search_languages_loop %] [% IF ( search_languages_loo.selected ) %] @@ -138,18 +141,20 @@ [% END %]

    -
    +
    + [% END %] [% IF ( UNIMARC ) %] [% INCLUDE 'subtypes_unimarc.inc' %] [% ELSE %] +
    -
    - Subtype limits

    +

    + Subtype limits:

    +[% IF ( template_defined_limits ) %] +
    + +
    + + Limit to any of the following + + + + + + + + + + + + + + + + + + + +
    + + +
    + + +
    + + +
    +
    +[% END %] + -
    -

    +

    +

    +

    +

    + [% IF ( searchdomainloop ) %]

    OR

    -

    [% FOREACH searchdomainloo IN searchdomainloop %] [% END %] -

    + [% END %] -
    +
    + -
    Sorting -

    - [% INCLUDE 'resort_form.inc' %]

    - + + + + + -
    +

    [% IF ( expanded_options ) %] [Fewer Options] [% ELSE %] [More options] [% END %] [New search] -

    +

    - 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 2ea7091..a019733 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -138,14 +138,14 @@ function verify_images() { [% IF ( pages ) %] [% END %][% pages %] [% IF ( illus ) %][% illus %][% END %] [% IF ( size ) %][% size %][% END %] -[% IF ( MARCURLS ) %]
  • +[% IF ( MARCurlS ) %]
  • Online Resources: -
  • [% itemloo.datelastseen %] [% itemloo.barcode %] + [% IF ( itemloo.volinfo ) %] [% IF ( itemdata_enumchron ) %] [% IF ( itemloo.enumchron ) %] [% itemloo.enumchron %][% IF ( itemloo.serialseq ) %] -- [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt index bc2490f..d4443f0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt @@ -33,7 +33,8 @@
    [% issue.surname %][% IF ( issue.firstname ) %], [% issue.firstname %][% END %] [% IF ( issue.barcode ) %] [% issue.barcode %] 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 e1f84b8..11f2cf4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -412,13 +412,13 @@ YAHOO.util.Event.onContentReady("searchheader", function () { [% IF ( AmazonEnabled ) %][% IF ( AmazonCoverImages ) %][% END %][% END %] - + [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %] [% IF ( loop.odd ) %][% ELSE %][% END %] - [% IF ( AmazonEnabled ) %][% IF ( AmazonCoverImages ) %] + [% IF ( SEARCH_RESULT.AmazonEnabled ) %][% IF ( SEARCH_RESULT.AmazonCoverImages ) %]
     ResultsResults Location
    @@ -429,7 +429,7 @@ YAHOO.util.Event.onContentReady("searchheader", function () { -

    [% SEARCH_RESULT.result_number %]. +

    [% biblionumber = SEARCH_RESULT.biblionumber %] [% INCLUDE 'biblio-default-view.inc' %] @@ -505,20 +505,22 @@ YAHOO.util.Event.onContentReady("searchheader", function () { [% IF ( SEARCH_RESULT.availablecount ) %] [% SEARCH_RESULT.availablecount %] available: -

      + [% END %] [% IF ( SEARCH_RESULT.onloancount ) %] [% SEARCH_RESULT.onloancount %] on loan: -
        + [% END %] [% IF ( SEARCH_RESULT.othercount ) %] 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 0a73ace..fa0c5e8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -142,7 +142,7 @@ function AreMandatoriesNotOk(){ [% END %] [% FOREACH subfield_loo IN innerloo.subfield_loop %] [% IF ( subfield_loo.mandatory ) %]mandatories.push("[% subfield_loo.id %]"); - tab.push("[% BIG_LOO.number %]"); + tab.push("[% subfield_loo.number %]"); label.push("[% subfield_loo.marc_lib %]"); [% END %] [% END %] @@ -255,7 +255,7 @@ function GetZ3950Terms(){ function Changefwk(FwkList) { var fwk = FwkList.options[FwkList.selectedIndex].value; - window.location = "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumberdata %]&op=[% op %]&breedingid=[% breedingid %]&mode=[% popup %]&frameworkcode="+fwk; + window.location = "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&breedingid=[% breedingid %]&frameworkcode="+fwk; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt index 553d130..4956f18 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt @@ -27,16 +27,11 @@ [% ELSIF ( BiblioDefaultViewisbd ) %]
        [% ELSE %] - -[% END %] - - -
        +[% END %] -
        - + [% ELSE %] [% IF ( missingparameter ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt index 5adc074..1ee7823 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt @@ -40,7 +40,6 @@ $(document).ready(function(){ /* Inline edit/delete links */ $("td").click(function(event){ var $tgt = $(event.target); - var row = $(this).parent(); $(".linktools").hide(); $("tr").removeClass("selected"); if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){ @@ -51,6 +50,7 @@ $(document).ready(function(){ var left = position.left+5; $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); } + var row = $(this).parent(); row.addClass("selected"); }); $("form[name='f']").submit(function(){ @@ -160,7 +160,6 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : [% END %] [% END %]
    -

    [% ELSE %] [% IF ( emptyserverlist ) %] You didn't select any Z39.50 target. @@ -169,8 +168,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Connection failed to [% errcon.server %] [% END %] [% END %] -

    Nothing found.

    -

    +

    Nothing found. Try another search.

    [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt index 43ef0c9..f22e407 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt @@ -49,7 +49,7 @@ $(document).ready(function(){
    [% IF ( branchloo.seen ) %] [% branchloo.seen %][% branchloo.seentime %] - [% branchloo.seen %] [% branchloo.seentime %] + [% DEFAULT branchloo.seentime="??:??" %] [% branchloo.seen %] [% ELSE %]Never [% END %] [% overdueloo.duedate %] [% overdueloo.name %] [% IF ( overdueloo.email ) %][email][% END %] - [% IF ( overdueloo.phone ) %]([% overdueloo.phone %])[% ELSIF ( overdueloo.mobile ) %]([% overdueloo.mobile %])[% ELSIF ( overdueloo.phonepro ) %]([% overdueloo.phonepro %])[% END %] [% overdueloo.branchcode %] [% INCLUDE 'biblio-default-view.inc' biblionumber = overdueloo.biblionumber %][% overdueloo.title |html %] [% overdueloo.subtitle %] [% IF ( overdueloo.author ) %], by [% overdueloo.author %][% END %]
    - + [% FOREACH riloo IN riloop %] @@ -412,7 +412,6 @@ function Dopop(link) { [% riloo.itemtitle |html %] - [% ELSIF ( text_field.link_field ) %] [% ELSE %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt index 85b1d3e..9965362 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -65,7 +65,7 @@ - + - + [% END %]
    Due DateTitle Author BarcodeShelving LocationCall NumberType PatronNote
    Due DateTitle Author BarcodeCall NumberType PatronNote
    [% riloo.itemauthor %] [% riloo.barcode %][% riloo.location %] [% riloo.itemcallnumber %] [% riloo.itemtype %] [% riloo.ccode %] [% IF ( riloo.duedate ) %] 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..d0ead07 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 @@ -63,7 +63,7 @@ In the case of patrons who are marked as 'Child' or 'Professional' and their Gua
  • Patrons can also be blocked from checking items out by setting Patron Flags
    • If you would like your circulation staff to confirm a patron's address before checking items out to the patron, you can see the 'Gone no Address' flag
    • -
    • If you would like to prevent a patron from checking items out or performing circulation actions at the library you can set the 'Restricted' flag +
    • If you would like to bar a patron from the library you can set the 'Debarred' flag
      • This flag can automatically be set with the Overdue/Notice Status Triggers
      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..630ef0c 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 @@ -12,9 +12,9 @@
      • Delay is the number of days after an issue is due before an action is triggered.
        • Important: These rules should not be used for Advanced Notices. Advanced Notices should be set using the Enhanched Messaging Preferences on the Patron Profile.
        • -
        • Important: If you want Koha to trigger an action (send a letter or restrict a member), a delay value is required.
        +
      • Important: If you want Koha to trigger an action (send a letter or debar member), a delay value is required.
    • To send additional notices, click on the tabs for 'Second' and 'Third' notice
    • -
    • 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.
    +
  • If you would like to prevent a patron from checking items out because of their overdue items, check the 'Debar' 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.
  • 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.

    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt index 4513a25..16bbf25 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt @@ -93,7 +93,7 @@
    - Add + Add [% text_field.field_value %][% resultsloo.branchcode %] [% resultsloo.dateexpiry %] [% IF ( resultsloo.overdues ) %][% resultsloo.overdues %][% ELSE %][% resultsloo.overdues %][% END %]/[% resultsloo.issues %][% IF ( resultsloo.fines < 0 ) %][% resultsloo.fines %] [% ELSIF resultsloo.fines > 0 %] [% resultsloo.fines %] [% ELSE %] [% resultsloo.fines %] [% END %][% resultsloo.fines %] [% resultsloo.borrowernotes %] [% IF ( resultsloo.category_type ) %] Edit 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 f96c27f..a4361cd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -162,18 +162,7 @@ [% IF ( step ) %][% END %] -[% IF ( opadd ) %] -[% ELSIF ( opduplicate ) %] - -[% ELSE %] - -[% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %] -[%# Only put the cardnumber if we arent showing it in the form later %] -[% IF cardnumber %] - -[% END %] -[% END %] -[% END %] +[% IF ( opadd ) %][% ELSIF ( opduplicate ) %][% ELSE %][% END %] [% IF ( step_1 ) %]
    @@ -958,7 +947,7 @@ [% FOREACH flagloo IN flagloop %]
  • @@ -1083,9 +1072,6 @@ [% END %] Patron messaging preferences - [% IF type_only %] - If no preferences are selected, the default preferences for the category chosen will be applied on save, otherwise your selection here is saved - [% END %] [% INCLUDE 'messaging-preference-form.inc' %] [% IF ( SMSSendDriver ) %]

    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt index 87c7a1d..9ad6dbd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt @@ -48,7 +48,7 @@ [% END %]

  • Initials: [% initials %]
  • Date of birth:[% dateofbirth %]
  • -
  • Gender:[% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %]
  • [% END %] +
  • Sex:[% sex %]
  • [% END %] [% IF ( printethnicityline ) %]
  • Ethnicity:[% ethnicity %]
  • Ethnicity notes: [% ethnotes %]
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt index f84052b..0452614 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt @@ -3,14 +3,6 @@ - - - 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 6287611..8384dfb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -163,7 +163,7 @@ function validate1(date) { - + [% END %] @@ -212,9 +212,7 @@ function validate1(date) { [% END %]
  • Initials: [% initials %]
  • Date of birth:[% dateofbirth %]
  • -
  • Gender: - [% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %] -
  • [% END %] +
  • Sex:[% sex %]
  • [% END %] [% IF ( printethnicityline ) %]
  • Ethnicity:[% ethnicity %]
  • Ethnicity notes: [% ethnotes %]
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt index 81fa3b6..f73ce2d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt @@ -1,16 +1,6 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Choose Adult category [% INCLUDE 'doc-head-close.inc' %] - - @@ -51,15 +41,12 @@ window.close();
    - - +
    - - [% FOREACH CAT_LOO IN CAT_LOOP %] [% END %] -
      Code Description
    @@ -68,7 +55,6 @@ window.close();
    @@ -86,4 +72,4 @@ window.close(); -[% INCLUDE 'popup-bottom.inc' %] +[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt index a67c080..55095d9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt @@ -118,7 +118,7 @@ function add_item(borrowernum,batch_id,type_id){
    [% resultsloo.branchcode %] [% resultsloo.dateexpiry %] [% resultsloo.borrowernotes %]AddAdd
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt index 78f927b..b177838 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt @@ -209,7 +209,7 @@ - Gender + Sex diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt index f6d48ba..23505ad 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt @@ -19,55 +19,55 @@ [% END %]

    Dictionary

    [% IF ( start_dictionary ) %] -

    Use the dictionary to define custom criteria for reporting.

    +

    Use the dictionary to define custom criteria for reporting.

    - [% IF ( definitions ) %] -

    Current Terms

    - - - [% IF ( areas ) %] - Filter by area - - -
    - [% END %] - - - - - - - - - [% FOREACH definition IN definitions %] - [% UNLESS ( loop.odd ) %] - - [% ELSE %] - - [% END %] - - - - - - - [% END %] -
    NameDescriptionAreaDefinition 
    [% definition.name %][% definition.description %][% definition.areaname %][% definition.saved_sql %]
    - - - -
    - [% END %] + +

    Current Terms

    +
    + +Filter by area + +
    +
    + + + + + + + + +[% IF ( definitions ) %] +[% FOREACH definition IN definitions %] +[% UNLESS ( loop.odd ) %] + +[% ELSE %] + +[% END %] + + + + + + +[% END %] [% END %] +
    NameDescriptionAreaDefinition 
    [% definition.name %][% definition.description %][% definition.areaname %][% definition.saved_sql %]
    + + + +
    +[% END %] + [% IF ( new_dictionary ) %]
    @@ -214,7 +214,7 @@ - Clear Date [% END %] @@ -358,7 +357,7 @@ function checkMultiHold() { [% UNLESS ( multi_hold ) %]
    - [% IF ( borrowernumber ) %] + [% IF ( cardnumber ) %] [% IF ( override_required ) %] [% ELSIF ( none_available ) %] @@ -465,7 +464,7 @@ function checkMultiHold() { [% IF ( bibitemloo.hiddencount ) %] -

    Show all items ([% bibitemloo.hiddencount %] hidden)

    +

    Show all items ([% bibitemloo.hiddencount %] hidden)

    [% END %] [% END %] @@ -538,7 +537,7 @@ function checkMultiHold() { [% END %]
    - [% IF ( borrowernumber ) %] + [% IF ( cardnumber ) %] [% IF ( override_required ) %] [% ELSIF ( none_available ) %] @@ -552,7 +551,7 @@ function checkMultiHold() {
    [% END %] -[% UNLESS ( borrowernumber ) %] +[% UNLESS ( cardnumber ) %] [% IF ( reserveloop ) %]
    [% IF ( multi_hold ) %] @@ -631,7 +630,7 @@ function checkMultiHold() { [% IF ( reserveloo.hidename ) %] - [% reserveloo.cardnumber (reserveloo.borrowernumber) %] + [% reserveloo.cardnumber %] [% ELSE %] [% reserveloo.firstname %] [% reserveloo.surname %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tt index 2a29f72..b92aafb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tt @@ -6,7 +6,7 @@ function GetIt(aqbooksellerid,name) { opener.document.f.aqbooksellerid.value = aqbooksellerid; - opener.document.f.aqbooksellername.value = name; + opener.document.f.aqbooksellername.value = unescape(name); window.close(); } @@ -33,7 +33,7 @@ function GetIt(aqbooksellerid,name) [% END %] [% loop_supplier.name %] - Choose + Choose [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt index 91172be..64c23d6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt @@ -64,7 +64,8 @@ function add_member(subscriptionid,borrowernumber){ [% resultsloo.cardnumber %] [% resultsloo.surname %], [% resultsloo.firstname %] [% resultsloo.branchcode %] - Add + ,[% resultsloo.borrowernumber %]); return false" href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% resultsloo.subscriptionid %]&borrowernumber=[% resultsloo.borrowernumber %]&op=add">Add [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt index 85c42b1..581ca97 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt @@ -55,14 +55,17 @@ function search_member(subscriptionid){ [% FOREACH memberloo IN memberloop %] [% memberloo.name %] [% memberloo.routingbox %] - Delete + Delete [% END %] -

    Add recipients  

    ); return false" +href="/cgi-bin/koha/serials/member-search.pl?subscriptionid=" class="button">Add recipients   Delete All

    [% ELSE %]
  • Recipients: - Add recipients
  • + ); return false" href="/cgi-bin/koha/serials/member-search.pl?subscriptionid=[% subscriptionid %]" class="button">Add recipients [% END %]
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt index 304c6ca..145166d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt @@ -178,7 +178,7 @@ $(document).ready(function() {

    Serial Edition [% bibliotitle %] - [% IF location %] ( [% location %] ) [% END %] + i[% IF location %] ( [% location %] ) [% END %] [% IF ( callnumber ) %] callnumber: [% callnumber %][% END %]

    @@ -287,17 +287,17 @@ $(document).ready(function() { [% FOREACH item IN serialslis.items %]
      [% FOREACH iteminformatio IN item.iteminformation %]
    1. -
      +
      [% iteminformatio.marc_value %] - + [% IF ( iteminformatio.ITEM_SUBFIELDS_ARE_NOT_REPEATABLE ) %] - + + + [% END %]
    2. @@ -326,7 +326,7 @@ $(document).ready(function() { - Supplemental Issue + Supplemental Issue @@ -335,8 +335,7 @@ $(document).ready(function() { - [% IF ( newserialloo.status1 ) %] @@ -390,17 +389,17 @@ $(document).ready(function() {
        [% FOREACH iteminformatio IN newserialloo.iteminformation %]
      1. -
        +
        [% iteminformatio.marc_value %] - + [% IF ( iteminformatio.ITEM_SUBFIELDS_ARE_NOT_REPEATABLE ) %] - + + + [% END %]
      2. [% END %]
      diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt index 7753fd3..56a8214 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt @@ -110,7 +110,7 @@ Serials updated : [% IF ( subscription.branchcode ) %][% subscription.branchcode %][% END %] [% IF ( subscription.callnumber ) %]([% subscription.callnumber %])[% END %] - [% IF ( routing ) %] + [% IF ( subscription.routing ) %] [% IF ( subscription.cannotedit ) %]   diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tt index f45ffeb..33f267a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tt @@ -4,7 +4,8 @@ -
      -[% UNLESS ( invalidlist ) %] - [% IF ( format ) %] -

      Your download should begin automatically.

      - [% ELSE %] - -
      -
      1. - + + + + + [% FOREACH csv_profile IN csv_profiles %] + + [% END %] -
      -
      -
      -
      - +
    +
    +
    +
    + -

    Back to lists

    +

    Back to lists

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

    You do not have permission to download this list.

    -
    -

    Back to lists

    -[% END %] - +[% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-opensearch.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-opensearch.tt index 5a13119..e7e2821 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-opensearch.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-opensearch.tt @@ -42,7 +42,7 @@ [% END %][% END %][% END %][% END %] -[% IF ( BakerTaylorEnabled ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]See Baker & Taylor[% END %][% END %] +[% IF ( BakerTaylorEnabled ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]See Baker & Taylor[% END %][% END %]

    [% IF ( SEARCH_RESULT.author ) %]By [% SEARCH_RESULT.author |html %]. [% END %] [% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place |html %] [% END %][% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode |html %][% END %][% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear |html %] [% ELSE %][% IF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate |html %][% END %][% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-privacy.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-privacy.tt index de34e02..ec880d3 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-privacy.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-privacy.tt @@ -1,7 +1,7 @@ [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Privacy management for [% firstname %] [% surname %] [% INCLUDE 'doc-head-close.inc' %] - +

    [% INCLUDE 'masthead.inc' %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt index 70aac88..05b50dd 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt @@ -67,7 +67,7 @@ You have never borrowed anything from this library. [% IF ( GoogleJackets ) %][% IF ( READING_RECOR.normalized_isbn ) %]
    [% ELSE %]No cover image available[% END %][% END %] - [% IF ( BakerTaylorEnabled ) %][% IF ( READING_RECOR.normalized_isbn ) %]See Baker & Taylor[% ELSE %]No cover image available[% END %][% END %] + [% IF ( BakerTaylorEnabled ) %][% IF ( READING_RECOR.normalized_isbn ) %]See Baker & Taylor[% ELSE %]No cover image available[% END %][% END %] [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( using_https ) %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt index 25e9a3a..bc46b28 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt @@ -152,7 +152,6 @@ }); // ]]> - @@ -330,7 +329,7 @@ Calendar.setup( { inputField : "reserve_date_[% bibitemloo.biblionumber %]", - ifFormat : "[% DHTMLcalendar_dateformat %]", + ifFormat : "[% bibitemloo.DHTMLcalendar_dateformat %]", button : "CalendarReserveDate[% bibitemloo.biblionumber %]", disableFunc : validate[% bibitemloo.biblionumber %], dateStatusFunc : validate[% bibitemloo.biblionumber %] @@ -338,8 +337,6 @@ ); //]]> -

    - Clear Date

    [% END %] [% END %] @@ -362,7 +359,7 @@ Calendar.setup( { inputField : "expiration_date_[% bibitemloo.biblionumber %]", - ifFormat : "[% DHTMLcalendar_dateformat %]", + ifFormat : "[% bibitemloo.DHTMLcalendar_dateformat %]", button : "CalendarExpirationDate_[% bibitemloo.biblionumber %]", disableFunc : validate1, dateStatusFunc : validate1 @@ -374,13 +371,11 @@ Clear Date

    [% END %] - [% IF ( bibitemloo.holdable ) %] - - [% IF ( OPACItemHolds ) %] - + [% IF ( bibitemloo.holdable ) %][% IF ( OPACItemHolds ) %] -
      -
    • + + + + + + + +
      [% UNLESS ( bibitemloo.holdable ) %] [% END %] - -
    • +
    • [% UNLESS ( bibitemloo.holdable ) %] [% END %] - - +
      [% END %][% END %] @@ -442,8 +440,9 @@ [% IF ( OPACItemHolds ) %] [% IF ( bibitemloo.holdable ) %] -   - + + + @@ -452,7 +451,7 @@ [% END %] - [% UNLESS ( singleBranchMode ) %] + [% UNLESS ( bibitemloo.singleBranchMode ) %] [% END %] @@ -467,7 +466,7 @@ [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt index 3e69614..338f174 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt @@ -11,7 +11,7 @@ [% IF ( cgi_debug ) %]alert(_('injecting OLD comment: ')+comment);[% END %] parent.opener.$('#c[% reviewid %] p').prev("small").prev("h5").html("Your Edited Comment (preview, pending approval)"); parent.opener.$('#c[% reviewid %] p').html(comment); - parent.opener.$('#c[% reviewid %] p').append("Edit<\/a>"); + parent.opener.$('#c[% reviewid %] p').append(" Edit<\/a>"); [% END %] return 1; }; @@ -21,7 +21,7 @@ parent.opener.$('#newcomment').html( "
      Your Comment (preview, pending approval)<\/h5>" + "

      "+comment+"<\/p>" + - "Edit<\/a><\/p>" + "Edit<\/a><\/p>" ); parent.opener.$("#addcomment").prev("p").remove(); parent.opener.$("#addcomment").remove(); @@ -66,7 +66,7 @@ [% END %]
      - +

      Comments on [% title |html %] [% subtitle %][% IF ( author ) %]by [% author %][% END %]
      diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelfform.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelfform.tt index 1085ae0..88b084e 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelfform.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelfform.tt @@ -20,30 +20,25 @@ [% END %] [% ELSE %] - [% IF ( invalidlist ) %] -
      -

      You do not have permission to send this list.

      -
      -

      Back to lists

      - [% ELSE %] - -
      - Sending your list -
      1. - - -
      2. -
      3. - - -
      4. -
      5. - -
      -
      Cancel
      - - [% END %] +
      + +
      +Sending your list +
      1. + + +
      2. +
      3. + + +
      4. +
      5. + +
      +
      Cancel
      + + [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tt index 5d45b53..8d6b94b 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tt @@ -12,9 +12,9 @@

      Issues for a subscription

      [% FOREACH subscription_LOO IN subscription_LOOP %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt index 9220367..93f9c16 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt @@ -343,7 +343,7 @@ $(function() { [% IF ( GoogleJackets ) %][% IF ( itemsloo.normalized_isbn ) %]
      [% ELSE %]No cover image available[% END %][% END %] - [% IF ( BakerTaylorEnabled ) %][% IF ( itemsloo.normalized_isbn ) %]See Baker & Taylor[% ELSE %]No cover image available[% END %][% END %] + [% IF ( BakerTaylorEnabled ) %][% IF ( itemsloo.normalized_isbn ) %]See Baker & Taylor[% ELSE %]No cover image available[% END %][% END %] [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews-rss.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews-rss.tt index 2c6e179..6d53953 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews-rss.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews-rss.tt @@ -18,7 +18,7 @@ [% END %][% END %][% END %][% END %] -[% IF ( BakerTaylorEnabled ) %][% IF ( review.normalized_isbn ) %]See Baker & Taylor[% END %][% END %] +[% IF ( BakerTaylorEnabled ) %][% IF ( review.normalized_isbn ) %]See Baker & Taylor[% END %][% END %] [% IF ( review.author ) %]

      By [% review.author |html %].

      [% END %]

      [% IF ( review.place ) %][% review.place |html %] [% END %][% IF ( review.publishercode ) %][% review.publishercode |html %][% END %][% IF ( review.publicationyear ) %] [% review.publicationyear |html %] [% ELSE %][% IF ( review.copyrightdate ) %] [% review.copyrightdate |html %][% END %][% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt index a50d825..e64fcae 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt @@ -46,11 +46,7 @@ $(document).ready(function(){ [% END %] [% IF ( review.copyrightdate ) %]Date:[% review.copyrightdate %][% END %]

      -

      - [% IF ( review.avatarurl ) %] - - [% END %] - [% review.review |html %] +

      [% review.review |html %] Added [% review.datereviewed %] [% IF ( review.your_comment ) %] by you[% ELSE %] [% IF ( ShowReviewer ) %] by [% review.firstname %] [% review.surname %][% END %][% END %]

      @@ -75,7 +71,7 @@ $(document).ready(function(){ [% IF ( GoogleJackets ) %][% IF ( review.normalized_isbn ) %]
      [% ELSE %]No cover image available[% END %][% END %] - [% IF ( BakerTaylorEnabled ) %][% IF ( review.normalized_isbn ) %]See Baker & Taylor[% ELSE %]No cover image available[% END %][% END %] + [% IF ( BakerTaylorEnabled ) %][% IF ( review.normalized_isbn ) %]See Baker & Taylor[% ELSE %]No cover image available[% END %][% END %] [% END %] 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 92bd44d..26c8670 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -4,7 +4,6 @@ [% BORROWER_INF.firstname %] [% BORROWER_INF.surname %] [% END %] [% INCLUDE 'doc-head-close.inc' %] - +[% IF (redirect) %] + +[% END %]
      @@ -131,7 +171,7 @@ $.tablesorter.addParser({
      Select a specific copy:
      Item TypeBarcodeHome Library Last Location
      [% IF ( itemLoo.available ) %] - [% ELSE %] 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 2047a1b..e08e31b 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -437,18 +437,18 @@ $(document).ready(function(){ Availability: - [% IF ( SEARCH_RESULT.available_items_loop.0 ) %] + [% IF ( SEARCH_RESULT.available_items_loop ) %] Copies available: [% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %] [% UNLESS ( available_items_loo.hideatopac ) %] - [% IF ( singleBranchMode ) %] + [% IF ( available_items_loo.singleBranchMode ) %] [% available_items_loo.location %] [% ELSE %] [% available_items_loo.branchname %] [% END %] [% IF ( OPACItemsResultsDisplay ) %] - [% UNLESS ( singleBranchMode ) %][% available_items_loo.location %][% END %] + [% UNLESS ( available_items_loo.singleBranchMode ) %][% available_items_loo.location %][% END %] [% IF ( available_items_loo.itemcallnumber ) %][[% available_items_loo.itemcallnumber %]][% END %] [% END %] ([% available_items_loo.count %]), @@ -499,7 +499,7 @@ $(document).ready(function(){ [% ELSIF ( loop.first ) %]Log in to add tags. [% END %] [% END %] - [% IF ( SEARCH_RESULT.TagLoop.size ) %] + [% IF ( SEARCH_RESULT.TagLoop ) %] [% END %] [% END %] [% END %][% END %] @@ -536,7 +536,7 @@ $(document).ready(function(){ [% IF ( GoogleJackets ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]
      [% ELSE %]No cover image available[% END %][% END %] - [% IF ( BakerTaylorEnabled ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]See Baker & Taylor[% ELSE %]No cover image available[% END %][% END %] + [% IF ( BakerTaylorEnabled ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]See Baker & Taylor[% ELSE %]No cover image available[% END %][% END %]
      - + @@ -161,20 +201,20 @@ $.tablesorter.addParser({
      Holds Waiting
      TitleTitle Hold date Pick Up Library
      - [% IF ( JacketImages ) %][% END %] - - + [% IF ( JacketImages ) %][% END %] + [% UNLESS ( item_level_itypes ) %] [% END %] [% IF ( show_barcode ) %][% END %] + [% IF ( OpacRenewalAllowed ) %] - [% UNLESS ( patron_flagged ) %][% END %] + [% UNLESS ( patron_flagged ) %][% END %] [% END %] [% IF ( OPACFinesTab ) %] [% END %] [% IF ( OPACMySummaryHTML ) %] - + [% END %] @@ -195,7 +235,7 @@ $.tablesorter.addParser({ [% IF ( GoogleJackets ) %][% IF ( ISSUE.normalized_isbn ) %]
      [% ELSE %]No cover image available[% END %][% END %] -[% IF ( BakerTaylorEnabled ) %][% IF ( ISSUE.normalized_isbn ) %]See Baker & Taylor[% ELSE %]No cover image available[% END %][% END %] +[% IF ( BakerTaylorEnabled ) %][% IF ( ISSUE.normalized_isbn ) %]See Baker & Taylor[% ELSE %]No cover image available[% END %][% END %] [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( using_https ) %] @@ -207,14 +247,14 @@ $.tablesorter.addParser({ + [% UNLESS ( item_level_itypes ) %][% END %] + [% IF ( show_barcode ) %][% END %] + [% IF ( ISSUE.overdue ) %] [% ELSE %] [% END %] - [% UNLESS ( item_level_itypes ) %][% END %] - [% IF ( show_barcode ) %][% END %] - [% IF ( OpacRenewalAllowed ) %] [% UNLESS ( ISSUE.patron_flagged ) %] -[% IF ( JacketImages ) %][% END %] - +[% IF ( JacketImages ) %][% END %] + [% UNLESS ( item_level_itypes ) %] [% END %] [% IF ( show_barcode ) %][% END %] [% IF ( OpacRenewalAllowed ) %] - [% UNLESS ( patron_flagged ) %][% END %][% END %] + [% UNLESS ( patron_flagged ) %][% END %][% END %] [% IF ( OPACFinesTab ) %] [% END %] @@ -281,7 +321,7 @@ $.tablesorter.addParser({ [% IF ( GoogleJackets ) %][% IF ( OVERDUE.normalized_isbn ) %]
      [% ELSE %]No cover image available[% END %][% END %] -[% IF ( BakerTaylorEnabled ) %][% IF ( OVERDUE.normalized_isbn ) %]See Baker & Taylor[% ELSE %]No cover image available[% END %][% END %] +[% IF ( BakerTaylorEnabled ) %][% IF ( OVERDUE.normalized_isbn ) %]See Baker & Taylor[% ELSE %]No cover image available[% END %][% END %] [% IF ( SyndeticsCoverImages ) %] [% IF ( using_https ) %] @@ -323,7 +363,7 @@ $.tablesorter.addParser({ - + @@ -331,7 +371,7 @@ $.tablesorter.addParser({ [% END %] - + [% FOREACH RESERVE IN RESERVES %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt index cb09184..6c4f0c3 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt @@ -51,7 +51,7 @@ Card Number: -
      [% issues_count %] Item(s) Checked Out
       TitleDue TitleItem TypeBarcodeCall No.DueRenewRenewFinesLinksLinks
      [% ISSUE.title |html %] [% ISSUE.author %] [% IF ( ISSUE.imageurl ) %][% ISSUE.description %][% END %] [% ISSUE.description %][% ISSUE.barcode %][% ISSUE.itemcallnumber %][% ISSUE.date_due %][% ISSUE.date_due %][% IF ( ISSUE.imageurl ) %][% ISSUE.description %][% END %] [% ISSUE.description %][% ISSUE.barcode %][% ISSUE.itemcallnumber %][% IF ( ISSUE.status ) %]Renew ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining) @@ -260,14 +300,14 @@ $.tablesorter.addParser({
      Overdues ([% overdues_count %] total)
       Title TitleItem TypeBarcodeCall No. DueRenewRenewFines
      Holds ([% reserves_count %] total)
      TitleTitle Placed On Expires On Pick Up LocationPriorityStatusModifyModify
      [% cardnumber %]
      Identity Details
      DoB: [% IF ( dateofbirth ) %][% dateofbirth %][% ELSE %] [% END %]
      Gender:[% IF ( sex ) %][% sex %][% ELSE %] [% END %]
      +Sex:[% IF ( sex ) %][% sex %][% ELSE %] [% END %] [% IF ( contactname ) %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt index 9a68851..12fb53c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt @@ -66,7 +66,7 @@
      1. -
      2. [% IF ( BORROWER_INF.sex == 'F' ) %][% ELSE %][% END %] [% IF ( BORROWER_INF.sex == 'M' ) %][% ELSE %][% END %]
      3. @@ -126,7 +126,7 @@ Personal Information
        1. Date of Birth: [% BORROWER_INF.dateofbirth %]
        2. -
        3. Gender: +
        4. Sex: [% IF ( sex == 'F' ) %]Female[% END %] [% IF ( sex == 'M' ) %]Male[% END %]
        5. diff --git a/kohaversion.pl b/kohaversion.pl index 00bdbec..c3b86a9 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.004'; + our $VERSION = '3.05.00.001'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install diff --git a/labels/label-create-xml.pl b/labels/label-create-xml.pl index dd83f1d..a6c5808 100755 --- a/labels/label-create-xml.pl +++ b/labels/label-create-xml.pl @@ -62,10 +62,9 @@ foreach my $item (@$items) { format_string => $layout->get_attr('format_string'), ); my $format_string = $layout->get_attr('format_string'); - my @data_fields = map { $_ eq 'callnumber' ? 'itemcallnumber' : $_ } # see bug 5653 - split(/, /, $format_string); + my @data_fields = split(/, /, $format_string); my $csv_data = $label->csv_data(); - for (my $i = 0; $i <= (scalar(@data_fields) - 1); $i++) { + for (my $i = 0; $i < (scalar(@data_fields) - 1); $i++) { push(@{$xml_data->{'label'}[$item_count]->{$data_fields[$i]}}, $$csv_data[$i]); } $item_count++; diff --git a/labels/label-edit-batch.pl b/labels/label-edit-batch.pl index 29d2dd3..8f89597 100755 --- a/labels/label-edit-batch.pl +++ b/labels/label-edit-batch.pl @@ -61,7 +61,7 @@ my @label_ids = $cgi->param('label_id') if $cgi->param('label_id'); my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number'); my $barcode = $cgi->param('barcode') if $cgi->param('barcode'); -my $branch_code = get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}); +my $branch_code = get_branch_code_from_name($template->param('LoginBranchname')); if ($op eq 'remove') { $batch = C4::Labels::Batch->retrieve(batch_id => $batch_id); diff --git a/labels/label-edit-layout.pl b/labels/label-edit-layout.pl index 6a70212..470092d 100755 --- a/labels/label-edit-layout.pl +++ b/labels/label-edit-layout.pl @@ -130,7 +130,7 @@ elsif ($op eq 'save') { font_size => $cgi->param('font_size') || 3, callnum_split => ($cgi->param('callnum_split') ? 1 : 0), text_justify => $cgi->param('text_justify') || 'L', - format_string => $cgi->param('format_string') || 'title, author, isbn, issn, itemtype, barcode, itemcallnumber', + format_string => $cgi->param('format_string') || 'title, author, isbn, issn, itemtype, barcode, callnumber', ); if ($layout_id) { # if a label_id was passed in, this is an update to an existing layout $layout = C4::Labels::Layout->retrieve(layout_id => $layout_id); diff --git a/labels/label-manage.pl b/labels/label-manage.pl index 70302e8..197c8d4 100755 --- a/labels/label-manage.pl +++ b/labels/label-manage.pl @@ -74,7 +74,7 @@ my $op = $cgi->param('op') || 'none'; my $element_id = $cgi->param('element_id') || undef; my $error = $cgi->param('error') || 0; -my $branch_code = ($label_element eq 'batch' ? get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}) : ''); +my $branch_code = ($label_element eq 'batch' ? get_branch_code_from_name($template->param('LoginBranchname')) : ''); if ($op eq 'delete') { if ($label_element eq 'layout') {$error = C4::Labels::Layout::delete(layout_id => $element_id);} diff --git a/mainpage.pl b/mainpage.pl index 6a0c1af..dfeb6fc 100755 --- a/mainpage.pl +++ b/mainpage.pl @@ -24,6 +24,9 @@ use C4::Auth; use C4::AuthoritiesMarc; use C4::Koha; use C4::NewsChannels; +use Data::Dumper::Simple; + + my $query = new CGI; my $authtypes = getauthtypes; my @authtypesloop; @@ -65,3 +68,6 @@ $template->param( ); output_html_with_http_headers $query, $cookie, $template->output; + + + diff --git a/members/mancredit.pl b/members/mancredit.pl index ae41b57..7d57fa5 100755 --- a/members/mancredit.pl +++ b/members/mancredit.pl @@ -45,10 +45,7 @@ my $add=$input->param('add'); if ($add){ if(checkauth($input)) { my $barcode = $input->param('barcode'); - my $itemnum; - if ($barcode) { - $itemnum = GetItemnumberFromBarcode($barcode); - } + my $itemnum = GetItemnumberFromBarcode($barcode) if $barcode; my $desc = $input->param('desc'); my $note = $input->param('note'); my $amount = $input->param('amount') || 0; diff --git a/members/maninvoice.pl b/members/maninvoice.pl index 9e8d429..f804e52 100755 --- a/members/maninvoice.pl +++ b/members/maninvoice.pl @@ -45,10 +45,7 @@ if ($add){ if(checkauth($input)) { # print $input->header; my $barcode=$input->param('barcode'); - my $itemnum; - if ($barcode) { - $itemnum = GetItemnumberFromBarcode($barcode); - } + my $itemnum = GetItemnumberFromBarcode($barcode) if $barcode; my $desc=$input->param('desc'); my $amount=$input->param('amount'); my $type=$input->param('type'); diff --git a/members/member.pl b/members/member.pl index 2be45bc..0d4e1c0 100755 --- a/members/member.pl +++ b/members/member.pl @@ -32,7 +32,7 @@ use C4::Members; use C4::Branch; use C4::Category; use File::Basename; - +use Data::Dumper::Simple; my $input = new CGI; my $quicksearch = $input->param('quicksearch'); my $startfrom = $input->param('startfrom')||1; @@ -52,7 +52,10 @@ my $patron = $input->Vars; foreach (keys %$patron){ delete $$patron{$_} unless($$patron{$_}); } -my @categories=C4::Category->all; + + +my @categories =C4::Category->all; + my $branches = GetBranches; my @branchloop; @@ -67,14 +70,16 @@ foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } my %categories_dislay; - foreach my $category (@categories){ + + my $hash={ category_description=>$$category{description}, category_type=>$$category{category_type} }; $categories_dislay{$$category{categorycode}} = $hash; -} + + } $template->param( "AddPatronLists_".C4::Context->preference("AddPatronLists")=> "1", ); @@ -118,6 +123,7 @@ if ($results) { my @resultsdata; $to=($count>$to?$to:$count); my $index=$from; + foreach my $borrower(@$results[$from..$to-1]){ #find out stats my ($od,$issue,$fines)=GetMemberIssuesAndFines($$borrower{'borrowernumber'}); @@ -133,8 +139,20 @@ foreach my $borrower(@$results[$from..$to-1]){ odissue => "$od/$issue", fines => sprintf("%.2f",$fines), ); + + if (C4::Context->preference("searchMyLibraryOnly") ) + { + if (%row->{branchcode} eq C4::Branch->mybranch()) + { push(@resultsdata, \%row); -} + } + } + else { + push(@resultsdata, \%row); + } + } + + if ($$patron{categorycode}){ foreach my $category (grep{$_->{categorycode} eq $$patron{categorycode}}@categories){ @@ -155,6 +173,7 @@ my $base_url = my @letters = map { {letter => $_} } ( 'A' .. 'Z'); + $template->param( letters => \@letters, paginationbar => pagination_bar( @@ -177,3 +196,4 @@ $template->param( ); output_html_with_http_headers $input, $cookie, $template->output; + diff --git a/members/memberentry.pl b/members/memberentry.pl index f6ca2c1..d7c5c96 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -40,6 +40,7 @@ use C4::Log; use C4::Letters; use C4::Branch; # GetBranches use C4::Form::MessagingPreferences; +use Data::Dumper::Simple; use vars qw($debug); @@ -105,17 +106,14 @@ $template->param( "duplicate" => 1 ) if ( $op eq 'duplicate' ); $template->param( "checked" => 1 ) if ( defined($nodouble) && $nodouble eq 1 ); ( $borrower_data = GetMember( 'borrowernumber' => $borrowernumber ) ) if ( $op eq 'modify' or $op eq 'save' or $op eq 'duplicate' ); my $categorycode = $input->param('categorycode') || $borrower_data->{'categorycode'}; -my $category_type = $input->param('category_type') || ''; -if ($category_type){ - $template->{VARS}->{'type_only'} = 1; -} +my $category_type = $input->param('category_type'); my $new_c_type = $category_type; #if we have input param, then we've already chosen the cat_type. unless ($category_type or !($categorycode)){ my $borrowercategory = GetBorrowercategory($categorycode); $category_type = $borrowercategory->{'category_type'}; my $category_name = $borrowercategory->{'description'}; $template->param("categoryname"=>$category_name); - } +} $category_type="A" unless $category_type; # FIXME we should display a error message instead of a 500 error ! # if a add or modify is requested => check validity of data. @@ -183,28 +181,24 @@ if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' ) } #############test for member being unique ############# -if ( ( $op eq 'insert' ) and !$nodouble ) { - my $category_type_send; - if ( $category_type eq 'I' ) { - $category_type_send = $category_type; - } - my $check_category; # recover the category code of the doublon suspect borrowers - # ($result,$categorycode) = checkuniquemember($collectivity,$surname,$firstname,$dateofbirth) - ( $check_member, $check_category ) = checkuniquemember( - $category_type_send, - ( $newdata{surname} ? $newdata{surname} : $data{surname} ), - ( $newdata{firstname} ? $newdata{firstname} : $data{firstname} ), - ( $newdata{dateofbirth} ? $newdata{dateofbirth} : $data{dateofbirth} ) - ); - if ( !$check_member ) { - $nodouble = 1; - } - - # recover the category type if the borrowers is a doublon +if (($op eq 'insert') and !$nodouble){ + my $category_type_send=$category_type if ($category_type eq 'I'); + my $check_category; # recover the category code of the doublon suspect borrowers + # ($result,$categorycode) = checkuniquemember($collectivity,$surname,$firstname,$dateofbirth) + ($check_member,$check_category) = checkuniquemember( + $category_type_send, + ($newdata{surname} ? $newdata{surname} : $data{surname} ), + ($newdata{firstname} ? $newdata{firstname} : $data{firstname} ), + ($newdata{dateofbirth} ? $newdata{dateofbirth} : $data{dateofbirth}) + ); + if(!$check_member){ + $nodouble = 1; + } + # recover the category type if the borrowers is a doublon if ($check_category) { - my $tmpborrowercategory = GetBorrowercategory($check_category); - $check_categorytype = $tmpborrowercategory->{'category_type'}; - } + my $tmpborrowercategory=GetBorrowercategory($check_category); + $check_categorytype=$tmpborrowercategory->{'category_type'}; + } } #recover all data from guarantor address phone ,fax... @@ -240,22 +234,19 @@ if ( (defined $newdata{'userid'}) && ($newdata{'userid'} eq '')){ $debug and warn join "\t", map {"$_: $newdata{$_}"} qw(dateofbirth dateenrolled dateexpiry); my $extended_patron_attributes = (); if ($op eq 'save' || $op eq 'insert'){ - # If the cardnumber is blank, treat it as null. - $newdata{'cardnumber'} = undef if $newdata{'cardnumber'} =~ /^\s*$/; - - if (checkcardnumber($newdata{cardnumber},$newdata{borrowernumber})){ - push @errors, 'ERROR_cardnumber'; - } - my $dateofbirthmandatory = (scalar grep {$_ eq "dateofbirth"} @field_check) ? 1 : 0; - if ($newdata{dateofbirth} && $dateofbirthmandatory) { - my $age = GetAge($newdata{dateofbirth}); - my $borrowercategory=GetBorrowercategory($newdata{'categorycode'}); - my ($low,$high) = ($borrowercategory->{'dateofbirthrequired'}, $borrowercategory->{'upperagelimit'}); - if (($high && ($age > $high)) or ($age < $low)) { - push @errors, 'ERROR_age_limitations'; - $template->param('ERROR_age_limitations' => "$low to $high"); - } + if (checkcardnumber($newdata{cardnumber},$newdata{borrowernumber})){ + push @errors, 'ERROR_cardnumber'; + } + my $dateofbirthmandatory = (scalar grep {$_ eq "dateofbirth"} @field_check) ? 1 : 0; + if ($newdata{dateofbirth} && $dateofbirthmandatory) { + my $age = GetAge($newdata{dateofbirth}); + my $borrowercategory=GetBorrowercategory($newdata{'categorycode'}); + my ($low,$high) = ($borrowercategory->{'dateofbirthrequired'}, $borrowercategory->{'upperagelimit'}); + if (($high && ($age > $high)) or ($age < $low)) { + push @errors, 'ERROR_age_limitations'; + $template->param('ERROR_age_limitations' => "$low to $high"); } + } if($newdata{surname} && C4::Context->preference('uppercasesurnames')) { $newdata{'surname'} = uc($newdata{'surname'}); @@ -344,7 +335,7 @@ if ((!$nok) and $nodouble and ($op eq 'insert' or $op eq 'save')){ C4::Members::Attributes::SetBorrowerAttributes($borrowernumber, $extended_patron_attributes); } if (C4::Context->preference('EnhancedMessagingPreferences') and $input->param('setting_messaging_prefs')) { - C4::Form::MessagingPreferences::handle_form_action($input, { borrowernumber => $borrowernumber }, $template, 1, $newdata{'categorycode'}); + C4::Form::MessagingPreferences::handle_form_action($input, { borrowernumber => $borrowernumber }, $template); } } elsif ($op eq 'save'){ if ($NoUpdateLogin) { @@ -403,6 +394,7 @@ if ( $op eq "duplicate" ) { $template->param( step_1 => 1, step_2 => 1, step_3 => 1, step_4 => 1, step_5 => 1, step_6 => 1 ) unless $step; } +# my $cardnumber=$data{'cardnumber'}; $data{'cardnumber'}=fixup_cardnumber($data{'cardnumber'}) if $op eq 'add'; if(!defined($data{'sex'})){ $template->param( none => 1); @@ -431,9 +423,18 @@ if ($ethnicitycategoriescount>=0) { my @typeloop; my $no_categories = 1; -my $no_add; +my ($action,$no_add); +my $ownbranch = C4::Branch->mybranch(); + foreach (qw(C A S P I X)) { - my $action="WHERE category_type=?"; + + if ( C4::Context->preference("searchMyLibraryOnly") ) + { + $action="WHERE category_type=? and categorycode like '$ownbranch%'"; + } + else { + $action="WHERE category_type=?"; + } ($categories,$labels)=GetborCatFromCatType($_,$action); if(scalar(@$categories) > 0){ $no_categories = 0; } my @categoryloop; @@ -549,8 +550,19 @@ my $onlymine=(C4::Context->preference('IndependantBranches') && my $branches=GetBranches($onlymine); my $default; my $CGIbranch; +my $ownbranch = C4::Branch->mybranch(); + for my $branch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { + if ( C4::Context->preference("searchMyLibraryOnly") ) + { + if ($branch eq $ownbranch) + { push @select_branch,$branch; + } + } + else { + push @select_branch,$branch; + } $select_branches{$branch} = $branches->{$branch}->{'branchname'}; $default = C4::Context->userenv->{'branch'} if (C4::Context->userenv && C4::Context->userenv->{'branch'}); } @@ -763,10 +775,21 @@ sub patron_attributes_form { $newentry->{use_dropdown} = 1; $newentry->{auth_val_loop} = GetAuthorisedValues($attr_type->authorised_value_category(), $attr->{value}); } + + + $i++; $newentry->{form_id} = "patron_attr_$i"; - #use Data::Dumper; die Dumper($entry) if $entry->{use_dropdown}; - push @attribute_loop, $newentry; + + + + push @attribute_loop, $newentry; + + + # push @attribute_loop, $newentry; + #use Data::Dumper; die Dumper($newentry->{auth_val_loop}[9]->{lib}) if $newentry->{use_dropdown}; + # die (substr($newentry->{auth_val_loop}[0]->{lib},0,3)); + } } else { $i++; @@ -777,12 +800,14 @@ sub patron_attributes_form { } $newentry->{form_id} = "patron_attr_$i"; push @attribute_loop, $newentry; + } } $template->param(patron_attributes => \@attribute_loop); } + # Local Variables: # tab-width: 8 # End: diff --git a/members/members-home.pl b/members/members-home.pl index 830800e..3c417d0 100755 --- a/members/members-home.pl +++ b/members/members-home.pl @@ -26,13 +26,12 @@ use C4::Context; use C4::Members; use C4::Branch; use C4::Category; +use Data::Dumper::Simple; my $query = new CGI; my $branch = $query->param('branchcode'); my $template_name; -$branch = q{} unless defined $branch; - my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "members/member.tmpl", query => $query, @@ -44,12 +43,13 @@ my ($template, $loggedinuser, $cookie) my $branches = GetBranches; my @branchloop; -foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %{$branches}) { - push @branchloop, { - value => $_, - selected => ($branches->{$_}->{branchcode} eq $branch), +foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { + my $selected = 1 if $branches->{$_}->{branchcode} eq $branch; + my %row = ( value => $_, + selected => $selected, branchname => $branches->{$_}->{branchname}, - }; + ); + push @branchloop, \%row; } my @categories; @@ -63,7 +63,14 @@ else { $template->param(branchloop=>\@branchloop); } - at categories=C4::Category->all; + if (C4::Context->preference("searchMyLibraryOnly")) + { + at categories=C4::Category->bybranch(); + } + else { + @categories=C4::Category->all; + } + if(scalar(@categories) < 1){ $no_categories = 1; } @@ -84,3 +91,4 @@ my @letters = map { {letter => $_} } ( 'A' .. 'Z'); $template->param( letters => \@letters ); output_html_with_http_headers $query, $cookie, $template->output; + diff --git a/members/moremember.pl b/members/moremember.pl index b766f2f..2d79dda 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -31,7 +31,7 @@ needs html removed and to use the C4::Output more, but its tricky =cut - + use strict; #use warnings; FIXME - Bug 2505 use CGI; diff --git a/misc/admin/koha-preferences b/misc/admin/koha-preferences index 6728609..a9e33f4 100755 --- a/misc/admin/koha-preferences +++ b/misc/admin/koha-preferences @@ -125,8 +125,6 @@ sub SetPreferences { _set_preference( $row->{'variable'}, $preferences{$row->{'variable'}} ); } - - C4::Context->clear_syspref_cache(); } sub _fetch_preference { diff --git a/misc/bin/koha-pazpar2-ctl.sh b/misc/bin/koha-pazpar2-ctl.sh index bcedfea..c894702 100755 --- a/misc/bin/koha-pazpar2-ctl.sh +++ b/misc/bin/koha-pazpar2-ctl.sh @@ -1,29 +1,4 @@ #!/bin/bash - -# 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., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - -### BEGIN INIT INFO -# Provides: koha-pazpar-daemon -# Required-Start: $syslog $remote_fs -# Required-Stop: $syslog $remote_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: PazPar2 server daemon for Koha -### END INIT INFO - USER=__KOHA_USER__ GROUP=__KOHA_GROUP__ DBNAME=__DB_NAME__ diff --git a/misc/bin/koha-zebra-ctl.sh b/misc/bin/koha-zebra-ctl.sh index 397eb19..01e4fad 100755 --- a/misc/bin/koha-zebra-ctl.sh +++ b/misc/bin/koha-zebra-ctl.sh @@ -1,29 +1,4 @@ #!/bin/bash - -# 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., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - -### BEGIN INIT INFO -# Provides: koha-zebra-daemon -# Required-Start: $syslog $remote_fs -# Required-Stop: $syslog $remote_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Zebra server daemon for Koha indexing -### END INIT INFO - USER=__KOHA_USER__ GROUP=__KOHA_GROUP__ DBNAME=__DB_NAME__ diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl index a573e96..6a408e4 100755 --- a/misc/cronjobs/advance_notices.pl +++ b/misc/cronjobs/advance_notices.pl @@ -63,12 +63,14 @@ my $confirm; # -c: Confir my $nomail; # -n: No mail. Will not send any emails. my $mindays = 0; # -m: Maximum number of days in advance to send notices my $maxdays = 30; # -e: the End of the time period +my $fromaddress = C4::Context->preference('KohaAdminEmailAddress'); # -f: From address for the emails my $verbose = 0; # -v: verbose my $itemscontent = join(',',qw( issuedate title barcode author )); GetOptions( 'c' => \$confirm, 'n' => \$nomail, 'm:i' => \$maxdays, + 'f:s' => \$fromaddress, 'v' => \$verbose, 'itemscontent=s' => \$itemscontent, ); @@ -81,6 +83,7 @@ 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. + -f from address for the emails. Defaults to KohaAdminEmailAddress system preference -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 @@ -132,28 +135,22 @@ SELECT biblio.*, items.*, issues.* AND (TO_DAYS(date_due)-TO_DAYS(NOW()) = ?) END_SQL -my $admin_adress = C4::Context->preference('KohaAdminEmailAddress'); - UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { warn 'examining ' . $upcoming->{'itemnumber'} . ' upcoming due items' if $verbose; # warn( Data::Dumper->Dump( [ $upcoming ], [ 'overdue' ] ) ); - my $from_address = $upcoming->{branchemail} || $admin_adress; - my $letter; my $borrower_preferences; if ( 0 == $upcoming->{'days_until_due'} ) { # This item is due today. Send an 'item due' message. $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $upcoming->{'borrowernumber'}, - message_name => 'item_due' } ); + message_name => 'item due' } ); # warn( Data::Dumper->Dump( [ $borrower_preferences ], [ 'borrower_preferences' ] ) ); - next unless $borrower_preferences; + next DUEITEM unless $borrower_preferences; if ( $borrower_preferences->{'wants_digest'} ) { # cache this one to process after we've run through all of the items. - my $digest = $due_digest->{$upcoming->{'borrowernumber'}} ||= {}; - $digest->{email} ||= $from_address; - $digest->{count}++; + $due_digest->{$upcoming->{'borrowernumber'}}++; } else { my $biblio = C4::Biblio::GetBiblioFromItemNumber( $upcoming->{'itemnumber'} ); my $letter_type = 'DUE'; @@ -175,16 +172,14 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { } } else { $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $upcoming->{'borrowernumber'}, - message_name => 'advance_notice' } ); + message_name => 'advance notice' } ); # warn( Data::Dumper->Dump( [ $borrower_preferences ], [ 'borrower_preferences' ] ) ); next UPCOMINGITEM unless $borrower_preferences && exists $borrower_preferences->{'days_in_advance'}; next UPCOMINGITEM unless $borrower_preferences->{'days_in_advance'} == $upcoming->{'days_until_due'}; if ( $borrower_preferences->{'wants_digest'} ) { # cache this one to process after we've run through all of the items. - my $digest = $upcoming_digest->{$upcoming->{'borrowernumber'}} ||= {}; - $digest->{email} ||= $from_address; - $digest->{count}++; + $upcoming_digest->{$upcoming->{'borrowernumber'}}++; } else { my $biblio = C4::Biblio::GetBiblioFromItemNumber( $upcoming->{'itemnumber'} ); my $letter_type = 'PREDUE'; @@ -216,7 +211,6 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { foreach my $transport ( @{$borrower_preferences->{'transports'}} ) { C4::Letters::EnqueueLetter( { letter => $letter, borrowernumber => $upcoming->{'borrowernumber'}, - from_address => $from_address, message_transport_type => $transport } ); } } @@ -237,12 +231,9 @@ SELECT biblio.*, items.*, issues.* AND (TO_DAYS(date_due)-TO_DAYS(NOW()) = ?) END_SQL -PATRON: while ( my ( $borrowernumber, $digest ) = each %$upcoming_digest ) { - my $count = $digest->{count}; - my $from_address = $digest->{email}; - +PATRON: while ( my ( $borrowernumber, $count ) = each %$upcoming_digest ) { my $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $borrowernumber, - message_name => 'advance_notice' } ); + message_name => 'advance notice' } ); # warn( Data::Dumper->Dump( [ $borrower_preferences ], [ 'borrower_preferences' ] ) ); next PATRON unless $borrower_preferences; # how could this happen? @@ -250,7 +241,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 = ""; while ( my $item_info = $sth->fetchrow_hashref()) { @@ -271,19 +261,15 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$upcoming_digest ) { foreach my $transport ( @{$borrower_preferences->{'transports'}} ) { C4::Letters::EnqueueLetter( { letter => $letter, borrowernumber => $borrowernumber, - from_address => $from_address, message_transport_type => $transport } ); } } } # Now, run through all the people that want digests and send them -PATRON: while ( my ( $borrowernumber, $digest ) = each %$due_digest ) { - my $count = $digest->{count}; - my $from_address = $digest->{email}; - +PATRON: while ( my ( $borrowernumber, $count ) = each %$due_digest ) { my $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $borrowernumber, - message_name => 'item_due' } ); + message_name => 'item due' } ); # warn( Data::Dumper->Dump( [ $borrower_preferences ], [ 'borrower_preferences' ] ) ); next PATRON unless $borrower_preferences; # how could this happen? @@ -311,7 +297,6 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$due_digest ) { foreach my $transport ( @{$borrower_preferences->{'transports'}} ) { C4::Letters::EnqueueLetter( { letter => $letter, borrowernumber => $borrowernumber, - from_address => $from_address, message_transport_type => $transport } ); } } diff --git a/misc/cronjobs/crontab.example b/misc/cronjobs/crontab.example index 3c5030d..e153959 100644 --- a/misc/cronjobs/crontab.example +++ b/misc/cronjobs/crontab.example @@ -1,81 +1,12 @@ -# Koha Example Crontab File -# Author: Joe Atzberger -# -# This is an example of a crontab file for Debian. It may not work -# in other versions of crontab, like on Solaris 8 or BSD, for example. -# -# While similar in structure, -# this is NOT an example for cron (as root). Cron takes an extra -# argument per line to designate the user to run as. You could -# reasonably extrapolate the needed info from here though. -# -# WARNING: These jobs will do things like charge fines, send -# potentially VERY MANY emails to patrons and even debar offending -# users. DO NOT RUN OR SCHEDULE these jobs without being sure you -# really intend to. Make sure the relevant message templates are -# configured to your liking before scheduling messages to be sent. -# -# ENVIRONMENT: -# First, establish Koha's two important ENV variables. - PERL5LIB=/usr/share/koha/lib KOHA_CONF=/etc/koha/koha-conf.xml - -# Some additional variables to save you typing -KOHA_CRON_PATH = /usr/share/koha/bin/cronjobs -# -# MULTIPLE KOHA SUPPORT: -# You can still run jobs for this user's additional koha installs, -# by manipulating those variables in the command. -# -# For example, on the same codebase: -# */10 * * * * KOHA_CONF=/etc/koha/koha-conf.xml /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -a -z >/dev/null -# -# For example, on a separate codebase: -# */10 * * * * KOHA_CONF=/etc/koha/koha-conf.xml PERL5LIB=/home/koha/kohaclone /home/koha/kohaclone/misc/migration_tools/rebuild_zebra.pl -b -a -z >/dev/null -# -# ADDITIONAL INFO: -# See the perldoc of individual scripts to determine what other options -# are available. Check the man page for crontab to understand the -# schedule syntax for your system. -# -# NOTE: Don't forget to keep the empty line at the bottom. -# Cron/crontab will choke without it. -# -# SCHEDULED JOBS: -# m h dom mon dow command - -# OVERDUE NOTICES +KOHA_CRON_PATH = /home/peter/kohaclone/bin/cronjobs 0 1 * * * $KOHA_CRON_PATH/overdue_notices.pl -t - -# FINES 5 1 * * * $KOHA_CRON_PATH/fines.pl - -# ADVANCE NOTICES 10 1 * * * $KOHA_CRON_PATH/advance_notices.pl -c - -# PROCESS LONG OVERDUES -# updates item status from available to longoverdue for items long overdue -# 19 1 * * * $KOHA_CRON_PATH/longoverdue.pl --lost 90=1 --confirm - -# SEND EMAILS 15 * * * * $KOHA_CRON_PATH/process_message_queue.pl - -# Hourly holds queue updated 52 * * * * $KOHA_CRON_PATH/holds/build_holds_queue.pl >/dev/null 2>&1 - -# Cancel expired holds 0 1 * * * $KOHA_CRON_PATH/holds/cancel_expired_holds.pl >/dev/null 2>&1 - -# ZEBRA INDEX UPDATES with -z option, incremental index updates throughout the day -# for both authorities and bibs -*/10 * * * * $KOHA_CRON_PATH/../migration_tools/rebuild_zebra.pl -b -a -z >/dev/null - -# services_throttle -- resets the xISBN service +*/2 * * * * $KOHA_CRON_PATH/../migration_tools/rebuild_zebra.pl -b -a -z >/dev/null 59 23 * * * $KOHA_CRON_PATH/services_throttle.pl > /dev/null 2>&1 - -# clean up databases nightly. Be sure not to run this with --sessions during a time when the system is in use! 16 1 * * * $KOHA_CRON_PATH/cleanup_database.pl --sessions --zebraqueue 10 - -# delete old purchase suggestions weekly. Replace XX with a number to define the age of suggestions to delete. - at weekly $KOHA_CRON_PATH/purge_suggestions.pl --days XX > /dev/null 2>&1 diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index e605451..bc97ecb 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -644,9 +644,6 @@ sub parse_letter { # FIXME: this code should probably be moved to C4::Letters:pa return unless exists $params->{$required}; } - my $todaysdate = C4::Dates->new()->output("syspref"); - $params->{'letter'}->{title} =~ s/<>/$todaysdate/g; - $params->{'letter'}->{content} =~ s/<>/$todaysdate/g; if ( $params->{'substitute'} ) { while ( my ( $key, $replacedby ) = each %{ $params->{'substitute'} } ) { diff --git a/misc/maintenance/remove_items_from_biblioitems.pl b/misc/maintenance/remove_items_from_biblioitems.pl index 9f30db0..0778b29 100755 --- a/misc/maintenance/remove_items_from_biblioitems.pl +++ b/misc/maintenance/remove_items_from_biblioitems.pl @@ -20,17 +20,15 @@ use strict; use warnings; -$|=1; use C4::Context; use C4::Biblio; use Getopt::Long; -my ($wherestring, $run, $silent, $want_help); +my ($wherestring, $run, $want_help); my $result = GetOptions( 'where:s' => \$wherestring, '--run' => \$run, - '--silent' => \$silent, 'help|h' => \$want_help, ); @@ -40,15 +38,11 @@ if ( not $result or not $run or $want_help ) { } my $dbh = C4::Context->dbh; -my $count = 0; my $querysth = qq{SELECT biblionumber from biblioitems }; $querysth .= " WHERE $wherestring " if ($wherestring); my $query = $dbh->prepare($querysth); $query->execute; while (my $biblionumber = $query->fetchrow){ - $count++; - print "." unless $silent; - print "\r$count" unless ($silent or ($count % 100)); my $record = GetMarcBiblio($biblionumber); if ($record) { @@ -59,8 +53,6 @@ while (my $biblionumber = $query->fetchrow){ } } -print "\n\n$count records processed.\n" unless $silent; - sub print_usage { print <<_USAGE_; $0: removes items from selected biblios @@ -74,7 +66,6 @@ should be run using rebuild_zebra.pl -b -r. Parameters: -where use this to limit modifications to selected biblios --run perform the update - --silent run silently --help or -h show this message _USAGE_ } diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl index dadf43f..5be01cf 100755 --- a/misc/migration_tools/rebuild_zebra.pl +++ b/misc/migration_tools/rebuild_zebra.pl @@ -191,7 +191,7 @@ sub index_records { my ($record_type, $directory, $skip_export, $process_zebraqueue, $as_xml, $noxml, $nosanitize, $do_not_clear_zebraqueue, $verbose_logging, $zebraidx_log_opt, $server_dir) = @_; my $num_records_exported = 0; - my $records_deleted; + my $num_records_deleted = 0; my $need_reset = check_zebra_dirs($server_dir); if ($need_reset) { print "$0: found broken zebra server directories: forcing a rebuild\n"; @@ -212,12 +212,12 @@ sub index_records { if ($process_zebraqueue) { my $entries = select_zebraqueue_records($record_type, 'deleted'); mkdir "$directory/del_$record_type" unless (-d "$directory/del_$record_type"); - $records_deleted = generate_deleted_marc_records($record_type, $entries, "$directory/del_$record_type", $as_xml); + $num_records_deleted = generate_deleted_marc_records($record_type, $entries, "$directory/del_$record_type", $as_xml); mark_zebraqueue_batch_done($entries); $entries = select_zebraqueue_records($record_type, 'updated'); mkdir "$directory/upd_$record_type" unless (-d "$directory/upd_$record_type"); $num_records_exported = export_marc_records_from_list($record_type, - $entries, "$directory/upd_$record_type", $as_xml, $noxml, $records_deleted); + $entries, "$directory/upd_$record_type", $as_xml, $noxml); mark_zebraqueue_batch_done($entries); } else { my $sth = select_all_records($record_type); @@ -239,7 +239,7 @@ sub index_records { my $record_fmt = ($as_xml) ? 'marcxml' : 'iso2709' ; if ($process_zebraqueue) { do_indexing($record_type, 'delete', "$directory/del_$record_type", $reset, $noshadow, $record_fmt, $zebraidx_log_opt) - if %$records_deleted; + if $num_records_deleted; do_indexing($record_type, 'update', "$directory/upd_$record_type", $reset, $noshadow, $record_fmt, $zebraidx_log_opt) if $num_records_exported; } else { @@ -320,7 +320,7 @@ sub export_marc_records_from_sth { ? GetXmlBiblio( $record_number ) : GetAuthorityXML( $record_number ); if ($record_type eq 'biblio'){ - my @items = GetItemsInfo($record_number); + my @items = GetItemsInfo($record_number, 'intra'); if (@items){ my $record = MARC::Record->new; my @itemsrecord; @@ -351,13 +351,8 @@ sub export_marc_records_from_sth { # strung together with no single root element. zebraidx doesn't seem # to care, though, at least if you're using the GRS-1 filter. It does # care if you're using the DOM filter, which requires valid XML file(s). - eval { - print OUT ($as_xml) ? $marc->as_xml_record(C4::Context->preference('marcflavour')) : $marc->as_usmarc(); - $num_exported++; - }; - if ($@) { - warn "Error exporting record $record_number ($record_type) ".($noxml ? "not XML" : "XML"); - } + print OUT ($as_xml) ? $marc->as_xml_record(C4::Context->preference('marcflavour')) : $marc->as_usmarc(); + $num_exported++; } } print "\nRecords exported: $num_exported\n" if ( $verbose_logging ); @@ -366,14 +361,12 @@ sub export_marc_records_from_sth { } sub export_marc_records_from_list { - my ($record_type, $entries, $directory, $as_xml, $noxml, $records_deleted) = @_; + my ($record_type, $entries, $directory, $as_xml, $noxml) = @_; my $num_exported = 0; open (OUT, ">:utf8 ", "$directory/exported_records") or die $!; my $i = 0; - - # Skip any deleted records. We check for this anyway, but this reduces error spam - my %found = %$records_deleted; + my %found = (); foreach my $record_number ( map { $_->{biblio_auth_number} } grep { !$found{ $_->{biblio_auth_number} }++ } @$entries ) { @@ -398,7 +391,7 @@ sub export_marc_records_from_list { sub generate_deleted_marc_records { my ($record_type, $entries, $directory, $as_xml) = @_; - my $records_deleted = {}; + my $num_exported = 0; open (OUT, ">:utf8 ", "$directory/exported_records") or die $!; my $i = 0; foreach my $record_number (map { $_->{biblio_auth_number} } @$entries ) { @@ -416,12 +409,11 @@ sub generate_deleted_marc_records { } print OUT ($as_xml) ? $marc->as_xml_record(C4::Context->preference("marcflavour")) : $marc->as_usmarc(); - - $records_deleted->{$record_number} = 1; + $num_exported++; } - print "\nRecords exported: $i\n" if ( $verbose_logging ); + print "\nRecords exported: $num_exported\n" if ( $verbose_logging ); close OUT; - return $records_deleted; + return $num_exported; } @@ -457,19 +449,15 @@ sub get_raw_marc_record { $fetch_sth->execute($record_number); if (my ($blob) = $fetch_sth->fetchrow_array) { $marc = MARC::Record->new_from_usmarc($blob); - unless ($marc) { - warn "error creating MARC::Record from $blob"; - } + $fetch_sth->finish(); + } else { + return; # failure to find a bib is not a problem - + # a delete could have been done before + # trying to process a record update } - # failure to find a bib is not a problem - - # a delete could have been done before - # trying to process a record update - - $fetch_sth->finish(); - return unless $marc; } else { eval { $marc = GetMarcBiblio($record_number); }; - if ($@ || !$marc) { + if ($@) { # here we do warn since catching an exception # means that the bib was found but failed # to be parsed diff --git a/misc/translator/tmpl_process3.pl b/misc/translator/tmpl_process3.pl index d862a97..46ceceb 100755 --- a/misc/translator/tmpl_process3.pl +++ b/misc/translator/tmpl_process3.pl @@ -274,21 +274,6 @@ if (defined $href) { # $charset_in = $candidate; # } # } - - # BUG6464: check consistency of PO messages - # - count number of '%s' in msgid and msgstr - for my $msg ( values %$href ) { - my $id_count = split(/%s/, $msg->{msgid}) - 1; - my $str_count = split(/%s/, $msg->{msgstr}) - 1; - next if $id_count == $str_count || - $msg->{msgstr} eq '""' || - grep { /fuzzy/ } @{$msg->{_flags}}; - warn_normal - "unconsistent %s count: ($id_count/$str_count):\n" . - " line: " . $msg->{loaded_line_number} . "\n" . - " msgid: " . $msg->{msgid} . "\n" . - " msgstr: " . $msg->{msgstr} . "\n", undef; - } } # set our charset in to UTF-8 diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl index c80d41c..b50947d 100755 --- a/opac/opac-ISBDdetail.pl +++ b/opac/opac-ISBDdetail.pl @@ -85,10 +85,7 @@ my $upc = GetNormalizedUPC($record,$marcflavour); my $ean = GetNormalizedEAN($record,$marcflavour); my $oclc = GetNormalizedOCLCNumber($record,$marcflavour); my $isbn = GetNormalizedISBN(undef,$record,$marcflavour); -my $content_identifier_exists; -if ( $isbn or $ean or $oclc or $upc ) { - $content_identifier_exists = 1; -} +my $content_identifier_exists = 1 if ($isbn or $ean or $oclc or $upc); $template->param( normalized_upc => $upc, normalized_ean => $ean, @@ -127,7 +124,7 @@ $template->param( my $norequests = 1; my $res = GetISBDView($biblionumber, "opac"); -my @items = GetItemsInfo( $biblionumber ); +my @items = &GetItemsInfo($biblionumber, 'opac'); my $itemtypes = GetItemTypes(); for my $itm (@items) { diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl index 7544902..8e492aa 100755 --- a/opac/opac-MARCdetail.pl +++ b/opac/opac-MARCdetail.pl @@ -61,7 +61,7 @@ my $biblionumber = $query->param('biblionumber'); my $itemtype = &GetFrameworkCode($biblionumber); my $tagslib = &GetMarcStructure( 0, $itemtype ); my $biblio = GetBiblioData($biblionumber); -my $record = GetMarcBiblio($biblionumber, 1); +my $record = GetMarcBiblio($biblionumber); if ( ! $record ) { print $query->redirect("/cgi-bin/koha/errors/404.pl"); exit; diff --git a/opac/opac-authorities-home.pl b/opac/opac-authorities-home.pl index acff077..a87030e 100755 --- a/opac/opac-authorities-home.pl +++ b/opac/opac-authorities-home.pl @@ -41,20 +41,18 @@ $startfrom = 0 if ( !defined $startfrom ); my ( $template, $loggedinuser, $cookie ); my $resultsperpage; -my $authtypes = getauthtypes(); -my @authtypesloop = (); -foreach my $thisauthtype ( - sort { - $authtypes->{$a}->{'authtypetext'} - cmp $authtypes->{$b}->{'authtypetext'} - } - keys %{$authtypes} - ) { - push @authtypesloop, - { value => $thisauthtype, - selected => $thisauthtype eq $authtypecode, - authtypetext => $authtypes->{$thisauthtype}->{'authtypetext'}, - }; +my $authtypes = getauthtypes; +my @authtypesloop; +foreach my $thisauthtype ( sort { $authtypes->{$a}{'authtypetext'} cmp $authtypes->{$b}{'authtypetext'} } + keys %$authtypes ) +{ + my $selected = 1 if $thisauthtype eq $authtypecode; + my %row = ( + value => $thisauthtype, + selected => $selected, + authtypetext => $authtypes->{$thisauthtype}{'authtypetext'}, + ); + push @authtypesloop, \%row; } if ( $op eq "do_search" ) { diff --git a/opac/opac-authoritiesdetail.pl b/opac/opac-authoritiesdetail.pl index 6610dfd..27ca8cc 100755 --- a/opac/opac-authoritiesdetail.pl +++ b/opac/opac-authoritiesdetail.pl @@ -170,14 +170,16 @@ foreach my $field (@fields) { } $template->param( "Tab0XX" => \@loop_data ); -my $authtypes = getauthtypes(); -my @authtypesloop = (); -foreach my $thisauthtype ( keys %{$authtypes} ) { - push @authtypesloop, - { value => $thisauthtype, - selected => $thisauthtype eq $authtypecode, +my $authtypes = getauthtypes; +my @authtypesloop; +foreach my $thisauthtype ( keys %$authtypes ) { + my $selected = 1 if $thisauthtype eq $authtypecode; + my %row = ( + value => $thisauthtype, + selected => $selected, authtypetext => $authtypes->{$thisauthtype}{'authtypetext'}, - }; + ); + push @authtypesloop, \%row; } $template->param( diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index e18e046..520804c 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -85,7 +85,7 @@ if (C4::Context->preference("OPACXSLTDetailsDisplay") ) { $template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); # change back when ive fixed request.pl -my @all_items = GetItemsInfo( $biblionumber ); +my @all_items = &GetItemsInfo( $biblionumber, 'opac' ); my @items; # Getting items to be hidden @@ -177,6 +177,7 @@ for my $itm (@items) { $itm->{datedue} = format_date($itm->{datedue}); $itm->{datelastseen} = format_date($itm->{datelastseen}); + # get collection code description, too if ( my $ccode = $itm->{'ccode'} ) { $itm->{'ccode'} = $collections->{$ccode} if ( defined($collections) && exists( $collections->{$ccode} ) ); @@ -281,10 +282,7 @@ my $upc = GetNormalizedUPC($record,$marcflavour); my $ean = GetNormalizedEAN($record,$marcflavour); my $oclc = GetNormalizedOCLCNumber($record,$marcflavour); my $isbn = GetNormalizedISBN(undef,$record,$marcflavour); -my $content_identifier_exists; -if ( $isbn or $ean or $oclc or $upc ) { - $content_identifier_exists = 1; -} +my $content_identifier_exists = 1 if ($isbn or $ean or $oclc or $upc); $template->param( normalized_upc => $upc, normalized_ean => $ean, @@ -298,12 +296,6 @@ $template->param( ocoins => GetCOinSBiblio($biblionumber), ); -my $libravatar_enabled = 0; -eval 'use Libravatar::URL'; -if (!$@ and C4::Context->preference('ShowReviewer') and C4::Context->preference('ShowReviewerPhoto')) { - $libravatar_enabled = 1; -} - my $reviews = getreviews( $biblionumber, 1 ); my $loggedincommenter; foreach ( @$reviews ) { @@ -312,9 +304,6 @@ foreach ( @$reviews ) { $_->{title} = $borrowerData->{'title'}; $_->{surname} = $borrowerData->{'surname'}; $_->{firstname} = $borrowerData->{'firstname'}; - if ($libravatar_enabled and $borrowerData->{'email'}) { - $_->{avatarurl} = libravatar_url(email => $borrowerData->{'email'}, https => $ENV{HTTPS}); - } $_->{userid} = $borrowerData->{'userid'}; $_->{cardnumber} = $borrowerData->{'cardnumber'}; $_->{datereviewed} = format_date($_->{datereviewed}); @@ -593,5 +582,6 @@ my $defaulttab = @serialcollections > 0 ? 'serialcollection' : 'subscription'; $template->param('defaulttab' => $defaulttab); +$template->param('homebranch'=>C4::Branch->mybranch(), ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/opac/opac-downloadshelf.pl b/opac/opac-downloadshelf.pl index 1057a16..ee9b0b1 100755 --- a/opac/opac-downloadshelf.pl +++ b/opac/opac-downloadshelf.pl @@ -48,59 +48,52 @@ my $shelfid = $query->param('shelfid'); my $format = $query->param('format'); my $dbh = C4::Context->dbh; -if ( ShelfPossibleAction( (defined($borrowernumber) ? $borrowernumber : -1), $shelfid, 'view' ) ) { - - if ($shelfid && $format) { +if ($shelfid && $format) { + + my @shelf = GetShelf($shelfid); + my ($items, $totitems) = GetShelfContents($shelfid); + my $marcflavour = C4::Context->preference('marcflavour'); + my $output; + + # CSV + if ($format =~ /^\d+$/) { + my @biblios; + foreach (@$items) { + push @biblios, $_->{biblionumber}; + } + $output = marc2csv(\@biblios, $format); + + # Other formats + } else { + foreach my $biblio (@$items) { + my $biblionumber = $biblio->{biblionumber}; - my @shelf = GetShelf($shelfid); - my ($items, $totitems) = GetShelfContents($shelfid); - my $marcflavour = C4::Context->preference('marcflavour'); - my $output; + my $record = GetMarcBiblio($biblionumber, 1); + next unless $record; - # CSV - if ($format =~ /^\d+$/) { - my @biblios; - foreach (@$items) { - push @biblios, $_->{biblionumber}; + if ($format eq 'iso2709') { + $output .= $record->as_usmarc(); } - $output = marc2csv(\@biblios, $format); - - # Other formats - } else { - foreach my $biblio (@$items) { - my $biblionumber = $biblio->{biblionumber}; - - my $record = GetMarcBiblio($biblionumber, 1); - next unless $record; - - if ($format eq 'iso2709') { - $output .= $record->as_usmarc(); - } - elsif ($format eq 'ris' ) { - $output .= marc2ris($record); - } - elsif ($format eq 'bibtex') { - $output .= marc2bibtex($record, $biblionumber); - } + elsif ($format eq 'ris' ) { + $output .= marc2ris($record); + } + elsif ($format eq 'bibtex') { + $output .= marc2bibtex($record, $biblionumber); } } + } - # If it was a CSV export we change the format after the export so the file extension is fine - $format = "csv" if ($format =~ m/^\d+$/); - - print $query->header( - -type => 'application/octet-stream', - -'Content-Transfer-Encoding' => 'binary', - -attachment=>"shelf.$format"); - print $output; + # If it was a CSV export we change the format after the export so the file extension is fine + $format = "csv" if ($format =~ m/^\d+$/); - } else { - $template->param(csv_profiles => GetCsvProfilesLoop()); - $template->param(shelfid => $shelfid); - output_html_with_http_headers $query, $cookie, $template->output; - } + print $query->header( + -type => 'application/octet-stream', + -'Content-Transfer-Encoding' => 'binary', + -attachment=>"shelf.$format"); + print $output; } else { - $template->param(invalidlist => 1); + $template->param(csv_profiles => GetCsvProfilesLoop()); + $template->param(shelfid => $shelfid); output_html_with_http_headers $query, $cookie, $template->output; -} \ No newline at end of file +} diff --git a/opac/opac-main.pl b/opac/opac-main.pl index 177d812..aeba92b 100755 --- a/opac/opac-main.pl +++ b/opac/opac-main.pl @@ -19,6 +19,7 @@ use strict; use warnings; use CGI; +use CGI::Session; use C4::Auth; # get_template_and_user use C4::Output; use C4::VirtualShelves; @@ -27,9 +28,13 @@ use C4::Members; # GetMember use C4::NewsChannels; # get_opac_news use C4::Acquisition; # GetRecentAcqui use C4::Languages qw(getTranslatedLanguages accept_language); +use Data::Dumper::Simple; + + +my $input = new CGI; +my $dbh = C4::Context->dbh; +my $branch; # = C4::Context->userenv->{branch}; -my $input = new CGI; -my $dbh = C4::Context->dbh; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { @@ -47,6 +52,8 @@ $template->param( ); + + my $borrower = GetMember( borrowernumber=>$borrowernumber ); $template->param( textmessaging => $borrower->{textmessaging}, @@ -95,4 +102,28 @@ if (C4::Context->preference('GoogleIndicTransliteration')) { $template->param('GoogleIndicTransliteration' => 1); } + +if (defined $input->param("library")) +{ + C4::Context->userenv->{branch} = $input->param("library"); + $template->param(branch=>C4::Context->userenv->{branch}); + my $session = C4::Auth::get_session(""); + C4::Context->set_userenv($session->param('branch',$input->param("library"))); + +} + +my $xx; +if ($template->{VARS}{loggedinusername} eq '') +{ + + print $input->redirect("/index.htm"); +} + + output_html_with_http_headers $input, $cookie, $template->output; + + + + + + diff --git a/opac/opac-renew.pl b/opac/opac-renew.pl index dd3dcf2..68abed0 100755 --- a/opac/opac-renew.pl +++ b/opac/opac-renew.pl @@ -3,7 +3,7 @@ #written 18/1/2000 by chris at katipo.co.nz # adapted for use in the hlt opac by finlay at katipo.co.nz 29/11/2002 # script to renew items from the web -# Parts Copyright 2010,2011 Catalyst IT +# Parts Copyright 2010 Catalyst IT # This file is part of Koha. # @@ -27,8 +27,7 @@ use warnings; use CGI; use C4::Circulation; use C4::Auth; -use C4::Items; -use C4::Members; + my $query = new CGI; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( @@ -49,27 +48,7 @@ my $errorstring=''; for my $itemnumber ( @items ) { my ($status,$error) = CanBookBeRenewed( $borrowernumber, $itemnumber ); if ( $status == 1 && $opacrenew == 1 ) { - my $renewalbranch = C4::Context->preference('OpacRenewalBranch'); - my $branchcode; - if ($renewalbranch eq 'itemhomebranch'){ - my $item = GetItem($itemnumber); - $branchcode=$item->{'homebranch'}; - } - elsif ($renewalbranch eq 'patronhomebranch'){ - my $borrower = GetMemberDetails($borrowernumber); - $branchcode = $borrower->{'branchcode'}; - } - elsif ($renewalbranch eq 'checkoutbranch'){ - my $issue = GetOpenIssue($itemnumber); - $branchcode = $issue->{'branchcode'}; - } - elsif ($renewalbranch eq 'NULL'){ - $branchcode=''; - } - else { - $branchcode='OPACRenew' - } - AddRenewal( $borrowernumber, $itemnumber, $branchcode); + AddRenewal( $borrowernumber, $itemnumber ); } else { $errorstring .= $error ."|"; diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index a92a976..d50480a 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -477,11 +477,11 @@ if ( $numBibsAvailable == 0 || !$anyholdable) { $template->param( none_available => 1 ); } -my $itemTableColspan = 7; -if (! $template->{VARS}->{'OPACItemHolds'}) { +my $itemTableColspan = 5; +if (!$template->param('OPACItemHolds')) { $itemTableColspan--; } -if (! $template->{VARS}->{'singleBranchMode'}) { +if ($template->param('singleBranchMode')) { $itemTableColspan--; } $template->param(itemtable_colspan => $itemTableColspan); diff --git a/opac/opac-search.pl b/opac/opac-search.pl index cd34610..43a62ea 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -39,6 +39,7 @@ use C4::Branch; # GetBranches use POSIX qw(ceil floor strftime); use URI::Escape; use Storable qw(thaw freeze); +use Data::Dumper::Simple; my $DisplayMultiPlaceHold = C4::Context->preference("DisplayMultiPlaceHold"); @@ -46,6 +47,7 @@ my $DisplayMultiPlaceHold = C4::Context->preference("DisplayMultiPlaceHold"); # FIXME: no_undef_params needs to be tested use CGI qw('-no_undef_params'); my $cgi = new CGI; +my @newresults1; BEGIN { if (C4::Context->preference('BakerTaylorEnabled')) { @@ -207,19 +209,15 @@ if ( $template_type && $template_type eq 'advsearch' ) { $template->param(outer_sup_servers_loop => $secondary_servers_loop,); # set the default sorting - if ( C4::Context->preference('OPACdefaultSortField') - && C4::Context->preference('OPACdefaultSortOrder') ) { - my $default_sort_by = - C4::Context->preference('OPACdefaultSortField') . '_' - . C4::Context->preference('OPACdefaultSortOrder'); - $template->param( $default_sort_by => 1 ); - } + my $default_sort_by = C4::Context->preference('OPACdefaultSortField')."_".C4::Context->preference('OPACdefaultSortOrder') + if (C4::Context->preference('OPACdefaultSortField') && C4::Context->preference('OPACdefaultSortOrder')); + $template->param($default_sort_by => 1); # determine what to display next to the search boxes (ie, boolean option # shouldn't appear on the first one, scan indexes should, adding a new # box should only appear on the last, etc. my @search_boxes_array; - my $search_boxes_count = 3; # begin whith 3 boxes + my $search_boxes_count = C4::Context->preference("OPACAdvSearchInputCount") || 3; for (my $i=1;$i<=$search_boxes_count;$i++) { # if it's the first one, don't display boolean option, but show scan indexes if ($i==1) { @@ -277,13 +275,8 @@ $tag = $params->{tag} if $params->{tag}; # sort by is used to sort the query # in theory can have more than one but generally there's just one my @sort_by; -my $default_sort_by; -if ( C4::Context->preference('OPACdefaultSortField') - && C4::Context->preference('OPACdefaultSortOrder') ) { - $default_sort_by = - C4::Context->preference('OPACdefaultSortField') . '_' - . C4::Context->preference('OPACdefaultSortOrder'); -} +my $default_sort_by = C4::Context->preference('OPACdefaultSortField')."_".C4::Context->preference('OPACdefaultSortOrder') + if (C4::Context->preference('OPACdefaultSortField') && C4::Context->preference('OPACdefaultSortOrder')); @sort_by = split("\0",$params->{'sort_by'}) if $params->{'sort_by'}; $sort_by[0] = $default_sort_by if !$sort_by[0] && defined($default_sort_by); @@ -440,7 +433,6 @@ if ($facets) { foreach my $f (@$facets) { $f->{facets} = [ sort { uc($a->{facet_title_value}) cmp uc($b->{facet_title_value}) } @{ $f->{facets} } ]; } - @$facets = sort {$a->{expand} cmp $b->{expand}} @$facets; } # use Data::Dumper; print STDERR "-" x 25, "\n", Dumper($results_hashref); @@ -472,6 +464,7 @@ for (my $i=0;$i<@servers;$i++) { @newresults = searchResults('opac', $query_desc, $hits, $results_per_page, $offset, $scan, @{$results_hashref->{$server}->{"RECORDS"}},, C4::Context->preference('hidelostitems')); } + @newresults1 = @newresults; my $tag_quantity; if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->preference('TagsShowOnList')) { @@ -577,13 +570,8 @@ for (my $i=0;$i<@servers;$i++) { my $pages = ceil($hits / $results_per_page); # default page number my $current_page_number = 1; - if ($offset) { - $current_page_number = ( $offset / $results_per_page + 1 ); - } - my $previous_page_offset; - if ( $offset >= $results_per_page ) { - $previous_page_offset = $offset - $results_per_page; - } + $current_page_number = ($offset / $results_per_page + 1) if $offset; + my $previous_page_offset = $offset - $results_per_page unless ($offset - $results_per_page <0); my $next_page_offset = $offset + $results_per_page; # If we're within the first 10 pages, keep it simple #warn "current page:".$current_page_number; @@ -597,14 +585,11 @@ for (my $i=0;$i<@servers;$i++) { my $this_offset = (($i*$results_per_page)-$results_per_page); # the page number for this page my $this_page_number = $i; + # it should only be highlighted if it's the current page + my $highlight = 1 if ($this_page_number == $current_page_number); # put it in the array - push @page_numbers, - { offset => $this_offset, - pg => $this_page_number, - highlight => $this_page_number == $current_page_number, - sort_by => join ' ', @sort_by - }; - + push @page_numbers, { offset => $this_offset, pg => $this_page_number, highlight => $highlight, sort_by => join " ", at sort_by }; + } } @@ -613,13 +598,9 @@ for (my $i=0;$i<@servers;$i++) { for ($i=$current_page_number; $i<=($current_page_number + 20 );$i++) { my $this_offset = ((($i-9)*$results_per_page)-$results_per_page); my $this_page_number = $i-9; - if ( $this_page_number <= $pages ) { - push @page_numbers, - { offset => $this_offset, - pg => $this_page_number, - highlight => $this_page_number == $current_page_number, - sort_by => join ' ', @sort_by - }; + my $highlight = 1 if ($this_page_number == $current_page_number); + if ($this_page_number <= $pages) { + push @page_numbers, { offset => $this_offset, pg => $this_page_number, highlight => $highlight, sort_by => join " ", at sort_by }; } } @@ -696,3 +677,9 @@ if (C4::Context->preference('GoogleIndicTransliteration')) { } output_with_http_headers $cgi, $cookie, $template->output, $content_type; + + + + + + \ No newline at end of file diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index df1b4c5..0042c42 100755 --- a/opac/opac-sendbasket.pl +++ b/opac/opac-sendbasket.pl @@ -81,7 +81,7 @@ if ( $email_add ) { my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); - my @items = GetItemsInfo( $biblionumber ); + my @items = &GetItemsInfo( $biblionumber, 'opac' ); my $hasauthors = 0; if($dat->{'author'} || @$marcauthorsarray) { diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl index b571e07..6a376c4 100755 --- a/opac/opac-sendshelf.pl +++ b/opac/opac-sendshelf.pl @@ -51,8 +51,6 @@ my $email = $query->param('email'); my $dbh = C4::Context->dbh; -if ( ShelfPossibleAction( (defined($borrowernumber) ? $borrowernumber : -1), $shelfid, 'view' ) ) { - if ( $email ) { my $email_from = C4::Context->preference('KohaAdminEmailAddress'); my $comment = $query->param('comment'); @@ -88,7 +86,7 @@ if ( $email ) { my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); - my @items = GetItemsInfo( $biblionumber ); + my @items = &GetItemsInfo( $biblionumber, 'opac' ); $dat->{MARCNOTES} = $marcnotesarray; $dat->{MARCSUBJCTS} = $marcsubjctsarray; @@ -179,10 +177,3 @@ END_OF_BODY ); output_html_with_http_headers $query, $cookie, $template->output; } - -} else { - $template->param( invalidlist => 1, - url => "/cgi-bin/koha/opac-sendshelf.pl", - ); - output_html_with_http_headers $query, $cookie, $template->output; -} \ No newline at end of file diff --git a/opac/opac-showreviews.pl b/opac/opac-showreviews.pl index 3a74270..f1e0b53 100755 --- a/opac/opac-showreviews.pl +++ b/opac/opac-showreviews.pl @@ -65,12 +65,6 @@ if($format eq "rss"){ ); } -my $libravatar_enabled = 0; -eval 'use Libravatar::URL'; -if (!$@ and C4::Context->preference('ShowReviewer') and C4::Context->preference('ShowReviewerPhoto')) { - $libravatar_enabled = 1; -} - my $reviews = getallreviews(1,$offset,$results_per_page); my $marcflavour = C4::Context->preference("marcflavour"); my $hits = numberofreviews(); @@ -98,10 +92,6 @@ for my $result (@$reviews){ $result->{timestamp} = $bib->{'timestamp'}; $result->{firstname} = $borr->{'firstname'}; $result->{surname} = $borr->{'surname'}; - if ($libravatar_enabled and $borr->{'email'}) { - $result->{avatarurl} = libravatar_url(email => $borr->{'email'}, size => 40, https => $ENV{HTTPS}); - } - if ($result->{borrowernumber} eq $borrowernumber) { $result->{your_comment} = 1; } diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl index 6899215..80e7c35 100755 --- a/opac/opac-topissues.pl +++ b/opac/opac-topissues.pl @@ -127,11 +127,13 @@ $template->param( branchloop => GetBranchesLoop(C4::Context->userenv->{'branch'} my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype'; $itemtypes = GetItemTypes; my @itemtypesloop; +my $selected=1; if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') { foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) { + my $selected = 1 if $thisitemtype eq $itemtype; my %row =( value => $thisitemtype, description => $itemtypes->{$thisitemtype}->{'description'}, - selected => $thisitemtype eq $itemtype, + selected => $selected, ); push @itemtypesloop, \%row; } @@ -140,7 +142,7 @@ if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') { for my $thisitemtype (@$advsearchtypes) { my $selected = 1 if $thisitemtype->{authorised_value} eq $itemtype; my %row =( value => $thisitemtype->{authorised_value}, - selected => $thisitemtype eq $itemtype, + selected => $selected, description => $thisitemtype->{'lib'}, ); push @itemtypesloop, \%row; diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 2c31ce7..5a5355f 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -35,6 +35,7 @@ use C4::Items; use C4::Dates qw/format_date/; use C4::Letters; use C4::Branch; # GetBranches +use Data::Dumper::Simple; use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE'; @@ -64,6 +65,8 @@ my $patronupdate = $query->param('patronupdate'); # get borrower information .... my ( $borr ) = GetMemberDetails( $borrowernumber ); + + for (qw(dateenrolled dateexpiry dateofbirth)) { ($borr->{$_}) and $borr->{$_} = format_date($borr->{$_}); } @@ -193,17 +196,13 @@ $template->param( show_barcode => 1 ) if $show_barcode; # load the branches my $branches = GetBranches(); my @branch_loop; -for my $branch_hash ( sort keys %{$branches} ) { - my $selected; - if ( C4::Context->preference('SearchMyLibraryFirst') ) { - $selected = - ( C4::Context->userenv - && ( $branch_hash eq C4::Context->userenv->{branch} ) ); - } +for my $branch_hash (sort keys %$branches ) { + my $selected=(C4::Context->userenv && ($branch_hash eq C4::Context->userenv->{branch})) if (C4::Context->preference('SearchMyLibraryFirst')); push @branch_loop, - { value => "branch: $branch_hash", + { + value => "branch: $branch_hash", branchname => $branches->{$branch_hash}->{'branchname'}, - selected => $selected, + selected => $selected }; } $template->param( branchloop => \@branch_loop ); @@ -327,5 +326,16 @@ $template->param( dateformat => C4::Context->preference("dateformat"), ); + + + +if ($borr->{userid} eq $borr->{branchcode}) +{ + $template->param(redirect=>1); + #print $query->redirect('/cgi-bin/koha/opac-main.pl'); +} + + output_html_with_http_headers $query, $cookie, $template->output; + diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl index 2488f67..b36ff64 100755 --- a/opac/sco/sco-main.pl +++ b/opac/sco/sco-main.pl @@ -92,7 +92,7 @@ my $issuer = GetMemberDetails($issuerid); my $item = GetItem(undef,$barcode); if (C4::Context->preference('SelfCheckoutByLogin') && !$patronid) { my $dbh = C4::Context->dbh; - my ($resval, $patronid) = checkpw($dbh, $patronlogin, $patronpw); + my $resval, $patronid = checkpw($dbh, $patronlogin, $patronpw); } my $borrower = GetMemberDetails(undef,$patronid); diff --git a/patroncards/edit-batch.pl b/patroncards/edit-batch.pl index 50bbbf4..449e82a 100755 --- a/patroncards/edit-batch.pl +++ b/patroncards/edit-batch.pl @@ -60,7 +60,7 @@ my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number'); my @borrower_numbers = $cgi->param('borrower_number') if $cgi->param('borrower_number'); my $errstr = $cgi->param('error') || ''; -my $branch_code = get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}); +my $branch_code = get_branch_code_from_name($template->param('LoginBranchname')); if ($op eq 'remove') { $batch = C4::Patroncards::Batch->retrieve(batch_id => $batch_id); diff --git a/patroncards/manage.pl b/patroncards/manage.pl index 71e1b82..2a449ba 100755 --- a/patroncards/manage.pl +++ b/patroncards/manage.pl @@ -73,7 +73,7 @@ my $display_columns = { layout => [ # db column => {col label }; my $errstr = ($cgi->param('error') ? $cgi->param('error') : ''); -my $branch_code = ($card_element eq 'batch' ? get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}) : ''); +my $branch_code = ($card_element eq 'batch' ? get_branch_code_from_name($template->param('LoginBranchname')) : ''); if ($op eq 'delete') { my $err = 0; diff --git a/reports/acquisitions_stats.pl b/reports/acquisitions_stats.pl index 8220148..26e85d5 100755 --- a/reports/acquisitions_stats.pl +++ b/reports/acquisitions_stats.pl @@ -134,7 +134,13 @@ else { -multiple => 0 ); - $req = $dbh->prepare("SELECT DISTINCTROW itemtype,description FROM itemtypes ORDER BY description"); + if (C4::Context->preference("searchMyLibraryOnly")) + { + $req = $dbh->prepare("SELECT DISTINCTROW itemtype,description FROM itemtypes WHERE itemtype LIKE '" . C4::Branch->mybranch() . "%' ORDER BY description"); + } + else { + $req = $dbh->prepare("SELECT DISTINCTROW itemtype,description FROM itemtypes ORDER BY description"); + } $req->execute; undef @select; undef %select; @@ -153,7 +159,14 @@ else { -multiple => 0 ); + if (C4::Context->preference("searchMyLibraryOnly")) + { + $req = $dbh->prepare("SELECT DISTINCTROW budget_code, budget_name FROM aqbudgets WHERE budget_code LIKE '" . C4::Branch->mybranch() . "%' ORDER BY budget_name"); + } + else { $req = $dbh->prepare("SELECT DISTINCTROW budget_code, budget_name FROM aqbudgets ORDER BY budget_name"); + } + $req->execute; undef @select; undef %select; diff --git a/reports/bor_issues_top.pl b/reports/bor_issues_top.pl index 95fc287..f45664f 100755 --- a/reports/bor_issues_top.pl +++ b/reports/bor_issues_top.pl @@ -137,7 +137,17 @@ foreach (sort keys %$labels) { my %row =(value => $_, description => $labels->{$_}, ); - push @borcatloop, \%row; + + if (C4::Context->preference("searchMyLibraryOnly") && not C4::Branch->mybranch() eq 'NO_LIBRARY_SET') + { + if (substr($labels->{$_},0,3) eq C4::Branch->mybranch()) + { + push @borcatloop, \%row; + } + } + else { + push @borcatloop, \%row; + } } $template->param( diff --git a/reports/borrowers_out.pl b/reports/borrowers_out.pl index 0a135e1..3dfde49 100755 --- a/reports/borrowers_out.pl +++ b/reports/borrowers_out.pl @@ -124,11 +124,23 @@ if ($do_it) { my ($codes,$labels) = GetborCatFromCatType(undef,undef); my @borcatloop; - foreach my $thisborcat (sort keys %$labels) { - my %row =(value => $thisborcat, - description => $labels->{$thisborcat}, + foreach (sort keys %$labels) { + my %row =(value => $_, + description => $labels->{$_}, ); - push @borcatloop, \%row; + + + if (C4::Context->preference("searchMyLibraryOnly") && not C4::Branch->mybranch() eq 'NO_LIBRARY_SET') + { + if (substr($labels->{$_},0,3) eq C4::Branch->mybranch()) + { + push @borcatloop, \%row; + } + } + else { + push @borcatloop, \%row; + } + } $template->param( CGIextChoice => $CGIextChoice, diff --git a/reports/borrowers_stats.pl b/reports/borrowers_stats.pl index c17a326..950330b 100755 --- a/reports/borrowers_stats.pl +++ b/reports/borrowers_stats.pl @@ -147,7 +147,16 @@ if ($do_it) { output_html_with_http_headers $input, $cookie, $template->output; sub catcode_aref() { - my $req = C4::Context->dbh->prepare("SELECT categorycode, description FROM categories ORDER BY description"); + my $req; + + if ( C4::Context->preference("searchMyLibraryOnly") && not C4::Branch->mybranch() eq 'NO_LIBRARY_SET' ) + { + $req = C4::Context->dbh->prepare("SELECT categorycode, description FROM categories WHERE categorycode LIKE '" . C4::Branch->mybranch() . "%' ORDER BY description"); + } + else { + $req = C4::Context->dbh->prepare("SELECT categorycode, description FROM categories ORDER BY description"); + } + $req->execute; return $req->fetchall_arrayref({}); } diff --git a/reports/cat_issues_top.pl b/reports/cat_issues_top.pl index 606106d..12f630a 100755 --- a/reports/cat_issues_top.pl +++ b/reports/cat_issues_top.pl @@ -140,11 +140,22 @@ if ($do_it) { #borcat my ($codes,$labels) = GetborCatFromCatType(undef,undef); my @borcatloop; - foreach my $thisborcat (sort {$labels->{$a} cmp $labels->{$b}} keys %$labels) { - my %row =(value => $thisborcat, - description => $labels->{$thisborcat}, + foreach (sort {$labels->{$a} cmp $labels->{$b}} keys %$labels) { + my %row =(value => $_, + description => $labels->{$_}, ); - push @borcatloop, \%row; + + if (C4::Context->preference("searchMyLibraryOnly") && not C4::Branch->mybranch() eq 'NO_LIBRARY_SET') + { + if (substr($labels->{$_},0,3) eq C4::Branch->mybranch()) + { + push @borcatloop, \%row; + } + } + else { + push @borcatloop, \%row; + } + } #Day diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl index 11dff4d..4c68f5d 100755 --- a/reports/catalogue_stats.pl +++ b/reports/catalogue_stats.pl @@ -142,7 +142,15 @@ if ($do_it) { my $hascote = 1; my $highcote = 5; + if ( C4::Context->preference("searchMyLibraryOnly") && not C4::Branch->mybranch() eq 'NO_LIBRARY_SET' ) + { + $req = $dbh->prepare("select itemtype, description from itemtypes WHERE itemtype LIKE '" . C4::Branch->mybranch() . "%' order by description"); + } + else { + $req = $dbh->prepare("select itemtype, description from itemtypes order by description"); + } + $req->execute; my $CGIitemtype = $req->fetchall_arrayref({}); diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index f5667a2..600ac29 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -21,7 +21,6 @@ use strict; #use warnings; FIXME - Bug 2505 use CGI; use Text::CSV; -use URI::Escape; use C4::Reports::Guided; use C4::Auth qw/:DEFAULT get_session/; use C4::Output; @@ -522,9 +521,6 @@ elsif ($phase eq 'Run this report'){ my $totpages = int($total/$limit) + (($total % $limit) > 0 ? 1 : 0); my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report&phase=Run%20this%20report"; - if (@sql_params) { - $url = join('&sql_params=', $url, map { URI::Escape::uri_escape($_) } @sql_params); - } $template->param( 'results' => \@rows, 'sql' => $sql, @@ -625,7 +621,7 @@ sub header_cell_loop { } foreach (1..6) { - $template->{VARS}->{'build' . $_} and $template->{VARS}->{'buildx' . $_} and last; + $template->param('build' . $_) and $template->param(buildx => $_) and last; } $template->param( 'referer' => $input->referer(), 'DHTMLcalendar_dateformat' => C4::Dates->DHTMLcalendar(), diff --git a/reports/issues_avg_stats.pl b/reports/issues_avg_stats.pl index c6a3859..a74b885 100755 --- a/reports/issues_avg_stats.pl +++ b/reports/issues_avg_stats.pl @@ -119,7 +119,15 @@ if ($do_it) { my %labels; my %select; my $req; + + if ( C4::Context->preference("searchMyLibraryOnly") && not C4::Branch->mybranch() eq 'NO_LIBRARY_SET' ) + { + $req = $dbh->prepare("select distinctrow categorycode,description from categories where categorycode like '" . C4::Branch->mybranch() . "%' order by description"); + } + else { $req = $dbh->prepare("select distinctrow categorycode,description from categories order by description"); + } + $req->execute; my @select; push @select,""; @@ -135,7 +143,13 @@ if ($do_it) { -size => 1, -multiple => 0 ); - $req = $dbh->prepare( "select distinctrow itemtype,description from itemtypes order by description"); + if ( C4::Context->preference("searchMyLibraryOnly") && not C4::Branch->mybranch() eq 'NO_LIBRARY_SET' ) + { + $req = $dbh->prepare( "select distinctrow itemtype,description from itemtypes where itemtype like '" . C4::Branch->mybranch() . "%' order by description"); + } + else { + $req = $dbh->prepare( "select distinctrow itemtype,description from itemtypes order by description"); + } $req->execute; undef @select; undef %select; @@ -554,23 +568,8 @@ sub calculate { # and the number matches the number of columns my $colcount=0; foreach my $col ( @loopcol ) { - my $value; - if ($table{$row}->{ - ( ( $col->{coltitle} eq 'NULL' ) - or ( $col->{coltitle} eq q{} ) - ) ? 'zzEMPTY' : $col->{coltitle} - } - ) { - $value = $table{$row}->{ - ( ( $col->{coltitle} eq 'NULL' ) - or ( $col->{coltitle} eq q{} ) - ) ? 'zzEMPTY' : $col->{coltitle} - } / $wgttable{$row}->{ - ( ( $col->{coltitle} eq 'NULL' ) - or ( $col->{coltitle} eq q{} ) - ) ? 'zzEMPTY' : $col->{coltitle} - }; - } + my $value =$table{$row}->{(($col->{coltitle} eq "NULL")or ($col->{coltitle} eq ""))?"zzEMPTY":$col->{coltitle}} / $wgttable{$row}->{(($col->{coltitle} eq "NULL")or ($col->{coltitle} eq ""))?"zzEMPTY":$col->{coltitle}} if ($table{$row}->{(($col->{coltitle} eq "NULL")or ($col->{coltitle} eq ""))?"zzEMPTY":$col->{coltitle}}); + $table{$row}->{(($col->{coltitle} eq "NULL")or ($col->{coltitle} eq ""))?"zzEMPTY":$col->{coltitle}} = $value; $table{$row}->{totalrow}+=$value; #warn "row : $row col:$col $cnttable{$row}->{(($col->{coltitle} eq \"NULL\")or ($col->{coltitle} eq \"\"))?\"zzEMPTY\":$col->{coltitle}}"; @@ -578,16 +577,12 @@ sub calculate { push @loopcell, {value => ($value)?sprintf("%.2f",$value):0 } ; } #warn "row : $row colcount:$colcount"; - my $total; - if ( $colcount > 0 ) { - $total = $table{$row}->{totalrow} / $colcount; - } - push @looprow, - { 'rowtitle' => ( $row eq "zzEMPTY" ) ? "NULL" : $row, - 'loopcell' => \@loopcell, - 'hilighted' => ( $hilighted > 0 ), - 'totalrow' => ($total) ? sprintf( "%.2f", $total ) : 0 - }; + my $total = $table{$row}->{totalrow}/$colcount if ($colcount>0); + push @looprow,{ 'rowtitle' => ($row eq "zzEMPTY")?"NULL":$row, + 'loopcell' => \@loopcell, + 'hilighted' => ($hilighted >0), + 'totalrow' => ($total)?sprintf("%.2f",$total):0 + }; $hilighted = -$hilighted; } # @@ -622,3 +617,6 @@ sub calculate { } 1; + + + diff --git a/reports/reservereport.pl b/reports/reservereport.pl index 42a1d20..67f384c 100755 --- a/reports/reservereport.pl +++ b/reports/reservereport.pl @@ -96,7 +96,7 @@ for ( my $i = 0 ; $i < $count ; $i++ ) { # FIXME still need to shift the text to the template so its translateable if ( $data->[$i]) { # find if its on issue - my @items = GetItemsInfo( $line{biblionumber} ); + my @items = GetItemsInfo($line{'biblionumber'}, 'intra' ); my $onissue = 0; foreach my $item (@items) { if ( $item->{'datedue'} eq 'Reserved' ) { diff --git a/reserve/placerequest.pl b/reserve/placerequest.pl index 19d76be..bc3fc74 100755 --- a/reserve/placerequest.pl +++ b/reserve/placerequest.pl @@ -44,14 +44,14 @@ my @bibitems=$input->param('biblioitem'); # and probably remove the reserveconstraint table as well, I never could fill anything in this table. my @reqbib=$input->param('reqbib'); my $biblionumber=$input->param('biblionumber'); -my $borrowernumber=$input->param('borrowernumber'); +my $borrower=$input->param('member'); my $notes=$input->param('notes'); my $branch=$input->param('pickup'); my $startdate=$input->param('reserve_date') || ''; my @rank=$input->param('rank-request'); my $type=$input->param('type'); my $title=$input->param('title'); -my $borrower=GetMember('borrowernumber'=>$borrowernumber); +my $borrowernumber=GetMember('cardnumber'=>$borrower); my $checkitem=$input->param('checkitem'); my $expirationdate = $input->param('expiration_date'); @@ -81,7 +81,7 @@ if ($checkitem ne ''){ } } -if ($type eq 'str8' && $borrower){ +if ($type eq 'str8' && $borrowernumber ne ''){ foreach my $biblionumber (keys %bibinfos) { my $count=@bibitems; @@ -100,18 +100,18 @@ if ($type eq 'str8' && $borrower){ if ($multi_hold) { my $bibinfo = $bibinfos{$biblionumber}; - AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,'a',[$biblionumber], + AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'a',[$biblionumber], $bibinfo->{rank},$startdate,$expirationdate,$notes,$bibinfo->{title},$checkitem,$found); } else { if ($input->param('request') eq 'any'){ # place a request on 1st available - AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$startdate,$expirationdate,$notes,$title,$checkitem,$found); + AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$startdate,$expirationdate,$notes,$title,$checkitem,$found); } elsif ($reqbib[0] ne ''){ # FIXME : elsif probably never reached, (see top of the script) # place a request on a given item - AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,'o',\@reqbib,$rank[0],$startdate,$expirationdate,$notes,$title,$checkitem, $found); + AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'o',\@reqbib,$rank[0],$startdate,$expirationdate,$notes,$title,$checkitem, $found); } else { - AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$startdate,$expirationdate,$notes,$title,$checkitem, $found); + AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$startdate,$expirationdate,$notes,$title,$checkitem, $found); } } } @@ -124,10 +124,8 @@ if ($type eq 'str8' && $borrower){ } else { print $input->redirect("request.pl?biblionumber=$biblionumber"); } -} elsif ($borrower eq ''){ +} elsif ($borrowernumber eq ''){ print $input->header(); - print "Invalid borrower number please try again"; -# Not sure that Dump() does HTML escaping. Use firebug or something to trace -# instead. -# print $input->Dump; + print "Invalid card number please try again"; + print $input->Dump; } diff --git a/reserve/request.pl b/reserve/request.pl index 79ff6b5..0b3bebc 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -85,7 +85,7 @@ my $CGIbranch = CGI::scrolling_list( my $findborrower = $input->param('findborrower'); $findborrower = '' unless defined $findborrower; $findborrower =~ s|,| |g; -my $borrowernumber_hold = $input->param('borrowernumber') || ''; +my $cardnumber = $input->param('cardnumber') || ''; my $borrowerslist; my $messageborrower; my $warnings; @@ -117,19 +117,21 @@ if ($findborrower) { my @borrowers = @$borrowers; - if ( !@borrowers ) { + if ( $#borrowers == -1 ) { + $input->param( 'findborrower', '' ); $messageborrower = "'$findborrower'"; } - elsif ( @borrowers == 1 ) { - $borrowernumber_hold = $borrowers[0]->{'borrowernumber'}; + elsif ( $#borrowers == 0 ) { + $input->param( 'cardnumber', $borrowers[0]->{'cardnumber'} ); + $cardnumber = $borrowers[0]->{'cardnumber'}; } else { $borrowerslist = \@borrowers; } } -if ($borrowernumber_hold) { - my $borrowerinfo = GetMemberDetails( $borrowernumber_hold ); +if ($cardnumber) { + my $borrowerinfo = GetMemberDetails( 0, $cardnumber ); my $diffbranch; my @getreservloop; my $count_reserv = 0; @@ -141,7 +143,7 @@ if ($borrowernumber_hold) { my $number_reserves = GetReserveCount( $borrowerinfo->{'borrowernumber'} ); - if ( C4::Context->preference('maxreserves') && ($number_reserves >= C4::Context->preference('maxreserves')) ) { + if ( C4::Context->preference('maxreserves') && $number_reserves >= C4::Context->preference('maxreserves') ) { $warnings = 1; $maxreserves = 1; } @@ -162,25 +164,24 @@ if ($borrowernumber_hold) { } $template->param( - borrowernumber => $borrowerinfo->{'borrowernumber'}, - borrowersurname => $borrowerinfo->{'surname'}, - borrowerfirstname => $borrowerinfo->{'firstname'}, - borrowerstreetaddress => $borrowerinfo->{'address'}, - borrowercity => $borrowerinfo->{'city'}, - borrowerphone => $borrowerinfo->{'phone'}, - borrowermobile => $borrowerinfo->{'mobile'}, - borrowerfax => $borrowerinfo->{'fax'}, - borrowerphonepro => $borrowerinfo->{'phonepro'}, - borroweremail => $borrowerinfo->{'email'}, - borroweremailpro => $borrowerinfo->{'emailpro'}, - borrowercategory => $borrowerinfo->{'category'}, - borrowerreservs => $count_reserv, - cardnumber => $borrowerinfo->{'cardnumber'}, - maxreserves => $maxreserves, - expiry => $expiry, - diffbranch => $diffbranch, - messages => $messages, - warnings => $warnings + borrowernumber => $borrowerinfo->{'borrowernumber'}, + borrowersurname => $borrowerinfo->{'surname'}, + borrowerfirstname => $borrowerinfo->{'firstname'}, + borrowerstreetaddress => $borrowerinfo->{'address'}, + borrowercity => $borrowerinfo->{'city'}, + borrowerphone => $borrowerinfo->{'phone'}, + borrowermobile => $borrowerinfo->{'mobile'}, + borrowerfax => $borrowerinfo->{'fax'}, + borrowerphonepro => $borrowerinfo->{'phonepro'}, + borroweremail => $borrowerinfo->{'email'}, + borroweremailpro => $borrowerinfo->{'emailpro'}, + borrowercategory => $borrowerinfo->{'category'}, + borrowerreservs => $count_reserv, + maxreserves => $maxreserves, + expiry => $expiry, + diffbranch => $diffbranch, + messages => $messages, + warnings => $warnings ); } @@ -199,18 +200,18 @@ if ($borrowerslist) { } @{$borrowerslist} ) { - push @values, $borrower->{borrowernumber}; + push @values, $borrower->{cardnumber}; - $labels{ $borrower->{borrowernumber} } = sprintf( + $labels{ $borrower->{cardnumber} } = sprintf( '%s, %s ... (%s - %s) ... %s', - $borrower->{surname} ||'', $borrower->{firstname} || '', - $borrower->{cardnumber} || '', $borrower->{categorycode} || '', - $borrower->{address} || '', + $borrower->{surname}, $borrower->{firstname}, + $borrower->{cardnumber}, $borrower->{categorycode}, + $borrower->{address}, ); } $CGIselectborrower = CGI::scrolling_list( - -name => 'borrowernumber', + -name => 'cardnumber', -values => \@values, -labels => \%labels, -size => 7, @@ -219,7 +220,7 @@ if ($borrowerslist) { } # FIXME launch another time GetMemberDetails perhaps until -my $borrowerinfo = GetMemberDetails( $borrowernumber_hold ); +my $borrowerinfo = GetMemberDetails( 0, $cardnumber ); my @biblionumbers = (); my $biblionumbers = $input->param('biblionumbers'); @@ -237,7 +238,7 @@ foreach my $biblionumber (@biblionumbers) { my $dat = GetBiblioData($biblionumber); - unless ( CanBookBeReserved($borrowerinfo->{borrowernumber}, $biblionumber) ) { + if ( not CanBookBeReserved($borrowerinfo->{borrowernumber}, $biblionumber) ) { $warnings = 1; $maxreserves = 1; } @@ -428,14 +429,11 @@ foreach my $biblionumber (@biblionumbers) { $item->{'holdallowed'} = $branchitemrule->{'holdallowed'}; if ( $branchitemrule->{'holdallowed'} == 0 || - ( $branchitemrule->{'holdallowed'} == 1 && - $borrowerinfo->{'branchcode'} ne $item->{'homebranch'} ) ) { + ( $branchitemrule->{'holdallowed'} == 1 && $borrowerinfo->{'branchcode'} ne $item->{'homebranch'} ) ) { $policy_holdallowed = 0; } - if (IsAvailableForItemLevelRequest($itemnumber) and - not $item->{cantreserve} and - CanItemBeReserved($borrowerinfo->{borrowernumber}, $itemnumber) ) { + if (IsAvailableForItemLevelRequest($itemnumber) and not $item->{cantreserve} and CanItemBeReserved($borrowerinfo->{borrowernumber}, $itemnumber) ) { if ( $policy_holdallowed ) { $item->{available} = 1; $num_available++; @@ -566,6 +564,7 @@ foreach my $biblionumber (@biblionumbers) { date => $date, biblionumber => $biblionumber, findborrower => $findborrower, + cardnumber => $cardnumber, title => $dat->{title}, author => $dat->{author}, holdsview => 1, diff --git a/serials/routing-preview.pl b/serials/routing-preview.pl index 64849b5..5d57c13 100755 --- a/serials/routing-preview.pl +++ b/serials/routing-preview.pl @@ -65,7 +65,7 @@ if($ok){ # get biblio information.... my $biblio = $subs->{'biblionumber'}; my ($count2, at bibitems) = GetBiblioItemByBiblioNumber($biblio); - my @itemresults = GetItemsInfo( $subs->{biblionumber} ); + my @itemresults = GetItemsInfo($subs->{'biblionumber'}, 'intra'); my $branch = $itemresults[0]->{'holdingbranch'}; my $branchname = GetBranchName($branch); diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl index db7620c..fbf9ad5 100755 --- a/serials/serials-edit.pl +++ b/serials/serials-edit.pl @@ -176,7 +176,6 @@ foreach my $subscriptionid (@subscriptionids) { $cell->{serialsadditems} = 1; } $cell->{'subscriptionid'} = $subscriptionid; - $cell->{biblionumber} = $serialdatalist[0]->{'biblionumber'}; $cell->{'itemid'} = 'NNEW'; $cell->{'serialid'} = 'NEW'; $cell->{'issuesatonce'} = 1; diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl index 9acee7b..7fcccdf 100755 --- a/serials/subscription-add.pl +++ b/serials/subscription-add.pl @@ -43,7 +43,7 @@ my @budgets; # Permission needed if it is a modification : edit_subscription # Permission needed otherwise (nothing or dup) : create_subscription -my $permission = ($op eq "modify") ? "edit_subscription" : "create_subscription"; +my $permission = ($op eq "mod") ? "edit_subscription" : "create_subscription"; my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "serials/subscription-add.tmpl", @@ -66,12 +66,12 @@ my $subs; my $firstissuedate; my $nextexpected; -if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { +if ($op eq 'mod' || $op eq 'dup' || $op eq 'modsubscription') { my $subscriptionid = $query->param('subscriptionid'); $subs = GetSubscription($subscriptionid); ## FIXME : Check rights to edit if mod. Could/Should display an error message. - if ($subs->{'cannotedit'} && $op eq 'modify'){ + if ($subs->{'cannotedit'} && $op eq 'mod'){ carp "Attempt to modify subscription $subscriptionid by ".C4::Context->userenv->{'id'}." not allowed"; print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid"); } @@ -91,7 +91,7 @@ if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { letter_loop($subs->{'letter'}, $template); $nextexpected = GetNextExpected($subscriptionid); $nextexpected->{'isfirstissue'} = $nextexpected->{planneddate}->output('iso') eq $firstissuedate ; - $subs->{nextacquidate} = $nextexpected->{planneddate}->output() if($op eq 'modify'); + $subs->{nextacquidate} = $nextexpected->{planneddate}->output() if($op eq 'mod'); unless($op eq 'modsubscription') { foreach my $length_unit qw(numberlength weeklength monthlength){ if ($subs->{$length_unit}){ @@ -107,7 +107,7 @@ if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { $op => 1, "subtype_$sub_on" => 1, sublength =>$sub_length, - history => ($op eq 'modify'), + history => ($op eq 'mod'), "periodicity".$subs->{'periodicity'} => 1, "numberpattern".$subs->{'numberpattern'} => 1, firstacquiyear => substr($firstissuedate,0,4), @@ -160,7 +160,7 @@ if ($op eq 'addsubscription') { } $template->param(subtype => \@sub_type_data); - letter_loop( '', $template ) if ($op ne 'modsubscription' && $op ne 'dup' && $op ne 'modify'); + letter_loop( '', $template ) if ($op ne 'modsubscription' && $op ne 'dup' && $op ne 'mod'); my $new_biblionumber = $query->param('biblionumber_for_new_subscription'); if (defined $new_biblionumber) { diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index d00b632..aa8fad0 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -288,16 +288,10 @@ my $patron_reason_loop = GetAuthorisedValues("OPAC_SUG",$$suggestion_ref{'patron $template->param(patron_reason_loop=>$patron_reason_loop); #Budgets management -my $budgets = []; -if ($branchfilter) { - my $searchbudgets = { budget_branchcode => $branchfilter }; - $budgets = GetBudgets($searchbudgets); -} else { - $budgets = GetBudgets(undef); -} +my $searchbudgets={ budget_branchcode=>$branchfilter} if $branchfilter; +my $budgets = GetBudgets($searchbudgets); -foreach my $budget ( @{$budgets} ) { -## Please see file perltidy.ERR +foreach my $budget (@$budgets){ $budget->{'selected'}=1 if ($$suggestion_ref{'budgetid'} && $budget->{'budget_id'} eq $$suggestion_ref{'budgetid'}) }; diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t index dd827f0..6012f5f 100755 --- a/t/db_dependent/Biblio.t +++ b/t/db_dependent/Biblio.t @@ -5,7 +5,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 6; use MARC::Record; use C4::Biblio; @@ -34,40 +34,6 @@ my $itemdata = &GetBiblioItemData($biblioitemnumber); is($itemdata->{title},$title,'First test of GetBiblioItemData to get same result of previous two GetBiblioData tests.'); is($itemdata->{isbn},$isbn,'Second test checking it returns the correct isbn.'); -my $success = 0; -$field = MARC::Field->new( - 655, ' ', ' ', - 'a' => 'Auction catalogs', - '9' => '1' - ); -eval { - $marc_record->append_fields($field); - $success = ModBiblio($marc_record,$biblionumber,''); -} or do { - diag($@); - $success = 0; -}; -ok($success, "ModBiblio handles authority-linked 655"); - -eval { - $field->delete_subfields('a'); - $marc_record->append_fields($field); - $success = ModBiblio($marc_record,$biblionumber,''); -} or do { - diag($@); - $success = 0; -}; -ok($success, "ModBiblio handles 655 with authority link but no heading"); - -eval { - $field->delete_subfields('9'); - $marc_record->append_fields($field); - $success = ModBiblio($marc_record,$biblionumber,''); -} or do { - diag($@); - $success = 0; -}; -ok($success, "ModBiblio handles 655 with no subfields"); # clean up after ourselves DelBiblio($biblionumber); diff --git a/tools/export.pl b/tools/export.pl index 4a09868..d858f44 100755 --- a/tools/export.pl +++ b/tools/export.pl @@ -184,17 +184,16 @@ else { push @itemtypesloop, \%row; } my @branchloop; - for my $thisbranch ( - sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } - keys %{$branches} - ) { - push @branchloop, - { value => $thisbranch, - selected => $thisbranch eq $branch, + for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { + my $selected = 1 if $thisbranch eq $branch; + my %row = ( + value => $thisbranch, + selected => $selected, branchname => $branches->{$thisbranch}->{'branchname'}, - }; + ); + push @branchloop, \%row; } - + $template->param( branchloop => \@branchloop, itemtypeloop => \@itemtypesloop, diff --git a/tools/holidays.pl b/tools/holidays.pl index 90ef56a..eb3bc9c 100755 --- a/tools/holidays.pl +++ b/tools/holidays.pl @@ -65,20 +65,18 @@ if ( $onlymine ) { $branch = C4::Context->userenv->{'branch'}; } my $branchname = GetBranchName($branch); -my $branches = GetBranches($onlymine); +my $branches = GetBranches($onlymine); my @branchloop; -for my $thisbranch ( - sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } - keys %{$branches} ) { - push @branchloop, - { value => $thisbranch, - selected => $thisbranch eq $branch, - branchname => $branches->{$thisbranch}->{'branchname'}, - }; +for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { + my $selected = 1 if $thisbranch eq $branch; + my %row =(value => $thisbranch, + selected => $selected, + branchname => $branches->{$thisbranch}->{'branchname'}, + ); + push @branchloop, \%row; } - # branches calculated - put branch codes in a single string so they can be passed in a form -my $branchcodes = join '|', keys %{$branches}; +my $branchcodes = join("|", keys %$branches); # Get all the holidays diff --git a/tools/import_borrowers.pl b/tools/import_borrowers.pl index 74a5889..6141998 100755 --- a/tools/import_borrowers.pl +++ b/tools/import_borrowers.pl @@ -66,7 +66,7 @@ my $columnkeystpl = [ map { {'key' => $_} } grep {$_ ne 'borrowernumber' && $_ my $input = CGI->new(); our $csv = Text::CSV->new({binary => 1}); # binary needed for non-ASCII Unicode -#push @feedback, {feedback=>1, name=>'backend', value=>$csv->backend, backend=>$csv->backend}; #XXX +# push @feedback, {feedback=>1, name=>'backend', value=>$csv->backend, backend=>$csv->backend}; my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ template_name => "tools/import_borrowers.tmpl", @@ -193,9 +193,6 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) { } if ($extended) { my $attr_str = $borrower{patron_attributes}; - $attr_str =~ s/\xe2\x80\x9c/"/g; # fixup double quotes in case we are passed smart quotes - $attr_str =~ s/\xe2\x80\x9d/"/g; - push @feedback, {feedback=>1, name=>'attribute string', value=>$attr_str, filename=>$uploadborrowers}; delete $borrower{patron_attributes}; # not really a field in borrowers, so we don't want to pass it to ModMember. $patron_attributes = extended_attributes_code_value_arrayref($attr_str); } @@ -249,8 +246,6 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) { } unless (ModMember(%borrower)) { $invalid++; - # untill we have better error trapping, we have no way of knowing why ModMember errored out... - push @errors, {unknown_error => 1}; $template->param('lastinvalid'=>$borrower{'surname'}.' / '.$borrowernumber); next LINE; } @@ -259,7 +254,7 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) { my $old_attributes = GetBorrowerAttributes($borrowernumber); $patron_attributes = extended_attributes_merge($old_attributes, $patron_attributes); #TODO: expose repeatable options in template } - push @errors, {unknown_error => 1} unless SetBorrowerAttributes($borrower{'borrowernumber'}, $patron_attributes); + SetBorrowerAttributes($borrower{'borrowernumber'}, $patron_attributes); } $overwritten++; $template->param('lastoverwritten'=>$borrower{'surname'}.' / '.$borrowernumber); @@ -281,7 +276,6 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) { $template->param('lastimported'=>$borrower{'surname'}.' / '.$borrowernumber); } else { $invalid++; - push @errors, {unknown_error => 1}; $template->param('lastinvalid'=>$borrower{'surname'}.' / AddMember'); } } diff --git a/tools/inventory.pl b/tools/inventory.pl index 5e7b198..cc7e8a7 100755 --- a/tools/inventory.pl +++ b/tools/inventory.pl @@ -77,8 +77,6 @@ my @authorised_value_list; my $authorisedvalue_categories = ''; my $frameworks = getframeworks(); -$frameworks->{''} = {frameworkcode => ''}; # Add the default framework - for my $fwk (keys %$frameworks){ my $fwkcode = $frameworks->{$fwk}->{'frameworkcode'}; my $authcode = GetAuthValCode('items.location', $fwkcode); @@ -196,7 +194,7 @@ if ( ! ($uploadbarcodes && length($uploadbarcodes)>0 ) || ( $input->param('compa if ( defined $input->param('compareinv2barcd') && ( ( $input->param('compareinv2barcd') eq 'on' ) && ( scalar @brcditems != scalar @$res ) ) && length($uploadbarcodes) > 0 ){ if ( scalar @brcditems > scalar @$res ){ for my $brcditem (@brcditems) { - if (! grep( $_->{barcode} =~ /$brcditem->{barcode}/ , @$res) ){ + if (! grep(/$brcditem->{barcode}/, @$res) ){ $brcditem->{notfoundkoha} = 1; push @$res, $brcditem; } @@ -204,7 +202,7 @@ if ( ! ($uploadbarcodes && length($uploadbarcodes)>0 ) || ( $input->param('compa } else { my @notfound; for my $item (@$res) { - if ( ! grep( $_->{barcode} =~ /$item->{barcode}/ , @brcditems) ){ + if ( ! grep(/$item->{barcode}/, @brcditems) ){ $item->{notfoundbarcode} = 1; push @notfound, $item; } diff --git a/tools/koha-news.pl b/tools/koha-news.pl index afc5268..2451934 100755 --- a/tools/koha-news.pl +++ b/tools/koha-news.pl @@ -79,7 +79,7 @@ if ( $op eq 'add_form' ) { op => 'edit', id => $new_detail->{'idnew'} ); - $template->{VARS}->{'new_detail'} = $new_detail; + $template->param($new_detail); } else { $template->param( op => 'add' ); diff --git a/tools/picture-upload.pl b/tools/picture-upload.pl index bfb233e..f4c75d8 100755 --- a/tools/picture-upload.pl +++ b/tools/picture-upload.pl @@ -78,10 +78,7 @@ my ( $total, $handled, @counts, $tempfile, $tfh ); if ( ($op eq 'Upload') && $uploadfile ) { # Case is important in these operational values as the template must use case to be visually pleasing! my $dirname = File::Temp::tempdir( CLEANUP => 1); $debug and warn "dirname = $dirname"; - my $filesuffix; - if ( $uploadfilename =~ m/(\..+)$/i ) { - my $filesuffix = $1; - } + my $filesuffix = $1 if $uploadfilename =~ m/(\..+)$/i; ( $tfh, $tempfile ) = File::Temp::tempfile( SUFFIX => $filesuffix, UNLINK => 1 ); $debug and warn "tempfile = $tempfile"; my ( @directories, $errors ); @@ -257,11 +254,8 @@ sub handle_file { undef $srcimage; # This object can get big... } $debug and warn "Image is of mimetype $mimetype"; - my $dberror; - if ($mimetype) { - $dberror = PutPatronImage( $cardnumber, $mimetype, $imgfile ); - } - if ( !$dberror && $mimetype ) { # Errors from here on are fatal only to the import of a particular image, so don't bail, just note the error and keep going + my $dberror = PutPatronImage($cardnumber,$mimetype, $imgfile) if $mimetype; + if ( !$dberror && $mimetype ) { # Errors from here on are fatal only to the import of a particular image, so don't bail, just note the error and keep going $count{count}++; push @{ $count{filenames} }, { source => $filename, cardnumber => $cardnumber }; } elsif ( $dberror ) { diff --git a/virtualshelves/sendshelf.pl b/virtualshelves/sendshelf.pl index 16ada89..d902398 100755 --- a/virtualshelves/sendshelf.pl +++ b/virtualshelves/sendshelf.pl @@ -85,7 +85,7 @@ if ( $email ) { my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); - my @items = GetItemsInfo( $biblionumber ); + my @items = &GetItemsInfo( $biblionumber, 'opac' ); $dat->{MARCNOTES} = $marcnotesarray; $dat->{MARCSUBJCTS} = $marcsubjctsarray; -- 1.7.4.1 From lrea at nekls.org Wed Jul 27 20:33:08 2011 From: lrea at nekls.org (Liz Rea) Date: Wed, 27 Jul 2011 13:33:08 -0500 Subject: [Koha-patches] [PATCH] Bug 6632 [Signed Off] add html filter to prevent XSS Message-ID: <1311791588-23003-1-git-send-email-lrea@nekls.org> From: Fr?re S?bastien Marie The filter 'html' have been added on all occurences of shelvename, which come from user input. http://bugs.koha-community.org/show_bug.cgi?id=6632 --- .../prog/en/modules/virtualshelves/shelves.tt | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) 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 103757c..3e2b3d9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -1,5 +1,5 @@ [% INCLUDE 'doc-head-open.inc' %] -Koha › [% IF ( viewshelf ) %]Lists › Contents of [% shelfname %][% ELSE %]Lists[% END %][% IF ( shelves ) %] › Create New List[% END %][% IF ( edit ) %] › Edit List [% shelfname %][% END %] +Koha › [% IF ( viewshelf ) %]Lists › Contents of [% shelfname | html %][% ELSE %]Lists[% END %][% IF ( shelves ) %] › Create New List[% END %][% IF ( edit ) %] › Edit List [% shelfname | html %][% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -92,32 +97,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 b92ad52..7b79aa8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -163,24 +163,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 c2e5062..7a98164 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt @@ -265,24 +265,9 @@ Confirm Deletion of Category [% categorycode |html %][% END %] [% IF ( searchfield ) %] You Searched for [% searchfield %] [% END %] - -
       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 2e9bdd2..9a90923 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt @@ -114,24 +114,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 e3df4e2..88b52c5 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.4.1 From Katrin.Fischer.83 at web.de Wed Jul 27 23:05:51 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Wed, 27 Jul 2011 23:05:51 +0200 Subject: [Koha-patches] [PATCH] Bug 6080: Add id to total line in funds table Message-ID: <1311800751-7523-1-git-send-email-Katrin.Fischer.83@web.de> Alternate patch for bug 6080. Instead of removing the line altogether make it possible to hide it easily by adding an id. To test: - apply patch - check your funds table for the last line labelled 'Total' - add to IntranetUserCss: #funds_total {display:none;} - check again, line should be hidden now Reason: The totals is only confusing for multi-level funds, but not wrong. If you are using only 1 level of funds, it works all ok. --- .../prog/en/modules/acqui/acqui-home.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt index a274365..86650eb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -99,7 +99,7 @@ $(document).ready(function() { - + -- 1.7.4.1 From srdjan at catalyst.net.nz Thu Jul 28 06:09:15 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Thu, 28 Jul 2011 16:09:15 +1200 Subject: [Koha-patches] [PATCH 1/1] Bug 4222 - allow nonpublicnote to be a mapped DB column In-Reply-To: References: Message-ID: <1311826155-691-1-git-send-email-srdjan@catalyst.net.nz> This means that it's possible (and easy) to put non-public notes (usually 952$x) on a template, same as public notes. It creates a mapping between the 952$x field and the new database column. Note that when this is applied, it will only work on newly saved records. It is possible this will need to be altered to allow for UNIMARC etc. if they use 952 differently. --- catalogue/detail.pl | 10 +++++++++- catalogue/moredetail.pl | 1 + installer/data/mysql/kohastructure.sql | 2 ++ installer/data/mysql/updatedatabase.pl | 8 ++++++++ .../prog/en/modules/catalogue/detail.tt | 4 ++++ .../prog/en/modules/catalogue/moredetail.tt | 1 + 6 files changed, 25 insertions(+), 1 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 8738737..f8feec5 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -223,6 +223,13 @@ foreach my $item (@items) { $item->{waitingdate} = format_date($wait_hashref->{waitingdate}); } + foreach my $f (qw( itemnotes nonpublicnote )) { + if ($item->{$f}) { + $item->{$f} =~ s|\n|
      |g; + $itemfields{$f} = 1; + } + } + push @itemloop, $item; } @@ -240,7 +247,8 @@ $template->param( itemdata_uri => $itemfields{uri}, itemdata_copynumber => $itemfields{copynumber}, volinfo => $itemfields{enumchron}, - itemdata_itemnotes => $itemfields{itemnotes}, + itemdata_itemnotes => $itemfields{itemnotes}, + itemdata_nonpublicnote => $itemfields{nonpublicnote}, z3950_search_params => C4::Search::z3950_search_args($dat), holdcount => $holdcount, C4::Search::enabled_staff_search_views, diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index d848188..364c26c 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -145,6 +145,7 @@ foreach my $item (@items){ } else { $item->{'issue'}= 0; } + $item->{nonpublicnote} =~ s|\n|
      |g if $item->{nonpublicnote}; } $template->param(count => $data->{'count'}, subscriptionsnumber => $subscriptionsnumber, diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e3c6f42..62bbf51 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -761,6 +761,7 @@ CREATE TABLE `deleteditems` ( `enumchron` text default NULL, `copynumber` varchar(32) default NULL, `stocknumber` varchar(32) default NULL, + `nonpublicnote` mediumtext default NULL, `marc` longblob, PRIMARY KEY (`itemnumber`), KEY `delitembarcodeidx` (`barcode`), @@ -1028,6 +1029,7 @@ CREATE TABLE `items` ( `enumchron` text default NULL, `copynumber` varchar(32) default NULL, `stocknumber` varchar(32) default NULL, + `nonpublicnote` mediumtext default NULL, PRIMARY KEY (`itemnumber`), UNIQUE KEY `itembarcodeidx` (`barcode`), KEY `itemstocknumberidx` (`stocknumber`), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9cbc8db..8b65080 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4370,6 +4370,14 @@ 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 items ADD COLUMN nonpublicnote MEDIUMTEXT"); + $dbh->do("ALTER TABLE deleteditems ADD COLUMN nonpublicnote MEDIUMTEXT"); + $dbh->do("UPDATE marc_subfield_structure SET kohafield='items.nonpublicnote' WHERE (kohafield IS NULL OR kohafield = '') AND tagfield='952' AND tagsubfield='x'"); + print "Upgrade to $DBversion done (Make nonpublicnote easier to use)\n"; +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 2ea7091..a801686 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -243,6 +243,8 @@ function verify_images() {
      + [% IF itemdata_itemnotes %][% END %] + [% IF itemdata_nonpublicnote %][% END %] [% IF ( volinfo ) %][% END %] [% IF ( itemdata_uri ) %][% END %] [% IF ( itemdata_copynumber ) %][% END %] @@ -355,6 +357,8 @@ function verify_images() { + [% IF itemdata_itemnotes %][% END %] + [% IF itemdata_nonpublicnote %][% END %] [% IF ( volinfo ) %] [% END %] [% IF ( itemdata_copynumber ) %][% END %] [% IF ( itemdata_itemnotes ) %][% END %] - [% IF ( SpineLabelShowPrintOnBibDetails ) %][% END %] + [% IF itemdata_nonpublicnote %][% END %] + [% IF ( SpineLabelShowPrintOnBibDetails ) %][% END %] [% FOREACH itemloo IN itemloop %] @@ -370,6 +371,7 @@ function verify_images() { [% END %] [% IF ( itemdata_itemnotes ) %][% END %] + [% IF itemdata_nonpublicnote %][% END %] [% IF ( itemloo.type ) %] [% END %] 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..db251fd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -174,6 +174,7 @@ [% IF ( ITEM_DAT.card2 ) %]
    • Previous Borrower: [% ITEM_DAT.card2 %] 
    • [% END %]
    • Paid for?: [% ITEM_DAT.paidfor %] 
    • Serial enumeration: [% ITEM_DAT.enumchron %] 
    • +
    • Non-public Note: [% ITEM_DAT.nonpublicnote %] 
    • Public Note: [% IF ( CAN_user_editcatalogue_edit_items ) %] 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 9dcb16d..2776948 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -701,7 +701,7 @@ No patron matched [% message %] [% IF ( todayissue.od ) %]
    • - + [% IF ( todayissue.multiple_borrowers ) %][% END %] @@ -773,7 +773,7 @@ No patron matched [% message %] [% IF ( previssue.od ) %] - + @@ -879,7 +879,7 @@ No patron matched [% message %] [% END %] [% IF ( relissue.overdue ) %] - + @@ -899,7 +899,7 @@ No patron matched [% message %] [% IF ( relprevissue.overdue ) %] - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index c02be49..3cab835 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -422,6 +422,7 @@ function Dopop(link) { [% ELSE %]Not checked out[% END %] [% END %] -- 1.6.5 From nengard at bywatersolutions.com Wed Jul 27 06:40:27 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 27 Jul 2011 00:40:27 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 4222 - allow nonpublicnote to be a mapped DB column Message-ID: <1311741627-4833-1-git-send-email-nengard@bywatersolutions.com> From: Srdjan Jankovic This means that it's possible (and easy) to put non-public notes (usually 952$x) on a template, same as public notes. It creates a mapping between the 952$x field and the new database column. Note that when this is applied, it will only work on newly saved records. It is possible this will need to be altered to allow for UNIMARC etc. if they use 952 differently. Signed-off-by: Nicole C. Engard --- catalogue/detail.pl | 10 +++++++++- catalogue/moredetail.pl | 1 + circ/returns.pl | 1 + installer/data/mysql/kohastructure.sql | 2 ++ installer/data/mysql/updatedatabase.pl | 8 ++++++++ .../prog/en/modules/catalogue/detail.tt | 4 +++- .../prog/en/modules/catalogue/moredetail.tt | 1 + .../prog/en/modules/circ/circulation.tt | 8 ++++---- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 1 + 9 files changed, 30 insertions(+), 6 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 8738737..f8feec5 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -223,6 +223,13 @@ foreach my $item (@items) { $item->{waitingdate} = format_date($wait_hashref->{waitingdate}); } + foreach my $f (qw( itemnotes nonpublicnote )) { + if ($item->{$f}) { + $item->{$f} =~ s|\n|
      |g; + $itemfields{$f} = 1; + } + } + push @itemloop, $item; } @@ -240,7 +247,8 @@ $template->param( itemdata_uri => $itemfields{uri}, itemdata_copynumber => $itemfields{copynumber}, volinfo => $itemfields{enumchron}, - itemdata_itemnotes => $itemfields{itemnotes}, + itemdata_itemnotes => $itemfields{itemnotes}, + itemdata_nonpublicnote => $itemfields{nonpublicnote}, z3950_search_params => C4::Search::z3950_search_args($dat), holdcount => $holdcount, C4::Search::enabled_staff_search_views, diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index d848188..364c26c 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -145,6 +145,7 @@ foreach my $item (@items){ } else { $item->{'issue'}= 0; } + $item->{nonpublicnote} =~ s|\n|
      |g if $item->{nonpublicnote}; } $template->param(count => $data->{'count'}, subscriptionsnumber => $subscriptionsnumber, diff --git a/circ/returns.pl b/circ/returns.pl index bb5230b..afaf5b2 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -573,6 +573,7 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { $ri{itemcallnumber} = $biblio->{'itemcallnumber'}; $ri{itemtype} = $biblio->{'itemtype'}; $ri{itemnote} = $biblio->{'itemnotes'}; + $ri{nonpublicnote} = $biblio->{'nonpublicnote'}; $ri{ccode} = $biblio->{'ccode'}; $ri{itemnumber} = $biblio->{'itemnumber'}; $ri{barcode} = $bar_code; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e3c6f42..62bbf51 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -761,6 +761,7 @@ CREATE TABLE `deleteditems` ( `enumchron` text default NULL, `copynumber` varchar(32) default NULL, `stocknumber` varchar(32) default NULL, + `nonpublicnote` mediumtext default NULL, `marc` longblob, PRIMARY KEY (`itemnumber`), KEY `delitembarcodeidx` (`barcode`), @@ -1028,6 +1029,7 @@ CREATE TABLE `items` ( `enumchron` text default NULL, `copynumber` varchar(32) default NULL, `stocknumber` varchar(32) default NULL, + `nonpublicnote` mediumtext default NULL, PRIMARY KEY (`itemnumber`), UNIQUE KEY `itembarcodeidx` (`barcode`), KEY `itemstocknumberidx` (`stocknumber`), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9cbc8db..8b65080 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4370,6 +4370,14 @@ 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 items ADD COLUMN nonpublicnote MEDIUMTEXT"); + $dbh->do("ALTER TABLE deleteditems ADD COLUMN nonpublicnote MEDIUMTEXT"); + $dbh->do("UPDATE marc_subfield_structure SET kohafield='items.nonpublicnote' WHERE (kohafield IS NULL OR kohafield = '') AND tagfield='952' AND tagsubfield='x'"); + print "Upgrade to $DBversion done (Make nonpublicnote easier to use)\n"; +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 2ea7091..ec1ba1d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -247,7 +247,8 @@ function verify_images() { [% IF ( itemdata_uri ) %]
      [% END %] [% IF ( itemdata_copynumber ) %][% END %] [% IF ( itemdata_itemnotes ) %][% END %] - [% IF ( SpineLabelShowPrintOnBibDetails ) %][% END %] + [% IF itemdata_nonpublicnote %][% END %] + [% IF ( SpineLabelShowPrintOnBibDetails ) %][% END %] [% FOREACH itemloo IN itemloop %] @@ -370,6 +371,7 @@ function verify_images() { [% END %] [% IF ( itemdata_itemnotes ) %][% END %] + [% IF itemdata_nonpublicnote %][% END %] [% IF ( itemloo.type ) %] [% END %] 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..db251fd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -174,6 +174,7 @@ [% IF ( ITEM_DAT.card2 ) %]
    • Previous Borrower: [% ITEM_DAT.card2 %] 
    • [% END %]
    • Paid for?: [% ITEM_DAT.paidfor %] 
    • Serial enumeration: [% ITEM_DAT.enumchron %] 
    • +
    • Non-public Note: [% ITEM_DAT.nonpublicnote %] 
    • Public Note: [% IF ( CAN_user_editcatalogue_edit_items ) %] 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 9dcb16d..2776948 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -701,7 +701,7 @@ No patron matched [% message %] [% IF ( todayissue.od ) %]
    • - + [% IF ( todayissue.multiple_borrowers ) %][% END %] @@ -773,7 +773,7 @@ No patron matched [% message %] [% IF ( previssue.od ) %] - + @@ -879,7 +879,7 @@ No patron matched [% message %] [% END %] [% IF ( relissue.overdue ) %] - + @@ -899,7 +899,7 @@ No patron matched [% message %] [% IF ( relprevissue.overdue ) %] - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index c02be49..3cab835 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -422,6 +422,7 @@ function Dopop(link) { [% ELSE %]Not checked out[% END %] [% END %] -- 1.7.2.3 From nengard at gmail.com Thu Jul 28 13:46:06 2011 From: nengard at gmail.com (Nicole Engard) Date: Thu, 28 Jul 2011 07:46:06 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 4222 - allow nonpublicnote to be a mapped DB column In-Reply-To: <1311741627-4833-1-git-send-email-nengard@bywatersolutions.com> References: <1311741627-4833-1-git-send-email-nengard@bywatersolutions.com> Message-ID: Oops - ignore this. Updated ticket with one small problem. Nicole On Wed, Jul 27, 2011 at 12:40 AM, Nicole C. Engard wrote: > From: Srdjan Jankovic > > This means that it's possible (and easy) to put non-public notes > (usually 952$x) on a template, same as public notes. It creates a > mapping between the 952$x field and the new database column. > > Note that when this is applied, it will only work on newly saved records. > > It is possible this will need to be altered to allow for UNIMARC etc. if > they use 952 differently. > > Signed-off-by: Nicole C. Engard > --- > ?catalogue/detail.pl ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? 10 +++++++++- > ?catalogue/moredetail.pl ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?1 + > ?circ/returns.pl ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?1 + > ?installer/data/mysql/kohastructure.sql ? ? ? ? ? ? | ? ?2 ++ > ?installer/data/mysql/updatedatabase.pl ? ? ? ? ? ? | ? ?8 ++++++++ > ?.../prog/en/modules/catalogue/detail.tt ? ? ? ? ? ?| ? ?4 +++- > ?.../prog/en/modules/catalogue/moredetail.tt ? ? ? ?| ? ?1 + > ?.../prog/en/modules/circ/circulation.tt ? ? ? ? ? ?| ? ?8 ++++---- > ?.../intranet-tmpl/prog/en/modules/circ/returns.tt ?| ? ?1 + > ?9 files changed, 30 insertions(+), 6 deletions(-) > > diff --git a/catalogue/detail.pl b/catalogue/detail.pl > index 8738737..f8feec5 100755 > --- a/catalogue/detail.pl > +++ b/catalogue/detail.pl > @@ -223,6 +223,13 @@ foreach my $item (@items) { > ? ? ? ? $item->{waitingdate} = format_date($wait_hashref->{waitingdate}); > ? ? } > > + ? ?foreach my $f (qw( itemnotes nonpublicnote )) { > + ? ? ? ?if ($item->{$f}) { > + ? ? ? ? ? ?$item->{$f} =~ s|\n|
      |g; > + ? ? ? ? ? ?$itemfields{$f} = 1; > + ? ? ? ?} > + ? ?} > + > ? ? push @itemloop, $item; > ?} > > @@ -240,7 +247,8 @@ $template->param( > ? ? ? ?itemdata_uri ? ? ? ?=> $itemfields{uri}, > ? ? ? ?itemdata_copynumber => $itemfields{copynumber}, > ? ? ? ?volinfo ? ? ? ? ? ? ? ? ? ? ? ? => $itemfields{enumchron}, > - ? ?itemdata_itemnotes ?=> $itemfields{itemnotes}, > + ? ? ? itemdata_itemnotes ?=> $itemfields{itemnotes}, > + ? ? ? itemdata_nonpublicnote ?=> $itemfields{nonpublicnote}, > ? ? ? ?z3950_search_params ? ? => C4::Search::z3950_search_args($dat), > ? ? holdcount ? ? ? ? ? => $holdcount, > ? ? ? ?C4::Search::enabled_staff_search_views, > diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl > index d848188..364c26c 100755 > --- a/catalogue/moredetail.pl > +++ b/catalogue/moredetail.pl > @@ -145,6 +145,7 @@ foreach my $item (@items){ > ? ? } else { > ? ? ? ? $item->{'issue'}= 0; > ? ? } > + ? ?$item->{nonpublicnote} =~ s|\n|
      |g if $item->{nonpublicnote}; > ?} > ?$template->param(count => $data->{'count'}, > ? ? ? ?subscriptionsnumber => $subscriptionsnumber, > diff --git a/circ/returns.pl b/circ/returns.pl > index bb5230b..afaf5b2 100755 > --- a/circ/returns.pl > +++ b/circ/returns.pl > @@ -573,6 +573,7 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { > ? ? ? ? $ri{itemcallnumber} ? = $biblio->{'itemcallnumber'}; > ? ? ? ? $ri{itemtype} ? ? ? ? = $biblio->{'itemtype'}; > ? ? ? ? $ri{itemnote} ? ? ? ? = $biblio->{'itemnotes'}; > + ? ? ? ?$ri{nonpublicnote} ? ?= $biblio->{'nonpublicnote'}; > ? ? ? ? $ri{ccode} ? ? ? ? ? ?= $biblio->{'ccode'}; > ? ? ? ? $ri{itemnumber} ? ? ? = $biblio->{'itemnumber'}; > ? ? ? ? $ri{barcode} ? ? ? ? ?= $bar_code; > diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql > index e3c6f42..62bbf51 100644 > --- a/installer/data/mysql/kohastructure.sql > +++ b/installer/data/mysql/kohastructure.sql > @@ -761,6 +761,7 @@ CREATE TABLE `deleteditems` ( > ? `enumchron` text default NULL, > ? `copynumber` varchar(32) default NULL, > ? `stocknumber` varchar(32) default NULL, > + ?`nonpublicnote` mediumtext default NULL, > ? `marc` longblob, > ? PRIMARY KEY ?(`itemnumber`), > ? KEY `delitembarcodeidx` (`barcode`), > @@ -1028,6 +1029,7 @@ CREATE TABLE `items` ( > ? `enumchron` text default NULL, > ? `copynumber` varchar(32) default NULL, > ? `stocknumber` varchar(32) default NULL, > + ?`nonpublicnote` mediumtext default NULL, > ? PRIMARY KEY ?(`itemnumber`), > ? UNIQUE KEY `itembarcodeidx` (`barcode`), > ? KEY `itemstocknumberidx` (`stocknumber`), > diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl > index 9cbc8db..8b65080 100755 > --- a/installer/data/mysql/updatedatabase.pl > +++ b/installer/data/mysql/updatedatabase.pl > @@ -4370,6 +4370,14 @@ 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 items ADD COLUMN nonpublicnote MEDIUMTEXT"); > + ? ?$dbh->do("ALTER TABLE deleteditems ADD COLUMN nonpublicnote MEDIUMTEXT"); > + ? ?$dbh->do("UPDATE marc_subfield_structure SET kohafield='items.nonpublicnote' WHERE (kohafield IS NULL OR kohafield = '') AND tagfield='952' AND tagsubfield='x'"); > + ? ?print "Upgrade to $DBversion done (Make nonpublicnote easier to use)\n"; > +} > + > ?=head1 FUNCTIONS > > ?=head2 DropAllForeignKeys($table) > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt > index 2ea7091..ec1ba1d 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt > @@ -247,7 +247,8 @@ function verify_images() { > ? ? ? ? ? ? ? ? [% IF ( itemdata_uri ) %]
      [% END %] > ? ? ? ? ? ? ? ? [% IF ( itemdata_copynumber ) %][% END %] > ? ? ? ? ? ? ? ? [% IF ( itemdata_itemnotes ) %][% END %] > - ? ? ? ? ? ? ? [% IF ( SpineLabelShowPrintOnBibDetails ) %][% END %] > + ? ? ? ? ? ? ? ?[% IF itemdata_nonpublicnote %][% END %] > + ? ? ? ? ? ? ? ?[% IF ( SpineLabelShowPrintOnBibDetails ) %][% END %] > ? ? ? ? ? ? > ? ? ? ? ? ? [% FOREACH itemloo IN itemloop %] > ? ? ? ? ? ? ? ? > @@ -370,6 +371,7 @@ function verify_images() { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[% END %] > ? ? ? ? ? ? ? ? [% IF ( itemdata_itemnotes ) %][% END %] > + ? ? ? ? ? ? ? ?[% IF itemdata_nonpublicnote %][% END %] > ? ? ? ? ? ? ? ? [% IF ( itemloo.type ) %] > ? ? ? ? ? ? ? ? ? ? > ? ? ? ? ? ? ? ? [% END %] > 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..db251fd 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt > @@ -174,6 +174,7 @@ > ? ? ? ? ? ? ? ?[% IF ( ITEM_DAT.card2 ) %]
    • Previous Borrower: [% ITEM_DAT.card2 %] 
    • [% END %] > ? ? ? ? ? ? ? ?
    • Paid for?: [% ITEM_DAT.paidfor %] 
    • > ? ? ? ? ? ?
    • Serial enumeration: [% ITEM_DAT.enumchron %] 
    • > + ? ? ? ? ? ?
    • Non-public Note: [% ITEM_DAT.nonpublicnote %] 
    • > ? ? ? ? ? ?
    • Public Note: > ? ? ? ? ? ? ? ? [% IF ( CAN_user_editcatalogue_edit_items ) %] > ? ? ? ? ? ? ? > 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 9dcb16d..2776948 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt > @@ -701,7 +701,7 @@ No patron matched [% message %] > ? ? ? ? [% IF ( todayissue.od ) %]
    • > - ? ? ? ? > + ? ? ? ? > ? ? ? ? > ? ? ? ? > ? ? ? ? [% IF ( todayissue.multiple_borrowers ) %][% END %] > @@ -773,7 +773,7 @@ No patron matched [% message %] > ? ? ? ? [% IF ( previssue.od ) %] > - ? ? ? ? > + ? ? ? ? > ? ? ? ? > @@ -879,7 +879,7 @@ No patron matched [% message %] > ? ? [% END %] > ? ? ? ? [% IF ( relissue.overdue ) %] > - ? ? ? ? > + ? ? ? ? > ? ? ? ? > ? ? ? ? > ? ? ? ? > @@ -899,7 +899,7 @@ No patron matched [% message %] > ? ? ? ? [% IF ( relprevissue.overdue ) %] > - ? ? ? ? > + ? ? ? ? > ? ? ? ? > ? ? ? ? > ? ? ? ? > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt > index c02be49..3cab835 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt > @@ -422,6 +422,7 @@ function Dopop(link) { > ? ? ? ? ? ? [% ELSE %]Not checked out[% END %] > ? ? ? ? ? ? > ? ? ? ? ? ? > ? ? ? ? [% END %] > -- > 1.7.2.3 > > _______________________________________________ > 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 nengard at bywatersolutions.com Wed Jul 27 06:55:25 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 27 Jul 2011 00:55:25 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6080: Add id to total line in funds table Message-ID: <1311742525-5123-1-git-send-email-nengard@bywatersolutions.com> From: Katrin Fischer Alternate patch for bug 6080. Instead of removing the line altogether make it possible to hide it easily by adding an id. To test: - apply patch - check your funds table for the last line labelled 'Total' - add to IntranetUserCss: #funds_total {display:none;} - check again, line should be hidden now Reason: The totals is only confusing for multi-level funds, but not wrong. If you are using only 1 level of funds, it works all ok. Signed-off-by: Nicole C. Engard --- .../prog/en/modules/acqui/acqui-home.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt index a274365..86650eb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -99,7 +99,7 @@ $(document).ready(function() { - + -- 1.7.2.3 From oleonard at myacpl.org Thu Jul 28 22:15:07 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 28 Jul 2011 16:15:07 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6638, Columns misaligned on serials claims Message-ID: <1311884107-27545-1-git-send-email-oleonard@myacpl.org> T:T variable scope error. Also correcting placement of calendar include in the source to avoid JavaScript error. --- .../prog/en/modules/serials/claims.tt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt index b31cd73..2d4cf10 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt @@ -1,5 +1,4 @@ [% INCLUDE 'doc-head-open.inc' %] -[% INCLUDE 'calendar.inc' %] Koha › Serials › Claims [% INCLUDE 'doc-head-close.inc' %] @@ -145,6 +144,7 @@ //]]> +[% INCLUDE 'calendar.inc' %] [% INCLUDE 'header.inc' %] @@ -281,7 +281,7 @@ [% FOREACH missingissue IN missingissues %] - [% IF ( missingissue.letter ) %] + [% IF ( letter ) %] -- 1.7.3 From ian.walls at bywatersolutions.com Thu Jul 28 22:27:43 2011 From: ian.walls at bywatersolutions.com (Ian Walls) Date: Thu, 28 Jul 2011 16:27:43 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6638, Columns misaligned on serials claims In-Reply-To: <1311884107-27545-1-git-send-email-oleonard@myacpl.org> References: <1311884107-27545-1-git-send-email-oleonard@myacpl.org> Message-ID: Signed off and passed QA. On Thu, Jul 28, 2011 at 4:15 PM, Owen Leonard wrote: > T:T variable scope error. Also correcting placement of calendar > include in the source to avoid JavaScript error. > --- > .../prog/en/modules/serials/claims.tt | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.ttb/koha-tmpl/intranet-tmpl/prog/en/modules/serials/ > claims.tt > index b31cd73..2d4cf10 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt > @@ -1,5 +1,4 @@ > [% INCLUDE 'doc-head-open.inc' %] > -[% INCLUDE 'calendar.inc' %] > Koha › Serials › Claims > [% INCLUDE 'doc-head-close.inc' %] > > @@ -145,6 +144,7 @@ > > //]]> > > +[% INCLUDE 'calendar.inc' %] > > > [% INCLUDE 'header.inc' %] > @@ -281,7 +281,7 @@ > > [% FOREACH missingissue IN missingissues %] > > - [% IF ( missingissue.letter ) %] > + [% IF ( letter ) %] > > -- > 1.7.3 > > _______________________________________________ > 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 lrea at nekls.org Thu Jul 28 23:02:45 2011 From: lrea at nekls.org (Liz Rea) Date: Thu, 28 Jul 2011 16:02:45 -0500 Subject: [Koha-patches] [PATCH 2/2] Bug 6643 -- Able to download patron card batches as an unauthorized user Message-ID: <1311886965-19096-1-git-send-email-lrea@nekls.org> Making sure permissions are checked on label creator --- patroncards/create-pdf.pl | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/patroncards/create-pdf.pl b/patroncards/create-pdf.pl index f063e9b..961dfbf 100755 --- a/patroncards/create-pdf.pl +++ b/patroncards/create-pdf.pl @@ -21,6 +21,7 @@ use strict; use warnings; use CGI; +use C4::Auth; use Graphics::Magick; use XML::Simple; use POSIX qw(ceil); @@ -34,6 +35,16 @@ use C4::Patroncards 1.000000; my $cgi = new CGI; +my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ + template_name => "labels/label-home.tt", + query => $cgi, + type => "intranet", + authnotrequired => 0, + flagsrequired => { tools => 'label_creator' }, + debug => 1, + }); + + my $batch_id = $cgi->param('batch_id') if $cgi->param('batch_id'); my $template_id = $cgi->param('template_id') || undef; my $layout_id = $cgi->param('layout_id') || undef; -- 1.7.2.5 From lrea at nekls.org Thu Jul 28 23:16:44 2011 From: lrea at nekls.org (Liz Rea) Date: Thu, 28 Jul 2011 16:16:44 -0500 Subject: [Koha-patches] [PATCH 12/12] Bug 6641 -- Specially crafted URL can allow unauthorized download of MARC files from staff client Message-ID: <1311887804-19434-1-git-send-email-lrea@nekls.org> Making sure permissions are checked on download of MARC files from staff client --- catalogue/export.pl | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/catalogue/export.pl b/catalogue/export.pl index 9bd49de..3efdb21 100755 --- a/catalogue/export.pl +++ b/catalogue/export.pl @@ -8,9 +8,19 @@ use C4::Auth; use C4::Output; use C4::Biblio; use CGI; -use C4::Auth; + + my $query = new CGI; +my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ + template_name => "tools/export.tt", + query => $query, + type => "intranet", + authnotrequired => 0, + flagsrequired => { tools => 'export_catalog' }, + debug => 1, + }); + my $op=$query->param("op"); my $format=$query->param("format"); if ($op eq "export") { -- 1.7.2.5 From chrisc at catalyst.net.nz Fri Jul 29 00:09:02 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 29 Jul 2011 10:09:02 +1200 Subject: [Koha-patches] [PATCH] Bug 5887 : Adding link for batch modification of biblios Message-ID: <1311890942-19052-1-git-send-email-chrisc@catalyst.net.nz> From: Paul Poulain Rebased for TT by Chris C --- koha-tmpl/intranet-tmpl/prog/en/js/basket.js | 6 ++++++ .../intranet-tmpl/prog/en/modules/basket/basket.tt | 7 +++++++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js index 9946cf7..03dc306 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js @@ -433,4 +433,10 @@ $(document).ready(function(){ if(basketcount){ updateBasket(basketcount); } }); +function batchEdit(){ + var valCookie = readCookie(nameCookie); + var strCookie = nameParam + "=" + valCookie; + var loc = CGIBIN + "tools/batchedit.pl?" + strCookie; + window.opener.location = loc; +} 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..f4f8e4a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt @@ -81,6 +81,13 @@ function placeHold () {
        + [% IF CAN_user_tools_batchedit %] +
      • + + Batch Edit + +
      • + [% END %]
      • [% IF ( verbose ) %]Brief Display[% ELSE %]More Details[% END %] -- 1.7.4.1 From srdjan at catalyst.net.nz Fri Jul 29 06:52:25 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Fri, 29 Jul 2011 16:52:25 +1200 Subject: [Koha-patches] [PATCH 1/1] Bug 4222 - allow nonpublicnote to be a mapped DB column In-Reply-To: References: Message-ID: <1311915145-1895-1-git-send-email-srdjan@catalyst.net.nz> This means that it's possible (and easy) to put non-public notes (usually 952$x) on a template, same as public notes. It creates a mapping between the 952$x field and the new database column. Note that when this is applied, it will only work on newly saved records. It is possible this will need to be altered to allow for UNIMARC etc. if they use 952 differently. --- catalogue/detail.pl | 10 +++++++++- catalogue/moredetail.pl | 1 + circ/returns.pl | 1 + installer/data/mysql/kohastructure.sql | 2 ++ installer/data/mysql/updatedatabase.pl | 8 ++++++++ .../prog/en/modules/catalogue/detail.tt | 4 +++- .../prog/en/modules/catalogue/moredetail.tt | 1 + .../prog/en/modules/circ/circulation.tt | 8 ++++---- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 1 + 9 files changed, 30 insertions(+), 6 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 8738737..f8feec5 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -223,6 +223,13 @@ foreach my $item (@items) { $item->{waitingdate} = format_date($wait_hashref->{waitingdate}); } + foreach my $f (qw( itemnotes nonpublicnote )) { + if ($item->{$f}) { + $item->{$f} =~ s|\n|
        |g; + $itemfields{$f} = 1; + } + } + push @itemloop, $item; } @@ -240,7 +247,8 @@ $template->param( itemdata_uri => $itemfields{uri}, itemdata_copynumber => $itemfields{copynumber}, volinfo => $itemfields{enumchron}, - itemdata_itemnotes => $itemfields{itemnotes}, + itemdata_itemnotes => $itemfields{itemnotes}, + itemdata_nonpublicnote => $itemfields{nonpublicnote}, z3950_search_params => C4::Search::z3950_search_args($dat), holdcount => $holdcount, C4::Search::enabled_staff_search_views, diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index d848188..364c26c 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -145,6 +145,7 @@ foreach my $item (@items){ } else { $item->{'issue'}= 0; } + $item->{nonpublicnote} =~ s|\n|
        |g if $item->{nonpublicnote}; } $template->param(count => $data->{'count'}, subscriptionsnumber => $subscriptionsnumber, diff --git a/circ/returns.pl b/circ/returns.pl index bb5230b..afaf5b2 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -573,6 +573,7 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { $ri{itemcallnumber} = $biblio->{'itemcallnumber'}; $ri{itemtype} = $biblio->{'itemtype'}; $ri{itemnote} = $biblio->{'itemnotes'}; + $ri{nonpublicnote} = $biblio->{'nonpublicnote'}; $ri{ccode} = $biblio->{'ccode'}; $ri{itemnumber} = $biblio->{'itemnumber'}; $ri{barcode} = $bar_code; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e3c6f42..62bbf51 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -761,6 +761,7 @@ CREATE TABLE `deleteditems` ( `enumchron` text default NULL, `copynumber` varchar(32) default NULL, `stocknumber` varchar(32) default NULL, + `nonpublicnote` mediumtext default NULL, `marc` longblob, PRIMARY KEY (`itemnumber`), KEY `delitembarcodeidx` (`barcode`), @@ -1028,6 +1029,7 @@ CREATE TABLE `items` ( `enumchron` text default NULL, `copynumber` varchar(32) default NULL, `stocknumber` varchar(32) default NULL, + `nonpublicnote` mediumtext default NULL, PRIMARY KEY (`itemnumber`), UNIQUE KEY `itembarcodeidx` (`barcode`), KEY `itemstocknumberidx` (`stocknumber`), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9cbc8db..8b65080 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4370,6 +4370,14 @@ 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 items ADD COLUMN nonpublicnote MEDIUMTEXT"); + $dbh->do("ALTER TABLE deleteditems ADD COLUMN nonpublicnote MEDIUMTEXT"); + $dbh->do("UPDATE marc_subfield_structure SET kohafield='items.nonpublicnote' WHERE (kohafield IS NULL OR kohafield = '') AND tagfield='952' AND tagsubfield='x'"); + print "Upgrade to $DBversion done (Make nonpublicnote easier to use)\n"; +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 2ea7091..ec1ba1d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -247,7 +247,8 @@ function verify_images() { [% IF ( itemdata_uri ) %]
      [% END %] [% IF ( itemdata_copynumber ) %][% END %] [% IF ( itemdata_itemnotes ) %][% END %] - [% IF ( SpineLabelShowPrintOnBibDetails ) %][% END %] + [% IF itemdata_nonpublicnote %][% END %] + [% IF ( SpineLabelShowPrintOnBibDetails ) %][% END %] [% FOREACH itemloo IN itemloop %] @@ -370,6 +371,7 @@ function verify_images() { [% END %] [% IF ( itemdata_itemnotes ) %][% END %] + [% IF itemdata_nonpublicnote %][% END %] [% IF ( itemloo.type ) %] [% END %] 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..e9d483d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -174,6 +174,7 @@ [% IF ( ITEM_DAT.card2 ) %]
    • Previous Borrower: [% ITEM_DAT.card2 %] 
    • [% END %]
    • Paid for?: [% ITEM_DAT.paidfor %] 
    • Serial enumeration: [% ITEM_DAT.enumchron %] 
    • + [% IF ITEM_DAT.nonpublicnote %]
    • Non-public Note: [% ITEM_DAT.nonpublicnote %] 
    • [% END %]
    • Public Note: [% IF ( CAN_user_editcatalogue_edit_items ) %] 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 9dcb16d..2776948 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -701,7 +701,7 @@ No patron matched [% message %] [% IF ( todayissue.od ) %]
    • - + [% IF ( todayissue.multiple_borrowers ) %][% END %] @@ -773,7 +773,7 @@ No patron matched [% message %] [% IF ( previssue.od ) %] - + @@ -879,7 +879,7 @@ No patron matched [% message %] [% END %] [% IF ( relissue.overdue ) %] - + @@ -899,7 +899,7 @@ No patron matched [% message %] [% IF ( relprevissue.overdue ) %] - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index c02be49..3cab835 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -422,6 +422,7 @@ function Dopop(link) { [% ELSE %]Not checked out[% END %] [% END %] -- 1.6.5 From srdjan at catalyst.net.nz Fri Jul 29 07:09:12 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Fri, 29 Jul 2011 17:09:12 +1200 Subject: [Koha-patches] [PATCH 1/1] Bug 4222 - allow nonpublicnote to be a mapped DB column In-Reply-To: References: Message-ID: <1311916152-10138-1-git-send-email-srdjan@catalyst.net.nz> This means that it's possible (and easy) to put non-public notes (usually 952$x) on a template, same as public notes. It creates a mapping between the 952$x field and the new database column. Note that when this is applied, it will only work on newly saved records. It is possible this will need to be altered to allow for UNIMARC etc. if they use 952 differently. --- catalogue/detail.pl | 10 +++++++++- catalogue/moredetail.pl | 1 + circ/returns.pl | 1 + installer/data/mysql/kohastructure.sql | 2 ++ installer/data/mysql/updatedatabase.pl | 8 ++++++++ .../prog/en/modules/catalogue/detail.tt | 4 +++- .../prog/en/modules/catalogue/moredetail.tt | 1 + .../prog/en/modules/circ/circulation.tt | 8 ++++---- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 1 + 9 files changed, 30 insertions(+), 6 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 8738737..f8feec5 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -223,6 +223,13 @@ foreach my $item (@items) { $item->{waitingdate} = format_date($wait_hashref->{waitingdate}); } + foreach my $f (qw( itemnotes nonpublicnote )) { + if ($item->{$f}) { + $item->{$f} =~ s|\n|
      |g; + $itemfields{$f} = 1; + } + } + push @itemloop, $item; } @@ -240,7 +247,8 @@ $template->param( itemdata_uri => $itemfields{uri}, itemdata_copynumber => $itemfields{copynumber}, volinfo => $itemfields{enumchron}, - itemdata_itemnotes => $itemfields{itemnotes}, + itemdata_itemnotes => $itemfields{itemnotes}, + itemdata_nonpublicnote => $itemfields{nonpublicnote}, z3950_search_params => C4::Search::z3950_search_args($dat), holdcount => $holdcount, C4::Search::enabled_staff_search_views, diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index d848188..364c26c 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -145,6 +145,7 @@ foreach my $item (@items){ } else { $item->{'issue'}= 0; } + $item->{nonpublicnote} =~ s|\n|
      |g if $item->{nonpublicnote}; } $template->param(count => $data->{'count'}, subscriptionsnumber => $subscriptionsnumber, diff --git a/circ/returns.pl b/circ/returns.pl index bb5230b..afaf5b2 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -573,6 +573,7 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { $ri{itemcallnumber} = $biblio->{'itemcallnumber'}; $ri{itemtype} = $biblio->{'itemtype'}; $ri{itemnote} = $biblio->{'itemnotes'}; + $ri{nonpublicnote} = $biblio->{'nonpublicnote'}; $ri{ccode} = $biblio->{'ccode'}; $ri{itemnumber} = $biblio->{'itemnumber'}; $ri{barcode} = $bar_code; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e3c6f42..62bbf51 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -761,6 +761,7 @@ CREATE TABLE `deleteditems` ( `enumchron` text default NULL, `copynumber` varchar(32) default NULL, `stocknumber` varchar(32) default NULL, + `nonpublicnote` mediumtext default NULL, `marc` longblob, PRIMARY KEY (`itemnumber`), KEY `delitembarcodeidx` (`barcode`), @@ -1028,6 +1029,7 @@ CREATE TABLE `items` ( `enumchron` text default NULL, `copynumber` varchar(32) default NULL, `stocknumber` varchar(32) default NULL, + `nonpublicnote` mediumtext default NULL, PRIMARY KEY (`itemnumber`), UNIQUE KEY `itembarcodeidx` (`barcode`), KEY `itemstocknumberidx` (`stocknumber`), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9cbc8db..8b65080 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4370,6 +4370,14 @@ 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 items ADD COLUMN nonpublicnote MEDIUMTEXT"); + $dbh->do("ALTER TABLE deleteditems ADD COLUMN nonpublicnote MEDIUMTEXT"); + $dbh->do("UPDATE marc_subfield_structure SET kohafield='items.nonpublicnote' WHERE (kohafield IS NULL OR kohafield = '') AND tagfield='952' AND tagsubfield='x'"); + print "Upgrade to $DBversion done (Make nonpublicnote easier to use)\n"; +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 2ea7091..d374e3c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -247,7 +247,8 @@ function verify_images() { [% IF ( itemdata_uri ) %]
      [% END %] [% IF ( itemdata_copynumber ) %][% END %] [% IF ( itemdata_itemnotes ) %][% END %] - [% IF ( SpineLabelShowPrintOnBibDetails ) %][% END %] + [% IF itemdata_nonpublicnote %][% END %] + [% IF ( SpineLabelShowPrintOnBibDetails ) %][% END %] [% FOREACH itemloo IN itemloop %] @@ -370,6 +371,7 @@ function verify_images() { [% END %] [% IF ( itemdata_itemnotes ) %][% END %] + [% IF itemdata_nonpublicnote %][% END %] [% IF ( itemloo.type ) %] [% END %] 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..e9d483d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -174,6 +174,7 @@ [% IF ( ITEM_DAT.card2 ) %]
    • Previous Borrower: [% ITEM_DAT.card2 %] 
    • [% END %]
    • Paid for?: [% ITEM_DAT.paidfor %] 
    • Serial enumeration: [% ITEM_DAT.enumchron %] 
    • + [% IF ITEM_DAT.nonpublicnote %]
    • Non-public Note: [% ITEM_DAT.nonpublicnote %] 
    • [% END %]
    • Public Note: [% IF ( CAN_user_editcatalogue_edit_items ) %] 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 9dcb16d..2776948 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -701,7 +701,7 @@ No patron matched [% message %] [% IF ( todayissue.od ) %]
    • - + [% IF ( todayissue.multiple_borrowers ) %][% END %] @@ -773,7 +773,7 @@ No patron matched [% message %] [% IF ( previssue.od ) %] - + @@ -879,7 +879,7 @@ No patron matched [% message %] [% END %] [% IF ( relissue.overdue ) %] - + @@ -899,7 +899,7 @@ No patron matched [% message %] [% IF ( relprevissue.overdue ) %] - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index c02be49..3cab835 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -422,6 +422,7 @@ function Dopop(link) { [% ELSE %]Not checked out[% END %] [% END %] -- 1.6.5 From oleonard at myacpl.org Fri Jul 29 15:05:49 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 29 Jul 2011 09:05:49 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6635, Can't page through results in label batch Message-ID: <1311944749-28990-1-git-send-email-oleonard@myacpl.org> - Fixing T:T scope issue - Correcting footer include for pop-up windows. - Markup correction for validity. --- .../intranet-tmpl/prog/en/modules/labels/result.tt | 4 ++-- .../intranet-tmpl/prog/en/modules/labels/search.tt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt index 4513a25..f8d7286 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt @@ -52,7 +52,7 @@ << [% END %] [% FOREACH number IN numbers %] - [% number.number %] + [% number.number %] [% END %] [% IF ( displaynext ) %] >> @@ -127,4 +127,4 @@

      [% END %] - [% INCLUDE 'intranet-bottom.inc' %] + [% INCLUDE 'popup-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt index 7aeac7f..1cd7aef 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt @@ -124,4 +124,5 @@ to add to Batch [% batch_id %]
      Cancel
      -[% INCLUDE 'intranet-bottom.inc' %] + +[% INCLUDE 'popup-bottom.inc' %] -- 1.7.3 From robin at catalyst.net.nz Sun Jul 31 04:29:48 2011 From: robin at catalyst.net.nz (Robin Sheat) Date: Sun, 31 Jul 2011 14:29:48 +1200 Subject: [Koha-patches] [PATCH] Bug 6651 - fix splitting of names when updating to 3.4 Message-ID: <1312079388-9875-1-git-send-email-robin@catalyst.net.nz> This affects only koha package installations that have multiple instances running. After this patch, it's worth running the upgrade again to ensure that everything happened correctly the first time. --- debian/scripts/koha-upgrade-to-3.4 | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/debian/scripts/koha-upgrade-to-3.4 b/debian/scripts/koha-upgrade-to-3.4 index 45650c1..190d841 100755 --- a/debian/scripts/koha-upgrade-to-3.4 +++ b/debian/scripts/koha-upgrade-to-3.4 @@ -37,7 +37,7 @@ Koha will be upgraded for the following instances: $TO_UPGRADE This may take some time to run. Go make a coffee. EOH -for name in "$TO_UPGRADE" +for name in $TO_UPGRADE do echo "Upgrading $name..." sudo -u "$name-koha" -H \ -- 1.7.4.1 From bogus@does.not.exist.com Fri Jul 29 16:50:56 2011 From: bogus@does.not.exist.com () Date: Fri, 29 Jul 2011 14:50:56 -0000 Subject: No subject Message-ID: Select an item to edit Edit the item as you see fit Verify that all values are saved in correct fields, and your changes are correct. (they are) Verify that you cannot set 'lost' status from the edit item interface. (You cannot) longoverdue.pl backdate an item so it will be long overdue run longoverdue.pl to set your item as long overdue. verify that the item is not removed from the patron's checked out items. Long Overdue does not charge the patron for the replacement. --- C4/Accounts.pm | 77 ++++++++------------------- C4/Circulation.pm | 40 ++++++++++++++- C4/Items.pm | 8 +++- catalogue/updateitem.pl | 3 +- cataloguing/additem.pl | 38 ++++++++----- 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, 100 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 520c116..589b5c5 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 bc36dd1..9e7167d 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..345d0c8 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==1) ; print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber"); diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 0db2d2d..4b99654 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -26,6 +26,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 @@ -206,28 +207,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'}; @@ -498,7 +504,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"; @@ -608,6 +614,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 9d4431b..a7848b9 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 @@ -173,7 +174,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} == 1; + } + }; } } $i++; -- 1.7.2.5
      Avail
      Total  Status Last seen BarcodePublic NoteNon-public NotePublication DetailsurlCopy No. [% itemloo.datelastseen %] [% itemloo.barcode %][% itemdata_itemnotes %][% itemdata_nonpublicnote %] [% IF ( itemdata_enumchron ) %] [% IF ( itemloo.enumchron ) %] 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..db251fd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -174,6 +174,7 @@ [% IF ( ITEM_DAT.card2 ) %]
    • Previous Borrower: [% ITEM_DAT.card2 %] 
    • [% END %]
    • Paid for?: [% ITEM_DAT.paidfor %] 
    • Serial enumeration: [% ITEM_DAT.enumchron %] 
    • +
    • Non-public Note: [% ITEM_DAT.nonpublicnote %] 
    • Public Note: [% IF ( CAN_user_editcatalogue_edit_items ) %]
      -- 1.6.5 From srdjan at catalyst.net.nz Thu Jul 28 07:46:10 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Thu, 28 Jul 2011 17:46:10 +1200 Subject: [Koha-patches] [PATCH 1/1] Bug 4222 - allow nonpublicnote to be a mapped DB column In-Reply-To: References: Message-ID: <1311831970-10326-1-git-send-email-srdjan@catalyst.net.nz> This means that it's possible (and easy) to put non-public notes (usually 952$x) on a template, same as public notes. It creates a mapping between the 952$x field and the new database column. Note that when this is applied, it will only work on newly saved records. It is possible this will need to be altered to allow for UNIMARC etc. if they use 952 differently. --- catalogue/detail.pl | 10 +++++++++- catalogue/moredetail.pl | 1 + circ/returns.pl | 1 + installer/data/mysql/kohastructure.sql | 2 ++ installer/data/mysql/updatedatabase.pl | 8 ++++++++ .../prog/en/modules/catalogue/detail.tt | 4 +++- .../prog/en/modules/catalogue/moredetail.tt | 1 + .../prog/en/modules/circ/circulation.tt | 8 ++++---- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 1 + 9 files changed, 30 insertions(+), 6 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 8738737..f8feec5 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -223,6 +223,13 @@ foreach my $item (@items) { $item->{waitingdate} = format_date($wait_hashref->{waitingdate}); } + foreach my $f (qw( itemnotes nonpublicnote )) { + if ($item->{$f}) { + $item->{$f} =~ s|\n|
      |g; + $itemfields{$f} = 1; + } + } + push @itemloop, $item; } @@ -240,7 +247,8 @@ $template->param( itemdata_uri => $itemfields{uri}, itemdata_copynumber => $itemfields{copynumber}, volinfo => $itemfields{enumchron}, - itemdata_itemnotes => $itemfields{itemnotes}, + itemdata_itemnotes => $itemfields{itemnotes}, + itemdata_nonpublicnote => $itemfields{nonpublicnote}, z3950_search_params => C4::Search::z3950_search_args($dat), holdcount => $holdcount, C4::Search::enabled_staff_search_views, diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index d848188..364c26c 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -145,6 +145,7 @@ foreach my $item (@items){ } else { $item->{'issue'}= 0; } + $item->{nonpublicnote} =~ s|\n|
      |g if $item->{nonpublicnote}; } $template->param(count => $data->{'count'}, subscriptionsnumber => $subscriptionsnumber, diff --git a/circ/returns.pl b/circ/returns.pl index bb5230b..afaf5b2 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -573,6 +573,7 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { $ri{itemcallnumber} = $biblio->{'itemcallnumber'}; $ri{itemtype} = $biblio->{'itemtype'}; $ri{itemnote} = $biblio->{'itemnotes'}; + $ri{nonpublicnote} = $biblio->{'nonpublicnote'}; $ri{ccode} = $biblio->{'ccode'}; $ri{itemnumber} = $biblio->{'itemnumber'}; $ri{barcode} = $bar_code; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e3c6f42..62bbf51 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -761,6 +761,7 @@ CREATE TABLE `deleteditems` ( `enumchron` text default NULL, `copynumber` varchar(32) default NULL, `stocknumber` varchar(32) default NULL, + `nonpublicnote` mediumtext default NULL, `marc` longblob, PRIMARY KEY (`itemnumber`), KEY `delitembarcodeidx` (`barcode`), @@ -1028,6 +1029,7 @@ CREATE TABLE `items` ( `enumchron` text default NULL, `copynumber` varchar(32) default NULL, `stocknumber` varchar(32) default NULL, + `nonpublicnote` mediumtext default NULL, PRIMARY KEY (`itemnumber`), UNIQUE KEY `itembarcodeidx` (`barcode`), KEY `itemstocknumberidx` (`stocknumber`), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9cbc8db..8b65080 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4370,6 +4370,14 @@ 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 items ADD COLUMN nonpublicnote MEDIUMTEXT"); + $dbh->do("ALTER TABLE deleteditems ADD COLUMN nonpublicnote MEDIUMTEXT"); + $dbh->do("UPDATE marc_subfield_structure SET kohafield='items.nonpublicnote' WHERE (kohafield IS NULL OR kohafield = '') AND tagfield='952' AND tagsubfield='x'"); + print "Upgrade to $DBversion done (Make nonpublicnote easier to use)\n"; +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 2ea7091..ec1ba1d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -247,7 +247,8 @@ function verify_images() { [% IF ( itemdata_uri ) %]
    • urlCopy No.Public notesSpine LabelNon-public NoteSpine Label
      [% itemloo.copynumber %]
      [% itemloo.itemnotes %]
      [% itemdata_nonpublicnote %]Fix Itemtype [% ELSE %][% END %] [% todayissue.dd %] [% todayissue.title |html %][% IF ( todayissue.author ) %], by [% todayissue.author %][% END %][% IF ( todayissue.itemnotes ) %]- [% todayissue.itemnotes %][% END %] [% todayissue.barcode %][% todayissue.title |html %][% IF ( todayissue.author ) %], by [% todayissue.author %][% END %][% IF ( todayissue.itemnotes ) %]- [% todayissue.itemnotes %][% END %][% IF ( todayissue.nonpublicnote ) %]- [% todayissue.nonpublicnote %][% END %] [% todayissue.barcode %] [% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %][% END %][% END %][% todayissue.itemtype %] [% todayissue.checkoutdate %][% todayissue.borrowername %][% ELSE %][% END %] [% previssue.dd %] [% previssue.title |html %][% IF ( previssue.author ) %], by [% previssue.author %][% END %] [% IF ( previssue.itemnotes ) %]- [% previssue.itemnotes %][% END %] [% previssue.barcode %][% previssue.title |html %][% IF ( previssue.author ) %], by [% previssue.author %][% END %] [% IF ( previssue.itemnotes ) %]- [% previssue.itemnotes %][% END %][% IF ( previssue.nonpublicnote ) %]- [% previssue.nonpublicnote %][% END %] [% previssue.barcode %] [% previssue.itemtype %] [% ELSE %][% END %] [% relissue.dd %][% relissue.title |html %][% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- [% relissue.itemnotes %][% END %] [% relissue.barcode %][% relissue.title |html %][% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- [% relissue.itemnotes %][% END %][% IF ( relissue.nonpublicnote ) %]- [% relissue.nonpublicnote %][% END %] [% relissue.barcode %] [% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %][% END %][% END %][% relissue.itemtype %] [% relissue.displaydate %] [% relissue.itemcallnumber %][% ELSE %][% END %] [% relprevissue.dd %] [% relprevissue.title |html %][% IF ( relprevissue.author ) %], by [% relprevissue.author %][% END %] [% IF ( relprevissue.itemnotes ) %]- [% relprevissue.itemnotes %][% END %] [% relprevissue.barcode %][% relprevissue.title |html %][% IF ( relprevissue.author ) %], by [% relprevissue.author %][% END %] [% IF ( relprevissue.itemnotes ) %]- [% relprevissue.itemnotes %][% END %][% IF ( relprevissue.nonpublicnote ) %] - [% relprevissue.nonpublicnote %][% END %] [% relprevissue.barcode %] [% UNLESS noItemTypeImages %][% IF relprevissue.itemtype_image %][% END %][% END %][% relprevissue.itemtype %] [% relprevissue.displaydate %] [% relprevissue.itemcallnumber %] [% IF ( riloo.bornote ) %][% riloo.bornote %]
      [% END %] [% IF ( riloo.itemnote ) %][% riloo.itemnote %][% END %] + [% IF ( riloo.nonpublicnote ) %][% riloo.nonpublicnote %][% END %]
      urlCopy No.Public notesSpine LabelNon-public NoteSpine Label
      [% itemloo.copynumber %]
      [% itemloo.itemnotes %]
      [% itemdata_nonpublicnote %]Fix Itemtype [% ELSE %][% END %] [% todayissue.dd %] [% todayissue.title |html %][% IF ( todayissue.author ) %], by [% todayissue.author %][% END %][% IF ( todayissue.itemnotes ) %]- [% todayissue.itemnotes %][% END %] [% todayissue.barcode %][% todayissue.title |html %][% IF ( todayissue.author ) %], by [% todayissue.author %][% END %][% IF ( todayissue.itemnotes ) %]- [% todayissue.itemnotes %][% END %][% IF ( todayissue.nonpublicnote ) %]- [% todayissue.nonpublicnote %][% END %] [% todayissue.barcode %] [% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %][% END %][% END %][% todayissue.itemtype %] [% todayissue.checkoutdate %][% todayissue.borrowername %][% ELSE %][% END %] [% previssue.dd %] [% previssue.title |html %][% IF ( previssue.author ) %], by [% previssue.author %][% END %] [% IF ( previssue.itemnotes ) %]- [% previssue.itemnotes %][% END %] [% previssue.barcode %][% previssue.title |html %][% IF ( previssue.author ) %], by [% previssue.author %][% END %] [% IF ( previssue.itemnotes ) %]- [% previssue.itemnotes %][% END %][% IF ( previssue.nonpublicnote ) %]- [% previssue.nonpublicnote %][% END %] [% previssue.barcode %] [% previssue.itemtype %] [% ELSE %][% END %] [% relissue.dd %][% relissue.title |html %][% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- [% relissue.itemnotes %][% END %] [% relissue.barcode %][% relissue.title |html %][% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- [% relissue.itemnotes %][% END %][% IF ( relissue.nonpublicnote ) %]- [% relissue.nonpublicnote %][% END %] [% relissue.barcode %] [% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %][% END %][% END %][% relissue.itemtype %] [% relissue.displaydate %] [% relissue.itemcallnumber %][% ELSE %][% END %] [% relprevissue.dd %] [% relprevissue.title |html %][% IF ( relprevissue.author ) %], by [% relprevissue.author %][% END %] [% IF ( relprevissue.itemnotes ) %]- [% relprevissue.itemnotes %][% END %] [% relprevissue.barcode %][% relprevissue.title |html %][% IF ( relprevissue.author ) %], by [% relprevissue.author %][% END %] [% IF ( relprevissue.itemnotes ) %]- [% relprevissue.itemnotes %][% END %][% IF ( relprevissue.nonpublicnote ) %] - [% relprevissue.nonpublicnote %][% END %] [% relprevissue.barcode %] [% UNLESS noItemTypeImages %][% IF relprevissue.itemtype_image %][% END %][% END %][% relprevissue.itemtype %] [% relprevissue.displaydate %] [% relprevissue.itemcallnumber %] [% IF ( riloo.bornote ) %][% riloo.bornote %]
      [% END %] [% IF ( riloo.itemnote ) %][% riloo.itemnote %][% END %] + [% IF ( riloo.nonpublicnote ) %][% riloo.nonpublicnote %][% END %]
      urlCopy No.Public notesSpine LabelNon-public NoteSpine Label
      [% itemloo.copynumber %]
      [% itemloo.itemnotes %]
      [% itemdata_nonpublicnote %]Fix Itemtype[% ELSE %][% END %] > ? ? ? ? [% todayissue.dd %] > ? ? ? ? [% todayissue.title |html %][% IF ( todayissue.author ) %], by [% todayissue.author %][% END %][% IF ( todayissue.itemnotes ) %]- [% todayissue.itemnotes %][% END %] [% todayissue.barcode %][% todayissue.title |html %][% IF ( todayissue.author ) %], by [% todayissue.author %][% END %][% IF ( todayissue.itemnotes ) %]- [% todayissue.itemnotes %][% END %][% IF ( todayissue.nonpublicnote ) %]- [% todayissue.nonpublicnote %][% END %] [% todayissue.barcode %][% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %][% END %][% END %][% todayissue.itemtype %][% todayissue.checkoutdate %][% todayissue.borrowername %][% ELSE %][% END %] > ? ? ? ? [% previssue.dd %] > ? ? ? ? [% previssue.title |html %][% IF ( previssue.author ) %], by [% previssue.author %][% END %] [% IF ( previssue.itemnotes ) %]- [% previssue.itemnotes %][% END %] [% previssue.barcode %][% previssue.title |html %][% IF ( previssue.author ) %], by [% previssue.author %][% END %] [% IF ( previssue.itemnotes ) %]- [% previssue.itemnotes %][% END %][% IF ( previssue.nonpublicnote ) %]- [% previssue.nonpublicnote %][% END %] [% previssue.barcode %] > ? ? ? ? ? ? [% previssue.itemtype %] > ? ? ? ? [% ELSE %][% END %] > ? ? ? ? ? ? [% relissue.dd %][% relissue.title |html %][% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- [% relissue.itemnotes %][% END %] [% relissue.barcode %][% relissue.title |html %][% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- [% relissue.itemnotes %][% END %][% IF ( relissue.nonpublicnote ) %]- [% relissue.nonpublicnote %][% END %] [% relissue.barcode %][% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %][% END %][% END %][% relissue.itemtype %][% relissue.displaydate %][% relissue.itemcallnumber %][% ELSE %][% END %] > ? ? ? ? [% relprevissue.dd %] > ? ? ? ? [% relprevissue.title |html %][% IF ( relprevissue.author ) %], by [% relprevissue.author %][% END %] [% IF ( relprevissue.itemnotes ) %]- [% relprevissue.itemnotes %][% END %] [% relprevissue.barcode %][% relprevissue.title |html %][% IF ( relprevissue.author ) %], by [% relprevissue.author %][% END %] [% IF ( relprevissue.itemnotes ) %]- [% relprevissue.itemnotes %][% END %][% IF ( relprevissue.nonpublicnote ) %] - [% relprevissue.nonpublicnote %][% END %] [% relprevissue.barcode %][% UNLESS noItemTypeImages %][% IF relprevissue.itemtype_image %][% END %][% END %][% relprevissue.itemtype %][% relprevissue.displaydate %][% relprevissue.itemcallnumber %][% IF ( riloo.bornote ) %][% riloo.bornote %]
      [% END %] > ? ? ? ? ? ? [% IF ( riloo.itemnote ) %][% riloo.itemnote %][% END %] > + ? ? ? ? ? ?[% IF ( riloo.nonpublicnote ) %][% riloo.nonpublicnote %][% END %] > ? ? ? ? ? ?
      Avail
      Total  
      > > urlCopy No.Public notesSpine LabelNon-public NoteSpine Label
      [% itemloo.copynumber %]
      [% itemloo.itemnotes %]
      [% itemdata_nonpublicnote %]Fix Itemtype [% ELSE %][% END %] [% todayissue.dd %] [% todayissue.title |html %][% IF ( todayissue.author ) %], by [% todayissue.author %][% END %][% IF ( todayissue.itemnotes ) %]- [% todayissue.itemnotes %][% END %] [% todayissue.barcode %][% todayissue.title |html %][% IF ( todayissue.author ) %], by [% todayissue.author %][% END %][% IF ( todayissue.itemnotes ) %]- [% todayissue.itemnotes %][% END %][% IF ( todayissue.nonpublicnote ) %]- [% todayissue.nonpublicnote %][% END %] [% todayissue.barcode %] [% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %][% END %][% END %][% todayissue.itemtype %] [% todayissue.checkoutdate %][% todayissue.borrowername %][% ELSE %][% END %] [% previssue.dd %] [% previssue.title |html %][% IF ( previssue.author ) %], by [% previssue.author %][% END %] [% IF ( previssue.itemnotes ) %]- [% previssue.itemnotes %][% END %] [% previssue.barcode %][% previssue.title |html %][% IF ( previssue.author ) %], by [% previssue.author %][% END %] [% IF ( previssue.itemnotes ) %]- [% previssue.itemnotes %][% END %][% IF ( previssue.nonpublicnote ) %]- [% previssue.nonpublicnote %][% END %] [% previssue.barcode %] [% previssue.itemtype %] [% ELSE %][% END %] [% relissue.dd %][% relissue.title |html %][% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- [% relissue.itemnotes %][% END %] [% relissue.barcode %][% relissue.title |html %][% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- [% relissue.itemnotes %][% END %][% IF ( relissue.nonpublicnote ) %]- [% relissue.nonpublicnote %][% END %] [% relissue.barcode %] [% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %][% END %][% END %][% relissue.itemtype %] [% relissue.displaydate %] [% relissue.itemcallnumber %][% ELSE %][% END %] [% relprevissue.dd %] [% relprevissue.title |html %][% IF ( relprevissue.author ) %], by [% relprevissue.author %][% END %] [% IF ( relprevissue.itemnotes ) %]- [% relprevissue.itemnotes %][% END %] [% relprevissue.barcode %][% relprevissue.title |html %][% IF ( relprevissue.author ) %], by [% relprevissue.author %][% END %] [% IF ( relprevissue.itemnotes ) %]- [% relprevissue.itemnotes %][% END %][% IF ( relprevissue.nonpublicnote ) %] - [% relprevissue.nonpublicnote %][% END %] [% relprevissue.barcode %] [% UNLESS noItemTypeImages %][% IF relprevissue.itemtype_image %][% END %][% END %][% relprevissue.itemtype %] [% relprevissue.displaydate %] [% relprevissue.itemcallnumber %] [% IF ( riloo.bornote ) %][% riloo.bornote %]
      [% END %] [% IF ( riloo.itemnote ) %][% riloo.itemnote %][% END %] + [% IF ( riloo.nonpublicnote ) %][% riloo.nonpublicnote %][% END %]
      urlCopy No.Public notesSpine LabelNon-public NoteSpine Label
      [% itemloo.copynumber %]
      [% itemloo.itemnotes %]
      [% itemloo.nonpublicnote %]Fix Itemtype [% ELSE %][% END %] [% todayissue.dd %] [% todayissue.title |html %][% IF ( todayissue.author ) %], by [% todayissue.author %][% END %][% IF ( todayissue.itemnotes ) %]- [% todayissue.itemnotes %][% END %] [% todayissue.barcode %][% todayissue.title |html %][% IF ( todayissue.author ) %], by [% todayissue.author %][% END %][% IF ( todayissue.itemnotes ) %]- [% todayissue.itemnotes %][% END %][% IF ( todayissue.nonpublicnote ) %]- [% todayissue.nonpublicnote %][% END %] [% todayissue.barcode %] [% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %][% END %][% END %][% todayissue.itemtype %] [% todayissue.checkoutdate %][% todayissue.borrowername %][% ELSE %][% END %] [% previssue.dd %] [% previssue.title |html %][% IF ( previssue.author ) %], by [% previssue.author %][% END %] [% IF ( previssue.itemnotes ) %]- [% previssue.itemnotes %][% END %] [% previssue.barcode %][% previssue.title |html %][% IF ( previssue.author ) %], by [% previssue.author %][% END %] [% IF ( previssue.itemnotes ) %]- [% previssue.itemnotes %][% END %][% IF ( previssue.nonpublicnote ) %]- [% previssue.nonpublicnote %][% END %] [% previssue.barcode %] [% previssue.itemtype %] [% ELSE %][% END %] [% relissue.dd %][% relissue.title |html %][% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- [% relissue.itemnotes %][% END %] [% relissue.barcode %][% relissue.title |html %][% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- [% relissue.itemnotes %][% END %][% IF ( relissue.nonpublicnote ) %]- [% relissue.nonpublicnote %][% END %] [% relissue.barcode %] [% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %][% END %][% END %][% relissue.itemtype %] [% relissue.displaydate %] [% relissue.itemcallnumber %][% ELSE %][% END %] [% relprevissue.dd %] [% relprevissue.title |html %][% IF ( relprevissue.author ) %], by [% relprevissue.author %][% END %] [% IF ( relprevissue.itemnotes ) %]- [% relprevissue.itemnotes %][% END %] [% relprevissue.barcode %][% relprevissue.title |html %][% IF ( relprevissue.author ) %], by [% relprevissue.author %][% END %] [% IF ( relprevissue.itemnotes ) %]- [% relprevissue.itemnotes %][% END %][% IF ( relprevissue.nonpublicnote ) %] - [% relprevissue.nonpublicnote %][% END %] [% relprevissue.barcode %] [% UNLESS noItemTypeImages %][% IF relprevissue.itemtype_image %][% END %][% END %][% relprevissue.itemtype %] [% relprevissue.displaydate %] [% relprevissue.itemcallnumber %] [% IF ( riloo.bornote ) %][% riloo.bornote %]
      [% END %] [% IF ( riloo.itemnote ) %][% riloo.itemnote %][% END %] + [% IF ( riloo.nonpublicnote ) %][% riloo.nonpublicnote %][% END %]