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>
154 lines
4.9 KiB
Text
154 lines
4.9 KiB
Text
[% USE Asset %]
|
|
[% USE KohaDates %]
|
|
[% USE Branches %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Reports › Serials subscriptions stats</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<style type="text/css">
|
|
.sql {display: none;}
|
|
</style>
|
|
[% Asset.css("css/datatables.css") %]
|
|
</head>
|
|
|
|
<body id="rep_serials_stats" class="rep">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a> › Serials subscriptions stats</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
<h1>Serials subscriptions</h1>
|
|
[% IF ( do_it ) %]
|
|
<table id="resulttable">
|
|
<thead>
|
|
<tr>
|
|
<th>Vendor</th>
|
|
<th>Title</th>
|
|
<th>Subscription id</th>
|
|
<th>Branch</th>
|
|
<th>Call number</th>
|
|
<th>Subscription begin</th>
|
|
<th>Subscription end</th>
|
|
<th>Expired? / Closed?</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
[% FOREACH data IN datas %]
|
|
<td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% data.aqbooksellerid %]">[% data.name %]</a></td>
|
|
<td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% data.subscriptionid %]">[% data.title |html %]</a></td>
|
|
<td>[% data.subscriptionid %]</td>
|
|
<td>[% Branches.GetName( data.branchcode ) %]</td>
|
|
<td>[% data.callnumber %]</td>
|
|
<td><span title="[% data.startdate %]">[% data.startdate | $KohaDates %]</span></td>
|
|
<td><span title="[% data.enddate %]">[% data.enddate | $KohaDates %]</span></td>
|
|
<td>
|
|
[% IF data.closed %]
|
|
Closed
|
|
[% ELSIF data.expired %]
|
|
Expired
|
|
[% END %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
[% ELSE %]
|
|
<form method="post" action="/cgi-bin/koha/reports/serials_stats.pl">
|
|
|
|
<fieldset class="rows">
|
|
<ol>
|
|
<li>
|
|
|
|
<label for="bookseller">
|
|
Vendor:
|
|
</label>
|
|
<select name="bookseller" id="bookseller">
|
|
<option value="">Any vendor</option>
|
|
[% FOREACH bookseller IN booksellers %]
|
|
<option value="[% bookseller.aqbooksellerid %]">[% bookseller.name %]</option>
|
|
[% END %]
|
|
</select>
|
|
</li><li>
|
|
<label for="branchcode">
|
|
Library:
|
|
</label>
|
|
<select name="branchcode" id="branchcode">
|
|
<option value="">Any library</option>
|
|
[% PROCESS options_for_libraries libraries => Branches.all() %]
|
|
</select>
|
|
|
|
</li>
|
|
<li>
|
|
<label for="expired">Include expired subscriptions: </label>
|
|
<input type="checkbox" name="expired" id="expired" />
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
|
|
|
|
<fieldset class="rows">
|
|
<legend>Output</legend>
|
|
<ol>
|
|
<li>
|
|
<label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
|
|
</li>
|
|
<li>
|
|
<label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" />
|
|
<label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
|
|
<label class="inline" for="MIME">Into an application:</label>
|
|
<select name="MIME" id="MIME" size="1">
|
|
[% FOREACH value IN CGIextChoice %]
|
|
<option value="[% value %]">[% value %]</option>
|
|
[% END %]
|
|
</select>
|
|
<select name="sep" id="sep" size="1">
|
|
[% FOREACH value IN CGIsepChoice.values.sort() %]
|
|
[% IF ( value == CGIsepChoice.default ) %]
|
|
<option value="[% value %]" selected="selected">[% value %]</option>
|
|
[% ELSE %]
|
|
<option value="[% value %]">[% value %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
|
|
<fieldset class="action">
|
|
<input type="submit" value="Submit" />
|
|
<input type="hidden" name="report_name" value="[% report_name %]" />
|
|
<input type="hidden" name="do_it" value="1" />
|
|
</fieldset>
|
|
</form>
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
[% INCLUDE 'reports-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$("#resulttable").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"sDom": 't',
|
|
"bPaginate": false,
|
|
"aoColumns": [
|
|
null,{ "sType": "anti-the" },null,null,null,{ "sType": "title-string" },{ "sType": "title-string" },null
|
|
],
|
|
}));
|
|
});
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|