Owen Leonard
5fc6bedaa7
This patch moves the OpacSuppressionMessage system preference into HTML customizations, making it possible to have language- and library-specific content. To test you should have some content in the OpacSuppressionMessage system preference before applying the patch. Apply the patch and run the database update process. - In the staff interface, locate a bibliographic record and open it for editing. - Under tab 9, tag 942, change subfield n, "Suppress in OPAC", to "Yes" and save the record. - Go to the OPAC and try to navigate directly to the bibliographic detail page for that record: /cgi-bin/koha/opac-detail.pl?biblionumber=X - You should be redirectd to the "Blocked" page. Under the message "You are not authorized to view this record" you should see the content which was previously in the OpacSuppressionMessage system preference. - In the staff client, go to Tools -> HTML customizations and verify that the content from OpacSuppressionMessage is now stored there. - The HTML customization entry form should offer OpacSuppressionMessage as a choice under "Display location." - Update and reinstall active translations (for instance fr-FR): - perl misc/translator/translate update fr-FR - perl misc/translator/translate install fr-FR - Enable the translation if necessary under Administration -> System preferences -> language. - Enable the "opaclanguagesdisplay" preference if necessary. - Edit the OpacSuppressionMessage HTML customization and add unique content to the "fr-FR" tab. - Go to the OPAC and switch to your updated translation. Try to view the suppressed record again and confirm that the content you added for your translation shows up correctly. - Go to Administration -> System preferences and search for "OpacSuppression." The description of these preferences should show an updated message about using HTML customizations to create OpacSuppressionMessage content. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
42 lines
1.4 KiB
Text
42 lines
1.4 KiB
Text
[% USE raw %]
|
|
[% USE AdditionalContents %]
|
|
[% SET OpacSuppressionMessage = AdditionalContents.get( location => "OpacSuppressionMessage", lang => lang, library => branchcode || default_branch ) %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>
|
|
Record blocked ›
|
|
[% IF ( LibraryNameTitle ) %]
|
|
[% LibraryNameTitle | html %]
|
|
[% ELSE %]
|
|
Koha online
|
|
[% END %] catalog
|
|
</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% BLOCK cssinclude %][% END %]
|
|
</head>
|
|
[% INCLUDE 'bodytag.inc' bodyid='opac-blocked' %]
|
|
[% INCLUDE 'masthead.inc' %]
|
|
<div class="main">
|
|
[% WRAPPER breadcrumbs %]
|
|
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
|
<span>Blocked record</span>
|
|
[% END %]
|
|
[% END #/ WRAPPER breadcrumbs %]
|
|
|
|
<div class="container-fluid">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-10 col-lg-6">
|
|
<div id="opac-blocked-message" class="maincontent">
|
|
<h1>Blocked</h1>
|
|
<p>You are not authorized to view this record.</p>
|
|
[% IF ( OpacSuppressionMessage ) %]
|
|
<div id="opacsuppressionmessage">
|
|
[% PROCESS koha_news_block news => OpacSuppressionMessage %]
|
|
</div>
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
[% INCLUDE 'opac-bottom.inc' %]
|
|
[% BLOCK jsinclude %][% END %]
|