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

(-)a/C4/Biblio.pm (+39 lines)
Lines 1720-1725 sub GetMarcNotes { Link Here
1720
    return \@marcnotes;
1720
    return \@marcnotes;
1721
}
1721
}
1722
1722
1723
=head2 GetOPACMarcNotes
1724
1725
    $marcnotesarray = GetOPACMarcNotes( $record, $marcflavour );
1726
1727
    Get all notes from the MARC record and returns them in an array.
1728
    The notes are stored in different fields depending on MARC flavour.
1729
    MARC21 field 555 gets special attention for the $u subfields.
1730
1731
=cut
1732
1733
sub GetOPACMarcNotes {
1734
    my ( $record, $marcflavour ) = @_;
1735
    if (!$record) {
1736
        carp 'GetMarcNotes called on undefined record';
1737
        return;
1738
    }
1739
1740
    my $scope = $marcflavour eq "UNIMARC"? '3..': '5..';
1741
    my @marcnotes;
1742
    my %blacklist = map { $_ => 1 }
1743
        split( /,/, C4::Context->preference('NotesOPACBlacklist'));
1744
    foreach my $field ( $record->field($scope) ) {
1745
        my $tag = $field->tag();
1746
        next if $blacklist{ $tag };
1747
        if( $marcflavour ne 'UNIMARC' && $tag =~ /555/ ) {
1748
            # Field 555$u contains URLs
1749
            # We first push the regular subfields and all $u's separately
1750
            # Leave further actions to the template
1751
            push @marcnotes, { marcnote => $field->as_string('abcd') };
1752
            foreach my $sub ( $field->subfield('u') ) {
1753
                push @marcnotes, { marcnote => $sub };
1754
            }
1755
        } else {
1756
            push @marcnotes, { marcnote => $field->as_string() };
1757
        }
1758
    }
1759
    return \@marcnotes;
1760
}
1761
1723
=head2 GetMarcSubjects
1762
=head2 GetMarcSubjects
1724
1763
1725
  $marcsubjcts = GetMarcSubjects($record,$marcflavour);
1764
  $marcsubjcts = GetMarcSubjects($record,$marcflavour);
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 281-286 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
281
('NorwegianPatronDBPassword','',NULL,'Password for communication with the Norwegian national patron database.','Free'),
281
('NorwegianPatronDBPassword','',NULL,'Password for communication with the Norwegian national patron database.','Free'),
282
('NorwegianPatronDBSearchNLAfterLocalHit','0',NULL,'Search NL if a search has already given one or more local hits?.','YesNo'),
282
('NorwegianPatronDBSearchNLAfterLocalHit','0',NULL,'Search NL if a search has already given one or more local hits?.','YesNo'),
283
('NotesBlacklist','',NULL,'List of notes fields that should not appear in the title notes/description separator of details','free'),
283
('NotesBlacklist','',NULL,'List of notes fields that should not appear in the title notes/description separator of details','free'),
284
('NotesOPACBlacklist','',NULL,'List of notes fields that should not appear in the title notes/description separator of details','free'),
284
('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'),
285
('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'),
285
('NoticeBcc','','','Email address to bcc outgoing notices sent by email','free'),
286
('NoticeBcc','','','Email address to bcc outgoing notices sent by email','free'),
286
('NoticeCSS','',NULL,'Notices CSS url.','free'),
287
('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 206-211 Cataloging: Link Here
206
              class: multi
206
              class: multi
207
            - 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)
207
            - 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)
208
        -
208
        -
209
            - Don't show these
210
            - pref: NotesOPACBlacklist
211
              class: multi
212
            - 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)
213
        -
209
            - pref: AcquisitionDetails
214
            - pref: AcquisitionDetails
210
              choices:
215
              choices:
211
                  yes: Display
216
                  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