From bugzilla-daemon@bugs.koha-community.org Fri Feb 20 05:32:33 2015
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 13736] New: Enable EDS Plugin Patch
Date: Fri, 20 Feb 2015 04:32:30 +0000
Message-ID:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============5246970069862903821=="
--===============5246970069862903821==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13736
Bug ID: 13736
Summary: Enable EDS Plugin Patch
Change sponsored?: ---
Product: Koha
Version: 3.18
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: OPAC
Assignee: oleonard@myacpl.org
Reporter: contact@alvet.com.au
QA Contact: testopia@bugs.koha-community.org
The EDS plugin requires 2 files to be patched.
OPEN doc-dead-close.inc in \opac\htdocs\opac-tmpl\\includes and add
the below line to the end of the file.
[% IF ( EDSEnabled ) %][% END %]
OPEN Auth.pm in \lib\C4 and add the below line after CalendarFirstDayOfWeek =>
at approx. line 397
EDSEnabled => C4::Context->preference("EDSEnabled"),
--
You are receiving this mail because:
You are watching all bug changes.
--===============5246970069862903821==--
From bugzilla-daemon@bugs.koha-community.org Fri Feb 20 05:45:17 2015
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 13736] Enable EDS Plugin Patch
Date: Fri, 20 Feb 2015 04:45:15 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8720032071464137799=="
--===============8720032071464137799==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13736
Alvet changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |contact@alvet.com.au
Status|NEW |ASSIGNED
Assignee|oleonard@myacpl.org |contact@alvet.com.au
--- Comment #1 from Alvet ---
Created attachment 36060
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36060&action=edit
EDS Plugin Patch
--
You are receiving this mail because:
You are watching all bug changes.
--===============8720032071464137799==--
From bugzilla-daemon@bugs.koha-community.org Sat Sep 26 16:43:17 2015
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 13736] Enable EDS Plugin Patch
Date: Sat, 26 Sep 2015 14:43:08 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============6255994073168193476=="
--===============6255994073168193476==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3D13736
Alvet changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #36060|0 |1
is obsolete| |
--- Comment #2 from Alvet ---
Created attachment 42894
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3D42894&action=3De=
dit
EDS Plugin Patches Code checks to see if setting EDSEnabled is ON and
integrates the EDS Plugin to the Opac
>From 5851a06cc13c93f40c2d58613e16aa4bf2c2e1b7 Mon Sep 17 00:00:00 2001
From: Alvet
Date: Sun, 27 Sep 2015 00:01:57 +1000
Subject: [PATCH] BUG 13736 [ENH] EDS Plugin Patches Code checks to see if
setting EDSEnabled is ON and integrates the EDS Plugin to the Opac Auth.pm
makes EDSEnabled accessible to the Opac doc-head-close.inc adds EDSScript.js
to the opac opac-downloadcart.pl; contains code to add EDS records to the
download list opac-sendbasket.pl; contains code to add EDS records to the
email message
Test Plan
- Without Plugin
1) Apply the patch
2) Use Koha as normal.
- With Plugin (optional test)
1) Apply the patch
2) Install the EDS Koha Plugin
3) A Discovery Dropdown appears in the search dropdown to search subscription
resources
-Updating the EDS plugin.(optional test)
1) Visit https://github.com/ebsco/edsapi-koha-plugin
2) Download the .kpz file
3) Upload file using Koha's plugin manager
---
C4/Auth.pm | 1 +
.../opac-tmpl/bootstrap/en/includes/doc-head-close.inc | 1 +
opac/opac-downloadcart.pl | 15 +++++++++++++=
++
opac/opac-sendbasket.pl | 15 +++++++++++++=
++
4 files changed, 32 insertions(+)
diff --git a/C4/Auth.pm b/C4/Auth.pm
index ef0c585..266c29a 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -471,6 +471,7 @@ sub get_template_and_user {
AuthorisedValueImages =3D>
C4::Context->preference("AuthorisedValueImages"),
BranchesLoop =3D>
GetBranchesLoop($opac_name),
BranchCategoriesLoop =3D> GetBranchCategories(
'searchdomain', 1, $opac_name ),
+ EDSEnabled =3D>
C4::Context->preference("EDSEnabled"),
LibraryName =3D> "" .
C4::Context->preference("LibraryName"),
LibraryNameTitle =3D> "" . $LibraryNameTitl=
e,
LoginBranchname =3D> C4::Context->userenv ?
C4::Context->userenv->{"branchname"} : "",
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc
b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc
index bce0da2..e8b819c 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc
@@ -48,3 +48,4 @@
function _(s) { return s } // dummy function for gettext
+[% IF ( EDSEnabled ) %][% END %]
diff --git a/opac/opac-downloadcart.pl b/opac/opac-downloadcart.pl
index f14eb9e..10d1fcd 100755
--- a/opac/opac-downloadcart.pl
+++ b/opac/opac-downloadcart.pl
@@ -34,6 +34,14 @@ use C4::Csv;
use utf8;
my $query =3D new CGI;
+my $eds_data =3D "";
+if ( ( eval { C4::Context->preference('EDSEnabled') } ) ) {
+ my $PluginDir =3D C4::Context->config("pluginsdir");
+ $PluginDir =3D $PluginDir . '/Koha/Plugin/EDS';
+ require $PluginDir . '/opac/eds-methods.pl';
+ $eds_data =3D $query->param('eds_data');
+}
+
my ( $template, $borrowernumber, $cookie ) =3D get_template_and_user (
{
template_name =3D> "opac-downloadcart.tt",
@@ -66,6 +74,13 @@ if ($bib_list && $format) {
foreach my $biblio (@bibs) {
my $record =3D GetMarcBiblio($biblio, 1);
+ if ( ( eval { C4::Context->preference('EDSEnabled') } ) ) {
+ my $dat =3D "";
+ if ( $biblio =3D~ m/\|/ ) {
+ ( $record, $dat ) =3D
+ ProcessEDSCartItems( $biblio, $eds_data, $record, $dat
);
+ }
+ }
next unless $record;
if ($format eq 'iso2709') {
diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl
index 6b2d62f..7f7d616 100755
--- a/opac/opac-sendbasket.pl
+++ b/opac/opac-sendbasket.pl
@@ -36,6 +36,13 @@ use C4::Members;
use Koha::Email;
my $query =3D new CGI;
+my $eds_data =3D "";
+if ( ( eval { C4::Context->preference('EDSEnabled') } ) ) {
+ my $PluginDir =3D C4::Context->config("pluginsdir");
+ $PluginDir =3D $PluginDir . '/Koha/Plugin/EDS';
+ require $PluginDir . '/opac/eds-methods.pl';
+ $eds_data =3D $query->param('eds_data');
+}
my ( $template, $borrowernumber, $cookie ) =3D get_template_and_user (
{
@@ -86,6 +93,11 @@ if ( $email_add ) {
my $dat =3D GetBiblioData($biblionumber);
next unless $dat;
my $record =3D GetMarcBiblio($biblionumber, 1);
+ if((eval{C4::Context->preference('EDSEnabled')})){
+ if($biblionumber =3D~m/\|/){
+ ($record,$dat)=3D
ProcessEDSCartItems($biblionumber,$eds_data,$record,$dat);
+ }
+ }
my $marcnotesarray =3D GetMarcNotes( $record, $marcflavour );
my $marcauthorsarray =3D GetMarcAuthors( $record, $marcflavour );
my $marcsubjctsarray =3D GetMarcSubjects( $record, $marcflavour );
@@ -122,6 +134,9 @@ if ( $email_add ) {
# Getting template result
my $template_res =3D $template2->output();
my $body;
+ if((eval{C4::Context->preference('EDSEnabled')})){
+ $template_res =3D CartSendLinks($template_res,@bibs);
+ }
# Analysing information and getting mail properties
--=20
1.9.1
--=20
You are receiving this mail because:
You are watching all bug changes.
--===============6255994073168193476==--