Commit ed754328 authored by Julian Maurice's avatar Julian Maurice Committed by joubu

Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere

Having to write [% KOHA_VERSION %] for each url is bad because:
- It's easily forgettable when adding new <script> or <link>
- It prevents grep'ing for the full filename
- It violates the DRY principle
- If at some point we want to change the "force js and css reload"
  mechanism, it will be tedious

This patch:
- adds a Template::Toolkit plugin that generates <script> and
  <link> tags for JS and CSS files, and inserts automatically the Koha
  version in the filename
- use the new plugin to remove all occurences of [% KOHA_VERSION %]
- remove the code that was adding KOHA_VERSION as a template variable

Test plan:
1. Apply patch
2. Go to several different pages in Koha (opac and intranet) while
   checking your browser's dev tools (there should be no 404 for JS and
   CSS files, and the Koha version should appear in filenames) and the
   server logs (there should be no "File not found")
3. `git grep KOHA_VERSION` should return nothing
4. prove t/db_dependent/Koha/Template/Plugin/Asset.t
Signed-off-by: Josef Moravec's avatarJosef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer's avatarKatrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: joubu's avatarJonathan Druart <jonathan.druart@bugs.koha-community.org>
parent 4fe8b62f
......@@ -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;
}
......
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;
[% 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") %]
[% 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" }) %]
[% USE Asset %]
[% USE Koha %]
[% USE String %]
[% PROCESS 'html_helpers.inc' %]
......@@ -10,16 +11,16 @@
<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 %]
......
[% 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") %]
[% 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">
[% 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 -->
......
[% USE Asset %]
[% USE AudioAlerts %]
[%# Prevent XFS attacks -%]
[% UNLESS popup %]
......@@ -11,17 +12,17 @@
</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 ) %]
......@@ -52,11 +53,11 @@
//]]>
</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");
......
[% 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,
......
[% 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 %]
......
[% 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">
......@@ -169,8 +170,8 @@
[% 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();
......
[% 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>
......@@ -425,10 +426,10 @@
</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, {
......
[% 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%;}
......@@ -685,9 +686,9 @@
</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 ) {
......
[% 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
......
[% USE Asset %]
[% USE Branches %]
[% USE Koha %]
[% SET footerjs = 1 %]
......@@ -140,8 +141,8 @@
</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' %]
[% 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">
......@@ -186,7 +187,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() {
......
[% 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; } }
......@@ -110,7 +111,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() {
......
[% 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>
......@@ -207,11 +208,11 @@
</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() {
......
[% 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() {
......
[% 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>
......@@ -210,7 +211,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 'calendar.inc' %]
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
......
[% 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>
......@@ -294,7 +295,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' %]
[% INCLUDE 'calendar.inc' %]
<script type="text/javascript">
......
[% 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_[% KOH