Skip to content

Commit 4a96d79

Browse files
authored
Merge pull request #109 from ebsco/koha-2105-updates
Updates for 21.05
2 parents 83c67ea + e30697b commit 4a96d79

9 files changed

Lines changed: 66 additions & 59 deletions

File tree

Koha/Plugin/EDS.pm

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ my ($PluginDir) = grep { -f $_ . "/Koha/Plugin/EDS.pm" } @pluginsdir;
2929
$PluginDir = $PluginDir.'/Koha/Plugin/EDS';
3030

3131
################# DO NOT TOUCH - CONTROLLED BY build.py
32-
our $MAJOR_VERSION = "20.11";
33-
our $SUB_VERSION = "009";
32+
our $MAJOR_VERSION = "21.05";
33+
our $SUB_VERSION = "001";
3434
our $VERSION = $MAJOR_VERSION . "" . $SUB_VERSION;
3535
our $SHA_ADD = "https://widgets.ebscohost.com/prod/api/koha/sha/1711.json";
36-
our $DATE_UPDATE = '2021-08-02';
36+
our $DATE_UPDATE = '2021-08-17';
3737
######################################################
3838

3939
## Here is our metadata, some keys are required, some are optional
@@ -110,6 +110,7 @@ sub configure {
110110
defaultparams => $self->retrieve_data('defaultparams'),
111111
autocomplete_mode => $self->retrieve_data('autocomplete_mode'),
112112
autocomplete => $self->retrieve_data('autocomplete'),
113+
PLUGIN_HTTP_PATH => $self->get_plugin_http_path(),
113114

114115

115116
);
@@ -175,7 +176,8 @@ sub update_EDSScript_js {
175176
autocomplete => ($cgi->param('autocomplete')?$cgi->param('autocomplete'):"-"),
176177
authtoken => $cgi->param('authtoken'),
177178
lastedsinfoupdate => $cgi->param('lastedsinfoupdate'),
178-
edsinfo => quotemeta($self->retrieve_data('edsinfo'))
179+
edsinfo => quotemeta($self->retrieve_data('edsinfo')),
180+
PLUGIN_HTTP_PATH => $self->get_plugin_http_path(),
179181
};
180182
#my $pluginsdir = C4::Context->config('pluginsdir');
181183
#my @pluginsdir = ref($pluginsdir) eq 'ARRAY' ? @$pluginsdir : $pluginsdir;
@@ -185,8 +187,9 @@ sub update_EDSScript_js {
185187
# push @plugindirs, $plugindir
186188
#}
187189
my $template = Template->new({
188-
INCLUDE_PATH => $PluginDir,
189-
OUTPUT_PATH => $PluginDir
190+
INCLUDE_PATH => $PluginDir,
191+
OUTPUT_PATH => $PluginDir,
192+
PLUGIN_HTTP_PATH => $self->get_plugin_http_path(),
190193
});
191194
$template->process('js/EDSScript.tt',$vars, 'js/EDSScript.js');
192195
$template->process('opac/templates/eds-methods.tt',$vars, 'opac/eds-methods.pl');
@@ -244,7 +247,7 @@ sub opac_js {
244247
<script>
245248
var defaultSearch="| . $default_search . q|";
246249
</script>
247-
<script src="/plugin/Koha/Plugin/EDS/js/EDSScript.js">
250+
<script src="|. $self->get_plugin_http_path() . q|/js/EDSScript.js">
248251
</script>
249252
|;
250253
}
@@ -372,6 +375,7 @@ sub SetupTool {
372375
customjs =>\@customJSContent,
373376
jsstate =>$customJS,
374377
plugin_dir =>$PluginDir,
378+
PLUGIN_HTTP_PATH => $self->get_plugin_http_path(),
375379

376380
);
377381

Koha/Plugin/EDS/admin/configure.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,15 @@ function EDSUpdateInfo(){
234234
$('#updateInfoBtn').val('Loading - this page will refresh in 10 seconds. Please wait...');
235235
$('#updateInfoBtn').attr('disabled','disabled');
236236

237-
var updateURL = '[% OPACBaseURL %]/plugin/Koha/Plugin/EDS/opac/eds-raw.pl?q=info';
237+
var updateURL = '[% OPACBaseURL %][% PLUGIN_HTTP_PATH %]/opac/eds-raw.pl?q=info';
238238
console.log(updateURL);
239239
var infoUpdateWindow=window.open(updateURL,'infoUpdateWindow',"width=100, height=10, top=0, left=0");
240240
setTimeout(function(){location.reload();},10000);
241241

242242
}
243243

244244
function GetLocalIP(){
245-
window.open('[% OPACBaseURL %]/plugin/Koha/Plugin/EDS/opac/eds-raw.pl?q=getip','getLocalIP',"width=100, height=10, top=0, left=0");
245+
window.open('[% OPACBaseURL %][% PLUGIN_HTTP_PATH %]/opac/eds-raw.pl?q=getip','getLocalIP',"width=100, height=10, top=0, left=0");
246246
}
247247

248248
</script>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- DO NOT TOUCH THIS FILE - controlled by build.py -->
33
<kohaplugin>
4-
<latestversion>20.11.009</latestversion>
4+
<latestversion>21.05.001</latestversion>
55
<download>https://github.com/ebsco/edsapi-koha-plugin</download>
6-
<lastupdated>2021/08/02</lastupdated>
6+
<lastupdated>2021/08/17</lastupdated>
77
<releasenotes>
8-
<release version="20.11.009" date="2021/08/02">
9-
<note id="1" author="mabrahamson@ebsco.com">Updates custom links to work offline.</note>
8+
<release version="21.05.001" date="2021/08/17">
9+
<note id="1" author="mabrahamson@ebsco.com">Compatibility updates for 21.05.</note>
1010
</release>
1111
</releasenotes>
1212
</kohaplugin>

Koha/Plugin/EDS/bootstrap/modules/eds-advsearch.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@
267267
<fieldset class="action">
268268
<p>
269269
<input class="btn btn-primary advSB" type="submit" accesskey="s" name="do" title="Search" value="Search">
270-
<a href="/plugin/Koha/Plugin/EDS/opac/eds-search.pl" class="btn btn-default new-search">New search</a>
270+
<a href="[% PLUGIN_HTTP_PATH %]/opac/eds-search.pl" class="btn btn-default new-search">New search</a>
271271
</p>
272272
</fieldset>
273273
<!-- /SEARCH BUTTONS -->

Koha/Plugin/EDS/bootstrap/modules/eds-results.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@
257257
[% BREAK %]
258258
[% END %]
259259
[% ELSE %]
260-
<a class="title" href="/plugin/Koha/Plugin/EDS/opac/eds-detail.pl?q=Retrieve?an=[% RECORD.Header.An %]|dbid=[%RECORD.Header.DbId%]&resultid=[% RECORD.ResultId %]" title="[% EDSLANG.eds_results_TT_title_attr %]">[% ITEM.Data %]</a>
260+
<a class="title" href="[% PLUGIN_HTTP_PATH %]/opac/eds-detail.pl?q=Retrieve?an=[% RECORD.Header.An %]|dbid=[%RECORD.Header.DbId%]&resultid=[% RECORD.ResultId %]" title="[% EDSLANG.eds_results_TT_title_attr %]">[% ITEM.Data %]</a>
261261
[% END %]
262262
</div>
263263
[% #IMAGE START %]

Koha/Plugin/EDS/bootstrap/modules/pfi-results.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
[% BREAK %]
219219
[% END %]
220220
[% ELSE %]
221-
<a class="title" href="/plugin/Koha/Plugin/EDS/opac/eds-detail.pl?q=Retrieve?id=[% RECORD.Header.PublicationId %]|dbid=edspub&resultid=[% RECORD.ResultId %]" title="[% EDSLANG.eds_results_TT_title_attr %]">[% ITEM.Data %]</a>
221+
<a class="title" href="[% PLUGIN_HTTP_PATH %]/opac/eds-detail.pl?q=Retrieve?id=[% RECORD.Header.PublicationId %]|dbid=edspub&resultid=[% RECORD.ResultId %]" title="[% EDSLANG.eds_results_TT_title_attr %]">[% ITEM.Data %]</a>
222222
[% END %]
223223
</div>
224224
[% #IMAGE START %]

0 commit comments

Comments
 (0)