Bugzilla – Attachment 92649 Details for
Bug 23562
Only one authorities search in header
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23562: Only one authorities search in header
Bug-23562-Only-one-authorities-search-in-header.patch (text/plain), 13.39 KB, created by
Fridolin Somers
on 2019-09-06 14:02:50 UTC
(
hide
)
Description:
Bug 23562: Only one authorities search in header
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2019-09-06 14:02:50 UTC
Size:
13.39 KB
patch
obsolete
>From 1b0331086702af9f1b468d7ca91bb4dede4fa50e Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Fri, 6 Sep 2019 15:48:09 +0200 >Subject: [PATCH] Bug 23562: Only one authorities search in header > >In authorities module, header contains 4 authorities search, from "main heading $a" to "entire record". >This is more a search option than really different searches. >I propose to merge them into only one with a select for where to search. >This allow to always keep current search options. > >This patch also adds title arguemnt on comboboxes to say what the represent. >Also changes submit button text with "Search" like in many places. > >Since there is a new combobox, a CSS rule need to be added to have an input text of 20em instead of 30em. > >Test plan : >1) Go to Authorities module >2) Choose a value different from fist in all comboboxes of header >3) Enter a text in input >4) Click on submit >5) Check that all values and text are kept >6) Perform search with each value of "Where" combobox and check results are OK >--- > .../prog/css/src/staff-global.scss | 4 + > .../prog/en/includes/authorities-search.inc | 191 ++---------------- > 2 files changed, 24 insertions(+), 171 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index 09dc82b52d..96b4f020de 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -1297,6 +1297,10 @@ div { > font-size: 1.3em; > width: 30em; > } >+ >+ #authorities_search .head-searchbox { >+ width: 20em; >+ } > } > > #reserves, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc >index 3fa669a60d..3dc701a106 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc >@@ -2,12 +2,12 @@ > <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName | html %]</a></h1> > <!-- Begin Authorities Resident Search Box --> > <div id="header_search" class="residentsearch"> >- <div id="mainmain_heading" class="residentsearch"> >- <p class="tip">Enter main heading ($a only):</p> >+ <div id="authorities_search" class="residentsearch"> >+ <p class="tip">Search for authorities:</p> > <form action="/cgi-bin/koha/authorities/authorities-home.pl" method="get"> > <input type="hidden" name="op" value="do_search" /> > <input type="hidden" name="type" value="intranet" /> >- <select name="authtypecode"> >+ <select name="authtypecode" title="Authority type"> > [% IF (marcflavour == 'UNIMARC' ) %]<option value="">All authority types</option>[% END %] > [% FOREACH authority_type IN authority_types %] > [% IF authority_type.authtypecode == authtypecode %] >@@ -17,176 +17,31 @@ > [% END %] > [% END %] > </select> >- <input type="hidden" name="marclist" value="mainmainentry" /> >- <input type="hidden" name="and_or" value="and" /> >- <input type="hidden" name="excluding" value="" /> >- <select name="operator"> >- [% IF ( operator == 'contains' ) %] >- <option value="contains" selected="selected">contains</option> >- [% ELSE %] >- <option value="contains">contains</option> >- [% END %] >- [% IF ( operator == 'start' ) %] >- <option value="start" selected="selected">starts with</option> >- [% ELSE %] >- <option value="start">starts with</option> >- [% END %] >- [% IF ( operator == 'is' ) %] >- <option value="is" selected="selected">is exactly</option> >- [% ELSE %] >- <option value="is">is exactly</option> >- [% END %] >- </select> >- <input id="value_mainentry" type="text" name="value" value="[% value | html %]" class="head-searchbox" /> >- <select name="orderby"> >- [% IF ( orderby == 'HeadingAsc' ) %] >- <option value="HeadingAsc" selected="selected">Heading A-Z</option> >- [% ELSE %] >- <option value="HeadingAsc">Heading A-Z</option> >- [% END %] >- [% IF ( orderby == 'HeadingDsc' ) %] >- <option value="HeadingDsc" selected="selected">Heading Z-A</option> >- [% ELSE %] >- <option value="HeadingDsc">Heading Z-A</option> >- [% END %] >- [% IF ( orderby == '' && op ) %] >- <option value="" selected="selected">None</option> >- [% ELSE %] >- <option value="">None</option> >- [% END %] >- </select> >- <input type="submit" class="submit" value="Submit" /> >- </form> >- </div> >- <div id="main_heading" class="residentsearch"> >- <p class="tip">Enter main heading:</p> >- <form action="/cgi-bin/koha/authorities/authorities-home.pl" method="get"> >- <input type="hidden" name="op" value="do_search" /> >- <input type="hidden" name="type" value="intranet" /> >- <select name="authtypecode"> >- [% IF (marcflavour == 'UNIMARC' ) %]<option value="">All authority types</option>[% END %] >- [% FOREACH authority_type IN authority_types %] >- [% IF authority_type.authtypecode == authtypecode %] >- <option value="[% authority_type.authtypecode | html %]" selected="selected">[% authority_type.authtypetext | html %]</option> >- [% ELSE %] >- <option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option> >- [% END %] >- [% END %] >- </select> >- <input type="hidden" name="marclist" value="mainentry" /> >- <input type="hidden" name="and_or" value="and" /> >- <input type="hidden" name="excluding" value="" /> >- <select name="operator"> >- [% IF ( operator == 'contains' ) %] >- <option value="contains" selected="selected">contains</option> >- [% ELSE %] >- <option value="contains">contains</option> >- [% END %] >- [% IF ( operator == 'start' ) %] >- <option value="start" selected="selected">starts with</option> >- [% ELSE %] >- <option value="start">starts with</option> >- [% END %] >- [% IF ( operator == 'is' ) %] >- <option value="is" selected="selected">is exactly</option> >- [% ELSE %] >- <option value="is">is exactly</option> >- [% END %] >- </select> >- <input id="value_mainentry" type="text" name="value" value="[% value | html %]" class="head-searchbox" /> >- <select name="orderby"> >- [% IF ( orderby == 'HeadingAsc' ) %] >- <option value="HeadingAsc" selected="selected">Heading A-Z</option> >- [% ELSE %] >- <option value="HeadingAsc">Heading A-Z</option> >- [% END %] >- [% IF ( orderby == 'HeadingDsc' ) %] >- <option value="HeadingDsc" selected="selected">Heading Z-A</option> >- [% ELSE %] >- <option value="HeadingDsc">Heading Z-A</option> >- [% END %] >- [% IF ( orderby == '' && op ) %] >- <option value="" selected="selected">None</option> >- [% ELSE %] >- <option value="">None</option> >- [% END %] >- </select> >- <input type="submit" class="submit" value="Submit" /> >- </form> >- </div> >- <div id="matchheading_search" class="residentsearch"> >- <p class="tip">Enter any heading:</p> >- <form action="/cgi-bin/koha/authorities/authorities-home.pl" method="get"> >- <input type="hidden" name="op" value="do_search" /> >- <input type="hidden" name="type" value="intranet" /> >- <select name="authtypecode"> >- [% IF (marcflavour == 'UNIMARC' ) %]<option value="">All authority types</option>[% END %] >- [% FOREACH authority_type IN authority_types %] >- [% IF authority_type.authtypecode == authtypecode %] >- <option value="[% authority_type.authtypecode | html %]" selected="selected">[% authority_type.authtypetext | html %]</option> >- [% ELSE %] >- <option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option> >- [% END %] >- [% END %] >- </select> >- <input type="hidden" name="marclist" value="match" /> >- <select name="operator"> >- [% IF ( operator == 'contains' ) %] >- <option value="contains" selected="selected">contains</option> >- [% ELSE %] >- <option value="contains">contains</option> >- [% END %] >- [% IF ( operator == 'start' ) %] >- <option value="start" selected="selected">starts with</option> >+ <select name="marclist" title="Where"> >+ [% IF ( marclist == 'mainmainentry' ) %] >+ <option value="mainmainentry" selected="selected">Main heading ($a only)</option> > [% ELSE %] >- <option value="start">starts with</option> >+ <option value="mainmainentry">Main heading ($a only)</option> > [% END %] >- [% IF ( operator == 'is' ) %] >- <option value="is" selected="selected">is exactly</option> >+ [% IF ( marclist == 'mainentry' ) %] >+ <option value="mainentry" selected="selected">Main heading</option> > [% ELSE %] >- <option value="is">is exactly</option> >+ <option value="mainentry">Main heading</option> > [% END %] >- </select> >- <input id="value_matchheading" type="text" name="value" value="[% value | html %]" class="head-searchbox" /> >- <select name="orderby"> >- [% IF ( orderby == 'HeadingAsc' ) %] >- <option value="HeadingAsc" selected="selected">Heading A-Z</option> >+ [% IF ( marclist == 'match' ) %] >+ <option value="match" selected="selected">All headings</option> > [% ELSE %] >- <option value="HeadingAsc">Heading A-Z</option> >+ <option value="match">All headings</option> > [% END %] >- [% IF ( orderby == 'HeadingDsc' ) %] >- <option value="HeadingDsc" selected="selected">Heading Z-A</option> >+ [% IF ( marclist == 'all' ) %] >+ <option value="all" selected="selected">Entire record</option> > [% ELSE %] >- <option value="HeadingDsc">Heading Z-A</option> >+ <option value="all">Entire record</option> > [% END %] >- [% IF ( orderby == '' && op ) %] >- <option value="" selected="selected">None</option> >- [% ELSE %] >- <option value="">None</option> >- [% END %] >- </select> >- <input type="submit" class="submit" value="Submit" /> >- </form> >- </div> >- <div id="entire_record" class="residentsearch"> >- <p class="tip">Enter any authority field:</p> >- <form action="/cgi-bin/koha/authorities/authorities-home.pl" method="get"> >- <input type="hidden" name="op" value="do_search" /> >- <input type="hidden" name="type" value="intranet" /> >- <select name="authtypecode"> >- [% IF (marcflavour == 'UNIMARC' ) %]<option value="">All authority types</option>[% END %] >- [% FOREACH authority_type IN authority_types %] >- [% IF authority_type.authtypecode == authtypecode %] >- <option value="[% authority_type.authtypecode | html %]" selected="selected">[% authority_type.authtypetext | html %]</option> >- [% ELSE %] >- <option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option> >- [% END %] >- [% END %] > </select> >- <input type="hidden" name="marclist" value="all" /> > <input type="hidden" name="and_or" value="and" /> > <input type="hidden" name="excluding" value="" /> >- <select name="operator"> >+ <select name="operator" title="Search option"> > [% IF ( operator == 'contains' ) %] > <option value="contains" selected="selected">contains</option> > [% ELSE %] >@@ -203,8 +58,8 @@ > <option value="is">is exactly</option> > [% END %] > </select> >- <input id="value_anywhere" type="text" name="value" value="[% value | html %]" class="head-searchbox" /> >- <select name="orderby"> >+ <input type="text" name="value" value="[% value | html %]" class="head-searchbox" /> >+ <select name="orderby" title="Order by"> > [% IF ( orderby == 'HeadingAsc' ) %] > <option value="HeadingAsc" selected="selected">Heading A-Z</option> > [% ELSE %] >@@ -221,15 +76,9 @@ > <option value="">None</option> > [% END %] > </select> >- <input type="submit" class="submit" value="Submit" /> >+ <input type="submit" class="submit" value="Search" /> > </form> > </div> >- <ul> >- <li><a class="keep_text" href="#mainmain_heading">Search main heading ($a only)</a></li> >- <li><a class="keep_text" href="#main_heading">Search main heading</a></li> >- <li><a class="keep_text" href="#matchheading_search">Search all headings</a></li> >- <li><a class="keep_text" href="#entire_record">Search entire record</a></li> >- </ul> > </div><!-- /header_search --> > </div><!-- /gradient --> > <!-- End Authorities Resident Search Box --> >-- >2.17.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 23562
:
92648
|
92649
|
92650
|
100339