@@ -, +, @@ --- Koha/Template/Plugin/Asset.pm | 15 +++++++++++---- .../prog/en/includes/intranet-bottom.inc | 1 + .../bootstrap/en/includes/opac-bottom.inc | 1 + public/shared/js/debug.js | 3 +++ 4 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 public/shared/js/debug.js --- a/Koha/Template/Plugin/Asset.pm +++ a/Koha/Template/Plugin/Asset.pm @@ -124,7 +124,7 @@ Returns the URL for the given file =cut sub url { - my ( $self, $filename ) = @_; + my ( $self, $filename, $args ) = @_; my $stash = $self->{_CONTEXT}->stash(); my $interface = $stash->get('interface'); @@ -136,13 +136,20 @@ sub url { my ($basename, $dirname, $suffix) = fileparse($filename, qr/\.[^.]*/); my $type = substr $suffix, 1; + + my $version = Koha::version; + $version =~ s/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/$1.$2$3$4/; + + my $shared = $args->{shared}; + if ($shared){ + my $url = File::Spec->catfile('/shared',$dirname, "${basename}_${version}${suffix}"); + return $url; + } + my @dirs = ( "$theme", ".", ); - - my $version = Koha::version; - $version =~ s/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/$1.$2$3$4/; foreach my $dir (@dirs) { my $abspath = File::Spec->catfile($root, $dir, $filename); if (-e $abspath) { --- a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc @@ -169,6 +169,7 @@ [% jsinclude | $raw # Parse the page template's JavaScript block if necessary %] [% END %] [% KohaPlugins.get_plugins_intranet_js | $raw %] + --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -203,5 +203,6 @@ $(document).ready(function() { [% Asset.js("js/cookieconsent.js") | $raw %] [% END %] [% KohaPlugins.get_plugins_opac_js | $raw %] + --- a/public/shared/js/debug.js +++ a/public/shared/js/debug.js @@ -0,0 +1,3 @@ +function debug_shared_js (){ + console.log("You successfully ran this function!"); +} --