Bug 27948: (follow-up) Use Koha.news and PROCESS koha_news_block to bring disclaimer
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
5ff5863d8b
commit
b7acefa116
2 changed files with 8 additions and 10 deletions
|
@ -1,7 +1,8 @@
|
|||
[% USE Koha %]
|
||||
[% USE raw %]
|
||||
[% USE Branches %]
|
||||
[% USE ItemTypes %]
|
||||
[% USE KohaNews %]
|
||||
[% USE raw %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
|
||||
<title>Request article › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
|
||||
|
@ -12,6 +13,8 @@
|
|||
[% INCLUDE 'bodytag.inc' bodyid='opac-request-article' %]
|
||||
[% INCLUDE 'masthead.inc' %]
|
||||
|
||||
[% SET disclaimer = KohaNews.get( location => "ArticleRequestsDisclaimerText", lang => lang, library => branchcode ) %]
|
||||
|
||||
<div class="main">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ul class="breadcrumb">
|
||||
|
@ -32,14 +35,9 @@
|
|||
<div class="col">
|
||||
[% IF biblio.can_article_request( patron ) %]
|
||||
<h1>Place article request for [% biblio.title | html %]</h1>
|
||||
[% IF disclaimer %]
|
||||
[% IF ( disclaimer && !action) %]
|
||||
<div class="alert alert-warning">
|
||||
[% FOREACH disc IN disclaimer %]
|
||||
<h3>[% disc.title | html %]</h3>
|
||||
<p>
|
||||
[% disc.content | $raw %]
|
||||
</p>
|
||||
[% END %]
|
||||
[% PROCESS koha_news_block news => disclaimer %]
|
||||
<a href="/cgi-bin/koha/opac-request-article.pl?biblionumber=[% biblio.biblionumber | uri %]&action=accept"
|
||||
class="btn btn-sm btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Accept</a>
|
||||
</div>
|
||||
|
@ -52,7 +50,7 @@
|
|||
|
||||
|
||||
<form id="place-article-request" method="post" action="/cgi-bin/koha/opac-request-article.pl">
|
||||
<legend class="sr-only">Place article request</legend>
|
||||
<legend class="sr-only">Place article request</legend>
|
||||
<input type="hidden" name="action" value="create" />
|
||||
<input type="hidden" name="biblionumber" id="biblionumber" value="[% biblio.biblionumber | html %]" />
|
||||
|
||||
|
|
2
opac/opac-request-article.pl
Executable file → Normal file
2
opac/opac-request-article.pl
Executable file → Normal file
|
@ -91,7 +91,7 @@ my $patron = Koha::Patrons->find($borrowernumber);
|
|||
$template->param(
|
||||
biblio => $biblio,
|
||||
patron => $patron,
|
||||
disclaimer => $disclaimer
|
||||
action => $action
|
||||
);
|
||||
|
||||
output_html_with_http_headers $cgi, $cookie, $template->output, undef, { force_no_caching => 1 };
|
||||
|
|
Loading…
Reference in a new issue