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

(-)a/installer/data/mysql/atomicupdate/bug_27734.perl (-5 / +2 lines)
Lines 4-12 if( CheckVersion( $DBversion ) ) { Link Here
4
        INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
4
        INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
5
        ('OpacHiddenRecordRedirect','0','Redirect the opac detail page for records hidden by OpacHiddenItems to an explanatory page (otherwise redirect to 404 error page)','','YesNo')
5
        ('OpacHiddenRecordRedirect','0','Redirect the opac detail page for records hidden by OpacHiddenItems to an explanatory page (otherwise redirect to 404 error page)','','YesNo')
6
    });
6
    });
7
    $dbh->do(q{
7
8
        INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
8
    NewVersion( $DBversion, 27734, "Add OpacHiddenRecordRedirect preference");
9
        ('OpacHiddenRecordMessage','','Display this message on the redirect page for hidden biblios','70|10','Textarea')
10
    });
11
    NewVersion( $DBversion, 27734, "Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage preferences");
12
}
9
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 lines)
Lines 498-504 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
498
('OpacHiddenItemsExceptions','',NULL,'List of borrower categories, separated by comma, that can see items otherwise hidden by OpacHiddenItems','Textarea'),
498
('OpacHiddenItemsExceptions','',NULL,'List of borrower categories, separated by comma, that can see items otherwise hidden by OpacHiddenItems','Textarea'),
499
('OpacHiddenItemsHidesRecord','1','','Hide biblio record when all its items are hidden because of OpacHiddenItems','YesNo'),
499
('OpacHiddenItemsHidesRecord','1','','Hide biblio record when all its items are hidden because of OpacHiddenItems','YesNo'),
500
('OpacHiddenRecordRedirect','0','Redirect the opac detail page for records hidden by OpacHiddenItems to an explanatory page (otherwise redirect to 404 error page)','','YesNo'),
500
('OpacHiddenRecordRedirect','0','Redirect the opac detail page for records hidden by OpacHiddenItems to an explanatory page (otherwise redirect to 404 error page)','','YesNo'),
501
('OpacHiddenRecordMessage','','Display this message on the redirect page for hidden biblios','70|10','Textarea'),
502
('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'),
501
('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'),
503
('OPACHoldingsDefaultSortField','first_column','first_column|homebranch|holdingbranch','Default sort field for the holdings table at the OPAC','choice'),
502
('OPACHoldingsDefaultSortField','first_column','first_column|homebranch|holdingbranch','Default sort field for the holdings table at the OPAC','choice'),
504
('OpacHoldNotes','0','','Show hold notes on OPAC','YesNo'),
503
('OpacHoldNotes','0','','Show hold notes on OPAC','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc (+4 lines)
Lines 38-43 Link Here
38
    Include this content in the header of all pages in the OPAC.
38
    Include this content in the header of all pages in the OPAC.
39
</div>
39
</div>
40
40
41
<div id="OpacHiddenRecordMessage_notes" class="hint customization_note">
42
    Display the following message on the redirect page for hidden bibliographic records. Depends on the system preferences OpacHiddenItems and OpacHiddenRecordRedirect.
43
</div>
44
41
<div id="OpacLibraryInfo_notes" class="hint customization_note">
45
<div id="OpacLibraryInfo_notes" class="hint customization_note">
42
    Include this content on the library information page in the OPAC.
46
    Include this content on the library information page in the OPAC.
43
</div>
47
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-4 / +1 lines)
Lines 655-664 OPAC: Link Here
655
              choices:
655
              choices:
656
                  1: "an explanatory page ('This record is blocked')."
656
                  1: "an explanatory page ('This record is blocked')."
657
                  0: "the 404 error page ('Not found')."
657
                  0: "the 404 error page ('Not found')."
658
            - "<br />Display the following message on the redirect page for suppressed bibliographic records:"
658
            - "<br />Display a message on the redirect page for suppressed bibliographic records with HTML customization <strong>OpacHiddenRecordMessage</strong>."
659
            - pref: OpacHiddenRecordMessage
660
              type: textarea
661
              class: code
662
        -
659
        -
663
            - pref: OpacAllowPublicListCreation
660
            - pref: OpacAllowPublicListCreation
664
              default: 1
661
              default: 1
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (-1 / +1 lines)
Lines 527-533 Link Here
527
            [% END %]
527
            [% END %]
528
        [% END %]
528
        [% END %]
529
    [% ELSE %]
529
    [% ELSE %]
530
        [% SET opac_available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'OpacMaintenanceNotice', 'OPACResultsSidebar', 'OpacSuppressionMessage', 'SCOMainUserBlock', 'SelfCheckInMainUserBlock', 'SelfCheckHelpMessage', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'PatronSelfRegistrationAdditionalInstructions', 'ILLModuleCopyrightClearance' ] %]
530
        [% SET opac_available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacHiddenRecordMessage', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'OpacMaintenanceNotice', 'OPACResultsSidebar', 'OpacSuppressionMessage', 'SCOMainUserBlock', 'SelfCheckInMainUserBlock', 'SelfCheckHelpMessage', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'PatronSelfRegistrationAdditionalInstructions', 'ILLModuleCopyrightClearance' ] %]
531
        <optgroup label="OPAC">
531
        <optgroup label="OPAC">
532
            [% FOREACH l IN opac_available_options.sort %]
532
            [% FOREACH l IN opac_available_options.sort %]
533
                [% IF l == location %]
533
                [% IF l == location %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-blocked.tt (-9 / +7 lines)
Lines 1-9 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE AdditionalContents %]
2
[% USE AdditionalContents %]
3
[% SET OpacSuppressionMessage = AdditionalContents.get( location => "OpacSuppressionMessage", lang => lang, library => branchcode || default_branch ) %]
3
[% SET OpacSuppressionMessage = AdditionalContents.get( location => "OpacSuppressionMessage", lang => lang, library => branchcode || default_branch ) %]
4
[% SET OpacHiddenRecordMessage = AdditionalContents.get( location => "OpacHiddenRecordMessage", lang => lang, library => branchcode || default_branch ) %]
4
[% PROCESS 'i18n.inc' %]
5
[% PROCESS 'i18n.inc' %]
5
[% PROCESS 'html_helpers.inc' %]
6
[% PROCESS 'html_helpers.inc' %]
6
[% USE Koha %]
7
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'doc-head-open.inc' %]
8
<title>[% FILTER collapse %]
8
<title>[% FILTER collapse %]
9
    [% t("Record blocked") | html %] &rsaquo;
9
    [% t("Record blocked") | html %] &rsaquo;
Lines 27-40 Link Here
27
                <div id="opac-blocked-message" class="maincontent">
27
                <div id="opac-blocked-message" class="maincontent">
28
                    <h1>Record blocked</h1>
28
                    <h1>Record blocked</h1>
29
                    <p>You are not authorized to view this record.</p>
29
                    <p>You are not authorized to view this record.</p>
30
                    [% IF hidden %]
30
                    [% IF ( OpacSuppressionMessage ) || ( hidden ) %]
31
                        [% SET OpacBlockedMessage = Koha.Preference("OpacHiddenRecordMessage") %]
32
                    [% ELSE %]
33
                        [% SET OpacBlockedMessage = Koha.Preference("OpacSuppressionMessage") %]
34
                    [% END %]
35
                    [% IF ( OpacBlockedMessage ) %]
36
                        <div id="opacsuppressionmessage">
31
                        <div id="opacsuppressionmessage">
37
                            [% PROCESS koha_news_block news => OpacSuppressionMessage %]
32
                            [% IF hidden %]
33
                                [% PROCESS koha_news_block news => OpacHiddenRecordMessage %]
34
                            [% ELSE %]
35
                                [% PROCESS koha_news_block news => OpacSuppressionMessage %]
36
                            [% END %]
38
                        </div>
37
                        </div>
39
                    [% END %]
38
                    [% END %]
40
                </div>
39
                </div>
41
- 

Return to bug 27734