From oleonard at myacpl.org Wed May 1 20:59:15 2013 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 1 May 2013 14:59:15 -0400 Subject: [Koha-patches] [PATCH] Bug 10166 - Can't place holds on multiple titles if one or more are un-holdable Message-ID: <1367434755-10519-1-git-send-email-oleonard@myacpl.org> opac-reserve.pl tries to check whether all selected titles in a multiple-hold batch are unavailable to be placed on hold. However, the logic is flawed in such a way that if the last item in the batch cannot be placed on hold the script assumes none can be placed on hold. This patch modifies the way the script tracks the "no titles available for holds" variable in order to correct the error. To test, place multiple holds by selecting titles from a list of search results. Test three conditions: - All titles are available to be placed on hold You should see no onscreen warnings, and all titles should be selectable on the place hold screen. A "Place hold" button should appear at the bottom. - Some titles can be placed on hold, some cannot The titles which can be placed on hold should be selectable. Titles which cannot be placed on hold should show a warning message. A "Place hold" button should appear at the bottom. - No titles can be placed on hold "Sorry, none of these items can be placed on hold." should appear at the top of the page. All titles should appear with warning messages. There should be no "Place hold" button. --- opac/opac-reserve.pl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index e725d30..c6e05f5 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -349,7 +349,7 @@ my $notforloan_label_of = get_notforloan_label_of(); my $biblioLoop = []; my $numBibsAvailable = 0; my $itemdata_enumchron = 0; -my $anyholdable; +my $anyholdable = 0; my $itemLevelTypes = C4::Context->preference('item-level_itypes'); $template->param('item_level_itypes' => $itemLevelTypes); @@ -526,26 +526,24 @@ foreach my $biblioNum (@biblionumbers) { $numBibsAvailable++; $biblioLoopIter{bib_available} = 1; $biblioLoopIter{holdable} = 1; - $anyholdable = 1; } if ($biblioLoopIter{already_reserved}) { $biblioLoopIter{holdable} = undef; - $anyholdable = undef; } if(not CanBookBeReserved($borrowernumber,$biblioNum)){ $biblioLoopIter{holdable} = undef; - $anyholdable = undef; } if(not C4::Context->preference('AllowHoldsOnPatronsPossessions') and CheckIfIssuedToPatron($borrowernumber,$biblioNum)) { $biblioLoopIter{holdable} = undef; $biblioLoopIter{already_patron_possession} = 1; - $anyholdable = undef; } + if( $biblioLoopIter{holdable} ){ $anyholdable = 1; } + push @$biblioLoop, \%biblioLoopIter; } -if ( $numBibsAvailable == 0 || !$anyholdable) { +if ( $numBibsAvailable == 0 || $anyholdable == 0) { $template->param( none_available => 1 ); } -- 1.7.9.5 From januszop at gmail.com Fri May 3 14:36:10 2013 From: januszop at gmail.com (Janusz Kaczmarek) Date: Fri, 3 May 2013 15:36:10 +0300 Subject: [Koha-patches] [PATCH] Bug 5262 - authority plugin doesn't copy indicators -- ver. 0.3 Message-ID: <1367584570-4662-1-git-send-email-januszop@gmail.com> With this patch Koha should Koha should correctly copy indicators (and create $2 subfield in MARC-21 if need) from the chosen authority record to the edited bibliographic record (according to discussion in bugzilla). UNIMARC and MARC-21 flavors are covered. I have omitted one case: it could be, that UNIF_TITLE authority will used to control bibliographic 240. In this case 2nd indicator from UNIF_TITLE authority should be copied to 2nd indicator of bibliographic 240. A modified patch is provided. --- authorities/blinddetail-biblio-search.pl | 43 ++++++++++++++++++++ .../authorities/blinddetail-biblio-search.tt | 3 + 2 files changed, 46 insertions(+), 0 deletions(-) diff --git a/authorities/blinddetail-biblio-search.pl b/authorities/blinddetail-biblio-search.pl index 6b3d122..7bfe09e 100755 --- a/authorities/blinddetail-biblio-search.pl +++ b/authorities/blinddetail-biblio-search.pl @@ -77,6 +77,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( # fill arrays my @subfield_loop; +my ($indicator1, $indicator2); if ($authid) { my @fields = $record->field( $auth_type->{auth_tag_to_report} ); my $repet = ($query->param('repet') || 1) - 1; @@ -99,6 +100,46 @@ if ($authid) { } push( @subfield_loop, { marc_subfield => 'w', marc_values => $relationship } ) if ( $relationship ); + if (C4::Context->preference('marcflavour') eq 'UNIMARC') { + $indicator1 = $field->indicator('1'); + $indicator2 = $field->indicator('2'); + } elsif (C4::Context->preference('marcflavour') eq 'MARC21') { + my $tag_from = $auth_type->{auth_tag_to_report}; + my $tag_to = $index; + $tag_to =~ s/^tag_(\d*)_.*$/$1/; + if ($tag_to =~ /^6/) { # subject heading + my %thes_mapping = qw / a 0 + b 1 + c 2 + d 3 + k 5 + n 4 + r 7 + s 7 + v 6 + z 7 + | 4 /; + my $thes_008_11 = ''; + $thes_008_11 = substr($record->field('008')->data(), 11, 1) if $record->field('008')->data(); + $indicator2 = defined $thes_mapping{$thes_008_11} ? $thes_mapping{$thes_008_11} : $thes_008_11; + if ($indicator2 eq '7') { + if ($thes_008_11 eq 'r') { + $subfields{'2'} = ['aat']; + } elsif ($thes_008_11 eq 's') { + $subfields{'2'} = ['sears']; + } + } + } + if ($tag_from eq '130') { # unified title -- the special case + if ($tag_to eq '830' || $tag_to eq '240') { + $indicator2 = $field->indicator('2'); + } else { + $indicator1 = $field->indicator('2'); + } + } else { + $indicator1 = $field->indicator('1'); + } + } } else { # authid is empty => the user want to empty the entry. @@ -113,6 +154,8 @@ $template->param( authid => $authid ? $authid : "", index => $index, tagid => $tagid, + indicator1 => $indicator1, + indicator2 => $indicator2, SUBFIELD_LOOP => \@subfield_loop, tag_number => $tag_number, ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt index 4a3cb86..c95a29b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt @@ -81,6 +81,9 @@ [% END %] ); [% END %] + var indicators = field_start.getElementsByClassName('indicator flat'); + indicators[0].value="[% indicator1 %]"; + indicators[1].value="[% indicator2 %]"; [% END %] // browse all its subfields (clear and $9) -- 1.7.2.5 From colin.campbell at ptfs-europe.com Fri May 3 16:48:25 2013 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Fri, 3 May 2013 15:48:25 +0100 Subject: [Koha-patches] [PATCH] [Bug 10184] Disable default sort on circ history Message-ID: <1367592505-15463-1-git-send-email-colin.campbell@ptfs-europe.com> Issue data is passed to the readingrec templated ordered most recent due date first. Datatables unless specified otherwise do a presort on the data they will display the default results in an order the reverse of what was intended. Disabling the presort preserves the initial sort order until the user selects a different sort --- koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt | 1 + 1 file changed, 1 insertion(+) 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 32c91a7..18f9060 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -14,6 +14,7 @@ [% END %] $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, { "sPaginationType": "four_button", + "aaSorting": [] })); }); //]]> -- 1.8.3.rc0.10.g8974033 From oleonard at myacpl.org Mon May 6 17:51:23 2013 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 6 May 2013 11:51:23 -0400 Subject: [Koha-patches] [PATCH] Bug 10201 - Old OPAC patron update system should be removed Message-ID: <1367855483-10170-1-git-send-email-oleonard@myacpl.org> The old pages for viewing and updating patron details in the OPAC have been superceded by the new script opac-memberentry.pl. This patch removes he old scripts and templates and corrects links to them. This patch also removes reference to opac-userupdate.tt from opac-patron-image.pl and replaces the authentication process with one which uses check_cookie_auth, based on the example of opac-tags.pl. To test, edit a patron record and set the "Gone no address" flag. Log in to the OPAC with that account and view the patron details page. The warning about out of date contact information should link to the new update page. Next, attempt to place a hold. You should see the same warning, and it should also link to the new update page. Test the display of patron images: Log in as a user who has an image associated with their account and navigate to /cgi-bin/koha/opac-patron-image.pl. Their patron image should display. A search of Koha source files should return no results for the missing scripts or templates. --- .../opac-tmpl/prog/en/modules/opac-reserve.tt | 4 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 2 +- .../opac-tmpl/prog/en/modules/opac-userdetails.tt | 87 --------- .../opac-tmpl/prog/en/modules/opac-userupdate.tt | 195 -------------------- opac/opac-patron-image.pl | 25 ++- opac/opac-userdetails.pl | 56 ------ opac/opac-userupdate.pl | 188 ------------------- 7 files changed, 14 insertions(+), 543 deletions(-) delete mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt delete mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt delete mode 100755 opac/opac-userdetails.pl delete mode 100755 opac/opac-userupdate.pl 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 65b177b..85f1c30 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt @@ -166,8 +166,8 @@ [% IF ( message ) %] [% IF ( GNA ) %]
-

Sorry, you cannot place holds because the library doesn't have up-to-date contact information on file.

-

Please contact your librarian, or use the online update form to submit current information (Please note: there may be a delay in restoring your account if you submit online)

+

Sorry, you cannot place holds because the library doesn't have up-to-date contact information on file.

+

Please contact your librarian, or use the online update form to submit current information (Please note: there may be a delay in restoring your account if you submit online)

[% END %] [% IF ( lost ) %] 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 96f6e8d..8b765f6 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -105,7 +105,7 @@ $.tablesorter.addParser({
  • Please note: Your account has been frozen[% IF ( BORROWER_INF.userdebarreddate ) %] until [% BORROWER_INF.userdebarreddate | $KohaDates %][% END %][% IF ( BORROWER_INF.debarredcomment ) %] with the comment "[% BORROWER_INF.debarredcomment %]"[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If your account page shows your account to be clear, please contact the library.
  • [% END %] [% IF ( BORROWER_INF.gonenoaddress ) %] -
  • Please note: According to our records, we don't have up-to-date [% UNLESS ( BORROWER_INF.OPACPatronDetails ) %]contact information[% ELSE %]contact information[% END %] on file. Please contact the library[% IF ( BORROWER_INF.OPACPatronDetails ) %] or use the online update form to submit current information (Please note: there may be a delay in restoring your account if you submit online)[% END %].
  • +
  • Please note: According to our records, we don't have up-to-date [% UNLESS ( BORROWER_INF.OPACPatronDetails ) %]contact information[% ELSE %]contact information[% END %] on file. Please contact the library[% IF ( BORROWER_INF.OPACPatronDetails ) %] or use the online update form to submit current information (Please note: there may be a delay in restoring your account if you submit online)[% END %].
  • [% END %] [% IF ( BORROWER_INF.lost ) %]
  • Please note: Your library card has been marked as lost or stolen. If this is an error, please contact the library.
  • diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt deleted file mode 100644 index e695a7a..0000000 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt +++ /dev/null @@ -1,87 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your personal details -[% INCLUDE 'doc-head-close.inc' %] - - -
    -
    -[% INCLUDE 'masthead.inc' %] - -
    -
    - -

    [% firstname %] [% surname %]'s account ⇢ Personal details

    - - - - -
    Name: [% firstname %] [% surname %]
    -Card number:[% cardnumber %]
    - - - - - - - - - - - - - - - -
    Contact details
    Mailing address:[% address %], [% city %]
    Permanent address: [% B_address %], [% B_address2 %], [% B_city %]
    Primary phone:[% IF ( phone ) %][% phone %][% ELSE %] [% END %]
    Secondary phone:[% IF ( mobile ) %][% mobile %][% ELSE %] [% END %]
    Fax:[% IF ( fax ) %][% fax %][% ELSE %] [% END %]
    Email:[% IF ( email ) %][% email %][% ELSE %] [% END %]
    - - - - - - - - - - - - - -[% IF ( joiningbranch ) %][% ELSE %] [% END %]
    Membership details
    Membership number: [% borrowernumber %]
    Membership category: [% categorycode %]
    Joined:[% dateenrolled %]
    Expires:[% dateexpiry %]
    Joining library:[% joiningbranch %]
    - - - - - -
    Identity details
    DoB: [% IF ( dateofbirth ) %][% dateofbirth %][% ELSE %] [% END %]
    Gender:[% IF ( sex ) %][% sex %][% ELSE %] [% END %]
    - -[% IF ( contactname ) %] - - - - - - - - - - -
    Alternate contact details
    Alternate contact: [% IF ( contactname ) %][% contactname %][% ELSE %] [% END %]
    Phone: [% IF ( B_phone ) %][% B_phone %][% ELSE %] [% END %]
    Relationship: [% IF ( relationship ) %][% relationship %][% ELSE %] [% END %]
    Notes: [% IF ( contactnote ) %][% contactnote %][% ELSE %] [% END %]
    Guarantor: [% IF ( guarantorid ) %][% guarantorid %][% ELSE %] [% END %]
    - -[% ELSE %] -

    No alternate contact on file.

    -[% END %] - -
    - -
    - -
    -
    -
    -
    -
    -[% INCLUDE 'navigation.inc' %] -[% INCLUDE 'usermenu.inc' %] -
    -
    -
    -[% INCLUDE 'opac-bottom.inc' %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt deleted file mode 100644 index 320b30b..0000000 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt +++ /dev/null @@ -1,195 +0,0 @@ -[% USE KohaDates %] - -[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %][% ELSE %]Koha online[% END %] catalog › Your personal details -[% INCLUDE 'doc-head-close.inc' %] - - -
    -
    -[% INCLUDE 'masthead.inc' %] - -
    -
    - -
    -[% FOREACH BORROWER_INF IN BORROWER_INFO %] -

    [% INCLUDE 'patron-title.inc' firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]'s account ⇢ Your personal details

    - -[% IF ( OPACPatronDetails ) %] -
    -
    - -[% IF ( display_patron_image ) %]

    - -

    [% END %] -
    Name
      -
    1. -
    2. -
    3. -
    -
    - -
    Contact information -
      -
    1. - - -
    2. -
    3. -
    4. -
    5. -
    6. -
    7. -
    8. -
    9. -
    10. -
    11. -
    12. -
    -
    - -
    -
    -
    -Alternate contact information -
      -
    1. - - - - -
    2. - -
    3. -
    4. -
    5. -
    6. -
    7. -
    8. -
    -
    -
    -
      -
    1. -
    2. -
    -
    -Library use: -
      -
    1. -
    2. -
    3. -
    4. -
    5. -
    6. - [% IF ( BORROWER_INF.ExtendedPatronAttributes ) %] - [% FOREACH patron_attribute IN BORROWER_INF.patron_attributes %] -
    7. - [% IF ( patron_attribute.value_description ) %] - [% patron_attribute.value_description %]" - [% ELSE %] - [% patron_attribute.value |html_line_break %] - [% END %] -
    8. - [% END %] - [% END %] -
    -
    -
    -

    Please make any necessary changes to your record. Submitting the form will notify a library staff member, who will make the changes permanent.

    - Cancel
    -
    - -
    -[% ELSE %] -

    To make changes to your record please contact the library.

    -
    -[% IF ( display_patron_image ) %]

    - -

    [% END %] -
    -Contact information -
      -
    1. Name: [% BORROWER_INF.firstname %] [% BORROWER_INF.surname %]
    2. -
    3. Other name: [% BORROWER_INF.othernames %]
    4. -
    5. Address: [% BORROWER_INF.streetnumber %] [% BORROWER_INF.address %]
    6. -
    7.  [% BORROWER_INF.address2 %]
    8. -
    9. City: [% BORROWER_INF.city %]
    10. -
    11. State: [% BORROWER_INF.state %]
    12. -
    13. Zip code: [% BORROWER_INF.zipcode %]
    14. -
    15. Country: [% BORROWER_INF.country %]
    16. -
    17. Primary phone: [% BORROWER_INF.phone %]
    18. -
    19. Secondary phone: [% BORROWER_INF.mobile %]
    20. -
    21. Other phone: [% BORROWER_INF.phonepro %]
    22. -
    23. Fax: [% BORROWER_INF.fax %]
    24. -
    25. Primary email: [% BORROWER_INF.email %]
    26. -
    27. Secondary email: [% BORROWER_INF.emailpro %]
    28. -
    -
    - -
    -Personal information -
      -
    1. Date of birth: [% BORROWER_INF.dateofbirth | $KohaDates %]
    2. -
    3. Gender: -[% IF ( sex == 'F' ) %]Female[% END %] -[% IF ( sex == 'M' ) %]Male[% END %] -
    4. -
    -
    -
    - -
    -
    -Alternate contact information -
      -
    1. Alternate address: [% BORROWER_INF.B_streetnumber %] [% BORROWER_INF.B_address %]
    2. -
    3.  [% BORROWER_INF.B_address2 %]
    4. -
    5. City: [% BORROWER_INF.B_city %]
    6. -
    7. State: [% BORROWER_INF.B_state %]
    8. -
    9. Zip code: [% BORROWER_INF.B_zipcode %]
    10. -
    11. Country: [% BORROWER_INF.B_country %]
    12. -
    13. Phone: [% BORROWER_INF.B_phone %]
    14. -
    15. Email: [% BORROWER_INF.B_email %]
    16. -
    -
    - -
    -Library use: -
      -
    1. Card number: [% BORROWER_INF.cardnumber %]
    2. -
    3. Home library: [% BORROWER_INF.branchname %]
    4. -
    5. Patron number: [% BORROWER_INF.borrowernumber %]
    6. -
    7. Patron category: [% BORROWER_INF.description %] ([% BORROWER_INF.categorycode %])
    8. -
    9. Joined: [% BORROWER_INF.dateenrolled | $KohaDates %]
    10. -
    11. Expires: [% BORROWER_INF.dateexpiry | $KohaDates %]
    12. - [% IF ( BORROWER_INF.ExtendedPatronAttributes ) %] - [% FOREACH patron_attribute IN BORROWER_INF.patron_attributes %] -
    13. [% patron_attribute.description %] - [% IF ( patron_attribute.value_description ) %] - [% patron_attribute.value_description %] - [% ELSE %] - [% patron_attribute.value %] - [% END %] -
    14. - [% END %] - [% END %] -
    -
    -
    -[% END %] -[% END %] -
    -
    -
    -
    -
    -
    -[% INCLUDE 'navigation.inc' IsPatronPage=1 %] -
    -
    -
    -[% INCLUDE 'opac-bottom.inc' %] diff --git a/opac/opac-patron-image.pl b/opac/opac-patron-image.pl index 1935bea..d1f4489 100755 --- a/opac/opac-patron-image.pl +++ b/opac/opac-patron-image.pl @@ -21,27 +21,24 @@ use strict; use warnings; use C4::Members; -use C4::Auth; -my $query = new CGI; +use CGI; +use CGI::Cookie; # need to check cookies before having CGI parse the POST request +use C4::Auth qw(:DEFAULT check_cookie_auth); -my ( $template, $borrowernumber, $cookie ) = get_template_and_user( - { - template_name => "opac-userupdate.tt", - query => $query, - type => "opac", - authnotrequired => 0, - flagsrequired => { borrow => 1 }, - debug => 1, - } -); +my $query = new CGI; unless (C4::Context->preference('OPACpatronimages')) { print $query->header(status => '403 Forbidden - displaying patron images in the OPAC not enabled'); exit; } -my ($borrower)=GetMember('borrowernumber' => $borrowernumber); -my $cardnumber = $borrower->{'cardnumber'}; +my $needed_flags; +my %cookies = fetch CGI::Cookie; +my $sessid = $cookies{'CGISESSID'}->value; +my ($auth_status, $auth_sessid) = check_cookie_auth($sessid, $needed_flags); +my $borrowernumber = C4::Context->userenv->{'number'}; +my $cardnumber = C4::Context->userenv->{'cardnumber'}; + my ($imagedata, $dberror) = GetPatronImage($cardnumber); if ($dberror) { diff --git a/opac/opac-userdetails.pl b/opac/opac-userdetails.pl deleted file mode 100755 index ac10002..0000000 --- a/opac/opac-userdetails.pl +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/perl - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with Koha; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -use strict; -use warnings; - -use CGI; - -use C4::Auth; -use C4::Koha; -use C4::Circulation; - -use C4::Output; -use C4::Dates qw/format_date/; -use C4::Members; - -my $query = new CGI; -my ( $template, $borrowernumber, $cookie ) = get_template_and_user( - { - template_name => "opac-userdetails.tmpl", - query => $query, - type => "opac", - authnotrequired => 0, - flagsrequired => { borrow => 1 }, - debug => 1, - } -); - -# get borrower information .... -my ( $borr ) = GetMemberDetails( $borrowernumber ); - -$borr->{'dateenrolled'} = format_date( $borr->{'dateenrolled'} ); -$borr->{'dateexpiry'} = format_date( $borr->{'dateexpiry'} ); -$borr->{'dateofbirth'} = format_date( $borr->{'dateofbirth'} ); -$borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} ); - -$template->param($borr); - -output_html_with_http_headers $query, $cookie, $template->output; - diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl deleted file mode 100755 index 3b90498..0000000 --- a/opac/opac-userupdate.pl +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/perl - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with Koha; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -use strict; -use warnings; - -use CGI; -use Mail::Sendmail; -use Encode; - -use C4::Auth; # checkauth, getborrowernumber. -use C4::Context; -use C4::Koha; -use C4::Circulation; -use C4::Output; -use C4::Dates qw/format_date/; -use C4::Members; -use C4::Members::Attributes; -use C4::Branch; - -my $query = new CGI; - -my ( $template, $borrowernumber, $cookie ) = get_template_and_user( - { - template_name => "opac-userupdate.tmpl", - query => $query, - type => "opac", - authnotrequired => 0, - flagsrequired => { borrow => 1 }, - debug => 1, - } -); - -# get borrower information .... -my ( $borr ) = GetMemberDetails( $borrowernumber ); -my ( $patronemail ) = GetFirstValidEmailAddress($borrowernumber); -my $lib = GetBranchDetail($borr->{'branchcode'}); - -# handle the new information.... -# collect the form values and send an email. -my @fields = ( - 'surname','firstname','othernames','streetnumber','address','address2','city','state','zipcode','country','phone','mobile','fax','phonepro', 'emailaddress','emailpro','B_streetnumber','B_address','B_address2','B_city','B_state','B_zipcode','B_country','B_phone','B_email','dateofbirth','sex' -); -my $update; -my $updateemailaddress = $lib->{'branchemail'}; -$updateemailaddress = C4::Context->preference('KohaAdminEmailAddress') unless( $updateemailaddress =~ /\w+@\w+/); -if ( !$updateemailaddress || $updateemailaddress eq '' ) { - warn -"KohaAdminEmailAddress system preference not set. Couldn't send patron update information for $borr->{'firstname'} $borr->{'surname'} (#$borrowernumber)\n"; - my ($template) = get_template_and_user( - { - template_name => "kohaerror.tmpl", - query => $query, - type => "opac", - authnotrequired => 1, - flagsrequired => { borrow => 1 }, - debug => 1, - } - ); - - $template->param( - noadminemail => 1, - ); - - output_html_with_http_headers $query, $cookie, $template->output; - exit; -} - -if ( !$patronemail || $patronemail eq '' ) { - $patronemail = $updateemailaddress; -}; - -if ( $query->param('modify') ) { - - # get all the fields: - my $message = <<"EOF"; -Patron $borr->{'cardnumber'} has requested to change her/his personal details. -Please check these new details and make the changes to these fields: - -EOF - - my $streetnumber = $borr->{'streetnumber'} || ''; - my $address = $borr->{'address'} || ''; - my $address2 = $borr->{'address2'} || ''; - my $B_streetnumber = $borr->{'B_streetnumber'} || ''; - my $B_address = $borr->{'B_address'} || ''; - my $B_address2 = $borr->{'B_address2'} || ''; - - foreach my $field (@fields) { - my $newfield = decode('utf-8',$query->param($field)) || ''; - my $borrowerfield = ''; - if($borr->{$field}) { - $borrowerfield = $borr->{$field}; - } - - if($field eq "dateofbirth") { - $borrowerfield = format_date( $borr->{'dateofbirth'} ) || ''; - } - - if($borrowerfield ne $newfield) { - $message .= $field . " : $borrowerfield --> $newfield\n"; - } - } - - $message .= "\nEdit this patron's record: http://".C4::Context->preference('staffClientBaseURL ')."/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=".$borr->{'borrowernumber'}."&categorycode=".$borr->{'categorycode'} if C4::Context->preference('staffClientBaseURL '); - - $message .= "\n\nThanks,\nKoha\n\n"; - my %mail = ( - To => $updateemailaddress, - From => $patronemail, - Subject => "User Request for update of Record.", - Message => encode('utf-8', $message), # Mail::Sendmail doesn't like wide characters - 'Content-Type' => 'text/plain; charset="utf-8"', - ); - - if ( sendmail %mail ) { - - # do something if it works.... - print $query->redirect('/cgi-bin/koha/opac-user.pl?patronupdate=sent'); - exit; - } - else { - - # do something if it doesnt work.... - warn "Error sending mail: $Mail::Sendmail::error \n"; - } -} - -$borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} ); -$borr->{'branchname'} = GetBranchName($borr->{'branchcode'}); - -if (C4::Context->preference('ExtendedPatronAttributes')) { - my $attributes = C4::Members::Attributes::GetBorrowerAttributes($borrowernumber, 'opac'); - if (scalar(@$attributes) > 0) { - $borr->{ExtendedPatronAttributes} = 1; - $borr->{patron_attributes} = $attributes; - } -} - -my $checkin_prefs = C4::Members::Messaging::GetMessagingPreferences({ - borrowernumber => $borrowernumber, - message_name => 'Item Checkout' -}); -for ( keys %{ $checkin_prefs->{transports} }) { - $borr->{"items_returned_$_"} = 1; -} -my $checkout_prefs = C4::Members::Messaging::GetMessagingPreferences({ - borrowernumber => $borrowernumber, - message_name => 'Item Check-in' -}); -for ( keys %{ $checkout_prefs->{transports} }) { - $borr->{"items_borrowed_$_"} = 1; -} - -if (C4::Context->preference('OPACpatronimages')) { - my ($image, $dberror) = GetPatronImage($borr->{'cardnumber'}); - if ($image) { - $template->param( - display_patron_image => 1 - ); - } -} - -my @bordat; -$bordat[0] = $borr; - -$template->param( - BORROWER_INFO => \@bordat, - userupdateview => 1, -); - -output_html_with_http_headers $query, $cookie, $template->output; -- 1.7.9.5 From oleonard at myacpl.org Mon May 6 18:46:23 2013 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 6 May 2013 12:46:23 -0400 Subject: [Koha-patches] [PATCH] Bug 10204 - Patron image no longer appears in the OPAC Message-ID: <1367858783-10815-1-git-send-email-oleonard@myacpl.org> With the addition of opac-memberentry.pl to the OPAC we lost a way to display the image associated with a patron's account. This patch adds display of the patron image to opac-memberentry.pl now that opac-userdetails.pl and opac-userupdate.pl are deprecated. To test: 1. Log into the OPAC as a patron who has an image associated with their account. View the "my personal details" tab and confirm that the patron image appears with and without OPACPatronDetails enabled. 2. Log into the OPAC as a patron who has no image associated with their account. View the "my personal details" tab and confirm that the layout looks correct. 3. Turn off OPACpatronimages and confirm that the "my personal details" page looks correct. --- .../opac-tmpl/prog/en/modules/opac-memberentry.tt | 37 +++++++++++++------- opac/opac-memberentry.pl | 13 ++++++- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt index 95149b3..8eda352 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt @@ -34,12 +34,13 @@
    -
    - [% IF action == 'edit' %] -
    - [% ELSE %] -
    - [% END %] +
    + [% IF action == 'edit' %] +
    + [% ELSE %] +
    + [% END %] +
    [% IF action == 'edit' %]

    [% borrower.firstname %] [% borrower.surname %]'s account ⇢ Personal details

    [% ELSE %] @@ -60,8 +61,6 @@
    You typed in the wrong characters in the box before submitting. Please try again.
    [% END %] - - [% UNLESS hidden.defined('branchcode') %] @@ -93,12 +92,16 @@ [% END %] - +
    [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %] +
    + [% IF ( display_patron_image ) %] +
    + [% END %]
    Identity @@ -228,8 +231,18 @@ [% END %]
    + [% IF ( display_patron_image ) %] +
    +
    +

    + +

    +
    + [% END %] +
    [% END %] +
    [% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && @@ -741,11 +754,9 @@ [% END %] - - - +
    -
    +
    diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index 7f8230d..112d405 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -195,8 +195,19 @@ elsif ( $action eq 'update' ) { } } elsif ( $action eq 'edit' ) { #Display logged in borrower's data + my $borrower = GetMember( borrowernumber => $borrowernumber ); $template->param( - borrower => GetMember( borrowernumber => $borrowernumber ), ); + borrower => $borrower, ); + + if (C4::Context->preference('OPACpatronimages')) { + my ($image, $dberror) = GetPatronImage($borrower->{cardnumber}); + if ($image) { + $template->param( + display_patron_image => 1 + ); + } + } + } my $captcha = random_string("CCCCC"); -- 1.7.9.5 From oleonard at myacpl.org Tue May 7 18:14:58 2013 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 7 May 2013 12:14:58 -0400 Subject: [Koha-patches] [PATCH] Bug 10201 [Follow-up] Old OPAC patron update system should be removed Message-ID: <1367943298-13874-1-git-send-email-oleonard@myacpl.org> The previous patch missed removal of one template, kohaerror.tt, which was used only by opac-userupdate.pl. This patch removes it. To test, apply the patch and search Koha source files for references to kohaerror. There should be none. --- koha-tmpl/opac-tmpl/prog/en/modules/kohaerror.tt | 26 ---------------------- 1 file changed, 26 deletions(-) delete mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/kohaerror.tt diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/kohaerror.tt b/koha-tmpl/opac-tmpl/prog/en/modules/kohaerror.tt deleted file mode 100644 index 61ef820..0000000 --- a/koha-tmpl/opac-tmpl/prog/en/modules/kohaerror.tt +++ /dev/null @@ -1,26 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › An error has occurred -[% INCLUDE 'doc-head-close.inc' %] - - -
    -
    -[% INCLUDE 'masthead.inc' %] - -
    -
    -
    -
    -

    An error has occurred

    -[% IF ( noadminemail ) %] -

    An error occurred when sending your message to the administrator. Please visit the library to update your personal details.

    -

    Return to your summary.

    -[% ELSE %] -

    [% errormessage %]

    -[% END %] -
    -
    -
    -
    -
    - -[% INCLUDE 'opac-bottom.inc' %] -- 1.7.9.5 From oleonard at myacpl.org Thu May 9 21:13:40 2013 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 9 May 2013 15:13:40 -0400 Subject: [Koha-patches] [PATCH] Bug 10225 - If an item isn't editable, don't show the onclick Edit/Delete menu Message-ID: <1368126820-30197-1-git-send-email-oleonard@myacpl.org> The user should not be shown edit/delete links when clicking on a row in additems which they cannot edit because of the IndependantBranches setting. This patch adds a class to the row to exclude such rows in the JavaScript onclick handler. To test: - Turn IndependantBranches on and edit items for a title which has holdings from various branches including your own. - Click a row for an item which is held by your library. You should see the "Edit/Delete" links appear. - Click a row for an item which is held by another library. No links should appear. --- .../prog/en/modules/cataloguing/additem.tt | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index 97d06a5..1043965 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -13,7 +13,7 @@ $(document).ready(function(){ $("fieldset.rows input").keydown(function(e){ return checkEnter(e); }); /* Inline edit/delete links */ var biblionumber = $("input[name='biblionumber']").attr("value"); - $("td").click(function(event){ + $("tr.editable td").click(function(event){ var $tgt = $(event.target); if($tgt.is("a")||$tgt.is(":first-child")||$tgt.is(":nth-child(2)")){ return true; } else { var rowid = $(this).parent().attr("id"); @@ -134,11 +134,19 @@ $(document).ready(function() { [% END %] [% FOREACH item_loo IN item_loop %] - [% IF ( item_loo.itemnumber == itemnumber) %] - - [% ELSE %] - - [% END %] + [% IF ( item_loo.itemnumber == itemnumber) %] + [% IF item_loo.nomod %] + + [% ELSE %] + + [% END %] + [% ELSE %] + [% IF item_loo.nomod %] + + [% ELSE %] + + [% END %] + [% END %] [% IF ( item_loo.nomod ) %]  [% ELSE %][% IF ( item_loo.hostitemflag ) %]Edit in host Delink [% ELSE %]Edit -- 1.7.9.5 From oleonard at myacpl.org Thu May 9 22:00:14 2013 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 9 May 2013 16:00:14 -0400 Subject: [Koha-patches] [PATCH] Bug 7110 - Renewal messages still displays in OPAC if OpacRenewalAllowed is disabled Message-ID: <1368129614-31159-1-git-send-email-oleonard@myacpl.org> The original patch added a message to display if OpacRenewalAllowed is disabled but OPACFineNoRenewals is enabled. This change was reversed by a follow-up on Bug 8408. I think both versions are incorrect: If a patron has fines which exceed the limit set by OPACFineNoRenewals but OPAC renewals are disallowed by OpacRenewalAllowed, no message should be displayed. Information about outstanding fines in this case has no bearing on how the user sees his summary of checkouts. To test, try various combinations of OpacRenewalAllowed and OPACFineNoRenewals with a patron who has outstanding fines: - OpacRenewalAllowed ON and OPACFineNoRenewals ON (set to be triggered by the test patron's fines): Logging in to the OPAC the patron should see a warning on opac-user.pl about not being able to renew items because of fines. - OpacRenewalAllowed ON and OPACFineNoRenewals OFF (threshold high enough not to trigger a block): No warning appears. - OpacRenewalAllowed OFF and OPACFineNoRenewals ON: No warning appears. - OpacRenewalAllowed OFF and OPACFineNoRenewals OFF: No warning appears. If OpacRenewalAllowed is diabled and a patron's fines exceed the limit set by OPACFineNoRenewals they should see no message. --- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 2 -- opac/opac-user.pl | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt index 96f6e8d..d19613c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -112,8 +112,6 @@ $.tablesorter.addParser({ [% END %] [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %]
  • Please note: Since you have [% IF renewal_blocked_fines != "0.00" %] more than [% renewal_blocked_fines %] in [% END %] fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.
  • - [% ELSIF ( renewal_blocked_fines ) %] -
  • Please note: You currently owe [% renewal_blocked_fines_amountoutstanding %] in fines. Please pay your fines if you wish to renew your books.
  • [% END %]
    [% END %] diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 750a9c3..df60792 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -105,7 +105,7 @@ if ( 5 >= $borr->{'amountoutstanding'} && $borr->{'amountoutstanding'} > 0 ) { my $no_renewal_amt = C4::Context->preference( 'OPACFineNoRenewals' ); $no_renewal_amt ||= 0; -if ( $borr->{amountoutstanding} > $no_renewal_amt ) { +if ( C4::Context->preference( 'OpacRenewalAllowed' ) && $borr->{amountoutstanding} > $no_renewal_amt ) { $borr->{'flagged'} = 1; $canrenew = 0; $template->param( -- 1.7.9.5 From oleonard at myacpl.org Fri May 10 14:45:49 2013 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 10 May 2013 08:45:49 -0400 Subject: [Koha-patches] [PATCH] Bug 9424 [Revised] Move JavaScript out of header include Message-ID: <1368189950-32250-1-git-send-email-oleonard@myacpl.org> This patch removes JavaScript "onlick" attributes from header.inc and moves the functionality to staff-global.js. This is in keeping with the idea of progressive enhancement. To test, be sure to clear your browser cache after applying the patch. - Test the help link. - Test the logout link with the intranetbookbag preference on and off. - Open a patron's account and click "search to hold." Log out, and log in again. Koha should not remember the patron you chose before logging out (as seen from a search results page). Revised for current master. --- .../intranet-tmpl/prog/en/includes/header.inc | 10 ++-------- koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc index 4a26d79..7b69a68 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc @@ -72,21 +72,15 @@ Set library [% END %] - [% IF ( intranetbookbag ) %]
  • - Log out + Log out
  • [% ELSE %] -
  • - Log out -
  • - [% END %] - [% ELSE %] You are not logged in | [% END %]
  • - Help + Help
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js index 2bf385f..8c50dca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js @@ -11,6 +11,13 @@ function _(s) { return s; } // dummy function for gettext if($("#header_search #catalog_search").length > 0){ $(document).bind('keydown','Alt+q',function (){ $("#header_search").tabs("select","#catalog_search"); $("#search-form").focus(); }); } else { $(document).bind('keydown','Alt+q',function(){ location.href="/cgi-bin/koha/catalogue/search.pl"; }); } $(".focus").focus(); $(".validated").validate(); + $("#logout").on("click",function(){ + logOut(); + }); + $("#helper").on("click",function(){ + openHelp(); + return false; + }); }); @@ -37,6 +44,17 @@ function clearHoldFor(){ $.cookie("holdfor",null, { path: "/", expires: 0 }); } +function logOut(){ + if( typeof delBasket == 'function' ){ + delBasket('main', true); + } + clearHoldFor(); +} + +function openHelp(){ + openWindow("/cgi-bin/koha/help.pl","Koha help",600,600); +} + jQuery.fn.preventDoubleFormSubmit = function() { jQuery(this).submit(function() { $("body, form input[type='submit'], form button[type='submit'], form a").addClass('waiting'); -- 1.7.9.5 From nengard at bywatersolutions.com Fri May 10 15:51:09 2013 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Fri, 10 May 2013 09:51:09 -0400 Subject: [Koha-patches] [PATCH] Bug 10197: Add classes to patron info list Message-ID: <1368193869-8292-1-git-send-email-nengard@bywatersolutions.com> This patch adds classes to the patron info found on the top left of the circulation and patron related pages to allow for easy styling of the information displayed. To test: * Apply patch * View a patron detail page and view the source on the list to the left to see the styles * View a checkout screen and view the source on the list to the left with patron info to see the styles * You could also try to style things by customizing your CSS --- .../intranet-tmpl/prog/en/includes/circ-menu.inc | 16 ++++++++-------- .../intranet-tmpl/prog/en/includes/circ-menu.tt | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) 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 fb283ec..bafa99e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -4,7 +4,7 @@ -
      +
        [% IF ( patronimages ) %] [% IF ( picture ) %]
      • [% firstname %] [% surname %] ([% cardnumber %])
      • @@ -14,21 +14,21 @@ [% END %] [% IF ( address or address2 ) %] [% IF ( address ) %] -
      • [% address %]
      • +
      • [% address %]
      • [% END %] [% IF ( address2 ) %] -
      • [% address2 %]
      • +
      • [% address2 %]
      • [% END %] [% ELSE %]
      • No address stored.
      • [% END %] -
      • [% IF ( city ) %] +
      • [% IF ( city ) %] [% city %][% IF ( state ) %], [% state %][% END %] [% zipcode %][% IF ( country ) %], [% country %][% END %] [% ELSE %] No city stored. [% END %]
      • -
      • [% IF ( phone ) %] +
      • [% IF ( phone ) %] [% phone %] [% ELSE %] [% IF ( mobile ) %] @@ -53,12 +53,12 @@ [% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN extendedattributes %] [% IF ( extendedattribute.display_checkout ) %] [% IF ( extendedattribute.value ) %] -
      • [% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]
      • +
      • [% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]
      • [% END %] [% END %] [% END %][% END %] -
      • Category: [% categoryname %] ([% categorycode %])
      • -
      • Home library: [% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]
      • +
      • Category: [% categoryname %] ([% categorycode %])
      • +
      • Home library: [% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]