Bug 35267: (follow-up) Fix PrintSlipCSS accordion and CSS in HTML output
- Add missing PrintSlipCSS accordion panel to the notice editor - Pass AllNoticeCSS and PrintNoticeCSS to gather_print_notices.pl HTML output - Include inline <style> blocks in print-notices.tt template Signed-off-by: Marion Durand <marion.durand@biblibre.com> Signed-off-by: Thomas Klausner <domm@plix.at> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
eb357bcffa
commit
a1b7017588
|
|
@ -20,6 +20,12 @@
|
|||
[% IF ( stylesheet ) %]
|
||||
<link rel="stylesheet" type="text/css" href="[% stylesheet | url %]" />
|
||||
[% END %]
|
||||
[% IF ( all_notice_css ) %]
|
||||
<style nonce="[% Koha.CSPNonce | $raw %]">[% all_notice_css | $raw %]</style>
|
||||
[% END %]
|
||||
[% IF ( print_notice_css ) %]
|
||||
<style nonce="[% Koha.CSPNonce | $raw %]">[% print_notice_css | $raw %]</style>
|
||||
[% END %]
|
||||
</head>
|
||||
<body id="batch_print-notices" class="batch">
|
||||
[% FOREACH message IN messages %]
|
||||
|
|
|
|||
|
|
@ -601,6 +601,26 @@
|
|||
[% END %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% WRAPPER accordion_item %]
|
||||
[% WRAPPER accordion_heading panel_id="print_slip_css" %]
|
||||
Print Slip CSS
|
||||
[% END %]
|
||||
[% WRAPPER accordion_panel panel_id="print_slip_css" %]
|
||||
<p class="alert alert-info">CSS to be applied to print slips in addition to that already in "All Notice CSS"</p>
|
||||
[%- IF Koha.Preference('PrintSlipCSS') -%]
|
||||
<div class="card">
|
||||
<div class="card-body bg-light">
|
||||
<pre><code>[%- Koha.Preference('PrintSlipCSS') | html -%]</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
[%- ELSE -%]
|
||||
<p class="alert alert-warning">None defined</p>
|
||||
[%- END -%]
|
||||
[% IF ( CAN_user_parameters_manage_sysprefs ) %]
|
||||
<a class="syspref-link" href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PrintSlipCSS">Edit</a>
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
</fieldset>
|
||||
|
||||
|
|
|
|||
|
|
@ -228,9 +228,11 @@ sub generate_html {
|
|||
}
|
||||
|
||||
$template->param(
|
||||
stylesheet => C4::Context->preference("NoticeCSS"),
|
||||
today => $today_syspref,
|
||||
messages => $messages,
|
||||
stylesheet => C4::Context->preference("NoticeCSS"),
|
||||
all_notice_css => C4::Context->preference("AllNoticeCSS"),
|
||||
print_notice_css => C4::Context->preference("PrintNoticeCSS"),
|
||||
today => $today_syspref,
|
||||
messages => $messages,
|
||||
);
|
||||
|
||||
open my $OUTPUT, '>encoding(utf-8)', $filepath
|
||||
|
|
|
|||
Loading…
Reference in New Issue