Koha/koha-tmpl/intranet-tmpl/prog/en/modules/reports
Julian Maurice ed7543287b Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere
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>
2018-04-13 11:49:44 -03:00
..
csv Bug 18331: POST_CHOMP everywhere! 2017-08-15 12:17:41 -03:00
acquisitions_stats.tt Bug 19663: Move JS to the footer: Reports 2017-12-14 16:58:22 -03:00
bor_issues_top.tt Bug 19663: Move JS to the footer: Reports 2017-12-14 16:58:22 -03:00
borrowers_out.tt Bug 19663: Move JS to the footer: Reports 2017-12-14 16:58:22 -03:00
borrowers_stats.tt Bug 19663: Move JS to the footer: Reports 2017-12-14 16:58:22 -03:00
cash_register_stats.tt Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere 2018-04-13 11:49:44 -03:00
cat_issues_top.tt Bug 19663: Move JS to the footer: Reports 2017-12-14 16:58:22 -03:00
catalogue_out.tt Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
catalogue_stats.tt Bug 19663: Move JS to the footer: Reports 2017-12-14 16:58:22 -03:00
convert_report.tt Bug 18667: Show a diff view of SQL reports when converting 2017-07-13 16:39:04 -03:00
dictionary.tt Bug 20372: Correct toolbar markup on some pages 2018-03-19 13:55:53 -03:00
guided_reports_start.tt Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere 2018-04-13 11:49:44 -03:00
issues_avg_stats.tt Bug 19663: Move JS to the footer: Reports 2017-12-14 16:58:22 -03:00
issues_stats.tt Bug 19663: Move JS to the footer: Reports 2017-12-14 16:58:22 -03:00
itemslost.tt Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere 2018-04-13 11:49:44 -03:00
itemtypes.tt Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere 2018-04-13 11:49:44 -03:00
orders_by_budget.tt Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere 2018-04-13 11:49:44 -03:00
reports-home.tt Bug 20345: Put saved report keyword search form on reports home 2018-03-26 17:31:27 -03:00
reserves_stats.tt Bug 19663: Move JS to the footer: Reports 2017-12-14 16:58:22 -03:00
serials_stats.tt Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere 2018-04-13 11:49:44 -03:00