Bugzilla – Attachment 4285 Details for
Bug 6120
Add search links in detail pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Signed-off patch
0001-SIGNED-OFF-Bug-6120-Add-search-links-in-detail-pages.patch (text/plain), 8.43 KB, created by
Frédéric Demians
on 2011-05-27 17:16:09 UTC
(
hide
)
Description:
Signed-off patch
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2011-05-27 17:16:09 UTC
Size:
8.43 KB
patch
obsolete
>From 2096350d5560596041b2da2e890bfc3156424c6d Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@progilone.fr> >Date: Fri, 27 May 2011 15:12:51 +0200 >Subject: [PATCH] [SIGNED-OFF] Bug 6120 Add search links in detail pages >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >[2011.05.27] F.Demians. -- Works as described. Solved all issues raised on >enhencement bugzilla comments. > >Signed-off-by: Frédéric Demians <f.demians@tamil.fr> >--- > koha-tmpl/opac-tmpl/prog/en/css/opac.css | 4 ++++ > .../opac-tmpl/prog/en/modules/opac-ISBDdetail.tt | 4 ++++ > .../opac-tmpl/prog/en/modules/opac-MARCdetail.tt | 4 ++++ > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 4 ++++ > koha-tmpl/opac-tmpl/prog/images/previous.gif | Bin 0 -> 483 bytes > opac/opac-ISBDdetail.pl | 11 ++++++++++- > opac/opac-MARCdetail.pl | 11 ++++++++++- > opac/opac-detail.pl | 11 ++++++++++- > opac/opac-search.pl | 13 +++++++++++-- > 9 files changed, 57 insertions(+), 5 deletions(-) > create mode 100644 koha-tmpl/opac-tmpl/prog/images/previous.gif > >diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css >index aa295c9..10a7acb 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css >+++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css >@@ -441,6 +441,10 @@ a .term { > background-image:url(../../images/cart2.gif); > } > >+#action a.comeback { >+ background-image:url(../../images/previous.gif); >+} >+ > /* toolbar buttons */ > > #toolbar { >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt >index 35fffc8..dbc8c1b 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt >@@ -48,6 +48,10 @@ > <div id="ulactioncontainer" class="container"> > <ul id="action"> > >+ [% IF ( currentsearchurl ) %][% UNLESS ( currentsearchisoneresult ) %] >+ <li><a class="comeback" href="[% currentsearchurl %]">Back to results</a></li> >+ [% END %][% END %] >+ > [% UNLESS ( norequests ) %] > [% IF ( opacuserlogin ) %] > [% IF ( RequestOnOpac ) %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt >index 68b0148..7d5c58a 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt >@@ -203,6 +203,10 @@ $(document).ready(function(){ > <div id="ulactioncontainer" class="container"> > <ul id="action"> > >+ [% IF ( currentsearchurl ) %][% UNLESS ( currentsearchisoneresult ) %] >+ <li><a class="comeback" href="[% currentsearchurl %]">Back to results</a></li> >+ [% END %][% END %] >+ > [% UNLESS ( norequests ) %] > [% IF ( opacuserlogin ) %] > [% IF ( RequestOnOpac ) %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >index 7263b1e..357fcaf 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -795,6 +795,10 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > <div id="ulactioncontainer" class="container"> > <ul id="action"> > >+ [% IF ( currentsearchurl ) %][% UNLESS ( currentsearchisoneresult ) %] >+ <li><a class="comeback" href="[% currentsearchurl %]">Back to results</a></li> >+ [% END %][% END %] >+ > [% UNLESS ( norequests ) %] > [% IF ( opacuserlogin ) %] > [% IF ( RequestOnOpac ) %] >diff --git a/koha-tmpl/opac-tmpl/prog/images/previous.gif b/koha-tmpl/opac-tmpl/prog/images/previous.gif >new file mode 100644 >index 0000000000000000000000000000000000000000..b765ba752d4062566934f58da2668dd5aeb2acaa >GIT binary patch >literal 483 >zcmZ?wbhEHb6lCCMIOfA3@71ONLhTCP9g5!Via^q*UD2mQ34}V8eL9tVJCuF9RD8RX >z{kl~AI#v9-RQ<Zt0(#VgdbGp(4I?MprOma=TIyQ3(yL&pZ^hb>%GCk2n*(aM1lMm3 >zYuFsxxIMISM|jir@aCPdO<N*bc0{)9jB4E#)3z(VZD&mT?zoQK@tr`lC!upseD}Vz >zuAS+<dsF)MWlz|bGhtumq(cQ$4(3lilsD~2{<I^7GmaI`JYF>WWa*p}WphuI&pTN; >z?{vldlT`~&)hs+!x9D{Jl5=e<FLtcH)V20<@A|9#8?OHQcl!Sz28usf7`Yhg8FUzc >z02C(-><$g}P0jV<;w>E=;@<6@o!vcsUEWjLrcH02FlF|fiLG-NOr5`QLEDmr?X#9I >dTD*GR+U31Xv!-vIynfQm9XmH~>S$!J1_1GZHc|ip > >literal 0 >HcmV?d00001 > >diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl >index b50947d..6faa2e6 100755 >--- a/opac/opac-ISBDdetail.pl >+++ b/opac/opac-ISBDdetail.pl >@@ -42,7 +42,7 @@ the items attached to the biblio > use strict; > use warnings; > >-use C4::Auth; >+use C4::Auth qw(:DEFAULT get_session); > use C4::Context; > use C4::Output; > use CGI; >@@ -202,4 +202,13 @@ if ( C4::Context->preference("OPACAmazonEnabled") == 1 ) { > $template->param( AMAZONREVIEWS => \@reviews ); > } > >+# Get current search from session >+my $session = get_session($query->cookie("CGISESSID")); >+if ($session) { >+ $template->param( >+ currentsearchurl => $session->param("currentsearchurl"), >+ currentsearchisoneresult => $session->param("currentsearchisoneresult"), >+ ); >+} >+ > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl >index 8e492aa..544b926 100755 >--- a/opac/opac-MARCdetail.pl >+++ b/opac/opac-MARCdetail.pl >@@ -44,7 +44,7 @@ the items attached to the biblio > use strict; > use warnings; > >-use C4::Auth; >+use C4::Auth qw(:DEFAULT get_session); > use C4::Context; > use C4::Output; > use CGI; >@@ -286,4 +286,13 @@ $template->param( > biblionumber => $biblionumber, > ); > >+# Get current search from session >+my $session = get_session($query->cookie("CGISESSID")); >+if ($session) { >+ $template->param( >+ currentsearchurl => $session->param("currentsearchurl"), >+ currentsearchisoneresult => $session->param("currentsearchisoneresult"), >+ ); >+} >+ > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index b357a56..277034d 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -23,7 +23,7 @@ use strict; > use warnings; > > use CGI; >-use C4::Auth; >+use C4::Auth qw(:DEFAULT get_session); > use C4::Branch; > use C4::Koha; > use C4::Serials; #uses getsubscriptionfrom biblionumber >@@ -582,4 +582,13 @@ my $defaulttab = > ? 'serialcollection' : 'subscription'; > $template->param('defaulttab' => $defaulttab); > >+# Get current search from session >+my $session = get_session($query->cookie("CGISESSID")); >+if ($session) { >+ $template->param( >+ currentsearchurl => $session->param("currentsearchurl"), >+ currentsearchisoneresult => $session->param("currentsearchisoneresult"), >+ ); >+} >+ > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 9b78069..03ac81a 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -118,6 +118,9 @@ if (C4::Context->preference('TagsEnabled')) { > } > } > >+# Read session >+my $session = get_session($cgi->cookie("CGISESSID")); >+ > ## URI Re-Writing > # Deprecated, but preserved because it's interesting :-) > # The same thing can be accomplished with mod_rewrite in >@@ -395,6 +398,12 @@ if (C4::Context->preference('OpacSuppression')) { > > $template->param ( LIMIT_INPUTS => \@limit_inputs ); > >+# Set session variables >+$session->param('currentsearchisoneresult', '0'); # init is only one result >+my $abs_url = $cgi->url( -absolute => 1, -query => 1 ); >+$abs_url =~ s/;/&/g; # CGI returns url with ; instead of & to separate url parameters >+$session->param('currentsearchurl', $abs_url); >+ > ## II. DO THE SEARCH AND GET THE RESULTS > my $total = 0; # the total results for the whole set > my $facets; # this object stores the faceted results that display on the left-hand of the results page >@@ -539,7 +548,8 @@ for (my $i=0;$i<@servers;$i++) { > print $cgi->redirect("/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=$biblionumber"); > } else { > print $cgi->redirect("/cgi-bin/koha/opac-detail.pl?biblionumber=$biblionumber"); >- } >+ } >+ $session->param('currentsearchisoneresult', 1); > exit; > } > if ($hits) { >@@ -648,7 +658,6 @@ if ($query_desc || $limit_desc) { > > # VI. BUILD THE TEMPLATE > # Build drop-down list for 'Add To:' menu... >-my $session = get_session($cgi->cookie("CGISESSID")); > my @addpubshelves; > my $pubshelves = $session->param('pubshelves'); > my $barshelves = $session->param('barshelves'); >-- >1.7.5.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6120
:
3803
|
3808
|
3842
|
4150
|
4151
|
4276
|
4285
|
4925