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

(-)a/C4/Biblio.pm (-3 / +3 lines)
Lines 1513-1523 sub GetMarcNotes { Link Here
1513
        590 => 1
1513
        590 => 1
1514
    );
1514
    );
1515
1515
1516
    my %blacklist = map { $_ => 1 }
1516
    my %hiddenlist = map { $_ => 1 }
1517
        split( /,/, C4::Context->preference('NotesBlacklist'));
1517
        split( /,/, C4::Context->preference('OpacHiddenNotes'));
1518
    foreach my $field ( $record->field($scope) ) {
1518
    foreach my $field ( $record->field($scope) ) {
1519
        my $tag = $field->tag();
1519
        my $tag = $field->tag();
1520
        next if $blacklist{ $tag };
1520
        next if $hiddenlist{ $tag };
1521
        next if $opac && $maybe_private{$tag} && !$field->indicator(1);
1521
        next if $opac && $maybe_private{$tag} && !$field->indicator(1);
1522
        if( $marcflavour ne 'UNIMARC' && $field->subfield('u') ) {
1522
        if( $marcflavour ne 'UNIMARC' && $field->subfield('u') ) {
1523
            # Field 5XX$u always contains URI
1523
            # Field 5XX$u always contains URI
(-)a/installer/data/mysql/atomicupdate/rename_preference_OpacHiddenNotes.perl (+5 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( "UPDATE systempreferences SET variable='OpacHiddenNotes' WHERE variable = 'NotesBlacklist'" );
4
    NewVersion( $DBversion, 25709, "Rename systempreference to OpacHiddenNotes");
5
}
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 333-339 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
333
('NoIssuesChargeGuarantees','','','Define maximum amount withstanding before check outs are blocked','Integer'),
333
('NoIssuesChargeGuarantees','','','Define maximum amount withstanding before check outs are blocked','Integer'),
334
('noItemTypeImages','0',NULL,'If ON, disables itemtype images in the staff interface','YesNo'),
334
('noItemTypeImages','0',NULL,'If ON, disables itemtype images in the staff interface','YesNo'),
335
('NoRenewalBeforePrecision','exact_time','date|exact_time','Calculate "No renewal before" based on date only or exact time of due date','Choice'),
335
('NoRenewalBeforePrecision','exact_time','date|exact_time','Calculate "No renewal before" based on date only or exact time of due date','Choice'),
336
('NotesBlacklist','',NULL,'List of notes fields that should not appear in the title notes/description separator of details','free'),
337
('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'),
336
('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'),
338
('NoticeBcc','','','Email address to bcc outgoing notices sent by email','free'),
337
('NoticeBcc','','','Email address to bcc outgoing notices sent by email','free'),
339
('NoticeCSS','',NULL,'Notices CSS url.','free'),
338
('NoticeCSS','',NULL,'Notices CSS url.','free'),
Lines 390-395 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
390
('OPACFRBRizeEditions','0','','If ON, the OPAC will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'),
389
('OPACFRBRizeEditions','0','','If ON, the OPAC will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'),
391
('OpacHiddenItems','','','This syspref allows to define custom rules for hiding specific items at the OPAC. See http://wiki.koha-community.org/wiki/OpacHiddenItems for more information.','Textarea'),
390
('OpacHiddenItems','','','This syspref allows to define custom rules for hiding specific items at the OPAC. See http://wiki.koha-community.org/wiki/OpacHiddenItems for more information.','Textarea'),
392
('OpacHiddenItemsExceptions','',NULL,'List of borrower categories, separated by |, that can see items otherwise hidden by OpacHiddenItems','Textarea'),
391
('OpacHiddenItemsExceptions','',NULL,'List of borrower categories, separated by |, that can see items otherwise hidden by OpacHiddenItems','Textarea'),
392
('OpacHiddenNotes','',NULL,'List of notes fields that should not appear in the title notes/description separator of details','free'),
393
('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'),
393
('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'),
394
('OPACHoldingsDefaultSortField','first_column','first_column|homebranch|holdingbranch','Default sort field for the holdings table at the OPAC','choice'),
394
('OPACHoldingsDefaultSortField','first_column','first_column|homebranch|holdingbranch','Default sort field for the holdings table at the OPAC','choice'),
395
('OPACHoldsIfAvailableAtPickup','1','','Allow to pickup up holds at libraries where the item is available','YesNo'),
395
('OPACHoldsIfAvailableAtPickup','1','','Allow to pickup up holds at libraries where the item is available','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (-1 / +1 lines)
Lines 230-236 Cataloging: Link Here
230
            - "is the logged in user's library. The second tab will contain all other items."
230
            - "is the logged in user's library. The second tab will contain all other items."
231
        -
231
        -
232
            - "Don't show"
232
            - "Don't show"
233
            - pref: NotesBlacklist
233
            - pref: OpacHiddenNotes
234
              class: multi
234
              class: multi
235
            - "note fields in the 'Title notes' tab and in the 'Description' tab on the OPAC and staff interface detail pages. Use a comma to separate multiple fields. Examples: 500,502 (MARC21); 300,328 (UNIMARC)."
235
            - "note fields in the 'Title notes' tab and in the 'Description' tab on the OPAC and staff interface detail pages. Use a comma to separate multiple fields. Examples: 500,502 (MARC21); 300,328 (UNIMARC)."
236
            - <br />
236
            - <br />
(-)a/t/Biblio/GetMarcNotes.t (-3 / +2 lines)
Lines 27-33 use C4::Biblio; Link Here
27
27
28
subtest 'GetMarcNotes MARC21' => sub {
28
subtest 'GetMarcNotes MARC21' => sub {
29
    plan tests => 11;
29
    plan tests => 11;
30
    t::lib::Mocks::mock_preference( 'NotesBlacklist', '520' );
30
    t::lib::Mocks::mock_preference( 'OpacHiddenNotes', '520' );
31
31
32
    my $record = MARC::Record->new;
32
    my $record = MARC::Record->new;
33
    $record->append_fields(
33
    $record->append_fields(
Lines 55-61 subtest 'GetMarcNotes MARC21' => sub { Link Here
55
55
56
subtest 'GetMarcNotes UNIMARC' => sub {
56
subtest 'GetMarcNotes UNIMARC' => sub {
57
    plan tests => 3;
57
    plan tests => 3;
58
    t::lib::Mocks::mock_preference( 'NotesBlacklist', '310' );
58
    t::lib::Mocks::mock_preference( 'OpacHiddenNotes', '310' );
59
59
60
    my $record = MARC::Record->new;
60
    my $record = MARC::Record->new;
61
    $record->append_fields(
61
    $record->append_fields(
62
- 

Return to bug 25709