Bugzilla – Attachment 38475 Details for
Bug 11880
Select the barcode index by default when searching for label items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11880: Select what has been selected before
Bug-11880-Select-what-has-been-selected-before.patch (text/plain), 4.73 KB, created by
Jonathan Druart
on 2015-04-24 08:06:17 UTC
(
hide
)
Description:
Bug 11880: Select what has been selected before
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-04-24 08:06:17 UTC
Size:
4.73 KB
patch
obsolete
>From a623286ce6048074209b6c320ee43690a496d7cf Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 24 Apr 2015 10:02:19 +0200 >Subject: [PATCH] Bug 11880: Select what has been selected before > >The previous patch wants to select the barcode option when the user is >on the item search for label, in all cases. >So even if 'title' is selected, a search done, and there is no result, >the barcode index is selected anyway. >In this case, the title option should be kept. > >Test plan: >Confirm that the barcode option is the default choice, but other values >are kept is the search does not return any result. >--- > .../intranet-tmpl/prog/en/modules/labels/search.tt | 30 +++++++++++----------- > labels/label-item-search.pl | 3 ++- > 2 files changed, 17 insertions(+), 16 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt >index af95538..d9d5235 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt >@@ -23,45 +23,45 @@ to add to Batch [% batch_id %] > <ol><li> > <select name="idx" > <!-- FIXME: script does keyword search regardless --> > >-[% IF ( selected ) %]<option value="kw" selected="selected">Keyword</option> >+[% IF idx == 'kw' %]<option value="kw" selected="selected">Keyword</option> > [% ELSE %]<option value="kw">Keyword</option>[% END %] > >-[% IF ( selected ) %]<option value="au" selected="selected">Author</option> >+[% IF idx == 'au' %]<option value="au" selected="selected">Author</option> > [% ELSE %]<option value="au">Author</option>[% END %] > >-[% IF ( selected ) %]<option value="yr" selected="selected">Publication date</option> >+[% IF idx == 'yr' %]<option value="yr" selected="selected">Publication date</option> > [% ELSE %]<option value="yr">Publication date</option>[% END %] > >-[% IF ( selected ) %]<option value="sn" selected="selected">Standard number</option> >+[% IF idx == 'sn' %]<option value="sn" selected="selected">Standard number</option> > [% ELSE %]<option value="sn">Standard number</option>[% END %] > >-[% IF ( selected ) %]<option value="nb" selected="selected">ISBN</option> >+[% IF idx == 'nb' %]<option value="nb" selected="selected">ISBN</option> > [% ELSE %]<option value="nb">ISBN</option>[% END %] > >-[% IF ( selected ) %]<option value="ns" selected="selected">ISSN</option> >+[% IF idx == 'ns' %]<option value="ns" selected="selected">ISSN</option> > [% ELSE %]<option value="ns">ISSN</option>[% END %] > >-[% IF ( selected ) %]<option value="lcn,phr" selected="selected">Call number</option> >+[% IF idx == 'lcn,phr' %]<option value="lcn,phr" selected="selected">Call number</option> > [% ELSE %]<option value="lcn,phr">Call number</option>[% END %] > >-[% IF ( selected ) %]<option value="su" selected="selected">Subject</option> >+[% IF idx == 'su' %]<option value="su" selected="selected">Subject</option> > [% ELSE %]<option value="su">Subject</option>[% END %] > >-[% IF ( selected ) %] >+[% IF idx == 'ti' %] > <option value="ti" selected="selected">Title</option> > [% ELSE %] >- <option value="ti" selected="selected">Title</option>[% END %] >+ <option value="ti">Title</option>[% END %] > >-[% IF ( selected ) %]<option value="ti,phr" selected="selected">Title phrase</option> >+[% IF idx == 'ti,phr' %]<option value="ti,phr" selected="selected">Title phrase</option> > [% ELSE %]<option value="ti,phr">Title phrase</option>[% END %] > >-[% IF ( selected ) %]<option value="se" selected="selected">Series title</option> >+[% IF idx == 'se' %]<option value="se" selected="selected">Series title</option> > [% ELSE %]<option value="se">Series title</option>[% END %] > >-[% IF ( selected ) %]<option value="bc" selected="selected">Barcode</option> >-[% ELSE %]<option value="bc" selected="selected">Barcode</option>[% END %] >+[% IF idx == 'bc' or not idx %]<option value="bc" selected="selected">Barcode</option> >+[% ELSE %]<option value="bc">Barcode</option>[% END %] > >-[% IF ( selected ) %]<option value="acqdate" selected="selected">Acquisition date</option> >+[% IF idx == 'acqdate' %]<option value="acqdate" selected="selected">Acquisition date</option> > [% ELSE %]<option value="acqdate">Acquisition date</option>[% END %] > </select> > >diff --git a/labels/label-item-search.pl b/labels/label-item-search.pl >index 2202c93..f28f057 100755 >--- a/labels/label-item-search.pl >+++ b/labels/label-item-search.pl >@@ -225,7 +225,6 @@ if ($show_results) { > result_set=> \@results_set, > batch_id => $batch_id, > type => $type, >- idx => $idx, > ccl_query => $ccl_query, > ); > } >@@ -262,5 +261,7 @@ else { > > } > >+$template->param( idx => $idx ); >+ > # Print the page > output_html_with_http_headers $query, $cookie, $template->output; >-- >2.1.0
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 11880
:
25746
|
25820
|
38475
|
38479
|
40774
|
40775