ed7543287b
Having to write [% KOHA_VERSION %] for each url is bad because: - It's easily forgettable when adding new <script> or <link> - It prevents grep'ing for the full filename - It violates the DRY principle - If at some point we want to change the "force js and css reload" mechanism, it will be tedious This patch: - adds a Template::Toolkit plugin that generates <script> and <link> tags for JS and CSS files, and inserts automatically the Koha version in the filename - use the new plugin to remove all occurences of [% KOHA_VERSION %] - remove the code that was adding KOHA_VERSION as a template variable Test plan: 1. Apply patch 2. Go to several different pages in Koha (opac and intranet) while checking your browser's dev tools (there should be no 404 for JS and CSS files, and the Koha version should appear in filenames) and the server logs (there should be no "File not found") 3. `git grep KOHA_VERSION` should return nothing 4. prove t/db_dependent/Koha/Template/Plugin/Asset.t Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
34 lines
1.3 KiB
Text
34 lines
1.3 KiB
Text
[% USE Asset %]
|
|
[% USE Koha %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
[% IF ( caller == 'hold-transfer' ) %]
|
|
<title>Koha › Circulation › Hold transfer print receipt</title>
|
|
[% ELSIF ( caller == 'transfer' ) %]
|
|
<title>Koha › Circulation › Transfers print receipt</title>
|
|
[% ELSIF ( caller == 'members' ) %]
|
|
<title>Koha › Patrons › Print receipt for [% borrowernumber %]</title>
|
|
[% ELSIF ( title ) %][%# FIXME title is never defined %]
|
|
<title>Koha › Patrons › [% title %]</title>
|
|
[% END %]
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
|
|
[% Asset.css("css/print.css") %]
|
|
[% IF ( Koha.Preference('SlipCSS') ) %]
|
|
<link rel="stylesheet" type="text/css" href="[% Koha.Preference('SlipCSS') %]" />
|
|
[% END %]
|
|
|
|
[% INCLUDE 'slip-print.inc' #printThenClose %]
|
|
</head>
|
|
<body id="circ_printslip" class="circ">
|
|
<div id="receipt">
|
|
|
|
[% IF plain %]
|
|
<pre>
|
|
[% IF ( slip ) %][% slip %][% ELSE %]No slip template found[% END %]
|
|
</pre>
|
|
[% ELSE %]
|
|
[% IF ( slip ) %][% slip %][% ELSE %]No slip template found[% END %]
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|