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>
123 lines
3.8 KiB
Text
123 lines
3.8 KiB
Text
[% USE Asset %]
|
|
[% USE KohaDates %]
|
|
[% USE ItemTypes %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Acquisitions › Spent</title>
|
|
[% Asset.css("css/datatables.css") %]
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="acq_spent" class="acq">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'acquisitions-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › Spent - [% fund_code %]</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
<h1>Fund: [% fund_code %]</h1>
|
|
<h2>Spent</h2>
|
|
|
|
<table id="spent">
|
|
<thead>
|
|
<tr>
|
|
<th class="anti-the">Title</th>
|
|
<th>Order</th>
|
|
<th>Vendor</th>
|
|
<th>Invoice</th>
|
|
<th>Item type</th>
|
|
<th>Received</th>
|
|
<th>Unit price</th>
|
|
<th class="title-string">Date ordered</th>
|
|
<th class="title-string">Date received</th>
|
|
<th>Subtotal</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
[% FOREACH order IN spent %]
|
|
<tr>
|
|
<td class="cell">
|
|
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">
|
|
[% order.title %]
|
|
</a>
|
|
</td>
|
|
<td class="cell">
|
|
[% order.ordernumber %]
|
|
</td>
|
|
<td class="cell">
|
|
<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.booksellerid %]">[% order.booksellerid %]</a>
|
|
</td>
|
|
<td class="cell">
|
|
<a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid %]">[% order.invoicenumber %]</a>
|
|
</td>
|
|
<td class="cell">
|
|
[% ItemTypes.GetDescription( order.itype ) %]
|
|
</td>
|
|
<td class="cell">
|
|
[% order.quantityreceived %]
|
|
</td>
|
|
<td class="cell">
|
|
[% order.unitprice %]
|
|
</td>
|
|
<td class="cell">
|
|
<span title="[% order.entrydate %]">[% order.entrydate | $KohaDates %]</span>
|
|
</td>
|
|
<td class="cell">
|
|
<span title="[% order.datereceived %]">[% order.datereceived | $KohaDates %]</span>
|
|
</td>
|
|
<td class="data cell">
|
|
[% order.rowtotal %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
<tfoot>
|
|
[% IF shipmentcosts.size %]
|
|
<tr valign="top">
|
|
<td colspan="9"> Sub total </td>
|
|
<td class="data"> [% subtotal %] </td>
|
|
</tr>
|
|
[% FOREACH shipmentcost IN shipmentcosts %]
|
|
<tr>
|
|
<td></td>
|
|
<td colspan="8">Shipping cost for invoice [% shipmentcost.invoicenumber %]</td>
|
|
<td class="data total">[% shipmentcost.shipmentcost %]</td>
|
|
</tr>
|
|
[% END %]
|
|
[% END %]
|
|
<tr>
|
|
<td colspan="9">TOTAL</td>
|
|
<td class="data total">[% total %]</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
[% INCLUDE 'acquisitions-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% Asset.js("js/acquisitions-menu.js") %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$("#spent").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"aoColumnDefs": [
|
|
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] },
|
|
{ "sType": "title-string", "aTargets" : [ "title-string" ] }
|
|
],
|
|
"sPaginationType": "four_button"
|
|
} ) );
|
|
});
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|