From: Owen Leonard Date: Thu, 16 Dec 2010 02:33:59 +0000 (-0500) Subject: Fix for Bug 4997, More searches menu not on OPAC MARC and ISBD detail pages X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=402240bbe25aaffd205a34a01663e556be01ac15;p=koha.git 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 --- 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,