Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere
authorJulian Maurice <julian.maurice@biblibre.com>
Fri, 6 Apr 2018 15:02:55 +0000 (17:02 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 13 Apr 2018 14:49:44 +0000 (11:49 -0300)
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>

246 files changed:
C4/Templates.pm
Koha/Template/Plugin/Asset.pm [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc
koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close-receipt.inc
koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
koha-tmpl/intranet-tmpl/prog/en/includes/greybox.inc
koha-tmpl/intranet-tmpl/prog/en/includes/help-top.inc
koha-tmpl/intranet-tmpl/prog/en/includes/intranetstylesheet.inc
koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc
koha-tmpl/intranet-tmpl/prog/en/includes/select2.inc
koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/checkmarc.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/clone-rules.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_accounts.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_ean_accounts.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/fieldmapping.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_field.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_fields.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_set_mappings.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/auth_finder.tt
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt
koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/cn_browser.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt
koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt
koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt
koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt
koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt
koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/edithelp.tt
koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt
koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt
koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/nl-search.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/routing-lists.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt
koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt
koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tt
koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/add-modify.tt
koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt
koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt
koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt
koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-template.tt
koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt
koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemtypes.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reviews/reviewswaiting.tt
koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt
koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt
koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt
koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/transferCollection.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/add_fields.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt
koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/automatic_item_modification_by_age.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/scheduler.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/showdiffmarc.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
koha-tmpl/opac-tmpl/bootstrap/en/includes/datatables.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/greybox.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/printslip.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
t/db_dependent/Koha/Template/Plugin/Asset.t [new file with mode: 0644]

index d1b7a57..343a374 100644 (file)
@@ -242,9 +242,6 @@ sub gettemplate {
             languages_loop       => $languages_loop,
             one_language_enabled => $one_language_enabled,
     ) unless $one_language_enabled;
-    $template->param(
-        KOHA_VERSION => C4::Context->preference('Version')
-    );
 
     return $template;
 }
diff --git a/Koha/Template/Plugin/Asset.pm b/Koha/Template/Plugin/Asset.pm
new file mode 100644 (file)
index 0000000..caf1786
--- /dev/null
@@ -0,0 +1,110 @@
+package Koha::Template::Plugin::Asset;
+
+# Copyright Marc Véron / marc veron ag, Switzerland
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
+
+use Modern::Perl;
+
+use Template::Plugin;
+use base qw( Template::Plugin );
+
+use File::Basename;
+use File::Spec;
+use C4::Context;
+
+sub new {
+    my ($class, $context) = @_;
+
+    my $self = {
+        _CONTEXT => $context,
+    };
+
+    return bless $self, $class;
+}
+
+sub js {
+    my ( $self, $filename, $attributes ) = @_;
+
+    my $url = $self->url($filename);
+    unless ($url) {
+        warn "File not found : $filename";
+        return;
+    }
+
+    $attributes->{src} = $url;
+
+    return $self->tag('script', $attributes) . '</script>';
+}
+
+sub css {
+    my ( $self, $filename, $attributes ) = @_;
+
+    my $url = $self->url($filename);
+    unless ($url) {
+        warn "File not found : $filename";
+        return;
+    }
+
+    $attributes->{rel} = 'stylesheet';
+    $attributes->{type} = 'text/css';
+    $attributes->{href} = $url;
+
+    return $self->tag('link', $attributes);
+}
+
+sub url {
+    my ( $self, $filename ) = @_;
+
+    my $stash = $self->{_CONTEXT}->stash();
+    my $interface = $stash->get('interface');
+    my $theme = $stash->get('theme');
+
+    my $configkey = $interface =~ /opac/ ? 'opachtdocs' : 'intrahtdocs';
+    my $root = C4::Context->config($configkey);
+
+    my ($basename, $dirname, $suffix) = fileparse($filename, qr/\.[^.]*/);
+
+    my $type = substr $suffix, 1;
+    my @dirs = (
+        "$theme",
+        ".",
+    );
+
+    my $version = C4::Context->preference('Version');
+    foreach my $dir (@dirs) {
+        my $abspath = File::Spec->catfile($root, $dir, $filename);
+        if (-e $abspath) {
+            return File::Spec->catfile($interface, $dir, $dirname, "${basename}_${version}${suffix}");
+        }
+    }
+}
+
+sub tag {
+    my ($self, $name, $attributes) = @_;
+
+    my @attributes_strs;
+    if ($attributes) {
+        while (my ($key, $value) = each %$attributes) {
+            push @attributes_strs, qq{$key="$value"};
+        }
+    }
+    my $attributes_str = join ' ', @attributes_strs;
+
+    return "<$name $attributes_str>";
+}
+
+1;
index d27059c..3a79dac 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% INCLUDE 'format_price.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/buttons.dataTables.min_[% KOHA_VERSION %].css" />
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/dataTables.buttons.min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/buttons.colVis.min_[% KOHA_VERSION %].js"></script>
+[% Asset.css("css/buttons.dataTables.min.css") %]
+[% Asset.js("lib/jquery/plugins/jquery.dataTables.min.js") %]
+[% Asset.js("lib/jquery/plugins/dataTables.buttons.min.js") %]
+[% Asset.js("lib/jquery/plugins/buttons.colVis.min.js") %]
 <script type="text/javascript">
 //<![CDATA[
     var MSG_DT_FIRST = _("First");
@@ -22,4 +23,4 @@
     var CONFIG_EXCLUDE_ARTICLES_FROM_SORT = _("a an the");
 //]]>
 </script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/datatables_[% KOHA_VERSION %].js"></script>
+[% Asset.js("js/datatables.js") %]
index 7dc56b3..a380870 100644 (file)
@@ -1,4 +1,5 @@
+[% USE Asset %]
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
-<link rel="stylesheet" type="text/css" media="print" href="[% interface %]/[% theme %]/css/print_[% KOHA_VERSION %].css" />
+[% Asset.css("css/print.css", { media = "print" }) %]
 
index 319bcda..a0722f2 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE String %]
 [% PROCESS 'html_helpers.inc' %]
 
 <link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
 
-<link rel="stylesheet" type="text/css" href="[% interface %]/lib/jquery/jquery-ui-1.11.4.min_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/lib/bootstrap/bootstrap.min_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/lib/bootstrap/bootstrap-theme.min_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/lib/font-awesome/css/font-awesome.min_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" media="print" href="[% interface %]/[% theme %]/css/print_[% KOHA_VERSION %].css" />
+[% Asset.css("lib/jquery/jquery-ui-1.11.4.min.css") %]
+[% Asset.css("lib/bootstrap/bootstrap.min.css") %]
+[% Asset.css("lib/bootstrap/bootstrap-theme.min.css") %]
+[% Asset.css("lib/font-awesome/css/font-awesome.min.css") %]
+[% Asset.css("css/print.css", { media = "print" }) %]
 [% INCLUDE intranetstylesheet.inc %]
-[% IF ( bidi ) %]<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left_[% KOHA_VERSION %].css" />[% END %]
+[% IF ( bidi ) %][% Asset.css("css/right-to-left.css") %][% END %]
 
 [% IF ( login ) %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/login_[% KOHA_VERSION %].css" />
+    [% Asset.css("css/login.css") %]
 [% END %]
 [% IF ( IntranetUserCSS ) %]<style type="text/css">[% IntranetUserCSS %]</style>[% END %]
 
index 620c254..84918c2 100644 (file)
@@ -1,7 +1,8 @@
+[% USE Asset %]
 <script type="text/javascript">
     var GB_ROOT_DIR = "[% interface %]/lib/greybox/";
 </script>
-<script type="text/javascript" src="[% interface %]/lib/greybox/AJS_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/greybox/AJS_fx_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/greybox/gb_scripts_[% KOHA_VERSION %].js"></script>
-<link href="[% interface %]/lib/greybox/gb_styles_[% KOHA_VERSION %].css" rel="stylesheet" type="text/css" />
+[% Asset.js("lib/greybox/AJS.js") %]
+[% Asset.js("lib/greybox/AJS_fx.js") %]
+[% Asset.js("lib/greybox/gb_scripts.js") %]
+[% Asset.css("lib/greybox/gb_styles.css") %]
index 4c2f955..99946e2 100644 (file)
@@ -1,20 +1,21 @@
+[% USE Asset %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Online help</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/lib/jquery/jquery-ui-1.11.4.min_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" media="print" href="[% interface %]/[% theme %]/css/print_[% KOHA_VERSION %].css" />
+[% Asset.css("lib/jquery/jquery-ui-1.11.4.min.css") %]
+[% Asset.css("css/print.css", { media = "print" }) %]
 [% INCLUDE intranetstylesheet.inc %]
 [% IF ( bidi ) %]
-   <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left_[% KOHA_VERSION %].css" />
+   [% Asset.css("css/right-to-left.css") %]
 [% END %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-2.2.3.min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-migrate-1.3.0.min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-ui-1.11.4.min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/shortcut/shortcut_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/jquery/jquery-2.2.3.min.js") %]
+[% Asset.js("lib/jquery/jquery-migrate-1.3.0.min.js") %]
+[% Asset.js("lib/jquery/jquery-ui-1.11.4.min.js") %]
+[% Asset.js("lib/shortcut/shortcut.js") %]
 <!-- koha core js -->
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/staff-global_[% KOHA_VERSION %].js"></script>
+[% Asset.js("js/staff-global.js") %]
 
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/help_[% KOHA_VERSION %].css" />
+[% Asset.css("css/help.css") %]
 </head>
 <body id="help" class="help">
index ce3c1c4..884aaea 100644 (file)
@@ -1,8 +1,9 @@
-[% SET intranetstylesheet='staff-global_' _ KOHA_VERSION _ '.css' UNLESS intranetstylesheet %]
+[% USE Asset %]
+[% SET intranetstylesheet='staff-global.css' UNLESS intranetstylesheet %]
 [% IF (intranetstylesheet.match('^https?:|^\/')) %]
     <link rel="stylesheet" type="text/css" href="[% intranetstylesheet %]" />
 [% ELSE %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/[% intranetstylesheet %]" />
+    [% Asset.css("css/" _ intranetstylesheet) %]
 [% END %]
 
 <!-- local colors -->
index 4ac51f9..de81f3f 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE AudioAlerts %]
 [%# Prevent XFS attacks -%]
 [% UNLESS popup %]
     </script>
 [% END %]
 
-<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-2.2.3.min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-migrate-1.3.0.min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-ui-1.11.4.min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/shortcut/shortcut_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.highlight-3_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/bootstrap/bootstrap.min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.validate.min_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/jquery/jquery-2.2.3.min.js") %]
+[% Asset.js("lib/jquery/jquery-migrate-1.3.0.min.js") %]
+[% Asset.js("lib/jquery/jquery-ui-1.11.4.min.js") %]
+[% Asset.js("lib/shortcut/shortcut.js") %]
+[% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") %]
+[% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") %]
+[% Asset.js("lib/bootstrap/bootstrap.min.js") %]
+[% Asset.js("lib/jquery/plugins/jquery.validate.min.js") %]
 <!-- koha core js -->
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/staff-global_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/commons_[% KOHA_VERSION %].js"></script>
+[% Asset.js("js/staff-global.js") %]
+[% Asset.js("js/commons.js") %]
 
 [% INCLUDE 'validator-strings.inc' %]
 [% IF ( IntranetUserJS ) %]
     //]]>
     </script>
 
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/basket_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/basket.js") %]
 [% END %]
 
 [% IF LocalCoverImages %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/localcovers_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/localcovers.js") %]
     <script type="text/javascript">
         //<![CDATA[
             var NO_LOCAL_JACKET = _("No cover image available");
index 7f395fb..8817860 100644 (file)
@@ -1,6 +1,7 @@
+[% USE Asset %]
 <script src="[% interface %]/lib/select2/js/select2.min.js"></script>
-<link rel="stylesheet" type="text/css" href="[% interface %]/lib/select2/css/select2.min_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/select2_[% KOHA_VERSION %].css" />
+[% Asset.css("lib/select2/css/select2.min.css") %]
+[% Asset.css("css/select2.css") %]
 <script>
   jQuery.extend($.fn.select2.defaults, {
     allowClear: true,
index d96a279..b2d3fe5 100644 (file)
@@ -1,5 +1,6 @@
+[% USE Asset %]
 [% #Enable tinymce for system preferences %]
-<script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/tiny_mce/tiny_mce.js") %]
 <script>
 
 [%# Save TinyMCE content and trigger an event on the original element %]
index b6fc28e..5864a2f 100644 (file)
@@ -1,11 +1,12 @@
+[% USE Asset %]
 [% USE Price %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
-<link href="[% interface %]/lib/jquery/plugins/treetable/stylesheets/jquery.treetable_[% KOHA_VERSION %].css" rel="stylesheet" type="text/css" />
+[% Asset.css("css/datatables.css") %]
+[% Asset.css("lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css") %]
 </head>
 
 <body id="acq_acqui-home" class="acq">
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/treetable/jquery.treetable_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") %]
+    [% Asset.js("js/acquisitions-menu.js") %]
     <script type="text/javascript">
         dt_overwrite_html_sorting_localeCompare();
 
index 1e9e918..473e076 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
@@ -9,7 +10,7 @@
  &rsaquo; Batch list
 [% END %]
 </title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css">#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
 [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
+    [% Asset.js("js/acq.js") %]
     <script type="text/JavaScript">
         $(document).ready(function() {
             $("#files").dataTable($.extend(true, {}, dataTablesDefaults, {
index 19030de..e9a94f8 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% BLOCK csv_export %]
     <div class="btn-group">
         <a id="exportbutton" class="btn btn-default btn-sm" href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]"><i class="fa fa-download"></i> Export as CSV</a>
@@ -19,7 +20,7 @@
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for [% booksellername|html %]</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 <style type="text/css">
     .sortmsg {font-size: 80%;}
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
 [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
     <script type="text/javascript">
         function updateColumnsVisibility(visible) {
             if ( visible ) {
index df6f723..d872672 100644 (file)
@@ -1,19 +1,20 @@
+[% USE Asset %]
 [% USE Branches %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Basket grouping for [% booksellername |html %]</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 [% INCLUDE 'datatables.inc' %]
-<script type="text/javascript" src="[% interface %]/lib/yui/utilities/utilities_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/yui/button/button-min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/yui/container/container_core-min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/yui/menu/menu-min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/basketgroup_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/yui/utilities/utilities.js") %]
+[% Asset.js("lib/yui/button/button-min.js") %]
+[% Asset.js("lib/yui/container/container_core-min.js") %]
+[% Asset.js("lib/yui/menu/menu-min.js") %]
+[% Asset.js("js/basketgroup.js") %]
 [% IF ( grouping ) %]
-<script type="text/javascript" src="[% interface %]/lib/yui/yahoo-dom-event/yahoo-dom-event_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/yui/animation/animation-min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/yui/dragdrop/dragdrop-min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/yui/element/element-min_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/yui/yahoo-dom-event/yahoo-dom-event.js") %]
+[% Asset.js("lib/yui/animation/animation-min.js") %]
+[% Asset.js("lib/yui/dragdrop/dragdrop-min.js") %]
+[% Asset.js("lib/yui/element/element-min.js") %]
 <style type="text/css">
 /*margin and padding on body element
   can introduce errors in determining
index 2aeeb4a..240226e 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Branches %]
 [% USE Koha %]
 [% SET footerjs = 1 %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
+    [% Asset.js("js/acq.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index 183b806..f8c092d 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -8,7 +9,7 @@
        vertical-align: top;
 }
 </style>
-<link rel="stylesheet" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="acq_booksellers" class="acq">
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         $(document).ready(function() {
index fccd57f..67e4731 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; EDIFACT messages</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 <style type="text/css">
 #EDI_modal { width : 80%; } @media (max-width: 767px) { #EDI_modal { margin: 0; width : auto; } }
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         $(document).ready(function() {
index 94ccbf3..99fcc96 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE ColumnsSettings %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( order_loop ) %]Orders search &rsaquo; Search results[% ELSE %]Order search[% END %]</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
 [% INCLUDE 'calendar.inc' %]
     [% INCLUDE 'datatables.inc' %]
     [% INCLUDE 'columns_settings.inc' %]
-    <script type="text/javascript" src="[% interface %]/js/autocomplete/patrons_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/autocomplete/patrons.js") %]
     <script type="text/javascript">
         var MSG_REMOVE_PATRON = _("Remove");
         $(document).ready(function() {
index 1e6ca4b..350b3a1 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; Invoice &rsaquo; Files</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
@@ -85,7 +86,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         $(document).ready(function() {
index 33838e5..38a886f 100644 (file)
@@ -1,10 +1,11 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE Price %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; Invoice</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'calendar.inc' %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
index b7264b9..2b5e550 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; Invoices</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 
 </head>
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     [% INCLUDE 'calendar.inc' %]
     <script type="text/javascript">
index 4c142a1..6362597 100644 (file)
@@ -1,10 +1,11 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Branches %]
 [% USE ColumnsSettings %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; Late orders</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     [% INCLUDE 'columns_settings.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
     [% INCLUDE 'calendar.inc' %]
     <script type="text/javascript">
         var late_orderst;
index 5d9a0ac..877e41a 100644 (file)
@@ -1,7 +1,8 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; Search existing records</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
          $(document).ready(function() {
index 03e8798..1a10af9 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% SET footerjs = 1 %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
+    [% Asset.js("js/acq.js") %]
     [% INCLUDE 'additem.js.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/additem_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/cataloging_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/prevent_submit_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/additem.js") %]
+    [% Asset.js("js/cataloging.js") %]
+    [% Asset.js("js/prevent_submit.js") %]
     <script type="text/javascript">
         actTotal = "";
 
index 38491d8..fd225b9 100644 (file)
@@ -1,10 +1,11 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Branches %]
 [% USE Koha %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Serials [% biblionumber %]</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
@@ -96,7 +97,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         function updateRowsVisibility(show_only_renewed) {
index a8f9c41..9b5fd90 100644 (file)
@@ -1,7 +1,8 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; Add order from a suggestion</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
@@ -74,7 +75,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
     $(document).ready(function() {
index e7c3040..802ae05 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE ItemTypes %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; Ordered</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
@@ -96,7 +97,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         $(document).ready(function() {
index 8ec42ad..abd35a6 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Branches %]
 [% USE Price %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
 [% INCLUDE 'calendar.inc' %]
     [% INCLUDE 'additem.js.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/additem_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/cataloging_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/prevent_submit_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/additem.js") %]
+    [% Asset.js("js/cataloging.js") %]
+    [% Asset.js("js/prevent_submit.js") %]
     <script type="text/javascript">
         function Check(form) {
             [% IF (AcqCreateItemReceiving) %]
index 863dbd2..96c2f51 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE Price %]
@@ -6,7 +7,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( date ) %]
             Receipt summary for [% name %] [% IF ( invoice ) %]invoice [% invoice %][% END %] on [% datereceived | $KohaDates %][% ELSE %]Receive orders from [% name %][% END %]</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") %]
     <style type="text/css">#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
     <script type="text/javascript">
 
index cf90e34..ee0ecd0 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; Receive shipment from vendor [% name %]</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'calendar.inc' %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
index f608c41..ec91e86 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE ItemTypes %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; Spent</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         $(document).ready(function() {
index 4e01547..1d7b033 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% BLOCK edit_contact %]
     <ol id="contact-form">
@@ -88,7 +89,7 @@
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Vendor [% name %]</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         function confirm_deletion() {
index e92456f..0b24419 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% USE Koha %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( booksellername ) %]Orders with uncertain prices for vendor [% booksellername %][% ELSE %]Orders with uncertain prices[% END %]</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         $(document).ready(function() {
         });
         var MSG_INVALIDPRICE = _("ERROR: Price is not a valid number, please check the price and try again!");
     </script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acq.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index d1e677d..81445f0 100644 (file)
@@ -1,7 +1,8 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( opsearch ) %]Order from external source[% ELSE %]Order from external source &rsaquo; Search results[% END %]</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 <style type="text/css">
 .linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
@@ -191,9 +192,9 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
 [% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acquisitions-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
     <script type="text/javascript">
         $(document).ready(function(){
             var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
@@ -223,7 +224,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
         });
     </script>
     [% INCLUDE 'z3950_search.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/z3950_search.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
\ No newline at end of file
index afd893f..ea68e0d 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Price %]
 [% SET footerjs = 1 %]
@@ -34,9 +35,9 @@
 
 [% INCLUDE 'doc-head-open.inc' %]
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% IF close_form %]
-    <link href="[% interface %]/lib/jquery/plugins/treetable/stylesheets/jquery.treetable_[% KOHA_VERSION %].css" rel="stylesheet" type="text/css" />
+    [% Asset.css("lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css") %]
 [% END %]
 
 <title>
     [% INCLUDE 'calendar.inc' %]
     [% INCLUDE 'datatables.inc' %]
     [% IF close_form %]
-        <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/treetable/jquery.treetable_[% KOHA_VERSION %].js"></script>
+        [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") %]
     [% END %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acq.js") %]
     <script type="text/javascript">
     // #################################################################################
     // Javascript
index e64c9e9..1e79782 100644 (file)
@@ -1,11 +1,12 @@
+[% USE Asset %]
 [% USE AuthorisedValues %]
 [% USE Branches %]
 [% USE Price %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Funds[% IF op == 'add_form' %] &rsaquo; [% IF ( budget_id ) %]Modify fund[% IF ( budget_name ) %] '[% budget_name %]'[% END %][% ELSE %]Add fund [% END %][% END %]</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
-<link href="[% interface %]/lib/jquery/plugins/treetable/stylesheets/jquery.treetable_[% KOHA_VERSION %].css" rel="stylesheet" type="text/css" />
+[% Asset.css("css/datatables.css") %]
+[% Asset.css("lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
 </div>
 </div>
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acq.js") %]
     <script type="text/javascript">
         var MSG_BUDGET_PARENT_ALLOCATION = "- " + _("Fund amount exceeds parent allocation") + "\n";
         var MSG_BUDGET_PERIOD_ALLOCATION = "- " + _("Fund amount exceeds period allocation") + "\n";
         var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") + "\n";
     </script>
 
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acq.js") %]
     [% IF op == 'add_form' %]
         <script type="text/javascript">
         //<![CDATA[
         </script>
     [% ELSIF op == 'list' %]
         [% INCLUDE 'datatables.inc' %]
-        <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/treetable/jquery.treetable_[% KOHA_VERSION %].js"></script>
+        [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") %]
 
         <script type="text/javascript">
         //<![CDATA[
index 8103bc1..4b0ab5f 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 </div>
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'calendar.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acq.js") %]
     <script type="text/javascript">
     //<![CDATA[
     // to check if the data are correctly entered.
index af39e1e..324e089 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Price %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 </div>
 </div>
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
+    [% Asset.js("js/acq.js") %]
     <script type="text/javascript">
     //<![CDATA[
         function Check(f) {
index c615159..ecf6226 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         var MSG_AUDIO_EMPTY_SOUND = _("Please select or enter a sound.");
         var MSG_AUDIO_CONFIRM_DELETE = _("Are you sure you want to delete the selected audio alerts?");
         var MSG_AUDIO_CHECK_CHECKBOXES = _("Check the box next to the alert you want to delete.")
     </script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/audio_alerts_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/audio_alerts.js") %]
 [% END %]
 [% INCLUDE 'intranet-bottom.inc' %]
index 3101ae7..8e6e6d3 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Authority MARC subfield structure</title>
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
      $(document).ready(function() {
         $('#subfieldtabs').tabs();
index 2ca2b14..435210f 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE AuthorisedValues %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -7,7 +8,7 @@
     [% ELSE %]&rsaquo; [% action %][% END %][% END %][% IF ( delete_confirm ) %]&rsaquo; [% IF ( authtypecode ) %][% authtypecode %] Framework[% ELSE %]Default framework[% END %] &rsaquo; Confirm deletion[% END %][% IF ( delete_confirmed ) %]&rsaquo; [% IF ( authtypecode ) %][% authtypecode %] Framework[% ELSE %]Default framework[% END %] &rsaquo; Data deleted[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="admin_auth_tag_structure" class="admin">
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             $("#table_authtagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
index 359caa5..a728a45 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Authorized values
@@ -9,7 +10,7 @@
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
 
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 
 <style type="text/css">
        fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; }
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         $(document).ready(function() {
index 97bdfa2..c75e410 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Authority types
@@ -8,7 +9,7 @@
 [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="admin_authtypes" class="admin">
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             $("#authtypes").dataTable($.extend(true, {}, dataTablesDefaults, {
index 56f979d..beeaa66 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; MARC frameworks
@@ -8,7 +9,7 @@
 [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="admin_biblio_framework" class="admin">
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         /* Set some variable needed in biblio_framework.js */
         var MSG_IMPORT_ERROR = _("Error importing the framework");
         var MSG_IMPORTING_TO_FRAMEWORK = _("Importing to framework: %s. Importing from file: %s.");
         var template_path = "[% interface %]/[% theme %]";
     </script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/biblio_framework_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/biblio_framework.js") %]
 [% END %]
 [% INCLUDE 'intranet-bottom.inc' %]
index 44eaee4..3dd10b8 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Library checkin and transfer policy</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css">td { text-align: center; } .sorted { min-width: 50%; }</style>
 </head>
 
@@ -85,9 +86,9 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
     <script type="text/javascript">
         $(document).ready(function(){
             $("#CheckAll").click(function(){ $("#transferlimit_tabs").checkCheckboxes(); return false; });
index 99777c8..cbb0730 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Libraries
@@ -8,7 +9,7 @@
 [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="admin_branches" class="admin">
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/tiny_mce/tiny_mce.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             $("#branchest").dataTable($.extend(true, {}, dataTablesDefaults, {
index 4ad11ea..c71e6fb 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE Price %]
@@ -7,7 +8,7 @@
 [% IF op == 'delete_confirm' %][% IF ( patrons_in_category > 0 ) %]Cannot delete: category [% categorycode |html %] in use[% ELSE %]Confirm deletion of category '[% categorycode |html %]'[% END %][% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css">#enrolmentmessage.hint { display : none; }</style>
 </head>
 
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/messaging-preference-form_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
+    [% Asset.js("js/messaging-preference-form.js") %]
     [% INCLUDE 'calendar.inc' %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         var MSG_CATEGORYCODE_CHARS = _("Category code can only contain the following characters: letters, numbers, - and _.");
         var MSG_ONE_ENROLLMENTPERIOD = ("Please choose an enrollment period in months OR by date.");
     </script>
-    <script type="text/javascript" src="[% themelang %]/js/categories_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/categories.js") %]
 [% END %]
 [% INCLUDE 'intranet-bottom.inc' %]
index 4fecf60..db49419 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; MARC check
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
 [% END %]
 [% INCLUDE 'intranet-bottom.inc' %]
index f3e3d88..f7daa3c 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; [% IF op =='add_form' %]Cities &rsaquo; [% IF city.cityid %] Modify city[% ELSE %] New city[% END %][% ELSE %][% IF op == 'delete_confirm' %]Cities &rsaquo; Confirm deletion of city[% ELSE %] Cities[% END %][% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="admin_cities" class="admin">
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         $(document).ready(function() {
index 6211bfe..c89bfdb 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Classification sources
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
 [% END %]
 [% INCLUDE 'intranet-bottom.inc' %]
index fee48e0..9adae50 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -67,7 +68,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index adac3ab..cfc1277 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% SET panel_id = 0 %]
 [% BLOCK pagelist %]
   </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         $(document).ready( function() {
             var accordion = $( "#modules" ).accordion({
index 94d3480..f9178a9 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE ColumnsSettings %]
 [% USE HtmlTags %]
@@ -8,7 +9,7 @@
 [% IF op == 'delete_confirm' %]Confirm deletion of currency '[% currency.currency %]'[% END %]
 [% IF op == 'list' %]Currencies[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="admin_currency" class="admin">
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     [% INCLUDE 'columns_settings.inc' %]
     <script type="text/javascript">
index b47e497..ecaad4f 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% BLOCK pluginlist %]
 <div class="pluginlist">
@@ -68,7 +69,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             $( ".pluginlist" ).sortable();
index 814cde3..2dc1c09 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; EDI accounts
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
 [% END %]
 [% INCLUDE 'intranet-bottom.inc' %]
index 2feff31..7088736 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Library EANs
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
 [% END %]
 [% INCLUDE 'intranet-bottom.inc' %]
index 9691322..1f6b36d 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Keyword to MARC mapping</title>
@@ -74,7 +75,7 @@
        </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             $('#selectframework').find("input:submit").hide();
index 0c26a0f..f47d5f9 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -158,7 +159,7 @@ table.grid td.default {
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         var $branch = "[% branch %]";
         $(function(){
index ac5aa57..c0ad079 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% USE AuthorisedValues %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -41,7 +42,7 @@
     </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
\ No newline at end of file
index 3b0b18f..8db4c85 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% USE AuthorisedValues %]
 [% INCLUDE 'doc-head-open.inc' %]
     </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         var MSG_ITEM_SEARCH_DELETE_CONFIRM = _("Are you sure you want to delete this field?");
     </script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/item_search_fields_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/item_search_fields.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index faead47..526ea9c 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE AuthorisedValues %]
 [% USE Price %]
@@ -22,7 +23,7 @@ Data deleted
 [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css">
        fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; }
   fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-active {background-color : #F4F8F9; }
@@ -395,7 +396,7 @@ Item types administration
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     [% INCLUDE 'greybox.inc' %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
index a402183..a692ad2 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Koha to MARC mapping</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="admin_koha2marclinks" class="admin">
@@ -68,7 +69,7 @@
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         function AddFld(kohafield) {
             var fieldstr = prompt( _("Adding a mapping for: %s.").format(kohafield) + "\n" + _("Please enter field tag and subfield code, separated by a comma. (For control fields: add '@' as subfield code.)\nThe change will be applied immediately.") );
index eaa1aba..b9b433f 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% USE KohaSpan %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Library groups</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link href="[% interface %]/lib/jquery/plugins/treetable/stylesheets/jquery.treetable_[% KOHA_VERSION %].css" rel="stylesheet" type="text/css" />
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/treetable/jquery.treetable_[% KOHA_VERSION %].js"></script>
+[% Asset.css("lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css") %]
+[% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") %]
 <script type="text/javascript">
 //<![CDATA[
     $(document).ready(function() {
index eedd8a2..fc62473 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Localization</title>
 [% INCLUDE 'doc-head-close.inc' popup => 1 %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="admin_localization" class="admin">
index da640d1..199bbe8 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo;[% IF ( add_form ) %][% IF ( use_heading_flags_p ) %][% IF ( heading_edit_subfields_p ) %] MARC subfield structure &rsaquo; Edit MARC subfields constraints[% END %][% ELSE %] MARC subfield structure &rsaquo; [% action %][% END %][% END %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/marc_subfields_structure_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
+    [% Asset.js("js/marc_subfields_structure.js") %]
 [% END %]
 [% INCLUDE 'intranet-bottom.inc' %]
index 366e99e..0d0431f 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE AuthorisedValues %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -7,7 +8,7 @@
 [% IF ( delete_confirmed ) %]MARC frameworks &rsaquo;  Data deleted[% END %]
 [% IF ( else ) %]MARC frameworks[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="admin_marctagstructure" class="admin">
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             $("#table_marctagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
index a084e9d..fce8032 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Record matching rules
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         var maxMatchPoint = [% max_matchpoint %];
         var maxMatchCheck = [% max_matchcheck %];
index a223d93..4846dc5 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; OAI sets &rsaquo; OAI set mappings</title>
@@ -93,7 +94,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             $("#mappingform").submit(function(){
index f4d4ba9..056365a 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; [% IF ( op_new ) %]OAI sets configuration &rsaquo; Add a new OAI set[% ELSE %]OAI sets configuration[% END %]</title>
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         function newDescField() {
             $("#adddescription").before(
index 963d93f..5232b79 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE AuthorisedValues %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             if ( $("#branches option:selected").length < 1 ) {
index 4bff6d4..2db4b2d 100644 (file)
@@ -1,12 +1,13 @@
+[% USE Asset %]
 [% USE Koha %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; System preferences</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/preferences_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/lib/jquery/plugins/multiple-select/multiple-select_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/humanmsg_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
+[% Asset.css("css/preferences.css") %]
+[% Asset.css("lib/jquery/plugins/multiple-select/multiple-select.css") %]
+[% Asset.css("css/humanmsg.css") %]
 </head>
 <body id="admin_preferences" class="admin">
 [% INCLUDE 'header.inc' %]
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/multiple-select/jquery.multiple.select_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
+    [% Asset.js("lib/jquery/plugins/multiple-select/jquery.multiple.select.js") %]
     <script type="text/javascript">
         [% UNLESS ( searchfield ) %]$(document).ready(function(){
                 $('#toolbar').fixFloat();
index 0690b08..7542190 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo;
 [% IF ( add_form ) %][% IF ( searchfield ) %] Printers &rsaquo; Modify printer '[% searchfield %]'[% ELSE %] Printers &rsaquo; New printer[% END %][% END %]
@@ -7,7 +8,7 @@
 [% IF ( else ) %]Printers[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% IF ( loop ) %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'datatables.inc' %]
 <script type="text/javascript">
 //<![CDATA[
index cc6f94c..cecd8de 100644 (file)
@@ -1,7 +1,8 @@
+[% USE Asset %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Elastic Search mappings</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.tablednd_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/jquery/plugins/jquery.tablednd.js") %]
 <script type="text/javascript">
     function clean_line( line ) {
         $(line).find('input[type="text"]').val("");
index 3eb96a7..86226cb 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     [% INCLUDE 'calendar.inc' %]
     <script type="text/javascript">
 
index 04331b5..4c41178 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; SMS cellular providers</title>
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         var MSG_SMS_PATRONS_USING = _("Are you sure you want to delete %s? %s patron(s) are using it!");
         var MSG_SMS_DELETE_CONFIRM = _("Are you sure you want to delete %s?");
         var LABEL_SMS_ADD_PROVIDER = _("Add an SMS cellular provider");
         var LABEL_SMS_EDIT_PROVIDER = _("Edit provider %s");
     </script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/sms_providers_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/sms_providers.js") %]
 [% END %]
 [% INCLUDE 'intranet-bottom.inc' %]
index a73ecb4..341a703 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; SRU search fields mapping</title>
@@ -71,7 +72,7 @@
     </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             $("#form01").submit(function(event) {
index 04f0d48..c0b1148 100644 (file)
@@ -1,10 +1,11 @@
+[% USE Asset %]
 [% USE Koha %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; [% IF ( add_form ) %] System preferences &rsaquo; [% IF ( modify ) %]Modify system preference '[% searchfield %]'[% ELSE %]Add a system preference[% END %][% END %][% IF ( add_validate ) %] System preferences &rsaquo; Data added[% END %]
 [% IF ( delete_confirm ) %] System preferences &rsaquo; [% searchfield %] &rsaquo; Confirm deletion of parameter '[% searchfield %]'[% END %][% IF ( delete_confirmed ) %] System preferences &rsaquo; Parameter deleted[% END %][% IF ( else ) %]System preferences[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="admin_systempreferences" class="admin">
index 4376eb6..17349ed 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -91,7 +92,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script type="text/javascript">
         function check_transport_cost(e) {
             var val = e.value;
index 2b7f8ae..5819de0 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% USE Koha %]
 [% USE KohaDates %]
@@ -5,7 +6,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Koha usage statistics</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" href="[% interface %]/lib/leaflet/leaflet_[% KOHA_VERSION %].css" />
+[% Asset.css("lib/leaflet/leaflet.css") %]
 </head>
 
 <body id="admin_usage_statistics" class="admin">
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'calendar.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     <script src="[% interface %]/lib/leaflet/leaflet.js"></script>
     <script type="text/javascript">
         function positionMap() {
index 8bf8483..6af148e 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 
@@ -16,7 +17,7 @@
 [% INCLUDE 'doc-head-close.inc' %]
 
 [% IF op == 'list' %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+    [% Asset.css("css/datatables.css") %]
 [% END %]
 </head>
 
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/admin-menu.js") %]
     [% IF op == 'list' %]
         [% INCLUDE 'datatables.inc' %]
     [% END %]
index a7e1aaa..8539ab1 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Cataloging authority plugin</title>
@@ -15,7 +16,7 @@
         var index = "[% index %]";
         var authtypecode = "[% authtypecode %]";
     </script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/auth-finder-search_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/auth-finder-search.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' popup_window = 1 %]
index 785f854..1fbfd13 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Authorities &rsaquo; [% IF ( authid ) %]Modify authority #[% authid %] ([% authtypetext %])[% ELSE %]Adding authority ([% authtypetext %])[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/cataloging_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
+[% Asset.js("js/cataloging.js") %]
 
 <script type="text/javascript">
 //<![CDATA[
@@ -152,7 +153,7 @@ function confirmnotdup(redirect){
 }
 //]]>
 </script>
-<link type="text/css" rel="stylesheet" href="[% interface %]/[% theme %]/css/addbiblio_[% KOHA_VERSION %].css" />
+[% Asset.css("css/addbiblio.css") %]
 
 [% INCLUDE 'select2.inc' %]
 <script>
@@ -162,7 +163,7 @@ function confirmnotdup(redirect){
 </script>
 
 [% IF ( bidi ) %]
-   <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left_[% KOHA_VERSION %].css" />
+   [% Asset.css("css/right-to-left.css") %]
 [% END %]
 </head>
 <body id="auth_authorities" class="auth">
index 95c331f..2dc44b4 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% PROCESS 'authorities.inc' %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -96,7 +97,7 @@
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'authorities_js.inc' %]
     [% IF ( displayhierarchy ) %]
-        <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.jstree_[% KOHA_VERSION %].js"></script>
+        [% Asset.js("lib/jquery/plugins/jquery.jstree.js") %]
     [% END %]
     <script type="text/javascript">
         $(document).ready(function() {
index 20ade54..f9412b0 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% PROCESS 'merge-record.inc' %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -106,7 +107,7 @@ div#result { margin-top: 1em; }
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'merge-record-strings.inc' %]
     [% INCLUDE 'authorities_js.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/merge-record_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/merge-record.js") %]
     [% INCLUDE 'merge-record-strings.inc' %]
     <script type="text/javascript">
     //<![CDATA[
index f8c86cf..39b06c1 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% PROCESS 'authorities-search-results.inc' %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -89,7 +90,7 @@
         var index = "[% index %]";
         var authtypecode = "[% authtypecode %]";
     </script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/auth-finder-search_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/auth-finder-search.js") %]
     <script type="text/javascript">
 
         function jumpfull(page){
index 28c0e78..6b1d28f 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% BLOCK controls %]
     <p style="padding: 7px 0; border-top : 1px solid #E8E8E8;">
@@ -32,7 +33,7 @@
     @import url([% interface %]/[% theme %]/css/print.css);
 </style>
     [% ELSE %][% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
        [% END %]
 </head>
 [% IF ( print_basket ) %]<body id="cart_basket" class="cart" onload="print();history.back();">[% ELSE %]<body id="cart_basket" class="cart">[% END %]
             [% INCLUDE js_includes.inc %]
             [% UNLESS ( print_basket ) %]
                 [% INCLUDE 'datatables.inc' %]
-                <script type="text/javascript" src="[% interface %]/[% theme %]/js/cart_[% KOHA_VERSION %].js"></script>
-                <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+                [% Asset.js("js/cart.js") %]
+                [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
             [% END %]
     </body>
 </html>
index 3a42fd1..e292c14 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Catalog &rsaquo;
@@ -48,9 +49,9 @@
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'catalog-strings.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/catalog_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/catalog.js") %]
     [% INCLUDE 'browser-strings.inc' %]
-    <script type="text/javascript" src="[% interface %]/js/browser_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/browser.js") %]
     <script type="text/javascript">
         var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
         browser.show();
index dfe1e1c..3b7c161 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Catalog &rsaquo;
 </div>
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'catalog-strings.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/catalog_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/catalog.js") %]
     [% INCLUDE 'browser-strings.inc' %]
-    <script type="text/javascript" src="[% interface %]/js/browser_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/browser.js") %]
     <script type="text/javascript">
         var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
         browser.show();
index 51b5e34..5be1aa5 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
     <script type="text/JavaScript">
         /**
          *  Function add_field();
index 9b1eb1a..bc83056 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE AuthorisedValues %]
@@ -33,7 +34,7 @@
   [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="catalog_detail" class="catalog">
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'catalog-strings.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/catalog_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/catalog.js") %]
     [% INCLUDE 'greybox.inc' %]
     <script type="text/javascript">
         // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
         });[% END %]
     </script>
     [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && ( normalized_isbn || normalized_upc ) ) %]
-        <script type="text/javascript" src="https://imageserver.ebscohost.com/novelistselect/ns2init_[% KOHA_VERSION %].js"></script>
+        [% Asset.js("https://imageserver.ebscohost.com/novelistselect/ns2init.js") %]
     [% END %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") %]
     [% INCLUDE 'browser-strings.inc' %]
     [% INCLUDE 'columns_settings.inc' %]
-    <script type="text/javascript" src="[% interface %]/js/browser_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/table_filters_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/browser.js") %]
+    [% Asset.js("js/table_filters.js") %]
     <script type="text/javascript">
         var browser;
         browser = KOHA.browser('[% searchid %]', parseInt(biblionumber, 10));
index b434c9a..99bed91 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Catalog &rsaquo; Details for [% biblio.title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]</title>
@@ -90,7 +91,7 @@ img.thumbnail {
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'catalog-strings.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/catalog_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/catalog.js") %]
     <script type="text/javascript">
         $(document).ready(function(){
             showCover([% imagenumber %]);
index e278c3d..28800ab 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE Branches %]
@@ -5,7 +6,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Catalog &rsaquo; Checkout history for [% biblio.title |html %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="catalog_issuehistory" class="catalog">
index 172920b..ee130b6 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE JSON.Escape %]
 
 [% BLOCK form_label %]
 [% INCLUDE 'doc-head-open.inc' %]
   <title>Koha &rsaquo; Catalog &rsaquo; Item search</title>
   [% INCLUDE 'doc-head-close.inc' %]
-  <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/itemsearchform_[% KOHA_VERSION %].css" />
-  <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+  [% Asset.css("css/itemsearchform.css") %]
+  [% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="catalog_itemsearch" class="catalog">
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
     <script type="text/javascript">
         var authorised_values = [% authorised_values_json %];
 
index 9ca854e..e3b472b 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 
@@ -76,9 +77,9 @@
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'catalog-strings.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/catalog_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/catalog.js") %]
     [% INCLUDE 'browser-strings.inc' %]
-    <script type="text/javascript" src="[% interface %]/js/browser_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/browser.js") %]
     <script type="text/javascript">
     //<![CDATA[
         var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
index ad8aefb..b1a261f 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 </div>
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'catalog-strings.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/catalog_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/catalog.js") %]
     [% INCLUDE 'browser-strings.inc' %]
-    <script type="text/javascript" src="[% interface %]/js/browser_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/browser.js") %]
     <script type="text/javascript">
         var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
         browser.show();
index 459bc08..127bd8c 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE Biblio %]
 [% USE KohaDates %]
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'browser-strings.inc' %]
-    <script type="text/javascript" src="[% interface %]/js/browser_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/browser.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
     <script type="text/javascript">
         var MSG_NO_ITEM_SELECTED = _("Nothing is selected.");
         var MSG_NON_RESERVES_SELECTED = _("One or more selected items cannot be placed on hold.");
index 5d62c85..43a9bfa 100644 (file)
@@ -1,10 +1,11 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 [% USE Koha %]
 [% USE KohaDates %]
 <title>Koha &rsaquo; Catalog &rsaquo; Search history</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="catalogue_search-history" class="catalogue">
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
     <script type="text/javascript">
     //<![CDATA[
     $(document).ready(function() {
index c92d51e..fa58629 100644 (file)
@@ -1,11 +1,12 @@
+[% USE Asset %]
 [% USE Koha %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Cataloging &rsaquo; [% IF ( biblionumber ) %]Editing [% title |html %] (Record number [% biblionumber %])[% ELSE %]Add MARC record[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/cataloging_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
+[% Asset.js("js/cataloging.js") %]
 [% INCLUDE 'browser-strings.inc' %]
-<script type="text/javascript" src="[% interface %]/js/browser_[% KOHA_VERSION %].js"></script>
+[% Asset.js("js/browser.js") %]
 <script type="text/javascript">
 //<![CDATA[
     var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
@@ -383,7 +384,7 @@ function Changefwk() {
 
 //]]>
 </script>
-<link type="text/css" rel="stylesheet" href="[% interface %]/[% theme %]/css/addbiblio_[% KOHA_VERSION %].css" />
+[% Asset.css("css/addbiblio.css") %]
 
 [% INCLUDE 'select2.inc' %]
 <script>
@@ -393,7 +394,7 @@ function Changefwk() {
 </script>
 
 [% IF ( bidi ) %]
-   <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left_[% KOHA_VERSION %].css" />
+   [% Asset.css("css/right-to-left.css") %]
 [% END %]
 </head>
 <body id="cat_addbiblio" class="cat">
index 8df082e..6b86b21 100644 (file)
@@ -1,15 +1,16 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE ColumnsSettings %]
 
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Cataloging &rsaquo; [% title |html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber %]) &rsaquo; Items</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 [% INCLUDE 'datatables.inc' %]
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/cataloging_[% KOHA_VERSION %].js"></script>
+[% Asset.js("js/cataloging.js") %]
 [% INCLUDE 'columns_settings.inc' %]
 [% INCLUDE 'browser-strings.inc' %]
-<script type="text/javascript" src="[% interface %]/js/browser_[% KOHA_VERSION %].js"></script>
+[% Asset.js("js/browser.js") %]
 <script type="text/javascript">
 //<![CDATA[
     var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
@@ -129,7 +130,7 @@ function confirm_deletion() {
 
 //]]>
 </script>
-<link type="text/css" rel="stylesheet" href="[% interface %]/[% theme %]/css/addbiblio_[% KOHA_VERSION %].css" />
+[% Asset.css("css/addbiblio.css") %]
 
 [% INCLUDE 'select2.inc' %]
 <script type="text/javascript">
@@ -139,7 +140,7 @@ function confirm_deletion() {
 </script>
 
 [% IF ( bidi ) %]
-   <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left_[% KOHA_VERSION %].css" />
+   [% Asset.css("css/right-to-left.css") %]
 [% END %]
 </head>
 <body id="cat_additem" class="cat">
index fbf271b..5937800 100644 (file)
@@ -1,14 +1,15 @@
+[% USE Asset %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Cataloging &rsaquo; Editor</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" href="[% interface %]/[% theme %]/css/cateditor_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" href="[% interface %]/lib/codemirror/codemirror_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" href="[% interface %]/[% theme %]/css/humanmsg_[% KOHA_VERSION %].css" />
+[% Asset.css("css/cateditor.css") %]
+[% Asset.css("css/datatables.css") %]
+[% Asset.css("lib/codemirror/codemirror.css") %]
+[% Asset.css("css/humanmsg.css") %]
 <script src="[% interface %]/lib/jquery/plugins/humanmsg.js" type="text/javascript"></script>
 <script src="[% interface %]/[% theme %]/js/cataloging_[% KOHA_VERSION %].js" type="text/javascript"></script>
 [% IF ( bidi ) %]
-   <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left_[% KOHA_VERSION %].css" />
+   [% Asset.css("css/right-to-left.css") %]
 [% END %]
 </head>
 <body id="cat_addbiblio" class="cat">
index 3dfdf73..c94d88d 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% PROCESS 'merge-record.inc' %]
 
@@ -186,7 +187,7 @@ div#result { margin-top: 1em; }
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/merge-record_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/merge-record.js") %]
     [% INCLUDE 'merge-record-strings.inc' %]
     <script type="text/javascript">
         [% UNLESS (result) %]
index 1bf7497..122da19 100644 (file)
@@ -1,6 +1,7 @@
+[% USE Asset %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 [% INCLUDE 'datatables.inc' %]
 </head>
index eb4e0f0..524687a 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Cataloging &rsaquo; 006 builder</title>
@@ -31,7 +32,7 @@
 </form>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src='[% interface %]/[% theme %]/js/xmlControlfield_[% KOHA_VERSION %].js'></script>
+    [% Asset.js("js/xmlControlfield.js") %]
     <script type="text/javascript">
         var objXmlControlField;
         var tr_result;
index a271c38..f8746e5 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Cataloging &rsaquo; 008 builder</title>
@@ -32,7 +33,7 @@
 </form>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src='[% interface %]/[% theme %]/js/xmlControlfield_[% KOHA_VERSION %].js'></script>
+    [% Asset.js("js/xmlControlfield.js") %]
     <script type="text/javascript">
         var objXmlControlField;
         var tr_result;
index 0a15b33..5bc8f9d 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 [% IF ( opsearch ) %]
@@ -6,7 +7,7 @@
     <title>Koha &rsaquo; Z39.50 authority search results</title>
     [% END %]
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css">
     #marcPreview { width : 90%; top: 5%; } .modal-body { max-height: 380px; } .modal-header { padding: 0 14px; } @media (max-width: 767px) { #marcPreview { margin: 0; width : auto; } }
 </style>
 [% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         $(document).ready(function(){
         });
     </script>
     [% INCLUDE 'z3950_search.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/z3950_search.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]
\ No newline at end of file
index ee05d96..7325414 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Z39.50/SRU search results</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css">
 #dataPreview { width : 90%; top: 5%; } .modal-body { max-height: 380px; } .modal-header { padding: 0 14px; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }
 </style>
 [% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
+    [% Asset.js("js/z3950_search.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         $(document).ready(function(){
index 198c47d..b2c8834 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE Branches %]
 [% USE KohaDates %]
@@ -15,7 +16,7 @@
 [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="circ_circulation" class="circ">
@@ -975,14 +976,14 @@ No patron matched <span class="ex">[% message | html %]</span>
     [% INCLUDE 'calendar.inc' %]
     [% INCLUDE 'datatables.inc' %]
     [% INCLUDE 'columns_settings.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") %]
     [% INCLUDE 'timepicker.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/holds_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/circ-patron-search-results_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.dataTables.rowGrouping.js") %]
+    [% Asset.js("js/pages/circulation.js") %]
+    [% Asset.js("js/checkouts.js") %]
+    [% Asset.js("js/holds.js") %]
+    [% Asset.js("js/circ-patron-search-results.js") %]
     <script type="text/javascript">
         /* Set some variable needed in circulation.js */
         var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning.");
@@ -1103,7 +1104,7 @@ No patron matched <span class="ex">[% message | html %]</span>
             [% END %]
         });
     </script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index 87860b9..d45cb3d 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Branches %]
 [% USE KohaDates %]
 [% USE Price %]
@@ -11,7 +12,7 @@
 [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="circ_circulation_batch_checkouts" class="circ">
index 4d4ec74..fd701ca 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 <!DOCTYPE html>
 [% IF (AllowOfflineCirculation) %]
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'calendar.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.indexeddb_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/offlinecirc_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.indexeddb.js") %]
+    [% Asset.js("js/offlinecirc.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") %]
     [% INCLUDE 'timepicker.inc' %]
     <script type="text/javascript">
         var ALERT_SUCCESSFUL_CHECKIN = _("Checked in item.");
index 0d6826d..70e24ae 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE Branches %]
 [% USE KohaDates %]
@@ -6,7 +7,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Pending on-site checkouts</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="circ_stats" class="circ">
index eaf0472..12966ed 100644 (file)
@@ -1,10 +1,11 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [%- USE Branches -%]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Items overdue as of [% todaysdate %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css">
     .sql {display:none;}
 </style>
index b706e8f..e3492a5 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE ColumnsSettings %]
 [% USE AuthorisedValues %]
@@ -7,7 +8,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Holds to pull</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="circ_pendingreserves" class="circ">
index 315f835..f73771d 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% INCLUDE 'doc-head-open.inc' %]
 [% IF ( caller == 'hold-transfer' ) %]
@@ -12,7 +13,7 @@
 [% INCLUDE 'doc-head-close.inc' %]
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/print_[% KOHA_VERSION %].css" />
+[% Asset.css("css/print.css") %]
 [% IF ( Koha.Preference('SlipCSS') ) %]
 <link rel="stylesheet" type="text/css" href="[% Koha.Preference('SlipCSS') %]" />
 [% END %]
index a64dc12..ca1aa1b 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Branches %]
 [% USE ItemTypes %]
@@ -7,7 +8,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Request article</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="circ_request-article" class="circ">
index 6125bd7..3c35d86 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE AuthorisedValues %]
 [% USE Branches %]
@@ -6,7 +7,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css">
     .sql { display: none; }
     .ulined { text-decoration: underline; }
index ab02473..cf27d1c 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Branches %]
 [% USE Koha %]
@@ -31,7 +32,7 @@
 
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Check in [% title |html %]</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
     [% INCLUDE 'datatables.inc' %]
     [% INCLUDE 'columns_settings.inc' %]
     [% INCLUDE 'calendar.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") %]
     [% INCLUDE 'timepicker.inc' %]
 
     <script type="text/javascript">
index 34834d2..3afff19 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE Branches %]
@@ -5,7 +6,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Transfers to receive</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="circ_transferstoreceive" class="circ">
index 80ff386..e8a3670 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE ItemTypes %]
@@ -10,7 +11,7 @@
 <title>Koha &rsaquo; Circulation &rsaquo; Holds queue</title>
 [% INCLUDE 'doc-head-close.inc' %]
 <style type="text/css"> p { margin-top: 0; }</style>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="circ_view_holdsqueue" class="circ">
index c2ada83..87434da 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE Branches %]
@@ -5,7 +6,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Holds awaiting pickup</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="circ_waitingreserves" class="circ">
index 02b5b21..d0d7268 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Branches %]
 [% USE Koha %]
@@ -5,7 +6,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Patron clubs &rsaquo; Club enrollments</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="club_enrollments" class="clubs">
@@ -51,7 +52,7 @@
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             eTable = $('#enrollments-table').dataTable($.extend(true, {}, dataTablesDefaults, {
index 2a9d3e0..895ac37 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Branches %]
 [% USE Koha %]
@@ -6,7 +7,7 @@
 <title>Koha &rsaquo; Tools &rsaquo; Patron clubs</title>
 [% INCLUDE 'doc-head-close.inc' %]
 
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="clubs_clubs" class="clubs">
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             tTable = $('#club-templates-table').dataTable($.extend(true, {}, dataTablesDefaults, {
index e2345ce..476bf89 100644 (file)
@@ -1,10 +1,11 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Patron search</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="common_patron_search" class="common">
index dec2c5d..11a495e 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE AuthorisedValues %]
 [% USE ItemTypes %]
 [% USE Branches %]
@@ -6,7 +7,7 @@
 <title>Koha &rsaquo; Course reserves &rsaquo; Course details for [% course.course_name %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="courses_course_details" class="course">
index 1308d58..2a8528b 100644 (file)
@@ -1,10 +1,11 @@
+[% USE Asset %]
 [% USE AuthorisedValues %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Course reserves</title>
 [% INCLUDE 'doc-head-close.inc' %]
 
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="courses_course_reserves" class="course">
index ae5cb53..f447d54 100644 (file)
@@ -1,6 +1,7 @@
+[% USE Asset %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Online help</title>
-<script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/tiny_mce/tiny_mce.js") %]
 <script type="text/javascript">//<![CDATA[
 tinyMCE.baseURL = "[% interface %]/lib/tiny_mce";
 tinyMCE.init({
@@ -23,7 +24,7 @@ tinyMCE.init({
 //]]>
 </script>
 [% INCLUDE intranetstylesheet.inc %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/help_[% KOHA_VERSION %].css" />
+[% Asset.css("css/help.css") %]
 </head>
 <body id="help_edithelp" class="help">
        <h1>Online Help</h1>
index aab9a75..70f31ca 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Branches %]
 [% USE Koha %]
 [% USE KohaDates %]
@@ -5,8 +6,8 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; ILL requests  &rsaquo;</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css">
+[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'datatables.inc' %]
 <script type="text/javascript">
     //<![CDATA[
index dc61992..ca68bec 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% USE Koha %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha staff client</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/mainpage_[% KOHA_VERSION %].css" />
+[% Asset.css("css/mainpage.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 <body id="main_intranet-main" class="intranet-main">
index 8381dda..178151e 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% USE ItemTypes %]
     [% INCLUDE 'doc-head-open.inc' %]
     <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Batches &rsaquo; [% IF batch_id %]Edit ([% batch_id %])[% ELSE %]New[% END %]</title>
     [% INCLUDE 'doc-head-close.inc' %]
     [% INCLUDE 'greybox.inc' %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+    [% Asset.css("css/datatables.css") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
     //<![CDATA[
index e3b0109..79f7907 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
     [% INCLUDE 'doc-head-open.inc' %]
     <title>Koha &rsaquo; Tools &rsaquo; Label creator</title>
     [% INCLUDE 'doc-head-close.inc' %]
     [% IF ( bidi ) %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left_[% KOHA_VERSION %].css" />
+    [% Asset.css("css/right-to-left.css") %]
     [% END %]
 </head>
 <body id="labels_label-home" class="tools labels">
index a079caa..18a4467 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% BLOCK translate_label_element %]
 [%-  SWITCH element -%]
 [%-  CASE 'layout'    -%]layout
@@ -75,7 +76,7 @@
         //]]>
     </script>
 
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'datatables.inc' %]
 <script type="text/javascript" id="js">
  $(document).ready(function() {
index 9bf4e1a..c02a217 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
     [% INCLUDE 'doc-head-open.inc' %]
     <title>Koha &rsaquo; Barcodes and labels &rsaquo; Search results</title>
     [% INCLUDE 'doc-head-close.inc' %]
     <style type="text/css">#custom-doc { width:46.23em;*width:45.04em;min-width:700px; margin:auto;margin-top: .4em; text-align:left; }</style>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
     <script type="text/javascript">
         //<![CDATA[
             $(document).ready(function(){
index 4400bb7..4c71cfc 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 <!DOCTYPE html>
 [% IF ( bidi ) %]<html lang="[% lang %]" dir="[% bidi %]">[% ELSE %]<html lang="[% lang %]">[% END %]
 <head>
 <title>Koha &rsaquo; Tools &rsaquo; Spine labels</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/spinelabel_[% KOHA_VERSION %].css" />
+[% Asset.css("css/spinelabel.css") %]
 
                <style type="text/css">
                @media print {
@@ -12,8 +13,8 @@
        </style>
 [% IF ( IntranetUserCSS ) %]<style type="text/css">[% IntranetUserCSS %]</style>[% END %]
 [% IF ( IntranetUserJS ) %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/jquery-2.2.3.min_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/jquery-migrate-1.3.0.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/jquery-2.2.3.min.js") %]
+    [% Asset.js("lib/jquery/jquery-migrate-1.3.0.min.js") %]
     <script type="text/javascript">
     //<![CDATA[
     [% IntranetUserJS %]
index d7684a6..20339d7 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE ColumnsSettings %]
@@ -6,7 +7,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Patrons &rsaquo; Account for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="pat_borraccount" class="pat">
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
     [% INCLUDE 'columns_settings.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
     <script type="text/javascript">
         var dateformat = "[% Koha.Preference('dateformat') %]";
         $(document).ready(function() {
index 68561e3..7db8505 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Price %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -61,7 +62,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index 01b2e9d..27a4cdd 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE AuthorisedValues %]
 [% USE Branches %]
@@ -73,7 +74,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index 254a1d9..bac9d69 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Branches %]
 [% USE KohaDates %]
 [% SET footerjs = 1 %]
@@ -50,7 +51,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
 
     [% INCLUDE 'datatables.inc' %]
     <script>
index 947b8d2..96d4c83 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE AuthorisedValues %]
 [% SET footerjs = 1 %]
@@ -84,7 +85,7 @@
     </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function(){
             $(".confirmdelete").on("click", function(){
index b5a0728..68f3a2b 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Koha %]
 [% USE AuthorisedValues %]
@@ -7,7 +8,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Holds history for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="pat_holdshistory" class="pat">
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
     [% INCLUDE 'columns_settings.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
     <script type="text/javascript" id="js">
         $(document).ready(function() {
             var columns_settings = [% ColumnsSettings.GetColumns('members', 'holdshistory', 'holdshistory-table', 'json') %];
index cfbb3b3..f6c4f6c 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE AuthorisedValues %]
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'calendar.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             $("a.delete").click(function(){
index 5f68a4c..0736b7f 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -57,7 +58,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function(){
             $('#mancredit').preventDoubleFormSubmit();
index 71eeb78..01ea093 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -70,7 +71,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
     <script type="text/javascript">
         var type_fees = {'L':'','F':'','A':'','N':'','M':''};
         [% FOREACH invoice_types_loo IN invoice_types_loop %]
index 5c1bbf0..d380187 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% PROCESS 'permissions.inc' %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Patrons &rsaquo; Set permissions for [% patron.surname %], [% patron.firstname %]</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/treeview/jquery.treeview_[% KOHA_VERSION %].css"/>
+[% Asset.css("css/treeview/jquery.treeview.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
@@ -76,8 +77,8 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.treeview.pack_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery.treeview.pack.js") %]
     <!-- set up tree -->
     <script type="text/javascript">
         $(document).ready(function() {
index df7bb77..250ed4e 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
@@ -90,7 +91,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
     <script type="text/JavaScript">
 
         function generate_password() {
index b40bb03..866dd27 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE ColumnsSettings %]
 [% USE Branches %]
@@ -6,7 +7,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Patrons [% IF ( searching ) %]&rsaquo; Search results[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="pat_member" class="pat">
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
     [% INCLUDE 'columns_settings.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             $('#add_to_patron_list_submit').prop('disabled', true);
index 4309824..e3db7c9 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE Branches %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
     [% INCLUDE 'calendar.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
 
         [% END %]
 
     </script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/messaging-preference-form_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members.js") %]
+    [% Asset.js("js/messaging-preference-form.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index 3a78199..1276f0c 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE AuthorisedValues %]
 [% USE Branches %]
 [% USE Categories %]
     </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
     <script type="text/javascript">
         $(function() {
             $( "#pending_updates" ).accordion();
index 49d0f55..8ec67a6 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -5,7 +6,7 @@
 [% INCLUDE 'doc-head-close.inc' %]
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/print_[% KOHA_VERSION %].css" />
+[% Asset.css("css/print.css") %]
 </head>
 
 <body id="pat_moremember-receipt" class="pat">
index 163fb13..edfee7e 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE Branches %]
 [% USE KohaDates %]
@@ -11,7 +12,7 @@
 [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="pat_moremember" class="pat">
     [% INCLUDE 'columns_settings.inc' %]
     [% INCLUDE 'strings.inc' %]
     [% INCLUDE 'calendar.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") %]
     [% INCLUDE 'timepicker.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/holds_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/messaging-preference-form_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.dataTables.rowGrouping.js") %]
+    [% Asset.js("js/pages/circulation.js") %]
+    [% Asset.js("js/checkouts.js") %]
+    [% Asset.js("js/holds.js") %]
+    [% Asset.js("js/members-menu.js") %]
+    [% Asset.js("js/messaging-preference-form.js") %]
     <script type="text/javascript">
         /* Set some variable needed in circulation.js */
         var interface = "[% interface %]";
index c23ba1b..6f7d71a 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -77,7 +78,7 @@
     </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index fecf201..66a9d13 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE AuthorisedValues %]
 [% USE Branches %]
@@ -6,7 +7,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Sent notices for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css">
     .notice { display: none; }
     .notice-title { font-weight: bold; display: block; }
@@ -89,7 +90,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         $(document).ready(function() {
index 34b6d11..80abac0 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE AuthorisedValues %]
 [% USE Branches %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
     <script type= "text/javascript">
         function enableCheckboxActions(){
             // Enable/disable controls if checkboxes are checked
index 39df143..b9e03cf 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
     <script type= "text/javascript">
         $(document).ready(function() {
             $('#payindivfine, #woindivfine, #payfine').preventDoubleFormSubmit();
index a6c5a3a..1e9ad5b 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE Branches %]
@@ -5,7 +6,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Print receipt for [% patron.cardnumber %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/printreceiptinvoice_[% KOHA_VERSION %].css" />
+[% Asset.css("css/printreceiptinvoice.css") %]
 [% INCLUDE 'blocking_errors.inc' %]
 </head>
 
index 151d945..ec3ddf6 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE Branches %]
 [% USE KohaDates %]
@@ -5,7 +6,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Print receipt for [% patron.cardnumber %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/printreceiptinvoice_[% KOHA_VERSION %].css" />
+[% Asset.css("css/printreceiptinvoice.css") %]
 </head>
 
 <body id="printinvoice" class="pat">
index f95c009..6794bc0 100644 (file)
@@ -1,10 +1,11 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE AuthorisedValues  %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Patrons &rsaquo; Purchase suggestions for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         $(document).ready(function() {
index dd32e0c..36f5281 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Koha %]
 [% USE AuthorisedValues %]
@@ -6,7 +7,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Circulation History for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="pat_readingrec" class="pat">
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript" id="js">
         $(document).ready(function() {
index 90c059e..1cbbfa6 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE AuthorisedValues %]
 [% USE Branches %]
@@ -84,7 +85,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index 6519628..14742eb 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE AuthorisedValues %]
 [% USE Branches %]
@@ -9,7 +10,7 @@
 [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="pat_statistics" class="pat">
@@ -89,7 +90,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         $(document).ready(function() {
index 23d8019..d5cd974 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Choose adult category</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="pat_update-child" class="pat">
@@ -93,7 +94,7 @@
             window.close();
         </script>
     [% END %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/members-menu.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]
index 31c7ade..c5803ae 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
     [% INCLUDE "doc-head-open.inc" %]
     <title>Koha &rsaquo; Circulation &rsaquo; Offline circulation</title>
@@ -87,7 +88,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
 
index cccdca9..b7f50e6 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Offline circulation file upload</title>
@@ -67,8 +68,8 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/background-job-progressbar_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/file-upload_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/background-job-progressbar.js") %]
+    [% Asset.js("js/file-upload.js") %]
     <script type="text/javascript">
         var xhr;
         $(document).ready(function(){
index 2a27110..bf89a4d 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Patron lists &rsaquo;
@@ -65,7 +66,7 @@
     </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index 935a409..cde655d 100644 (file)
@@ -1,10 +1,11 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Patron lists &rsaquo; [% list.name %] &rsaquo; Add patrons</title>
 [% INCLUDE 'doc-head-close.inc' %]
 
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css">
     #add_patrons_by_search {
         display: none;
     </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
 
-    <script type="text/javascript" src="[% interface %]/js/autocomplete/patrons_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/autocomplete/patrons.js") %]
     <script type="text/javascript">
         var MSG_REMOVE_PATRON = _("Remove");
         $(document).ready(function() {
index a1402f7..f2cd32d 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Patron lists</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% INCLUDE 'greybox.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="patlist_lists" class="pat patlist">
     </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
 
     <script type="text/javascript">
index 4ea92ae..1eaaa95 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
     [% INCLUDE 'doc-head-open.inc' %]
     <title>Koha &rsaquo; Tools &rsaquo; Patron card creator &rsaquo; Batches &rsaquo; [% IF batch_id %]Edit ([% batch_id %])[% ELSE %]New[% END %]</title>
     [% INCLUDE 'doc-head-close.inc' %]
-    <link rel="stylesheet" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+    [% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="pcard_edit-batch" class="tools pcard">
index 36437dd..3fa08fc 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
     [% INCLUDE 'doc-head-open.inc' %]
     <title>Koha &rsaquo; Tools &rsaquo; Patron card creator &rsaquo; Templates &rsaquo; [% IF (template_id) %]Edit ([% template_id %])[% ELSE %]New[% END %]</title>
     </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     <script>
         $(document).ready(function(){
             var selectedUnit = $("#units option:selected").attr("value");
index 203e7ce..fcf1d96 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 <!DOCTYPE html>
 [% IF ( bidi ) %]<html lang="[% lang %]" dir="[% bidi %]">[% ELSE %]<html lang="[% lang %]">[% END %]
     </div>
 
 [% IF ( IntranetUserJS ) %]
-    <script src="[% interface %]/lib/jquery/jquery-2.2.3.min_[% KOHA_VERSION %].js"></script>
-    <script src="[% interface %]/lib/jquery/jquery-migrate-1.3.0.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/jquery-2.2.3.min.js") %]
+    [% Asset.js("lib/jquery/jquery-migrate-1.3.0.min.js") %]
     <script>
         [% IntranetUserJS %]
         function Done() {
index 4f895f4..ee9c1a0 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% INCLUDE 'calendar.inc' %]
     <script type="text/javascript">
         $(document).ready(function(){
index f3db10b..d38df2f 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Price %]
 [% USE ItemTypes %]
@@ -5,7 +6,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Cash register statistics &rsaquo; Results[% ELSE %]&rsaquo; Cash register statistics[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="cash_register_stats" class="rep">
index 20064b2..5a443aa 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Koha %]
 [% USE ColumnsSettings %]
@@ -50,7 +51,7 @@
     }
 </style>
 [% IF ( saved1 ) %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+    [% Asset.css("css/datatables.css") %]
 [% END %]
 </head>
 
index 7412ef4..83c82eb 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE AuthorisedValues %]
 [% USE Branches %]
 [% USE ColumnsSettings %]
@@ -7,7 +8,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Reports &rsaquo; Lost items</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="rep_itemslost" class="rep">
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") %]
     [% INCLUDE 'columns_settings.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/table_filters_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/table_filters.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
     <script type='text/javascript'>
         $(document).ready(function() {
             var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) %];
index 44b2ca4..d1cb134 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Branches %]
 [% USE ItemTypes %]
 [% SET footerjs = 1 %]
@@ -5,7 +6,7 @@
 <title>Koha &rsaquo; Reports &rsaquo; Catalog by item types</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% IF ( do_it ) %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% END %]
 </head>
 
index 33c1fed..edea6ad 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Price %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -8,7 +9,7 @@
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'cat-search.inc' %]
 
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>[% IF ( get_orders ) %] &rsaquo; <a href="/cgi-bin/koha/reports/orders_by_fund.pl">Orders by fund</a> &rsaquo; Results[% ELSE %] &rsaquo; Orders by fund[% END %]</div>
 
 <div id="doc3" class="yui-t2">
index 0e67d9c..25af72f 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
@@ -7,7 +8,7 @@
 <style type="text/css">
        .sql {display: none;}
 </style>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="rep_serials_stats" class="rep">
index b8b5d98..91e9e5b 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE Branches %]
     <title>Koha &rsaquo; Circulation &rsaquo; Holds &rsaquo; Confirm holds</title>
 [% END %]
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'datatables.inc' %]
 [% INCLUDE 'calendar.inc' %]
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/circ-patron-search-results_[% KOHA_VERSION %].js"></script>
+[% Asset.js("js/circ-patron-search-results.js") %]
 <script type="text/javascript">
     // <![CDATA[
 var MSG_CONFIRM_DELETE_HOLD   = _("Are you sure you want to cancel this hold?");
index 5cf457b..37e478c 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Comments &rsaquo; [% IF ( status ) %] Approved comments[% ELSE %] Comments awaiting moderation[% END %]</title>
@@ -75,7 +76,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index a5dc9ac..365745d 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo; Collection [% colTitle %] &rsquo; Add or remove items</title>
     </div> <!-- /#bd -->
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/rotating-collections_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
+    [% Asset.js("js/rotating-collections.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index 1bfe14d..0f0f755 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo;
     </div> <!-- /#bd -->
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/rotating-collections_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
+    [% Asset.js("js/rotating-collections.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index 111e92d..f3602ee 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Rotating collections</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="rcoll_rotatingCollections" class="tools rcoll">
@@ -67,8 +68,8 @@
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/rotating-collections_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
+    [% Asset.js("js/rotating-collections.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index 5177773..123be61 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -59,8 +60,8 @@
     </div> <!-- /#bd -->
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/rotating-collections_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
+    [% Asset.js("js/rotating-collections.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index 06ee078..d93cc20 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE AuthorisedValues %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -10,7 +11,7 @@
   [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="ser_add_fields" class="ser">
index 5c823b9..8f5f547 100644 (file)
@@ -1,10 +1,11 @@
+[% USE Asset %]
 [% USE AuthorisedValues %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
     <title>Koha &rsaquo; Serials &rsaquo; Claims</title>
     [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="ser_claims" class="ser">
index f59fd35..c00c7be 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE AuthorisedValues %]
 [% USE Branches %]
 [% USE KohaDates %]
@@ -5,7 +6,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Serials &rsaquo; Serial collection information for [% bibliotitle %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="ser_serials-collection" class="ser">
         var MSG_REOPEN_SUBSCRIPTION = _("Are you sure you want to reopen this subscription?");
         var CONFIRM_DELETE_SUBSCRIPTION = _("Are you sure you want to delete this subscription?");
     </script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/serials-toolbar_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/serials-toolbar.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
     <script type="text/javascript">
         function generateReceive(subscriptionid) {
             if(nbissues=prompt(_("How many issues do you want to receive ?"))){
index 09af141..e23d35d 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% USE AuthorisedValues %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Serials &rsaquo; Serial edition [% bibliotitle %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/cataloging_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/prevent_submit_[% KOHA_VERSION %].js"></script>
+[% Asset.js("js/cataloging.js") %]
+[% Asset.js("js/prevent_submit.js") %]
 [% INCLUDE 'calendar.inc' %]
 <script language="JavaScript" type="text/javascript">
 //<![CDATA[
index 5305fa8..d6ecbc4 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -23,7 +24,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/serials-toolbar_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/serials-toolbar.js") %]
     <script type="text/javascript">
         var subscriptionid = "[% subscriptionid %]";
         var MSG_CLOSE_SUBSCRIPTION = _("Are you sure you want to close this subscription?");
index 756b8df..73b0c16 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE AuthorisedValues %]
 [% USE Branches %]
 [% USE KohaDates %]
@@ -5,7 +6,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Serials [% biblionumber %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css">input.dt-filter { width : 100%; font-size : 85%; }</style>
 </head>
 
         var MSG_REOPEN_SUBSCRIPTION = _("Are you sure you want to reopen this subscription?");
         var CONFIRM_DELETE_SUBSCRIPTION = _("Are you sure you want to delete this subscription?");
     </script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/serials-toolbar_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/serials-toolbar.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             var osrlt = $("#osrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
index b986e09..8f95b49 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
@@ -508,8 +509,8 @@ fieldset.rows li.radio { width: 100%; } /* override staff-global.css */
         var MSG_PUB_DATE_UNDEFINED = _("First publication date is not defined");
         var MSG_NEXT_ISSUE_UNDEFINED = _("Next issue publication date is not defined");
     </script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/subscription-add_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/showpredictionpattern_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/subscription-add.js") %]
+    [% Asset.js("js/showpredictionpattern.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index f487738..ac4b8f8 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE Branches %]
 [% USE AuthorisedValues %]
         var MSG_REOPEN_SUBSCRIPTION = _("Are you sure you want to reopen this subscription?");
         var CONFIRM_DELETE_SUBSCRIPTION = _("Are you sure you want to delete this subscription?");
     </script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/serials-toolbar_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/serials-toolbar.js") %]
     <script type="text/javascript">
         // the english words used in display purposes
         var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern",
index c544519..18f0ec6 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Serials &rsaquo; Numbering patterns</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="ser_subscription_numberpatterns" class="ser">
 
 [% MACRO jsinclude BLOCK %]
     [% IF (daily_options) %]
-        <script type="text/javascript" src="[% interface %]/[% theme %]/js/showpredictionpattern_[% KOHA_VERSION %].js"></script>
+        [% Asset.js("js/showpredictionpattern.js") %]
     [% END %]
     [% INCLUDE 'calendar.inc' %]
     [% INCLUDE 'datatables.inc' %]
index 5885912..16f4ccf 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Branches %]
 [% USE AuthorisedValues %]
 [% USE KohaDates %]
@@ -19,7 +20,7 @@
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% IF ( op_else ) %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+    [% Asset.css("css/datatables.css") %]
 [% END %]
 [% IF ( op_else ) %]
     <style type="text/css">
     [% END %]
     [% IF ( op_else ) %]
         [% INCLUDE 'datatables.inc' %]
-        <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+        [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
         <script type="text/javascript">
             /**
             *  displayOther.
             });
         </script>
     [% END %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/acq.js") %]
+    [% Asset.js("js/acquisitions-menu.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index da4dfde..e1ced5b 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Tags &rsaquo; [% IF ( do_it ) %]Review &rsaquo; [% ELSE %]Review tags[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css">
 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent; }</style>
 </head>
index eacb7d8..6898da4 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Home &rsaquo; Tools &rsaquo; Tags &rsaquo; [% IF ( do_it ) %]Review &rsaquo; [% ELSE %]Review tags[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css">
 .setlabel {width: 6em; font-family: courier; background-color:#E8E8E8;}
 .rejected { color: #CC0033; }
@@ -225,8 +226,8 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
     [% INCLUDE 'calendar.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/tags-review_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
+    [% Asset.js("js/pages/tags-review.js") %]
     <script type="text/javascript">
         var MSG_AJAX_APPROVE_FAILED = _("AJAX failed to approve tag: %s");
         var MSG_AJAX_REJECTION_FAILED = _("AJAX failed to reject tag: %s");
index dd98249..7e1d5a3 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Automatic item modifications by age</title>
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/automatic_item_modification_by_age_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
+    [% Asset.js("js/automatic_item_modification_by_age.js") %]
     [% IF op == 'edit_form' %]
         <script type="text/javascript">
             $(document).ready(function() {
index 1894e28..835be89 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Batch item deletion</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <!--[if IE]>
 <style type="text/css">#selections { display: none; }</style>
 <![endif]-->
     </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/batchMod_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/pages/batchMod.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
     <script type="text/javascript">
         // Prepare array of all column headers, incrementing each index by
         // two to accommodate control and title columns
index 0f40e2c..32577c8 100644 (file)
@@ -1,13 +1,14 @@
+[% USE Asset %]
 [% USE Koha %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Batch item modification</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/background-job-progressbar_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/cataloging_[% KOHA_VERSION %].js"></script>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.js("js/background-job-progressbar.js") %]
+[% Asset.js("js/cataloging.js") %]
+[% Asset.css("css/datatables.css") %]
 [% INCLUDE 'datatables.inc' %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/batchMod_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
+[% Asset.js("js/pages/batchMod.js") %]
 <script type="text/javascript">
 //<![CDATA[
 
@@ -41,7 +42,7 @@ $(document).ready(function(){
 <style type="text/css">#selections { display: none; }</style>
 <![endif]-->
 <style type="text/css">input[type=checkbox]{ margin : 0 .5em; }</style>
-<link type="text/css" rel="stylesheet" href="[% interface %]/[% theme %]/css/addbiblio_[% KOHA_VERSION %].css" />
+[% Asset.css("css/addbiblio.css") %]
 
 [% INCLUDE 'select2.inc' %]
 <script type="text/javascript">
index 3f1cd9b..50a7b8e 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; [% IF ( del ) %]Batch item deletion[% ELSE %]Batch item modification[% END %] </title>
@@ -74,7 +75,7 @@
     </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index 913905a..cd789a9 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% PROCESS 'authorities-search-results.inc' %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Batch record deletion</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="tools_batch_delete_records" class="tools">
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
     <script type="text/javascript">
         var MSG_CANNOT_BE_DELETED = _("This record cannot be deleted, at least one item is currently checked out.");
         $(document).ready(function() {
index 1fa782a..a1d5d75 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% PROCESS 'authorities-search-results.inc' %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Batch record modification</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="tools_batch_record_modification" class="tools">
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/background-job-progressbar_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
+    [% Asset.js("js/background-job-progressbar.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
           $("#selectall").click(function(e){
index 2dcde9f..271a78d 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE Branches %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% INCLUDE 'calendar.inc' %]
     <script type="text/javascript">
         $(document).ready(function(){
index 06d21ce..9856dec 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; CSV export profiles</title>
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     <script type="text/javascript">
         function reloadPage(p) {
             var id = p.value;
index adf520a..6d09067 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% INCLUDE 'calendar.inc' %]
     <script type="text/javascript">
         $(document).ready(function() {
index 89db4cf..5d65cef 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; [% Branches.GetName( branch ) %] calendar</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css"> .key { padding : 3px; white-space:nowrap; line-height:230%; }
 .ui-datepicker { font-size : 150%; }
 .ui-datepicker th, .ui-datepicker .ui-datepicker-title select { font-size : 80%; }
@@ -340,7 +341,7 @@ td.repeatableyearly a.ui-state-default {  background:  #FFCC66 none; color :  Bl
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'calendar.inc' %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     <script type="text/javascript">
         var weekdays = new Array(_("Sundays"),_("Mondays"),_("Tuesdays"),_("Wednesdays"),_("Thursdays"),_("Fridays"),_("Saturdays"));
 
index 9989414..f2b5c3c 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
@@ -289,8 +290,8 @@ you can supply dates in ISO format (e.g., '2010-10-28').
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'calendar.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
+    [% Asset.js("js/members-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             [%# Make date fields have the datepicker %]
index 346b36d..be5aee5 100644 (file)
@@ -1,10 +1,11 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Inventory</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="tools_inventory" class="tools">
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     [% INCLUDE 'calendar.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
     <script type="text/javascript">
         function checkForm() {
             if ( $('#uploadbarcodes').val() ) {
index 76ecd89..f50b806 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
@@ -5,7 +6,7 @@
 <title>Koha &rsaquo; Tools &rsaquo; News</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% IF ( opac_news_count ) %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+    [% Asset.css("css/datatables.css") %]
 [% END %]
 </head>
 
@@ -225,7 +226,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'calendar.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% IF ( opac_news_count ) %]
         [% INCLUDE 'datatables.inc' %]
         <script type="text/javascript">
@@ -265,7 +266,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
             });
         </script>
     [% END %]
-    <script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/tiny_mce/tiny_mce.js") %]
     <script type="text/javascript">
         tinyMCE.baseURL = "[% interface %]/lib/tiny_mce";
         tinyMCE.init({
index e28a7f7..079bb68 100644 (file)
@@ -1,10 +1,11 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Notices[% IF ( add_form or copy_form ) %][% IF ( modify ) %] &rsaquo; Modify notice[% ELSE %] &rsaquo; Add notice[% END %][% END %][% IF ( add_validate or copy_validate) %] &rsaquo; Notice added[% END %][% IF ( delete_confirm ) %] &rsaquo; Confirm deletion[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="tools_letter" class="tools">
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.insertatcaret_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery.insertatcaret.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             [% IF add_form or copy_form %]
index 21cd576..cff595a 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Manage staged MARC records
@@ -6,7 +7,7 @@
 [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css">
     #jobpanel,#jobstatus,#jobfailed { display : none; }
     span.change-status { font-style:italic; color:#666; display:none; }
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/background-job-progressbar_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
+[% Asset.js("js/background-job-progressbar.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         $(document).ready(function(){
index 4af7467..b281356 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; MARC modification templates</title>
   </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     <script type="text/javascript">
         var MSG_MMT_SUBFIELDS_MATCH = _("Both subfield values should be filled or empty.");
         var MSG_MMT_DESTINATION_REQUIRED = _("The destination should be filled.");
         var MSG_MMT_EDIT_ACTION = _("Edit action %s");
         var MSG_MMT_UPDATE_ACTION = _("Update action");
     </script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/marc_modification_templates_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/marc_modification_templates.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index bbf39a0..c00a1a5 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE Branches %]
@@ -5,7 +6,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Batch patron modification</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="tools_modborrowers" class="tools">
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'calendar.inc' %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     <script type="text/javascript">
         var patron_attributes_lib = new Array();
         var patron_attributes_values = new Array();
index 6928ee5..8dc1df0 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     <script type="text/javascript">
         var tab_map = { "1" : _("First"), "2" : _("Second"), "3" : _("Third")};
         $(document).ready(function() {
index 53484c7..87151c7 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Upload patron images</title>
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
+    [% Asset.js("js/members-menu.js") %]
     <script type="text/javascript">
         $(document).ready(function() {
             $("#zipfile").click(function(){
index 9840e86..5cf4ade 100644 (file)
@@ -1,10 +1,11 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
     [% INCLUDE 'doc-head-open.inc' %]
     <title>Koha &rsaquo; Tools &rsaquo; Quote uploader</title>
     [% INCLUDE 'doc-head-close.inc' %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/uploader_[% KOHA_VERSION %].css" />
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/quotes_[% KOHA_VERSION %].css" />
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+    [% Asset.css("css/uploader.css") %]
+    [% Asset.css("css/quotes.css") %]
+    [% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="tools_quotes" class="tools">
@@ -73,9 +74,9 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.jeditable.mini_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.jeditable.mini.js") %]
     <script type="text/javascript">
         var oTable; //DataTable object
         $(document).ready(function() {
index f70beb1..4013b3d 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
     [% INCLUDE 'doc-head-open.inc' %]
     <title>Koha &rsaquo; Tools &rsaquo; Quote editor</title>
     [% INCLUDE 'doc-head-close.inc' %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/quotes_[% KOHA_VERSION %].css" />
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+    [% Asset.css("css/quotes.css") %]
+    [% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="tools_quotes" class="tools">
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/dataTables.fnReloadAjax_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.jeditable.mini_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/dataTables.fnReloadAjax.js") %]
+    [% Asset.js("lib/jquery/plugins/jquery.jeditable.mini.js") %]
     <script type="text/javascript">
         var oTable; /* oTable needs to be global */
         var sEmptyTable = _("No quotes available. Please use the 'Add quote' button to add a quote."); /* override the default message in datatables.inc */
index 8491538..e8ff186 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Task scheduler</title>
@@ -91,7 +92,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% INCLUDE 'calendar.inc' %]
     <script type="text/javascript">
         $(document).ready(function(){
index 5f3700d..89b71d3 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Manage staged MARC records &rsaquo; Compare matched records</title>
@@ -47,8 +48,8 @@
 <p><a href="/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_id=[% batchid %]">Return to staged MARC batch [% batchid %]</a></p>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jsdiff/jsdiff.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
+    [% Asset.js("lib/jsdiff/jsdiff.min.js") %]
     <script type="text/javascript">
         $(document).ready(function(){
           var diff1 = $("#col1 pre").text();
index 37a1a38..29a49a8 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Stage MARC records for import</title>
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/background-job-progressbar_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/file-upload_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
+    [% Asset.js("js/background-job-progressbar.js") %]
+    [% Asset.js("js/file-upload.js") %]
     <script type="text/javascript">
         var xhr;
         $(document).ready(function(){
index bdd4357..d5f7903 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Upload images</title>
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/background-job-progressbar_[% KOHA_VERSION %].js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/file-upload_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
+    [% Asset.js("js/background-job-progressbar.js") %]
+    [% Asset.js("js/file-upload.js") %]
     <script type="text/javascript">
         function StartUpload() {
             if( $('#fileToUpload').prop('files').length == 0 ) return;
index 4508582..a4e6147 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -7,7 +8,7 @@
     <title>Koha &rsaquo; Tools &rsaquo; Upload</title>
 [% END %]
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 
 [% BLOCK plugin_pars %]
     [% IF plugin %]
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         var errMESSAGES = [
             _("File or upload record could not be deleted."),
         ];
     </script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/file-upload_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/file-upload.js") %]
     <script type="text/javascript">
         function StartUpload() {
             if( $('#fileToUpload').prop('files').length == 0 ) return;
index 93932e7..b183dca 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE AuthorisedValues %]
 [% USE Branches %]
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'calendar.inc' %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index d3c4ac4..35a70ff 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% SET PRIVATE = 1 %]
@@ -6,7 +7,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; [% IF op == 'view' %]Lists &rsaquo; Contents of [% shelf.shelfname | html %][% ELSE %]Lists[% END %][% IF op == 'add_form' %] &rsaquo; Create new list[% END %][% IF op == 'edit_form' %] &rsaquo; Edit list [% shelf.shelfname | html %][% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 <style type="text/css">textarea { width: 100%; }</style>
 
 [% BLOCK list_permissions %]
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") %]
     [% IF print %]
         <script type="text/javascript">
             $( document ).ready(function() {
     [% END %]
 
     [% IF op == 'view' %]
-        <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
-        <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
+        [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
+        [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
     [% END %]
     <script type="text/javascript">
         var MSG_NO_ITEM_SELECTED = _("Nothing is selected.");
index b2f3e2a..f968278 100644 (file)
@@ -1,4 +1,5 @@
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.min_[% KOHA_VERSION %].js"></script>
+[% USE Asset %]
+[% Asset.js("lib/jquery/plugins/jquery.dataTables.min.js") %]
 <script type="text/javascript">
 //<![CDATA[
     var MSG_DT_FIRST = _("First");
@@ -17,4 +18,4 @@
     var CONFIG_EXCLUDE_ARTICLES_FROM_SORT = _("a an the");
 //]]>
 </script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/datatables_[% KOHA_VERSION %].js"></script>
\ No newline at end of file
+[% Asset.js("js/datatables.js") %]
\ No newline at end of file
index 8445567..24faf4d 100644 (file)
@@ -1,25 +1,26 @@
 [%- USE KohaPlugins -%]
+[% USE Asset %]
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats -->
 <meta name="viewport" content="width=device-width, initial-scale=1" />
 <link rel="shortcut icon" href="[% IF ( OpacFavicon ) %][% OpacFavicon %][% ELSE %][% interface %]/[% theme %]/images/favicon.ico[% END %]" type="image/x-icon" />
 [% IF ( bidi ) %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/bootstrap/css/bootstrap-rtl.min_[% KOHA_VERSION %].css" />
+    [% Asset.css("lib/bootstrap/css/bootstrap-rtl.min.css") %]
 [% ELSE %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/bootstrap/css/bootstrap.min_[% KOHA_VERSION %].css" />
+    [% Asset.css("lib/bootstrap/css/bootstrap.min.css") %]
 [% END %]
 
 [% IF ( bidi ) %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/jquery/jquery-ui-rtl_[% KOHA_VERSION %].css" />
+    [% Asset.css("lib/jquery/jquery-ui-rtl.css") %]
 [% ELSE %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/jquery/jquery-ui_[% KOHA_VERSION %].css" />
+    [% Asset.css("lib/jquery/jquery-ui.css") %]
 [% END %]
 
-[% SET opaclayoutstylesheet='opac_' _ KOHA_VERSION _ '.css' UNLESS opaclayoutstylesheet %]
+[% SET opaclayoutstylesheet='opac.css' UNLESS opaclayoutstylesheet %]
 [% IF (opaclayoutstylesheet.match('^https?:|^\/')) %]
     <link rel="stylesheet" type="text/css" href="[% opaclayoutstylesheet %]" />
 [% ELSE %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/[% opaclayoutstylesheet %]" />
+    [% Asset.css("css/" _ opaclayoutstylesheet) %]
 [% END %]
 [% IF ( OpacAdditionalStylesheet ) %]
     [% IF (OpacAdditionalStylesheet.match('^https?:|^\/')) %]
@@ -31,9 +32,9 @@
 [% IF ( opac_css_override ) %]
     <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/[% opac_css_override %]" />
 [% END %]
-<link rel="stylesheet" type="text/css" media="print" href="[% interface %]/[% theme %]/css/print_[% KOHA_VERSION %].css" />
+[% Asset.css("css/print.css", { media = "print" }) %]
 [% IF ( bidi ) %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left_[% KOHA_VERSION %].css" />
+    [% Asset.css("css/right-to-left.css") %]
 [% END %]
 [% IF ( OPACUserCSS ) %]<style>[% OPACUserCSS %]</style>[% END %]
 [% IF SCO_login %]
@@ -51,7 +52,7 @@
 <script type="text/javascript">
     function _(s) { return s } // dummy function for gettext
 </script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/modernizr.min_[% KOHA_VERSION %].js"></script>
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/font-awesome/css/font-awesome.min_[% KOHA_VERSION %].css" />
+[% Asset.js("lib/modernizr.min.js") %]
+[% Asset.css("lib/font-awesome/css/font-awesome.min.css") %]
 [% PROCESS 'html_helpers.inc' %]
 [% KohaPlugins.get_plugins_opac_head %]
index ca12389..76cc419 100644 (file)
@@ -1,7 +1,8 @@
+[% USE Asset %]
 <script type="text/javascript">
     var GB_ROOT_DIR = "[% interface %]/[% theme %]/lib/greybox/";
 </script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/greybox/AJS_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/greybox/AJS_fx_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/greybox/gb_scripts_[% KOHA_VERSION %].js"></script>
-<link href="[% interface %]/[% theme %]/lib/greybox/gb_styles_[% KOHA_VERSION %].css" rel="stylesheet" type="text/css" />
+[% Asset.js("lib/greybox/AJS.js") %]
+[% Asset.js("lib/greybox/AJS_fx.js") %]
+[% Asset.js("lib/greybox/gb_scripts.js") %]
+[% Asset.css("lib/greybox/gb_styles.css") %]
index e96299e..1d91ef7 100644 (file)
@@ -1,4 +1,5 @@
 [%- USE KohaPlugins -%]
+[% USE Asset %]
 [% UNLESS ( is_popup ) %]
     [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %]
     [% IF ( opaccredits ) %]
 
 
 <!-- JavaScript includes -->
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/jquery_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/jquery-ui_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/jquery/jquery.js") %]
+[% Asset.js("lib/jquery/jquery-ui.js") %]
 <script type="text/javascript">
 // Resolve name collision between jQuery UI and Twitter Bootstrap
 $.widget.bridge('uitooltip', $.ui.tooltip);
 </script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/bootstrap/js/bootstrap.min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/global_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/bootstrap/js/bootstrap.min.js") %]
+[% Asset.js("js/global.js") %]
 <script type="text/javascript">
     Modernizr.load([
         // Test need for polyfill
         {
             test: window.matchMedia,
-            nope: "[% interface %]/[% theme %]/lib/media.match.min_[% KOHA_VERSION %].js"
+            nope: "[% Asset.url('lib/media.match.min.js') %]"
         },
         // and then load enquire
-        "[% interface %]/[% theme %]/lib/enquire.min_[% KOHA_VERSION %].js",
-        "[% interface %]/[% theme %]/js/script_[% KOHA_VERSION %].js"
+        "[% Asset.url('lib/enquire.min.js') %]",
+        "[% Asset.url('js/script.js') %]",
     ]);
 
     // Fix for datepicker in a modal
@@ -106,13 +107,13 @@ $.widget.bridge('uitooltip', $.ui.tooltip);
         var NO_AMAZON_IMAGE = _("No cover image available");
     //]]>
 </script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/amazonimages_[% KOHA_VERSION %].js"></script>
+[% Asset.js("js/amazonimages.js") %]
 [% END %]
 
-<script src="[% interface %]/lib/emoji-picker/js/config_[% KOHA_VERSION %].js"></script>
-<script src="[% interface %]/lib/emoji-picker/js/util_[% KOHA_VERSION %].js"></script>
-<script src="[% interface %]/lib/emoji-picker/js/jquery.emojiarea_[% KOHA_VERSION %].js"></script>
-<script src="[% interface %]/lib/emoji-picker/js/emoji-picker_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/emoji-picker/js/config.js") %]
+[% Asset.js("lib/emoji-picker/js/util.js") %]
+[% Asset.js("lib/emoji-picker/js/jquery.emojiarea.js") %]
+[% Asset.js("lib/emoji-picker/js/emoji-picker.js") %]
 
 <script type="text/javascript">
     //<![CDATA[
@@ -178,16 +179,16 @@ $.widget.bridge('uitooltip', $.ui.tooltip);
 </script>
 
 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/basket_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/basket.js") %]
 [% ELSIF ( Koha.Preference( 'virtualshelves' ) == 1 ) %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/basket_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/basket.js") %]
 [% ELSE %]
     <script type="text/javascript">var readCookie;</script>
 [% END %]
 
-[% IF Koha.Preference( 'opacuserlogin' ) == 1 %][% IF Koha.Preference( 'TagsEnabled' ) == 1 %]<script type="text/javascript" src="[% interface %]/[% theme %]/js/tags_[% KOHA_VERSION %].js"></script>[% END %][% ELSE %][% END %]
+[% IF Koha.Preference( 'opacuserlogin' ) == 1 %][% IF Koha.Preference( 'TagsEnabled' ) == 1 %][% Asset.js("js/tags.js") %][% END %][% ELSE %][% END %]
 [% IF ( GoogleJackets ) %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/google-jackets_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/google-jackets.js") %]
     <script type="text/javascript">
         //<![CDATA[
         var NO_GOOGLE_JACKET = _("No cover image available");
@@ -195,7 +196,7 @@ $.widget.bridge('uitooltip', $.ui.tooltip);
     </script>
 [% END %]
 [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/coce_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/coce.js") %]
     <script type="text/javascript">
         //<![CDATA[
         var NO_COCE_JACKET = _("No cover image available");
@@ -204,7 +205,7 @@ $.widget.bridge('uitooltip', $.ui.tooltip);
 [% END %]
 
 [% IF OpenLibraryCovers || OpenLibrarySearch %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/openlibrary_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/openlibrary.js") %]
     <script type="text/javascript">
     //<![CDATA[
     var NO_OL_JACKET = _("No cover image available");
@@ -214,7 +215,7 @@ $.widget.bridge('uitooltip', $.ui.tooltip);
 [% END %]
 
 [% IF OPACLocalCoverImages %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/localcovers_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/localcovers.js") %]
     <script type="text/javascript">
     //<![CDATA[
     var NO_LOCAL_JACKET = _("No cover image available");
@@ -223,7 +224,7 @@ $.widget.bridge('uitooltip', $.ui.tooltip);
 [% END %]
 
 [% IF ( BakerTaylorEnabled ) %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/bakertaylorimages_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/bakertaylorimages.js") %]
     <script type="text/javascript">
         //<![CDATA[
         var NO_BAKERTAYLOR_IMAGE = _("No cover image available");
@@ -235,7 +236,7 @@ $.widget.bridge('uitooltip', $.ui.tooltip);
 [% END %]
 [% IF ( GoogleIndicTransliteration ) %]
     <script type="text/javascript" src="https://www.google.com/jsapi"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/googleindictransliteration_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/googleindictransliteration.js") %]
 [% END %]
 
 [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]
@@ -246,7 +247,7 @@ $.widget.bridge('uitooltip', $.ui.tooltip);
 </script>
 [% END %]
 
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.cookie.min_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") %]
 <script type="text/javascript">
 $(document).ready(function() {
     if($('#searchsubmit').length) {
index 41985f0..807aa8f 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE Price %]
@@ -7,7 +8,7 @@
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your fines and charges</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% BLOCK cssinclude %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+    [% Asset.css("css/datatables.css") %]
 [% END %]
 </head>
 
index f5308ea..1b7fb90 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE Branches %]
 [% INCLUDE 'doc-head-open.inc' %]
 [% END %]
 
 [% BLOCK jsinclude %]
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.deserialize.min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.cookie.min_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/jquery/plugins/jquery.deserialize.min.js") %]
+[% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") %]
 <script type="text/javascript">//<![CDATA[
 $(document).ready(function() {
     $('#advsearches').tabs();
index 12bf374..a2cf3a4 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% PROCESS 'opac-authorities.inc' %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -63,7 +64,7 @@
 
 [% INCLUDE 'opac-bottom.inc' %]
 [% BLOCK jsinclude %]
-<script type="text/javascript" src="/opac-tmpl/lib/jquery/plugins/jquery.jstree_[% KOHA_VERSION %].js"></script>
+[% Asset.js("/opac-tmpl/lib/jquery/plugins/jquery.jstree.js") %]
 <script type="text/javascript">
     //<![CDATA[
         $(document).ready(function() {
index c73bd15..f166f42 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% PROCESS 'opac-authorities.inc' %]
 [% INCLUDE 'doc-head-open.inc' %]
 [% INCLUDE 'opac-bottom.inc' %]
 [% BLOCK jsinclude %]
 [% IF ( displayhierarchy ) %]
-    <script type="text/javascript" src="/opac-tmpl/lib/jquery/plugins/jquery.jstree_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("/opac-tmpl/lib/jquery/plugins/jquery.jstree.js") %]
 [% END %]
 <script type="text/javascript">
     //<![CDATA[
index 7724cb9..5e34f52 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE AuthorisedValues %]
@@ -7,7 +8,7 @@
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Course reserves for [% course.course_name %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% BLOCK cssinclude %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+    [% Asset.css("css/datatables.css") %]
 [% END %]
 
 </head>
index eb20071..eacb243 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE AuthorisedValues %]
 
@@ -5,7 +6,7 @@
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Courses</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% BLOCK cssinclude %]
-    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+    [% Asset.css("css/datatables.css") %]
 [% END %]
 
 </head>
index f4b823c..21c6ccd 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Math %]
 [% USE Koha %]
 [% USE KohaDates %]
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Details for: [% title |html %][% FOREACH subtitl IN subtitle %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] [% subtitl.subfield |html %][% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% IF ( bidi ) %]
-  [% BLOCK cssinclude %]<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left_[% KOHA_VERSION %].css" />[% END %]
+  [% BLOCK cssinclude %][% Asset.css("css/right-to-left.css") %][% END %]
 [% END %]
 [% IF ( OpacStarRatings != 'disable' ) %]
-    [% BLOCK cssinclude %]<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/jquery.rating_[% KOHA_VERSION %].css" />[% END %]
+    [% BLOCK cssinclude %][% Asset.css("css/jquery.rating.css") %][% END %]
 [% END %]
 [% INCLUDE greybox.inc %]
-    <link href="[% interface %]/lib/emoji-picker/css/emoji_[% KOHA_VERSION %].css" rel="stylesheet">
+    [% Asset.css("lib/emoji-picker/css/emoji.css") %]
 </head>
 [% INCLUDE 'bodytag.inc' bodyid='opac-detail' bodyclass='scrollto' %]
 [% INCLUDE 'masthead.inc' %]
     </script>
     <script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
 [% END %]
-[% IF ( OpacStarRatings != 'disable' ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.rating_[% KOHA_VERSION %].js"></script>[% END %]
+[% IF ( OpacStarRatings != 'disable' ) %][% Asset.js("lib/jquery/plugins/jquery.rating.js") %][% END %]
 
-[% IF ( OpacHighlightedWords ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.highlight-3_[% KOHA_VERSION %].js"></script>[% END %]
+[% IF ( OpacHighlightedWords ) %][% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") %][% END %]
 
 <script type="text/javascript">
 //<![CDATA[
index c903453..eacd423 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE AuthorisedValues %]
 [% USE Categories %]
 [% USE Koha %]
 
 [% INCLUDE 'opac-bottom.inc' %]
 [% BLOCK jsinclude %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.validate.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") %]
     [% PROCESS 'password_check.inc' %]
     [% PROCESS 'add_password_check' new_password => 'borrower_password' %]
     <script type="text/javascript">
index 727a2a5..32d2734 100644 (file)
@@ -1,9 +1,10 @@
+[% USE Asset %]
 [% USE Koha %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; OverDrive search for '[% q | html %]'</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% BLOCK cssinclude %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/jquery.rating_[% KOHA_VERSION %].css" />
+[% Asset.css("css/jquery.rating.css") %]
 <style>
 .actions a.addtocart {
     display: inline;
@@ -59,8 +60,8 @@
 
 [% INCLUDE 'opac-bottom.inc' %]
 [% BLOCK jsinclude %]
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/overdrive_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.rating_[% KOHA_VERSION %].js"></script>
+[% Asset.js("js/overdrive.js") %]
+[% Asset.js("lib/jquery/plugins/jquery.rating.js") %]
 <script type="text/javascript">
 var querystring = "[% q |replace( "'", "\'" ) |replace( '\n', '\\n' ) |replace( '\r', '\\r' ) |html %]";
 var results_per_page = [% OPACnumSearchResults %];
index 32e3208..f799524 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Change your password</title>
@@ -86,7 +87,7 @@
 
 [% INCLUDE 'opac-bottom.inc' %]
 [% BLOCK jsinclude %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.validate.min_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") %]
     [% PROCESS 'password_check.inc' %]
     [% PROCESS 'add_password_check' new_password => 'Newkey' %]
     <script type="text/javascript">
index a08f7c4..e121699 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo;
@@ -278,7 +279,7 @@ href="/cgi-bin/koha/opac-rss.pl?[% query_cgi %][% limit_cgi |html %]" />
 
 [% INCLUDE 'opac-bottom.inc' %]
 [% BLOCK jsinclude %]
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
 <script type="text/javascript">
 //<![CDATA[
 
index 3803627..8c65b2a 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnList ) %]
 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnList ) %]
@@ -12,7 +13,7 @@
 [% INCLUDE 'doc-head-close.inc' %]
 [% IF ( OpacStarRatings == 'all' || Koha.Preference('Babeltheque') ) %]
     [% BLOCK cssinclude %]
-        <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/jquery.rating_[% KOHA_VERSION %].css" />
+        [% Asset.css("css/jquery.rating.css") %]
     [% END %]
 [% END %]
 
 [% IF ( LibraryThingForLibrariesID ) %]
     <script src="https://ltfl.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID %]&amp;systype=koha" type="text/javascript"></script>
 [% END %]
-[% IF ( OpacStarRatings == 'all' || Koha.Preference('Babeltheque') ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.rating_[% KOHA_VERSION %].js"></script>[% END %]
-[% IF ( OverDriveEnabled ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/js/overdrive_[% KOHA_VERSION %].js"></script>[% END %]
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
-[% IF ( OpacHighlightedWords ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.highlight-3_[% KOHA_VERSION %].js"></script>
+[% IF ( OpacStarRatings == 'all' || Koha.Preference('Babeltheque') ) %][% Asset.js("lib/jquery/plugins/jquery.rating.js") %][% END %]
+[% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") %][% END %]
+[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
+[% IF ( OpacHighlightedWords ) %][% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") %]
 [% END %]<script type="text/javascript">
 //<![CDATA[
 [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
index 25f834c..9ad78c3 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% INCLUDE 'doc-head-open.inc' %]
 [% INCLUDE 'opac-bottom.inc' %]
 [% BLOCK jsinclude %]
 [% INCLUDE 'datatables.inc' %]
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
 <script type="text/javascript">
 //<![CDATA[
     var MSG_CONFIRM_DELETE_HISTORY = _("Are you sure you want to delete selected search history entries?");
index b5a6496..8efbec1 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% SET PRIVATE = 1 %]
 [% SET PUBLIC = 2 %]
 
 [% INCLUDE 'opac-bottom.inc' %]
 [% BLOCK jsinclude %]
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
 <script type="text/javascript">
 //<![CDATA[
 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
index 5906c83..0dff37f 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE Branches %]
 [% USE AuthorisedValues %]
 
 [% INCLUDE 'opac-bottom.inc' %]
 [% BLOCK jsinclude %]
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
 [% INCLUDE 'datatables.inc' %]
 <script type="text/javascript">
     //<![CDATA[
index 9eabf10..9ce4add 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE Branches %]
@@ -1043,7 +1044,7 @@ Using this account is not recommended because some parts of Koha will not functi
         //]]>
     </script>
     [% IF Koha.Preference('OverDriveCirculation') %]
-    <script type="text/javascript" src="[% interface %]//[% theme %]/js/overdrive_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/overdrive.js") %]
     <script type="text/JavaScript">
     $(document).ready(function() {
         [% IF ( overdrive_error ) %]
index e042aee..f751934 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [%# Includes %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% ELSE %]
 <link rel="shortcut icon" href="[% interface %]/[% theme %]/images/favicon.ico" type="image/x-icon" />
 [% END %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/bootstrap/css/bootstrap.min_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/jquery/jquery-ui_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/font-awesome/css/font-awesome.min_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/sci_[% KOHA_VERSION %].css" />
+[% Asset.css("lib/bootstrap/css/bootstrap.min.css") %]
+[% Asset.css("lib/jquery/jquery-ui.css") %]
+[% Asset.css("lib/font-awesome/css/font-awesome.min.css") %]
+[% Asset.css("css/sci.css") %]
 [% IF ( Koha.Preference('OPACUserCSS') ) %]<style type="text/css">[% Koha.Preference('OPACUserCSS') %]</style>[% END %]
 [% IF ( Koha.Preference('SelfCheckInUserCSS') ) %]<style type="text/css">[% Koha.Preference('SelfCheckInUserCSS') %]</style>[% END %]
 <!--[if lt IE 9]>
@@ -40,7 +41,7 @@
 <script type="text/javascript">
     function _(s) { return s } // dummy function for gettext
 </script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/modernizr.min_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/modernizr.min.js") %]
 </head>
 <body id="sci_main" class="sci" onload="dofocus();" onunload="mungeHistory();">
 
index 8345453..349cbf5 100644 (file)
@@ -1,12 +1,13 @@
+[% USE Asset %]
 [% USE KohaDates %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] &rsaquo; Self checkout help</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats -->
 <link rel="shortcut icon" href="[% IF ( OpacFavicon  ) %][% OpacFavicon  %][% ELSE %][% interface %]/[% theme %]/images/favicon.ico[% END %]" type="image/x-icon" />
- <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/bootstrap/css/bootstrap.min_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/jquery/jquery-ui_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/sco_[% KOHA_VERSION %].css" />
+ [% Asset.css("lib/bootstrap/css/bootstrap.min.css") %]
+[% Asset.css("lib/jquery/jquery-ui.css") %]
+[% Asset.css("css/sco.css") %]
 [% IF ( OPACUserCSS ) %]<style>[% OPACUserCSS %]</style>[% END %]
 [% IF ( SCOUserCSS ) %]<style>[% SCOUserCSS %]</style>[% END %]
 <!--[if lt IE 9]>
@@ -15,7 +16,7 @@
 <script type="text/javascript">
     function _(s) { return s } // dummy function for gettext
 </script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/modernizr.min_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/modernizr.min.js") %]
 </head>
 <body id="sco_help" class="sco">
 [% INCLUDE 'masthead-sco.inc' %]
index cd87e00..191548a 100644 (file)
@@ -1,16 +1,17 @@
+[% USE Asset %]
 [% USE Koha %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] &rsaquo; Self checkout &rsaquo; Print Receipt for [% borrowernumber %]</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <link rel="shortcut icon" href="[% IF ( OpacFavicon  ) %][% OpacFavicon  %][% ELSE %][% interface %]/[% theme %]/images/favicon.ico[% END %]" type="image/x-icon" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/print_[% KOHA_VERSION %].css" />
+[% Asset.css("css/print.css") %]
 [% IF stylesheet %]
 <link rel="stylesheet" type="text/css" href="[% stylesheet %]" />
 [% END %]
 
 <!-- JavaScript includes -->
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/jquery_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/global_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/jquery/jquery.js") %]
+[% Asset.js("js/global.js") %]
 
 [% INCLUDE 'slip-print.inc' %]
 
index 8cadb17..48274b0 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
 [% USE AudioAlerts %]
@@ -7,9 +8,9 @@
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats -->
 <link rel="shortcut icon" href="[% IF ( Koha.Preference('OpacFavicon') ) %][% Koha.Preference('OpacFavicon') %][% ELSE %][% interface %]/[% theme %]/images/favicon.ico[% END %]" type="image/x-icon" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/bootstrap/css/bootstrap.min_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/jquery/jquery-ui_[% KOHA_VERSION %].css" />
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/sco_[% KOHA_VERSION %].css" />
+[% Asset.css("lib/bootstrap/css/bootstrap.min.css") %]
+[% Asset.css("lib/jquery/jquery-ui.css") %]
+[% Asset.css("css/sco.css") %]
 [% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') %]</style>[% END %]
 [% IF ( Koha.Preference('SCOUserCSS') ) %]<style>[% Koha.Preference('SCOUserCSS') %]</style>[% END %]
 <!--[if lt IE 9]>
@@ -18,7 +19,7 @@
 <script type="text/javascript">
     function _(s) { return s } // dummy function for gettext
 </script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/lib/modernizr.min_[% KOHA_VERSION %].js"></script>
+[% Asset.js("lib/modernizr.min.js") %]
 </head>
 <body id="sco_main" class="sco" onload="dofocus();" onunload="mungeHistory();">
 [% INCLUDE 'masthead-sco.inc' %]
diff --git a/t/db_dependent/Koha/Template/Plugin/Asset.t b/t/db_dependent/Koha/Template/Plugin/Asset.t
new file mode 100644 (file)
index 0000000..0c82af0
--- /dev/null
@@ -0,0 +1,99 @@
+#!/usr/bin/env perl
+
+use Modern::Perl;
+
+use Test::More tests => 16;
+use Template;
+
+use C4::Context;
+
+my $version = C4::Context->preference('Version');
+
+my $template = Template->new({
+    PLUGIN_BASE => 'Koha::Template::Plugin',
+});
+
+my $intranet_vars = {
+    interface => '/intranet-tmpl',
+    theme => 'prog',
+};
+
+my $opac_vars = {
+    interface => '/opac-tmpl',
+    theme => 'bootstrap',
+};
+
+my $output;
+
+$output = '';
+$template->process(url_template("js/staff-global.js"), $intranet_vars, \$output);
+is($output, "/intranet-tmpl/prog/js/staff-global_$version.js");
+
+$output = '';
+$template->process(url_template("js/browser.js"), $intranet_vars, \$output);
+is($output, "/intranet-tmpl/js/browser_$version.js");
+
+$output = '';
+$template->process(url_template("css/staff-global.css"), $intranet_vars, \$output);
+is($output, "/intranet-tmpl/prog/css/staff-global_$version.css");
+
+$output = '';
+$template->process(url_template("lib/font-awesome/css/font-awesome.min.css"), $intranet_vars, \$output);
+is($output, "/intranet-tmpl/lib/font-awesome/css/font-awesome.min_$version.css");
+
+$output = '';
+$template->process(url_template("js/global.js"), $opac_vars, \$output);
+is($output, "/opac-tmpl/bootstrap/js/global_$version.js");
+
+$output = '';
+$template->process(url_template("lib/jquery/plugins/jquery.dataTables.min.js"), $opac_vars, \$output);
+is($output, "/opac-tmpl/lib/jquery/plugins/jquery.dataTables.min_$version.js");
+
+$output = '';
+$template->process(url_template("css/opac.css"), $opac_vars, \$output);
+is($output, "/opac-tmpl/bootstrap/css/opac_$version.css");
+
+$output = '';
+$template->process(url_template("lib/emoji-picker/css/emoji.css"), $opac_vars, \$output);
+is($output, "/opac-tmpl/lib/emoji-picker/css/emoji_$version.css");
+
+$output = '';
+$template->process(css_template("css/opac.css"), $opac_vars, \$output);
+like($output, qr/<link .*href="\/opac-tmpl\/bootstrap\/css\/opac_\Q$version\E\.css".*>/);
+like($output, qr/<link .*type="text\/css".*>/);
+like($output, qr/<link .*rel="stylesheet".*>/);
+
+$output = '';
+$template->process(\'[% USE Asset %][% Asset.css("css/print.css", { media = "print" }) %]', $opac_vars, \$output);
+like($output, qr/<link .*href="\/opac-tmpl\/bootstrap\/css\/print_\Q$version\E\.css".*>/);
+like($output, qr/<link .*type="text\/css".*>/);
+like($output, qr/<link .*rel="stylesheet".*>/);
+like($output, qr/<link .*media="print".*>/);
+
+$output = '';
+$template->process(js_template("js/global.js"), $opac_vars, \$output);
+like($output, qr/<script .*src="\/opac-tmpl\/bootstrap\/js\/global_\Q$version\E\.js".*>/);
+
+sub url_template {
+    my ($filename) = @_;
+
+    my $template = "[% USE Asset %][% Asset.url(\"$filename\") %]";
+
+    return \$template;
+}
+
+sub css_template {
+    my ($filename) = @_;
+
+    my $template = "[% USE Asset %][% Asset.css(\"$filename\") %]";
+
+    return \$template;
+}
+
+sub js_template {
+    my ($filename) = @_;
+
+    my $template = "[% USE Asset %][% Asset.js(\"$filename\") %]";
+
+    return \$template;
+}