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>
80 lines
2.3 KiB
Text
80 lines
2.3 KiB
Text
[% USE Asset %]
|
|
[% USE KohaDates %]
|
|
[% USE AuthorisedValues %]
|
|
[% USE Branches %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Patrons › [% UNLESS blocking_error %]Discharge for [% patron.firstname %] [% patron.surname %] ([% patron.cardnumber %])[% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
<body id="discharge" class="discharge">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'patron-search.inc' %]
|
|
|
|
<div id="breadcrumbs">
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
|
|
› <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
|
|
› [% UNLESS blocking_error %]Discharge for [% patron.firstname %] [% patron.surname %] ([% patron.cardnumber %])[% END %]
|
|
</div>
|
|
|
|
<div id="doc3" class="yui-t1">
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
<div class="yui-g">
|
|
<h3>Discharge</h3>
|
|
[% FOR message IN messages %]
|
|
<div class="dialog [% message.type %]">
|
|
[% IF message.code == "unable_to_generate_pdf" %]
|
|
An error occurs when generating the pdf file.
|
|
Please contact the administrator to resolve this problem.
|
|
[% END %]
|
|
</div>
|
|
[% END %]
|
|
[% UNLESS can_be_discharged %]
|
|
<p>Cannot edit discharge: the patron has checked out items.</p>
|
|
[% ELSE %]
|
|
[% IF patron.holds.count %]
|
|
<p>Borrower has reserves: they will be canceled if the discharge is generated.</p>
|
|
[% END %]
|
|
<form method="post">
|
|
<input type="submit" value="Generate discharge" name="discharge" />
|
|
<input type="hidden" value="[% patron.borrowernumber %]" name="borrowernumber" />
|
|
</form>
|
|
[% END %]
|
|
|
|
[% IF validated_discharges %]
|
|
<h2>Already validated discharges</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Requested</th>
|
|
<th>Validated</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOR d IN validated_discharges %]
|
|
<tr>
|
|
<td>[% d.needed | $KohaDates with_hours = 1 %]</td>
|
|
<td>[% d.validated | $KohaDates with_hours = 1 %]</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
[% END %]
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
[% INCLUDE 'circ-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% Asset.js("js/members-menu.js") %]
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|