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

(-)a/C4/Biblio.pm (+39 lines)
Lines 1715-1720 sub GetMarcNotes { Link Here
1715
    return \@marcnotes;
1715
    return \@marcnotes;
1716
}
1716
}
1717
1717
1718
=head2 GetOPACMarcNotes
1719
1720
    $marcnotesarray = GetOPACMarcNotes( $record, $marcflavour );
1721
1722
    Get all notes from the MARC record and returns them in an array.
1723
    The notes are stored in different fields depending on MARC flavour.
1724
    MARC21 field 555 gets special attention for the $u subfields.
1725
1726
=cut
1727
1728
sub GetOPACMarcNotes {
1729
    my ( $record, $marcflavour ) = @_;
1730
    if (!$record) {
1731
        carp 'GetMarcNotes called on undefined record';
1732
        return;
1733
    }
1734
1735
    my $scope = $marcflavour eq "UNIMARC"? '3..': '5..';
1736
    my @marcnotes;
1737
    my %blacklist = map { $_ => 1 }
1738
        split( /,/, C4::Context->preference('NotesOPACBlacklist'));
1739
    foreach my $field ( $record->field($scope) ) {
1740
        my $tag = $field->tag();
1741
        next if $blacklist{ $tag };
1742
        if( $marcflavour ne 'UNIMARC' && $tag =~ /555/ ) {
1743
            # Field 555$u contains URLs
1744
            # We first push the regular subfields and all $u's separately
1745
            # Leave further actions to the template
1746
            push @marcnotes, { marcnote => $field->as_string('abcd') };
1747
            foreach my $sub ( $field->subfield('u') ) {
1748
                push @marcnotes, { marcnote => $sub };
1749
            }
1750
        } else {
1751
            push @marcnotes, { marcnote => $field->as_string() };
1752
        }
1753
    }
1754
    return \@marcnotes;
1755
}
1756
1718
=head2 GetMarcSubjects
1757
=head2 GetMarcSubjects
1719
1758
1720
  $marcsubjcts = GetMarcSubjects($record,$marcflavour);
1759
  $marcsubjcts = GetMarcSubjects($record,$marcflavour);
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 280-285 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
280
('NorwegianPatronDBPassword','',NULL,'Password for communication with the Norwegian national patron database.','Free'),
280
('NorwegianPatronDBPassword','',NULL,'Password for communication with the Norwegian national patron database.','Free'),
281
('NorwegianPatronDBSearchNLAfterLocalHit','0',NULL,'Search NL if a search has already given one or more local hits?.','YesNo'),
281
('NorwegianPatronDBSearchNLAfterLocalHit','0',NULL,'Search NL if a search has already given one or more local hits?.','YesNo'),
282
('NotesBlacklist','',NULL,'List of notes fields that should not appear in the title notes/description separator of details','free'),
282
('NotesBlacklist','',NULL,'List of notes fields that should not appear in the title notes/description separator of details','free'),
283
('NotesOPACBlacklist','',NULL,'List of notes fields that should not appear in the title notes/description separator of details','free'),
283
('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'),
284
('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'),
284
('NoticeBcc','','','Email address to bcc outgoing notices sent by email','free'),
285
('NoticeBcc','','','Email address to bcc outgoing notices sent by email','free'),
285
('NoticeCSS','',NULL,'Notices CSS url.','free'),
286
('NoticeCSS','',NULL,'Notices CSS url.','free'),
(-)a/installer/data/mysql/updatedatabase.pl (+9 lines)
Lines 14617-14622 if( CheckVersion( $DBversion ) ) { Link Here
14617
    SetVersion( $DBversion );
14617
    SetVersion( $DBversion );
14618
    print "Upgrade to $DBversion done (Bug 18718 - Language selector in staff header menu similar to OPAC )\n";
14618
    print "Upgrade to $DBversion done (Bug 18718 - Language selector in staff header menu similar to OPAC )\n";
14619
}
14619
}
14620
$DBversion = '17.06.00.006';
14621
if( CheckVersion( $DBversion ) ) {
14622
    $dbh->do(q{
14623
        INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('NotesOPACBlacklist','','List of notes fields that should not appear in the title notes/description separator of details',NULL,'free')
14624
        });
14625
14626
    SetVersion( $DBversion );
14627
    print "Upgrade to $DBversion done (Bug 9495 - split NotesBlacklist in to two prefs for staff and OPAC )\n";
14628
}
14620
14629
14621
$DBversion = '17.06.00.006';
14630
$DBversion = '17.06.00.006';
14622
if( CheckVersion( $DBversion ) ) {
14631
if( CheckVersion( $DBversion ) ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (+5 lines)
Lines 202-207 Cataloging: Link Here
202
              class: multi
202
              class: multi
203
            - note fields in title notes separator (OPAC record details) and in the description separator (Staff client record details). The fields should appear separated with commas and according with the Koha MARC format (eg 3.. for UNIMARC, 5.. for MARC21)
203
            - note fields in title notes separator (OPAC record details) and in the description separator (Staff client record details). The fields should appear separated with commas and according with the Koha MARC format (eg 3.. for UNIMARC, 5.. for MARC21)
204
        -
204
        -
205
            - Don't show these
206
            - pref: NotesOPACBlacklist
207
              class: multi
208
            - note fields in title notes separator (OPAC record details). The fields should appear separated with commas and according with the Koha MARC format (eg 3.. for UNIMARC, 5.. for MARC21)
209
        -
205
            - pref: AcquisitionDetails
210
            - pref: AcquisitionDetails
206
              choices:
211
              choices:
207
                  yes: Display
212
                  yes: Display
(-)a/opac/opac-detail.pl (-2 / +1 lines)
Lines 748-754 if (!C4::Context->preference("OPACXSLTDetailsDisplay") ) { Link Here
748
    );
748
    );
749
}
749
}
750
750
751
my $marcnotesarray   = GetMarcNotes   ($record,$marcflavour);
751
my $marcnotesarray   = GetOPACMarcNotes   ($record,$marcflavour);
752
my $subtitle         = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber));
752
my $subtitle         = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber));
753
753
754
    $template->param(
754
    $template->param(
755
- 

Return to bug 9495