From c96a52a4a0eeda52b219ba29a86685337265ab56 Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Tue, 27 Sep 2011 18:35:33 +0200 Subject: [PATCH] Bug 5729 - Add CoinS to intranet This patch adds CoinS support to biblio displays in staff interface. librarians can now use zotero on the staff interface Signed-off-by: Chris Cormack Modified by: Ian Walls GetCOinSBiblio has changed interface, requiring a $record object instead of looking one up by biblionumber. Calls in ISBDdetail.pl, MARCdetail.pl and detail.pl updated. Signed-off-by: Ian Walls --- catalogue/ISBDdetail.pl | 4 +++- catalogue/MARCdetail.pl | 1 + catalogue/detail.pl | 1 + .../intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt | 5 ++++- .../intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt | 4 ++++ koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 5 +++++ 6 files changed, 18 insertions(+), 2 deletions(-) diff --git a/catalogue/ISBDdetail.pl b/catalogue/ISBDdetail.pl index 58a8d901c5..de24490ce0 100755 --- a/catalogue/ISBDdetail.pl +++ b/catalogue/ISBDdetail.pl @@ -100,13 +100,15 @@ if ($subscriptionsnumber) { subscriptiontitle => $subscriptiontitle, ); } +my $record = GetMarcBiblio($biblionumber); $template->param ( ISBD => $res, biblionumber => $biblionumber, isbdview => 1, z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)), - C4::Search::enabled_staff_search_views + ocoins => GetCOinSBiblio($record), + C4::Search::enabled_staff_search_views, ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl index 0a2974b1aa..0490076402 100755 --- a/catalogue/MARCdetail.pl +++ b/catalogue/MARCdetail.pl @@ -83,6 +83,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( ); my $record = GetMarcBiblio($biblionumber); +$template->param( ocoins => GetCOinSBiblio($record) ); if ( not defined $record ) { # biblionumber invalid -> report and exit diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 580949d109..a1e5cc91a3 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -86,6 +86,7 @@ if (C4::Context->preference("XSLTDetailsDisplay") ) { } $template->param( 'SpineLabelShowPrintOnBibDetails' => C4::Context->preference("SpineLabelShowPrintOnBibDetails") ); +$template->param( ocoins => GetCOinSBiblio($record) ); # some useful variables for enhanced content; # in each case, we're grabbing the first value we find in diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt index b08f360dc4..1d924ec9b9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt @@ -30,7 +30,10 @@
[% INCLUDE 'cat-toolbar.inc' %] - + [% IF ( ocoins ) %] + + + [% END %]
[% ISBD %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt index 3fac577e0a..ae86ee0633 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt @@ -57,6 +57,10 @@ function Changefwk(FwkList) { [% IF ( frameworkcodeloo.selected ) %][% ELSE %][% END %] [% END %]

+[% IF ( ocoins ) %] + + +[% END %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 019fa10e86..dae3ad51c8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -68,6 +68,11 @@ function verify_images() {
    [% INCLUDE 'cat-toolbar.inc' %] + [% IF ( ocoins ) %] + + + [% END %] + [% IF ( AmazonEnabled ) %] [% IF ( XSLTDetailsDisplay ) %]
    -- 2.39.5