Bugzilla – Attachment 54190 Details for
Bug 17074
Fix links in result list of 'scan indexes' search and keep search term
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17074: Fix links in result list of 'scan indexes' and keep search term visible
Bug-17074-Fix-links-in-result-list-of-scan-indexes.patch (text/plain), 3.92 KB, created by
Jonathan Druart
on 2016-08-09 09:44:04 UTC
(
hide
)
Description:
Bug 17074: Fix links in result list of 'scan indexes' and keep search term visible
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-08-09 09:44:04 UTC
Size:
3.92 KB
patch
obsolete
>From a81bb30787f119538478665a1800ca5ff947bd76 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Sun, 7 Aug 2016 16:03:13 +0200 >Subject: [PATCH] Bug 17074: Fix links in result list of 'scan indexes' and > keep search term visible > >The 'scan indexes' search that can be reached from the >advanced search has 2 problems to begin with: > >- The search term you searched for is not displayed > in the input field. >- The links in the result list are missing the index > and because of that, are not giving the correct results. > >To test: >- Go to the advanced search, select an index to search in >- Enter a search term and check 'scan indexes' >- Submit search >- Check if the search term is visible in the input box >- Check if the result links contain your selected index > and give you correct results (count and the number of > results should match) > >Tested both patches together, works as expected. >Signed-off-by: Marc <veron@veron.ch> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > catalogue/search.pl | 7 ++++++- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 8 ++++++-- > 2 files changed, 12 insertions(+), 3 deletions(-) > >diff --git a/catalogue/search.pl b/catalogue/search.pl >index dcbd21c..41f67aa 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -492,6 +492,7 @@ my $searcher = Koha::SearchEngine::Search->new( > ## parse the query_cgi string and put it into a form suitable for <input>s > my @query_inputs; > my $scan_index_to_use; >+my $scan_search_term_to_use; > > for my $this_cgi ( split('&',$query_cgi) ) { > next unless $this_cgi; >@@ -502,9 +503,13 @@ for my $this_cgi ( split('&',$query_cgi) ) { > if ($input_name eq 'idx') { > $scan_index_to_use = $input_value; # unless $scan_index_to_use; > } >+ if ($input_name eq 'q') { >+ $scan_search_term_to_use = $input_value; >+ } > } > $template->param ( QUERY_INPUTS => \@query_inputs, >- scan_index_to_use => $scan_index_to_use ); >+ scan_index_to_use => $scan_index_to_use, >+ scan_search_term_to_use => $scan_search_term_to_use ); > > ## parse the limit_cgi string and put it into a form suitable for <input>s > my @limit_inputs; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index 9902578..55b5927 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -421,7 +421,11 @@ var holdForPatron = function () { > <table> > <tr> > <td> >- Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="" /> >+ [% IF ( scan_search_term_to_use ) %] >+ Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="[% scan_search_term_to_use %]" /> >+ [% ELSE %] >+ Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="" /> >+ [% END %] > </td> > </tr> > <tr> >@@ -467,7 +471,7 @@ var holdForPatron = function () { > [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %] > <tr> > <td> >- <a href="/cgi-bin/koha/catalogue/search.pl?idx=[% SEARCH_RESULT.scan_index_to_use %]&q=[% SEARCH_RESULT.scan_use |url %]"[% SEARCH_RESULT.title %]"">[% SEARCH_RESULT.title |html %]</a> >+ <a href="/cgi-bin/koha/catalogue/search.pl?idx=[% scan_index_to_use %]&q=[% SEARCH_RESULT.scan_use |url %]"[% SEARCH_RESULT.title %]"">[% SEARCH_RESULT.title |html %]</a> > </td> > <td> > [% SEARCH_RESULT.author %] >-- >2.8.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 17074
:
54123
|
54133
|
54134
|
54135
|
54138
|
54139
| 54190 |
54191