View | Details | Raw Unified | Return to bug 6129
Collapse All | Expand All

(-)a/C4/Biblio.pm (-2 / +4 lines)
Lines 1624-1630 sub GetMarcAuthors { Link Here
1624
1624
1625
=head2 GetMarcUrls
1625
=head2 GetMarcUrls
1626
1626
1627
  $marcurls = GetMarcUrls($record,$marcflavour);
1627
  $marcurls = GetMarcUrls($record,$marcflavour,$issn);
1628
1628
1629
Returns arrayref of URLs from MARC data, suitable to pass to tmpl loop.
1629
Returns arrayref of URLs from MARC data, suitable to pass to tmpl loop.
1630
Assumes web resources (not uncommon in MARC21 to omit resource type ind) 
1630
Assumes web resources (not uncommon in MARC21 to omit resource type ind) 
Lines 1632-1638 Assumes web resources (not uncommon in MARC21 to omit resource type ind) Link Here
1632
=cut
1632
=cut
1633
1633
1634
sub GetMarcUrls {
1634
sub GetMarcUrls {
1635
    my ( $record, $marcflavour ) = @_;
1635
    my ( $record, $marcflavour, $issn ) = @_;
1636
1636
1637
    my @marcurls;
1637
    my @marcurls;
1638
    for my $field ( $record->field('856') ) {
1638
    for my $field ( $record->field('856') ) {
Lines 1642-1647 sub GetMarcUrls { Link Here
1642
        }
1642
        }
1643
        my @urls = $field->subfield('u');
1643
        my @urls = $field->subfield('u');
1644
        foreach my $url (@urls) {
1644
        foreach my $url (@urls) {
1645
            $url .= "?sid=&ISSN=$issn"
1646
              if $issn && ($url =~ m/\bserialssolutions\b/o) && ($url !~ m/\bISSN=/o);
1645
            my $marcurl;
1647
            my $marcurl;
1646
            if ( $marcflavour eq 'MARC21' ) {
1648
            if ( $marcflavour eq 'MARC21' ) {
1647
                my $s3   = $field->subfield('3');
1649
                my $s3   = $field->subfield('3');
(-)a/basket/basket.pl (-2 / +2 lines)
Lines 65-72 foreach my $biblionumber ( @bibs ) { Link Here
65
    my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
65
    my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
66
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
66
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
67
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
67
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
68
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
68
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour,$dat->{issn});
69
    my @items            = GetItemsInfo( $biblionumber );
69
    my @items            = GetItemsInfo( $biblionumber, 'opac' );
70
70
71
    my $hasauthors = 0;
71
    my $hasauthors = 0;
72
    if($dat->{'author'} || @$marcauthorsarray) {
72
    if($dat->{'author'} || @$marcauthorsarray) {
(-)a/catalogue/detail.pl (-2 / +8 lines)
Lines 99-110 $template->param( Link Here
99
    normalized_isbn => $isbn,
99
    normalized_isbn => $isbn,
100
);
100
);
101
101
102
unless (defined($record)) {
103
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
104
	exit;
105
}
106
107
my $dat = &GetBiblioData($biblionumber);
108
102
my $marcnotesarray   = GetMarcNotes( $record, $marcflavour );
109
my $marcnotesarray   = GetMarcNotes( $record, $marcflavour );
103
my $marcisbnsarray   = GetMarcISBN( $record, $marcflavour );
110
my $marcisbnsarray   = GetMarcISBN( $record, $marcflavour );
104
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
111
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
105
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
112
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
106
my $marcseriesarray  = GetMarcSeries($record,$marcflavour);
113
my $marcseriesarray  = GetMarcSeries($record,$marcflavour);
107
my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
114
my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour,$dat->{issn});
108
my $subtitle         = GetRecordValue('subtitle', $record, $fw);
115
my $subtitle         = GetRecordValue('subtitle', $record, $fw);
109
116
110
# Get Branches, Itemtypes and Locations
117
# Get Branches, Itemtypes and Locations
Lines 117-123 my @items; Link Here
117
for my $itm (@all_items) {
124
for my $itm (@all_items) {
118
    push @items, $itm unless ( $itm->{itemlost} && GetHideLostItemsPreference($borrowernumber) && !$showallitems);
125
    push @items, $itm unless ( $itm->{itemlost} && GetHideLostItemsPreference($borrowernumber) && !$showallitems);
119
}
126
}
120
my $dat = &GetBiblioData($biblionumber);
121
127
122
# get count of holds
128
# get count of holds
123
my ( $holdcount, $holds ) = GetReservesFromBiblionumber($biblionumber,1);
129
my ( $holdcount, $holds ) = GetReservesFromBiblionumber($biblionumber,1);
(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl (-1 / +4 lines)
Lines 436-441 Link Here
436
        </xsl:for-each>
436
        </xsl:for-each>
437
        </span>
437
        </span>
438
        </xsl:if>
438
        </xsl:if>
439
        <xsl:variable name="issn"><xsl:if test="marc:datafield[@tag=022]"><xsl:value-of select="marc:datafield[@tag=022]/marc:subfield[@code='a']"/></xsl:if></xsl:variable>
439
440
440
        <!-- Other Title  Statement: Alternate Graphic Representation (MARC 880) -->
441
        <!-- Other Title  Statement: Alternate Graphic Representation (MARC 880) -->
441
        <xsl:if test="$display880">
442
        <xsl:if test="$display880">
Lines 539-545 Link Here
539
        <span class="results_summary"><span class="label">Online Resources: </span>
540
        <span class="results_summary"><span class="label">Online Resources: </span>
540
        <xsl:for-each select="marc:datafield[@tag=856]">
541
        <xsl:for-each select="marc:datafield[@tag=856]">
541
            <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
542
            <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
542
            <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
543
            <xsl:variable name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:variable>
544
            <!--        <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/><xsl:if test="$issn and matches(marc:subfield[@code='u'], 'serialssolutions') and not matches(marc:subfield[@code='u'], 'ISSN')">?ISSN=<xsl:value-of select="$issn"/></xsl:if></xsl:attribute> -->
545
            <a><xsl:attribute name="href"><xsl:value-of select="$href"/><xsl:if test="$issn and contains($href, 'serialssolutions') and not(contains($href, 'ISSN'))">?sid=&amp;ISSN=<xsl:value-of select="$issn"/></xsl:if></xsl:attribute>
543
            <xsl:if test="$OPACURLOpenInNewWindow='1'">
546
            <xsl:if test="$OPACURLOpenInNewWindow='1'">
544
                <xsl:attribute name="target">_blank</xsl:attribute>
547
                <xsl:attribute name="target">_blank</xsl:attribute>
545
            </xsl:if>
548
            </xsl:if>
(-)a/opac/opac-basket.pl (-1 / +1 lines)
Lines 67-73 foreach my $biblionumber ( @bibs ) { Link Here
67
    my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
67
    my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
68
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
68
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
69
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
69
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
70
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
70
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour,$dat->{issn});
71
    my @items            = &GetItemsLocationInfo( $biblionumber );
71
    my @items            = &GetItemsLocationInfo( $biblionumber );
72
    my $subtitle         = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber));
72
    my $subtitle         = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber));
73
73
(-)a/opac/opac-detail.pl (-7 / +6 lines)
Lines 97-108 my $hideitems = 1 if C4::Context->preference('hidelostitems') or scalar(@hiddeni Link Here
97
# Hide items
97
# Hide items
98
if ($hideitems) {
98
if ($hideitems) {
99
    for my $itm (@all_items) {
99
    for my $itm (@all_items) {
100
	if  ( C4::Context->preference('hidelostitems') ) {
100
        if  ( C4::Context->preference('hidelostitems') ) {
101
	    push @items, $itm unless $itm->{itemlost} or any { $itm->{'itemnumber'} eq $_ } @hiddenitems;
101
            push @items, $itm unless $itm->{itemlost} or any { $itm->{'itemnumber'} eq $_ } @hiddenitems;
102
	} else {
102
        } else {
103
	    push @items, $itm unless any { $itm->{'itemnumber'} eq $_ } @hiddenitems;
103
            push @items, $itm unless any { $itm->{'itemnumber'} eq $_ } @hiddenitems;
104
        }
104
    }
105
    }
105
}
106
} else {
106
} else {
107
    # Or not
107
    # Or not
108
    @items = @all_items;
108
    @items = @all_items;
Lines 223-229 my $marcisbnsarray = GetMarcISBN ($record,$marcflavour); Link Here
223
my $marcauthorsarray = GetMarcAuthors ($record,$marcflavour);
223
my $marcauthorsarray = GetMarcAuthors ($record,$marcflavour);
224
my $marcsubjctsarray = GetMarcSubjects($record,$marcflavour);
224
my $marcsubjctsarray = GetMarcSubjects($record,$marcflavour);
225
my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
225
my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
226
my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
226
my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour,$dat->{issn});
227
my $subtitle         = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber));
227
my $subtitle         = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber));
228
228
229
    $template->param(
229
    $template->param(
230
- 

Return to bug 6129