Merge remote-tracking branch 'kc/3.8.x' into 3.8.x

This commit is contained in:
Chris Cormack 2013-05-16 09:45:55 +12:00
commit f05bb04470
40 changed files with 73 additions and 56 deletions

View File

@ -2251,6 +2251,7 @@ sub _koha_modify_item {
my $query = "UPDATE items SET ";
my @bind;
for my $key ( keys %$item ) {
next if ( $key eq 'itemnumber' );
$query.="$key=?,";
push @bind, $item->{$key};
}

View File

@ -386,6 +386,7 @@ $template->param(
# CHECKME: gst-stuff needs verifing, mason.
gstrate => $bookseller->{'gstrate'} // C4::Context->preference("gist") // 0,
gstreg => $bookseller->{'gstreg'},
acqcreate => C4::Context->preference("AcqCreateItem") eq "ordering" ? 1 : ""
);
output_html_with_http_headers $input, $cookie, $template->output;

View File

@ -163,7 +163,6 @@ if ( $count == 1 ) {
quantityreceived => @$results[0]->{'quantityreceived'},
rrp => @$results[0]->{'rrp'},
ecost => sprintf( "%.2f",$order->{'ecost'}),
unitprice => sprintf( "%.2f",$order->{'unitprice'}),
memberfirstname => $member->{firstname} || "",
membersurname => $member->{surname} || "",
invoice => $invoice,
@ -174,6 +173,15 @@ if ( $count == 1 ) {
surnamesuggestedby => $suggestion->{surnamesuggestedby},
firstnamesuggestedby => $suggestion->{firstnamesuggestedby},
);
# regardless of the content of 'unitprice' e.g 0 or '' or any string will return in these cases 0.00
# and the 'IF' in the .tt will show 0.00 and not 'ecost' (see BZ 7129)
# So if 'unitprice' == 0 we don't create unitprice
if ( $order->{'unitprice'} != 0) {
$template->param(
unitprice => sprintf( "%.2f",$order->{'unitprice'}),
);
}
}
else {
my @loop;

View File

@ -428,6 +428,7 @@ sub StringSearch {
my $sth = $dbh->prepare("Select variable,value,explanation,type,options from systempreferences where (variable like ?) order by variable");
$sth->execute($syspref);
while ( my $data = $sth->fetchrow_hashref ) {
unless (defined $data->{value}) { $data->{value} = "";}
$data->{shortvalue} = $data->{value};
$data->{shortvalue} = substr( $data->{value}, 0, 60 ) . "..." if defined( $data->{value} ) and length( $data->{value} ) > 60;
push( @results, $data );
@ -460,6 +461,7 @@ sub StringSearch {
}
while ( my $data = $sth->fetchrow_hashref ) {
unless (defined $data->{value}) { $data->{value} = "";}
$data->{shortvalue} = $data->{value};
$data->{shortvalue} = substr( $data->{value}, 0, 60 ) . "..." if length( $data->{value} ) > 60;
push( @results, $data );

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -3,7 +3,7 @@
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Communnity</orgname>
<orgname>The Koha Community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>

View File

@ -20,16 +20,6 @@
SetEnv MEMCACHED_SERVERS "__MEMCACHED_SERVERS__"
SetEnv MEMCACHED_NAMESPACE "__MEMCACHED_NAMESPACE__"
<Directory "__OPAC_WWW_DIR__">
Options -Indexes
</Directory>
# Secure internal stuff
<DirectoryMatch "__OPAC_WWW_DIR__/.*/(modules|xslt|includes)">
Order deny,allow
Deny from all
</DirectoryMatch>
<IfModule mod_gzip.c>
mod_gzip_on yes
mod_gzip_dechunk yes
@ -129,16 +119,6 @@
ErrorDocument 404 /cgi-bin/koha/errors/404.pl
ErrorDocument 500 /cgi-bin/koha/errors/500.pl
<Directory "__INTRANET_WWW_DIR__">
Options -Indexes
</Directory>
# Secure internal stuff
<DirectoryMatch "__INTRANET_WWW_DIR__/.*/(modules|xslt|includes)">
Order deny,allow
Deny from all
</DirectoryMatch>
<IfModule mod_gzip.c>
mod_gzip_on yes
mod_gzip_dechunk yes

View File

@ -28,6 +28,13 @@ KOHA.LocalCover = {
'/cgi-bin/koha/catalogue/image.pl?thumbnail=1&biblionumber=' + $(mydiv).attr("class"))
.load(function () {
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
//IE HACK
try {
$(mydiv).append(img);
$(mydiv).children('.no-image').remove();
}
catch(err){
}
} else {
if (uselink) {
var a = $("<a />").attr('href', '/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=' + $(mydiv).attr("class"));

View File

@ -129,6 +129,7 @@ $(document).ready(function()
//We apply the fonction only for modify option
[% IF ( quantityrec ) %]
[% IF ( acqcreate ) %]
$('#quantity').blur(function()
{
// if user decreases the quantity
@ -147,6 +148,7 @@ $(document).ready(function()
}
});
[% END %]
[% END %]
//keep a copy of all budgets before removing the inactives
disabledBudgetsCopy = $('#budget_id').html();

View File

@ -38,7 +38,7 @@ $(document).ready(function() {
[% INCLUDE 'cat-search.inc' %]
<div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a> &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]&amp;searchfield=[% tagfield %]">[% frameworkcode %] framework structure</a> &rsaquo;
<a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a> &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]&amp;searchfield=[% tagfield %]">[% frameworkcode or "Default" %] framework structure</a> &rsaquo;
[% IF ( add_form ) %]
[% IF ( use_heading_flags_p ) %]
[% IF ( heading_edit_subfields_p ) %] <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield %]&amp;frameworkcode=[% frameworkcode %]">Tag [% tagfield %] subfield structure</a> &rsaquo; Edit subfields constraints
@ -71,8 +71,7 @@ $(document).ready(function() {
<input type="hidden" name="op" value="add_validate" />
<input type="hidden" name="tagfield" value="[% tagfield %]" />
<input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
<input type="submit" value="Save changes" />
<div id="subfieldtabs" class="toptabs numbered">
<ul>
[% FOREACH loo IN loop %]
@ -129,6 +128,9 @@ $(document).ready(function() {
</div><!-- /content_sub -->
[% END %]
</div><!-- /content -->
<fieldset class="action">
<input type="submit" value="Save changes" /> <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield %]&amp;frameworkcode=[% frameworkcode %]" class="cancel">Cancel</a>
</fieldset>
</form>
[% END %]

View File

@ -133,7 +133,7 @@
[% IF ( f7b ) %]
<option value="b" selected="selected">b- Serial component part</option>
[% ELSE %]
<option value="b">a- Serial component part</option>
<option value="b">b- Serial component part</option>
[% END %]
[% IF ( f7c ) %]
<option value="c" selected="selected">c- Collection</option>

View File

@ -106,7 +106,7 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
"data": {ok: $(event.target).attr("title"), CGISESSID: readCookie('CGISESSID')},
"success": count_approve // success_approve
});
$(event.target).next(".rej").removeAttr("disabled").attr("value","Reject").css("color","#000");
$(event.target).next(".rej").removeAttr("disabled").attr("value",_("Reject")).css("color","#000");
$(event.target).attr( "value",_("Approved")).attr("disabled","disabled").css("color","#666");
return false; // cancel submit
}
@ -115,7 +115,7 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
"data": {rej: $(event.target).attr("title"), CGISESSID: readCookie('CGISESSID')},
"success": count_reject // success_reject
});
$(event.target).prev(".ok").removeAttr("disabled").attr("value","Approve").css("color","#000");
$(event.target).prev(".ok").removeAttr("disabled").attr("value",_("Approve")).css("color","#000");
$(event.target).attr( "value",_("Rejected")).attr("disabled","disabled").css("color","#666");
return false; // cancel submit
}
@ -249,8 +249,8 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
</table>
[% END %]
[% IF ( tagloop ) %]<fieldset class="action">
<input type="submit" value="Approve" id="approve_button" name="op" />
<input type="submit" value="Reject" id="reject_button" name="op" />
<input type="submit" value="Approve" id="approve_button" name="op-approve" />
<input type="submit" value="Reject" id="reject_button" name="op-reject" />
</fieldset>[% END %]
</form>
</div>
@ -278,7 +278,7 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
<div class="description">Enter a word or phrase to check against approved/rejected lists: </div>
<form method="post" action="/cgi-bin/koha/tags/review.pl">
<input type="text" size="14" name="test" id="test" />
<fieldset class="action"><input type="submit" value="Test" id="test_button" name="op" /></fieldset>
<fieldset class="action"><input type="submit" value="Test" id="test_button" name="op-test" /></fieldset>
<div id="verdict">
[% IF ( test_term ) %]
[% IF ( verdict_ok ) %]

View File

@ -2,7 +2,7 @@
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
<xsl:stylesheet version="1.0"
xmlns:marc="http://www.loc.gov/MARC21/slim"
xmlns:items="http://www.koha.org/items"
xmlns:items="http://www.koha-community.org/items"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="marc items">
<xsl:import href="UNIMARCslimUtils.xsl"/>

View File

@ -4,6 +4,7 @@
<xsl:stylesheet version="1.0"
xmlns:marc="http://www.loc.gov/MARC21/slim"
xmlns:items="http://www.koha-community.org/items"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="marc items">

View File

@ -28,6 +28,13 @@ KOHA.LocalCover = {
'/cgi-bin/koha/opac-image.pl?thumbnail=1&biblionumber=' + $(mydiv).attr("class"))
.load(function () {
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
//IE HACK
try {
$(mydiv).append(img);
$(mydiv).children('.no-image').remove();
}
catch(err){
};
} else {
if (uselink) {
var a = $("<a />").attr('href', '/cgi-bin/koha/opac-imageviewer.pl?biblionumber=' + $(mydiv).attr("class"));

View File

@ -141,7 +141,7 @@ $(document).ready(function(){
$("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
$("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
[% IF ( opacbookbag ) %]$("span.addto").html(param1);[% ELSE %][% IF ( virtualshelves ) %][% IF ( loggedinusername ) %]$("span.addto").html(param1);[% END %][% END %][% END %]
[% IF ( opacbookbag ) %]
[% IF ( opacbookbag || virtualshelves ) %]
[% IF ( virtualshelves ) %]
$("#addto").change(function(){
cartList();

View File

@ -4,6 +4,7 @@
<xsl:stylesheet version="1.0"
xmlns:marc="http://www.loc.gov/MARC21/slim"
xmlns:items="http://www.koha-community.org/items"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="marc items">

View File

@ -1,4 +1,4 @@
#!/bin/perl
#!/usr/bin/perl
use Modern::Perl;
use C4::SocialData;

View File

@ -89,7 +89,12 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({
});
my ($op, @errors, @tags);
$op = lc($input->param('op')) || 'none';
foreach (qw( approve reject test )) {
$op = $_ if ( $input->param("op-$_") );
}
$op ||= 'none';
@tags = $input->param('tags');
$borrowernumber == 0 and push @errors, {op_zero=>1};