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>
67 lines
3.1 KiB
Text
67 lines
3.1 KiB
Text
[% USE Asset %]
|
|
[% USE Branches %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Tools › Rotating collections › Transfer collection</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
<body id="rcoll_transferCollection" class="tools rcoll">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a> › <a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% colId %]">Collection <i>[% colTitle %]</i></a> › Transfer collection</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
<h1>Transfer collection <i>[% colTitle %]</i></h1>
|
|
|
|
[% IF ( transferSuccess ) %]
|
|
<div class="dialog message">
|
|
<p>Collection transferred successfully</p>
|
|
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
|
|
</div>
|
|
[% ELSIF ( transferFailure ) %]
|
|
<div class="dialog alert">
|
|
<p>Failed to transfer collection</p>
|
|
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF ( transferSuccess ) %]
|
|
[% ELSE %]
|
|
<div>
|
|
<form action="transferCollection.pl" method="post">
|
|
<input type="hidden" name="colId" value="[% colId %]" />
|
|
<fieldset class="rows">
|
|
<ol>
|
|
<li>
|
|
<label for="toBranch">Choose your library:</label>
|
|
<select id="toBranch" name="toBranch">
|
|
[% PROCESS options_for_libraries libraries => Branches.all( unfiltered => 1 ) %]
|
|
</select>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<input type="submit" value="Transfer collection"> <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl" class="cancel">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
[% END %]
|
|
|
|
</div> <!-- /.yui-b -->
|
|
</div> <!-- /#yui-main -->
|
|
<div class="yui-b">
|
|
[% INCLUDE 'tools-menu.inc' %]
|
|
</div>
|
|
</div> <!-- /#bd -->
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% Asset.js("js/tools-menu.js") %]
|
|
[% Asset.js("js/rotating-collections.js") %]
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|