From 402240bbe25aaffd205a34a01663e556be01ac15 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 15 Dec 2010 21:33:59 -0500 Subject: [PATCH] Fix for Bug 4997, More searches menu not on OPAC MARC and ISBD detail pages Signed-off-by: Nicole Engard Signed-off-by: Chris Cormack --- .../prog/en/modules/opac-ISBDdetail.tmpl | 28 +++++++++++++++ .../prog/en/modules/opac-MARCdetail.tmpl | 35 ++++++++++++++++++- opac/opac-ISBDdetail.pl | 10 ++++++ opac/opac-MARCdetail.pl | 10 ++++++ 4 files changed, 82 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl index 039e2ea52e..475d681ebf 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl @@ -5,6 +5,20 @@ $(document).ready(function() { $('#bibliodescriptions > ul').tabs(); }); + YAHOO.util.Event.onContentReady("furtherm", function () { + $("#furtherm").css("display","block").css("visibility","hidden"); + $("#furthersearches").parent().show(); + var furthersearchesMenu = new YAHOO.widget.Menu("furtherm"); + furthersearchesMenu.render(); + furthersearchesMenu.cfg.setProperty("context", ["furthersearches", "tr", "br"]); + furthersearchesMenu.subscribe("beforeShow",positionfurthersearchesMenu); + furthersearchesMenu.subscribe("show", furthersearchesMenu.focus); + function positionfurthersearchesMenu() { + furthersearchesMenu.align("tr", "br"); + } + YAHOO.util.Event.addListener("furthersearches", "click", furthersearchesMenu.show, null, furthersearchesMenu); + YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionfurthersearchesMenu); + }); //]]> + @@ -188,7 +207,21 @@
  • '); return false;"> Add to Your Cart
  • +
  • More searches
  • + + + +
    +
    +

    Search for this title in:

    +
      + + +
    +
    +
    +
    diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl index 88904da451..d3ffecc9a9 100755 --- a/opac/opac-ISBDdetail.pl +++ b/opac/opac-ISBDdetail.pl @@ -155,6 +155,16 @@ $template->param( reviews => $reviews, ); +#Search for title in links +if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ + $dat->{author} ? $search_for_title =~ s/{AUTHOR}/$dat->{author}/g : $search_for_title =~ s/{AUTHOR}//g; + $dat->{title} =~ s/\/+$//; # remove trailing slash + $dat->{title} =~ s/\s+$//; # remove trailing space + $dat->{title} ? $search_for_title =~ s/{TITLE}/$dat->{title}/g : $search_for_title =~ s/{TITLE}//g; + $isbn ? $search_for_title =~ s/{ISBN}/$isbn/g : $search_for_title =~ s/{ISBN}//g; + $template->param('OPACSearchForTitleIn' => $search_for_title); +} + ## Amazon.com stuff #not used unless preference set if ( C4::Context->preference("OPACAmazonEnabled") == 1 ) { diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl index d1272024e5..1a9dc34088 100755 --- a/opac/opac-MARCdetail.pl +++ b/opac/opac-MARCdetail.pl @@ -269,6 +269,16 @@ if(C4::Context->preference("ISBD")) { $template->param(ISBD => 1); } +#Search for title in links +if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ + $biblio->{author} ? $search_for_title =~ s/{AUTHOR}/$biblio->{author}/g : $search_for_title =~ s/{AUTHOR}//g; + $biblio->{title} =~ s/\/+$//; # remove trailing slash + $biblio->{title} =~ s/\s+$//; # remove trailing space + $biblio->{title} ? $search_for_title =~ s/{TITLE}/$biblio->{title}/g : $search_for_title =~ s/{TITLE}//g; + $biblio->{isbn} ? $search_for_title =~ s/{ISBN}/$biblio->{isbn}/g : $search_for_title =~ s/{ISBN}//g; + $template->param('OPACSearchForTitleIn' => $search_for_title); +} + $template->param( item_loop => \@item_value_loop, item_header_loop => \@header_value_loop, -- 2.39.5