Merge git://git.koha.org/pub/scm/koha
This commit is contained in:
commit
b5970e02b2
48
C4/Biblio.pm
48
C4/Biblio.pm
|
|
@ -1879,12 +1879,8 @@ sub GetMarcSubjects {
|
|||
}
|
||||
my $separator = C4::Context->preference("authoritysep") unless $counter==0;
|
||||
# ignore $9
|
||||
push @subfields_loop, {code => $code, value => $value, link_loop => \@link_loop, separator => $separator} unless ($subject_subfield->[0] == 9 );
|
||||
# this needs to be added back in in a way that the template can expose it properly
|
||||
#if ( $code == 9 ) {
|
||||
# $link = "an:".$subject_subfield->[1];
|
||||
# $flag = 1;
|
||||
#}
|
||||
my @this_link_loop = @link_loop;
|
||||
push @subfields_loop, {code => $code, value => $value, link_loop => \@this_link_loop, separator => $separator} unless ($subject_subfield->[0] == 9 );
|
||||
$counter++;
|
||||
}
|
||||
|
||||
|
|
@ -1926,25 +1922,37 @@ sub GetMarcAuthors {
|
|||
|
||||
foreach my $field ( $record->fields ) {
|
||||
next unless $field->tag() >= $mintag && $field->tag() <= $maxtag;
|
||||
my %hash;
|
||||
my @subfields_loop;
|
||||
my @link_loop;
|
||||
my @subfields = $field->subfields();
|
||||
my $count_auth = 0;
|
||||
# if there is an authority link, build the link with Koha-Auth-Number: subfield9
|
||||
my $subfield9 = $field->subfield('9');
|
||||
for my $authors_subfield (@subfields) {
|
||||
#unimarc-specific line
|
||||
next if ($marcflavour eq 'UNIMARC' and (($authors_subfield->[0] eq '3') or ($authors_subfield->[0] eq '5')));
|
||||
# don't load unimarc subfields 3, 5
|
||||
next if ($marcflavour eq 'UNIMARC' and ($authors_subfield->[0] =~ (3|5) ) );
|
||||
my $subfieldcode = $authors_subfield->[0];
|
||||
my $value;
|
||||
# deal with UNIMARC author responsibility
|
||||
if ( $marcflavour eq 'UNIMARC' and ($authors_subfield->[0] eq '4')) {
|
||||
$value = "(".GetAuthorisedValueDesc( $field->tag(), $authors_subfield->[0], $authors_subfield->[1], '', $tagslib ).")";
|
||||
} else {
|
||||
$value = $authors_subfield->[1];
|
||||
}
|
||||
$hash{tag} = $field->tag;
|
||||
$hash{value} .= $value . " " if ($subfieldcode != 9) ;
|
||||
$hash{link} .= $value if ($subfieldcode eq 9);
|
||||
my $value = $authors_subfield->[1];
|
||||
my $linkvalue = $value;
|
||||
$linkvalue =~ s/(\(|\))//g;
|
||||
my $operator = " and " unless $count_auth==0;
|
||||
# if we have an authority link, use that as the link, otherwise use standard searching
|
||||
if ($subfield9) {
|
||||
@link_loop = ({'limit' => 'Koha-Auth-Number' ,link => "$subfield9" });
|
||||
}
|
||||
else {
|
||||
# reset $linkvalue if UNIMARC author responsibility
|
||||
if ( $marcflavour eq 'UNIMARC' and ($authors_subfield->[0] eq '4')) {
|
||||
$linkvalue = "(".GetAuthorisedValueDesc( $field->tag(), $authors_subfield->[0], $authors_subfield->[1], '', $tagslib ).")";
|
||||
}
|
||||
push @link_loop, {'limit' => 'au', link => $linkvalue, operator => $operator };
|
||||
}
|
||||
my @this_link_loop = @link_loop;
|
||||
my $separator = C4::Context->preference("authoritysep") unless $count_auth==0;
|
||||
push @subfields_loop, {code => $subfieldcode, value => $value, link_loop => \@this_link_loop, separator => $separator} unless ($authors_subfield->[0] == 9 );
|
||||
$count_auth++;
|
||||
}
|
||||
push @marcauthors, \%hash;
|
||||
push @marcauthors, { MARCAUTHOR_SUBFIELDS_LOOP => \@subfields_loop };
|
||||
}
|
||||
return \@marcauthors;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -885,7 +885,7 @@ sub buildQuery {
|
|||
foreach my $this_limit (@limits) {
|
||||
if ( $this_limit =~ /available/ ) {
|
||||
# available is defined as (items.notloan is NULL) and (items.itemlost > 0 or NULL) (last clause handles NULL values for lost in zebra)
|
||||
$availability_limit .="( ( allrecords,AlwaysMatches='' not onloan,AlwaysMatches='') and ((lost,st-numeric gt 0) or ( allrecords,AlwaysMatches='' not lost,AlwaysMatches='')) )";
|
||||
$availability_limit .="( ( allrecords,AlwaysMatches='' not onloan,AlwaysMatches='') and ((lost,st-numeric ge 0) or ( allrecords,AlwaysMatches='' not lost,AlwaysMatches='')) )";
|
||||
$limit_cgi .= "&limit=available";
|
||||
$limit_desc .="";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,11 +210,11 @@ for ( my $tabloop = 0 ; $tabloop <= 10 ; $tabloop++ ) {
|
|||
}
|
||||
if ( $#subfields_data == 0 ) {
|
||||
$subfields_data[0]->{marc_lib} = '';
|
||||
$subfields_data[0]->{marc_subfield} = '';
|
||||
# $subfields_data[0]->{marc_subfield} = '';
|
||||
}
|
||||
if ( $#subfields_data >= 0 ) {
|
||||
if ( $#subfields_data >= 0) {
|
||||
my %tag_data;
|
||||
if ( $fields[$x_i]->tag() eq $fields[ $x_i - 1 ]->tag() ) {
|
||||
if ( $fields[$x_i]->tag() eq $fields[ $x_i - 1 ]->tag() && (C4::Context->preference('LabelMARCView') eq 'economical')) {
|
||||
$tag_data{tag} = "";
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<h4>Refine your search</h4>
|
||||
<ul>
|
||||
<li>Availability<ul>
|
||||
<li><!-- TMPL_IF NAME="available" -->Showing only <strong>available</strong> items. <a href="/cgi-bin/koha/catalogue/search.pl?<!-- TMPL_VAR NAME="query_cgi" --><!-- TMPL_VAR NAME="limit_cgi_not_availablity" -->">Show all items</a><!-- TMPL_ELSE -->Limit to <a href="/cgi-bin/koha/catalogue/search.pl?<!-- TMPL_VAR NAME="query_cgi" --><!-- TMPL_VAR NAME="limit_cgi" -->&limit=available">currently available items.</a><!-- /TMPL_IF -->
|
||||
<li><!-- TMPL_IF NAME="available" -->Showing only <strong>available</strong> items. <a href="/cgi-bin/koha/catalogue/search.pl?<!-- TMPL_VAR NAME="query_cgi" --><!-- TMPL_VAR NAME="limit_cgi_not_availablity" --><!-- TMPL_IF NAME="sort_by" -->&sort_by=<!-- TMPL_VAR NAME="sort_by" --><!-- /TMPL_IF -->">Show all items</a><!-- TMPL_ELSE -->Limit to <a href="/cgi-bin/koha/catalogue/search.pl?<!-- TMPL_VAR NAME="query_cgi" --><!-- TMPL_VAR NAME="limit_cgi" --><!-- TMPL_IF NAME="sort_by" -->&sort_by=<!-- TMPL_VAR NAME="sort_by" --><!-- /TMPL_IF -->&limit=available">currently available items.</a><!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="related" --> <li>(related searches: <!-- TMPL_LOOP NAME="related" --><!-- TMPL_VAR NAME="related_search" --><!-- /TMPL_LOOP -->)</li><!-- /TMPL_IF -->.
|
||||
</li></ul>
|
||||
|
||||
|
|
|
|||
|
|
@ -61,17 +61,16 @@ function verify_images() {
|
|||
<ul>
|
||||
<!-- TMPL_IF name="MARCAUTHORS" -->
|
||||
<li><strong>Additional Authors:</strong><ul>
|
||||
<!-- TMPL_LOOP NAME="MARCAUTHORS" -->
|
||||
<li><a href="/cgi-bin/koha/catalogue/search.pl?q=Koha-Auth-Number:<!-- TMPL_VAR NAME="link" -->">
|
||||
<!-- TMPL_VAR NAME="value" -->
|
||||
</a></li>
|
||||
<!-- TMPL_LOOP NAME="MARCAUTHORS" -->
|
||||
<li><!-- TMPL_LOOP NAME="MARCAUTHOR_SUBFIELDS_LOOP" --><!-- TMPL_VAR NAME="separator" --><a title="‡<!-- TMPL_VAR NAME=code --> <!-- TMPL_VAR NAME=value -->" href="/cgi-bin/koha/catalogue/search.pl?q=<!-- TMPL_LOOP NAME=link_loop --><!-- TMPL_VAR NAME=operator --><!-- TMPL_VAR name='limit' -->:<!-- TMPL_VAR NAME=link --><!-- /TMPL_LOOP -->"><!-- TMPL_VAR NAME="value" --></a><!-- /TMPL_LOOP --></li>
|
||||
<!-- /TMPL_LOOP -->
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="publishercode" -->
|
||||
<li><strong>Published by:</strong>
|
||||
<a href="/cgi-bin/koha/opac-search.pl?q=pb:<!-- TMPL_VAR NAME="publishercode"-->">
|
||||
<a href="/cgi-bin/koha/catalogue/search.pl?q=pb:<!-- TMPL_VAR NAME="publishercode"-->">
|
||||
<!-- TMPL_VAR NAME="publishercode" -->
|
||||
</a> <!-- TMPL_IF name="place" -->(<!-- TMPL_VAR NAME="place"-->)<!--/TMPL_IF--> <!-- TMPL_IF NAME="publicationyear" -->, <!-- TMPL_VAR NAME="publicationyear" --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="editionstatement" --><!-- TMPL_VAR NAME="editionstatement" --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="editionresponsability" --><!-- TMPL_VAR NAME="editionresponsability" --><!-- /TMPL_IF -->
|
||||
</li>
|
||||
|
|
@ -160,9 +159,9 @@ function verify_images() {
|
|||
<td><!-- TMPL_VAR NAME="branchname" --> <!-- TMPL_VAR name="location" --> <!-- TMPL_IF NAME="itemcallnumber" --> <!-- TMPL_VAR NAME="itemcallnumber" --><!-- /TMPL_IF --></td>
|
||||
<td><!-- TMPL_IF name="datedue" -->
|
||||
<!-- TMPL_IF NAME="NOTSAMEBRANCH" -->
|
||||
On issue to a borrower from another branch
|
||||
Checked out to a borrower from another branch
|
||||
<!-- TMPL_ELSE -->
|
||||
On issue to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></a>
|
||||
Checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></a>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_ELSE -->
|
||||
<!-- TMPL_IF name="bi_notforloan" -->
|
||||
|
|
|
|||
|
|
@ -51,11 +51,10 @@
|
|||
|
||||
<!-- TMPL_IF name="MARCAUTHORS" -->
|
||||
<p><span class="label">Authors:</span>
|
||||
<!-- TMPL_LOOP NAME="MARCAUTHORS" -->
|
||||
<a href="/cgi-bin/koha/opac-search.pl?q=au:<!-- TMPL_VAR NAME="value" -->">
|
||||
<!-- TMPL_VAR NAME="value" -->
|
||||
</a>|
|
||||
<!-- /TMPL_LOOP -->
|
||||
<!-- TMPL_LOOP NAME="MARCAUTHORS" -->
|
||||
<!-- TMPL_LOOP NAME="MARCAUTHOR_SUBFIELDS_LOOP" --><!-- TMPL_VAR NAME="separator" --><a title="‡<!-- TMPL_VAR NAME=code --> <!-- TMPL_VAR NAME=value -->" href="/cgi-bin/koha/opac-search.pl?q=<!-- TMPL_LOOP NAME=link_loop --><!-- TMPL_VAR NAME=operator --><!-- TMPL_VAR name='limit' -->:<!-- TMPL_VAR NAME=link --><!-- /TMPL_LOOP -->"><!-- TMPL_VAR NAME="value" --></a><!-- /TMPL_LOOP -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
|
||||
</p>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="editionstatement" -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue