Bug 17109: Use Koha.Preference in sendbasket template
No need to send OPACBaseURL to the template, if you load the Koha TT plugin inside the template. Test plan: Send a few items in your cart from OPAC and intranet. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
dc4617ba3b
commit
1a3b92bc76
|
|
@ -68,11 +68,10 @@ if( $csrf_err ) {
|
|||
my $comment = $query->param('comment');
|
||||
|
||||
# Since we are already logged in, no need to check credentials again
|
||||
# We only need to add OPACBaseURL
|
||||
# when loading a second template.
|
||||
my $template2 = C4::Templates::gettemplate(
|
||||
'basket/sendbasket.tt', 'intranet', $query,
|
||||
);
|
||||
$template2->param( OPACBaseURL => C4::Context->preference('OPACBaseURL') );
|
||||
|
||||
my @bibs = split( /\//, $bib_list );
|
||||
my @results;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
[% USE HtmlToText %]
|
||||
[% USE Koha %]
|
||||
|
||||
<SUBJECT>
|
||||
Your cart
|
||||
<END_SUBJECT>
|
||||
|
||||
[% USE HtmlToText %]
|
||||
|
||||
<HEADER>
|
||||
|
||||
[% FILTER html2text %]
|
||||
|
|
@ -130,6 +131,7 @@ Your cart
|
|||
[% END %]
|
||||
</p>
|
||||
|
||||
[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
|
||||
[% IF ( OPACBaseURL ) %]
|
||||
<p>
|
||||
In online catalog: [% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber %]
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
[% USE HtmlToText %]
|
||||
[% USE Koha %]
|
||||
|
||||
<SUBJECT>
|
||||
Your cart
|
||||
<END_SUBJECT>
|
||||
|
||||
[% USE HtmlToText %]
|
||||
|
||||
<HEADER>
|
||||
|
||||
[% FILTER html2text %]
|
||||
|
|
@ -130,6 +131,7 @@ Your cart
|
|||
[% END %]
|
||||
</p>
|
||||
|
||||
[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
|
||||
[% IF ( OPACBaseURL ) %]
|
||||
<p>
|
||||
In online catalog: [% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber %]
|
||||
|
|
|
|||
|
|
@ -81,11 +81,10 @@ if( $csrf_err ) {
|
|||
$mail{'X-Abuse-Report'} = C4::Context->preference('KohaAdminEmailAddress');
|
||||
|
||||
# Since we are already logged in, no need to check credentials again
|
||||
# We only need to add OPACBaseURL
|
||||
# when loading a second template.
|
||||
my $template2 = C4::Templates::gettemplate(
|
||||
'opac-sendbasket.tt', 'opac', $query,
|
||||
);
|
||||
$template2->param( OPACBaseURL => C4::Context->preference('OPACBaseURL') );
|
||||
|
||||
my @bibs = split( /\//, $bib_list );
|
||||
my @results;
|
||||
|
|
|
|||
Loading…
Reference in New Issue