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' %]
-
-
-
To make changes to your record please contact the library.
-
-[% IF ( display_patron_image ) %]
-
-
[% 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 %]
+
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.
-
-[% 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 ) %]
--
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 ) %]
[% 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 ) %]
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 ) %]
@@ -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 %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt
index abcdccd..6e32ccb 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt
@@ -6,32 +6,32 @@ in the global namespace %]
-
+
[% IF ( patronimages ) %]
[% IF borrower.has_picture %]
[% ELSE %]
-
+
[% END %]
[% END %]
[% IF ( borrower.address or borrower.address2 ) %]
[% IF ( borrower.address ) %]
-
[% borrower.address %]
+
[% borrower.address %]
[% END %]
[% IF ( borrower.address2 ) %]
-
[% borrower.address2 %]
+
[% borrower.address2 %]
[% END %]
[% ELSE %]
No address stored.
[% END %]
-
+
[% IF borrower.city %]
[% borrower.city %][% IF borrower.state %], [% borrower.state %][% END %]
[% borrower.zipcode %][% IF ( borrower.country ) %], [% borrower.country %][% END %]
[% ELSE %]
No city stored.
[% END %]
-
[% IF borrower.phone %]
+
[% IF borrower.phone %]
[% borrower.phone %]
[% ELSE %]
[% IF borrower.mobile %]
@@ -56,12 +56,12 @@ in the global namespace %]
[% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN borrower.extendedattributes %]
[% IF ( extendedattribute.display_checkout ) %]
[% IF ( extendedattribute.value ) %]
-
[% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]
+
[% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]
Home library: [% IF ( borrower.branchname ) %][% borrower.branchname %][% ELSE %][% borrower.branch %][% END %]
--
1.7.2.3
From oleonard at myacpl.org Fri May 10 15:55:08 2013
From: oleonard at myacpl.org (Owen Leonard)
Date: Fri, 10 May 2013 09:55:08 -0400
Subject: [Koha-patches] [PATCH] Bug 9679 - can't place hold from cart in CCSR
Message-ID: <1368194109-1083-1-git-send-email-oleonard@myacpl.org>
When the CCSR theme is enabled, selecting items in the cart and clicking
"place hold" triggers a JavaScript error and fails. This patch adds a
function missing from the CCSR version of basket.js.
To test, apply the patch and clear your browser cache.
- Enable the CCSR theme and put items into the OPAC cart.
- Open the cart, select one or more items, and click "place hold."
The cart should automatically close and the main window should redirect
to the holds screen showing your selections.
---
koha-tmpl/opac-tmpl/ccsr/en/js/basket.js | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/koha-tmpl/opac-tmpl/ccsr/en/js/basket.js b/koha-tmpl/opac-tmpl/ccsr/en/js/basket.js
index 115880f..adc0c8f 100644
--- a/koha-tmpl/opac-tmpl/ccsr/en/js/basket.js
+++ b/koha-tmpl/opac-tmpl/ccsr/en/js/basket.js
@@ -397,6 +397,16 @@ function showLess() {
document.location = loc;
}
+function holdSel() {
+ var items = document.getElementById('records').value;
+ if (items) {
+ parent.opener.document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers=" + items;
+ window.close();
+ } else {
+ alert(MSG_NO_RECORD_SELECTED);
+ }
+}
+
function updateBasket(updated_value,target) {
if(target){
target.$('#basketcount').html(""+updated_value+"");
--
1.7.9.5
From nengard at bywatersolutions.com Fri May 10 15:55:35 2013
From: nengard at bywatersolutions.com (Nicole C. Engard)
Date: Fri, 10 May 2013 09:55:35 -0400
Subject: [Koha-patches] [PATCH] Bug 10197: Add classes to patron info list
Message-ID: <1368194135-8375-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 | 18 +++++++++---------
.../intranet-tmpl/prog/en/includes/circ-menu.tt | 18 +++++++++---------
2 files changed, 18 insertions(+), 18 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..bc2c437 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
@@ -4,31 +4,31 @@
-
+
[% IF ( patronimages ) %]
[% IF ( picture ) %]
[% ELSE %]
-
+
[% END %]
[% 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 %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt
index abcdccd..6e32ccb 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt
@@ -6,32 +6,32 @@ in the global namespace %]
-
+
[% IF ( patronimages ) %]
[% IF borrower.has_picture %]
[% ELSE %]
-
+
[% END %]
[% END %]
[% IF ( borrower.address or borrower.address2 ) %]
[% IF ( borrower.address ) %]
-
[% borrower.address %]
+
[% borrower.address %]
[% END %]
[% IF ( borrower.address2 ) %]
-
[% borrower.address2 %]
+
[% borrower.address2 %]
[% END %]
[% ELSE %]
No address stored.
[% END %]
-
+
[% IF borrower.city %]
[% borrower.city %][% IF borrower.state %], [% borrower.state %][% END %]
[% borrower.zipcode %][% IF ( borrower.country ) %], [% borrower.country %][% END %]
[% ELSE %]
No city stored.
[% END %]
-
[% IF borrower.phone %]
+
[% IF borrower.phone %]
[% borrower.phone %]
[% ELSE %]
[% IF borrower.mobile %]
@@ -56,12 +56,12 @@ in the global namespace %]
[% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN borrower.extendedattributes %]
[% IF ( extendedattribute.display_checkout ) %]
[% IF ( extendedattribute.value ) %]
-
[% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]
+
[% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]
Home library: [% IF ( borrower.branchname ) %][% borrower.branchname %][% ELSE %][% borrower.branch %][% END %]
--
1.7.2.3
From oleonard at myacpl.org Fri May 10 18:19:48 2013
From: oleonard at myacpl.org (Owen Leonard)
Date: Fri, 10 May 2013 12:19:48 -0400
Subject: [Koha-patches] [PATCH] Bug 9680 - cart aligned right in CCSR
Message-ID: <1368202788-2993-1-git-send-email-oleonard@myacpl.org>
The CCSR theme sets a min-width of 1000px for windows which are more
than 700px wide. This caused the cart popup window to be given a
min-width of 1000px, resulting in a broken layout with unnecessary
horizontal scrolling.
This patch adds a class to the cart template and to other pop-up window
templates to ensure that a large min-width is not enforced and to give
consistent padding to those pages.
To test, set your theme to 'CCSR' and view the following pop-up pages:
- The Cart. From the cart, trigger:
- The "send" window
- The "download" window
- From a view of a List's contents trigger:
- The "send" window"
- The "download" window
Each of these pages should look correct with no horizontal scrolling.
---
koha-tmpl/opac-tmpl/ccsr/en/css/colors.css | 5 +++++
koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt | 2 +-
.../opac-tmpl/prog/en/modules/opac-downloadcart.tt | 2 +-
.../prog/en/modules/opac-downloadshelf.tt | 2 +-
.../prog/en/modules/opac-sendbasketform.tt | 2 +-
.../prog/en/modules/opac-sendshelfform.tt | 2 +-
6 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/koha-tmpl/opac-tmpl/ccsr/en/css/colors.css b/koha-tmpl/opac-tmpl/ccsr/en/css/colors.css
index 7e8a946..c751c3d 100644
--- a/koha-tmpl/opac-tmpl/ccsr/en/css/colors.css
+++ b/koha-tmpl/opac-tmpl/ccsr/en/css/colors.css
@@ -13,6 +13,11 @@ body {
background-color : #eaeae6;
}
+body.popup {
+ min-width: 100px;
+ padding : 1em;
+}
+
#container {
background: #fff;
border:1px solid #d2d2cf;
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt
index 90a259e..09993af 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt
@@ -135,7 +135,7 @@ function enableCheckboxActions(){
[% 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 f594ffc..9af57c8 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-downloadcart.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-downloadcart.tt
@@ -1,6 +1,6 @@
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Download cart[% INCLUDE 'doc-head-close.inc' %]
-
+
[% UNLESS ( invalidlist ) %]
[% IF ( format ) %]
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasketform.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasketform.tt
index 927fc7a..d5da34d 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasketform.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasketform.tt
@@ -1,7 +1,7 @@
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Sending your cart
[% INCLUDE 'doc-head-close.inc' %]
-
+
[% IF ( email_add ) %]
[% IF ( SENT ) %]
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 f64eb08..fbe7add 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelfform.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelfform.tt
@@ -7,7 +7,7 @@
//]]>
-
+
[% IF ( email ) %]
[% IF ( SENT ) %]
--
1.7.9.5
From oleonard at myacpl.org Fri May 10 21:37:40 2013
From: oleonard at myacpl.org (Owen Leonard)
Date: Fri, 10 May 2013 15:37:40 -0400
Subject: [Koha-patches] [PATCH] Bug 10108 - can't print more than one page
of overdues
Message-ID: <1368214660-4038-1-git-send-email-oleonard@myacpl.org>
Printing a report like overdues in Firefox results in a printout which
cuts off in the middle. I traced the cause to something in the YUI grid
system, although I'm not sure what specific definition is the cause.
This patch adds a "screen" parameter to the @import which loads the YUI
grid CSS file. This will disable YUI grid layouts in print views. The
main disadvantage to this, as far as I can tell, is that it will
"linearize" some layouts. For instance: the patron detail page
(moremember.pl) which on screen is divided into two columns. I think
this disadvantage is outweighed by the ability to make complete prints.
To test, apply the patch and clear your cache. Try printing various
reports from Firefox. Printouts should look correct and be complete.
---
.../intranet-tmpl/prog/en/css/staff-global.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 8f99a11..eea165c 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
+++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
@@ -1,4 +1,4 @@
- at import url("../lib/yui/reset-fonts-grids.css");
+ at import url("../lib/yui/reset-fonts-grids.css") screen;
@import url("../lib/yui/skin.css");
input:focus, textarea:focus {
--
1.7.9.5
From oleonard at myacpl.org Fri May 10 22:06:23 2013
From: oleonard at myacpl.org (Owen Leonard)
Date: Fri, 10 May 2013 16:06:23 -0400
Subject: [Koha-patches] [PATCH] Bug 10196 - items table partially hidden in
marc view in ccsr
Message-ID: <1368216383-5063-1-git-send-email-oleonard@myacpl.org>
In the CCSR theme's OPAC MARC view the table of items is truncated
because the container div is styled with "overflow:hidden." I think the
complete display of information is more important than not seeing a
horizontal scrollbar, so this patch removes the style.
To test, apply the patch and clear your browser cache. View a MARC
detail page for a title which has holdings and confirm that the entire
table can be seen. Test other pages to make sure no unwanted layout
changes have resulted.
---
koha-tmpl/opac-tmpl/ccsr/en/css/colors.css | 1 -
1 file changed, 1 deletion(-)
diff --git a/koha-tmpl/opac-tmpl/ccsr/en/css/colors.css b/koha-tmpl/opac-tmpl/ccsr/en/css/colors.css
index 7e8a946..d13df28 100644
--- a/koha-tmpl/opac-tmpl/ccsr/en/css/colors.css
+++ b/koha-tmpl/opac-tmpl/ccsr/en/css/colors.css
@@ -21,7 +21,6 @@ body {
border-radius: 8px;
margin:0 20px;
padding: 10px;
- overflow: hidden;
}
a:link,
--
1.7.9.5
From oleonard at myacpl.org Mon May 13 16:00:25 2013
From: oleonard at myacpl.org (Owen Leonard)
Date: Mon, 13 May 2013 10:00:25 -0400
Subject: [Koha-patches] [PATCH] Bug 10233 - Toolbar background missing from
staff client catalogue page
Message-ID: <1368453625-7993-1-git-send-email-oleonard@myacpl.org>
The toolbar on the cataloging home page lacks the standard toolbar id,
resulting in an inconsistent appearance. This patch adds the correct id.
To test, apply the patch, clear your browser cache, and view the
cataloging home page (cataloguing/addbooks.pl). The toolbar should look
like other toolbars in Koha (for instance, members/members-home.pl).
---
.../prog/en/modules/cataloguing/addbooks.tt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 de597f2..9155235 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt
@@ -42,7 +42,7 @@
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
-
+
--
1.7.9.5
From oleonard at myacpl.org Mon May 13 18:36:16 2013
From: oleonard at myacpl.org (Owen Leonard)
Date: Mon, 13 May 2013 12:36:16 -0400
Subject: [Koha-patches] [PATCH] Bug 10237 - Enforce authorized value
character limitations
Message-ID: <1368462976-2885-1-git-send-email-oleonard@myacpl.org>
An authorized value should not have spaces or special characters other
than underscores and hyphens in it, but this limitation is not enforced.
This patch adds client-side validation blocking entries which contain
anything other than numbers, letters, underscores, or dashes. Changes
include:
- The addition of a custom alphanumeric validation scheme which can be
used anywhere in Koha.
- The addition of a new translatable warning message which appears when
the alphanumeric validation scheme is violated.
- The addition of rules to the authorized_values.tt template to enable
the new alphanumeric validation scheme.
To test, apply the patch and clear your browser cache.
With an existing category of authorized values (like ccode):
- Click to add new authorized value
- Try to enter invalid data in the "authorized value" form field. You
should see a warning.
- Try to submit a form with the invalid data. You should be prevented
from doing to.
- Correct the invalid data to conform to the validation rules. Warnings
should disappear.
- Submit the form. It should submit correctly.
With a new category:
- Click to create a new category.
- Try to enter invalid data in the "category" and "authorized value"
form fields. You should see warnings.
- Try to submit a form with the invalid data. You should be prevented
from doing to.
- Correct the invalid data to conform to the validation rules. Warnings
should disappear.
- Submit the form. It should submit correctly.
---
.../prog/en/includes/validator-strings.inc | 1 +
koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 4 +++
.../prog/en/modules/admin/authorised_values.tt | 26 +++++++++++++++-----
3 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/validator-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/validator-strings.inc
index 2ca4430..5259ba7 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/validator-strings.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/validator-strings.inc
@@ -11,6 +11,7 @@ $(document).ready(function(){
number: _("Please enter a valid number."),
digits: _("Please enter only digits."),
equalTo: _("Please enter the same value again."),
+ alphanumeric: _("Please use only letters, numbers, underscores, or dashes."),
maxlength: $.validator.format(_("Please enter no more than {0} characters.")),
minlength: $.validator.format(_("Please enter at least {0} characters.")),
rangelength: $.validator.format(_("Please enter a value between {0} and {1} characters long.")),
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..25c6d59 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js
+++ b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js
@@ -53,3 +53,7 @@ function openWindow(link,name,width,height) {
height = (typeof height == "undefined")?'400':height;
var newin=window.open(link,name,'width='+width+',height='+height+',resizable=yes,toolbar=false,scrollbars=yes,top');
}
+
+jQuery.validator.addMethod("alphanumeric", function(value, element) {
+ return this.optional(element) || /^[a-z0-9_\-]+$/i.test(value);
+});
\ No newline at end of file
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 5ba3072..1bcf228 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
@@ -27,6 +27,20 @@
$("#branches option:first").attr("selected", "selected");
}
$('#icons').tabs();
+
+ $("#authval_form").validate({
+ rules: {
+ "category": {
+ required: true,
+ alphanumeric: true
+ },
+ "authorised_value": {
+ required: true,
+ alphanumeric: true
+ }
+ }
+ });
+
});
//]]>
@@ -75,24 +89,24 @@ $(document).ready(function() {
[% IF ( action_modify ) %]
NOTE: If you change an authorized value, existing records using it won't be updated.