Bugzilla – Attachment 32926 Details for
Bug 11425
Search form for items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11425 [Template follow-up] Search form for items
Bug-11425-Template-follow-up-Search-form-for-items.patch (text/plain), 13.82 KB, created by
Marc Véron
on 2014-10-29 16:35:52 UTC
(
hide
)
Description:
Bug 11425 [Template follow-up] Search form for items
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2014-10-29 16:35:52 UTC
Size:
13.82 KB
patch
obsolete
>From 8e4521734764e5e48ae9cfd343651b2aa8a4e975 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 29 Oct 2014 09:48:39 -0400 >Subject: [PATCH] Bug 11425 [Template follow-up] Search form for items >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This template followup makes several changes to markup and text: > >- Replace "Bibliographic reference" with "Title" >- Replace "Callnumber" with "Call number" >- Replace "Home branch" with "Home library" >- Replace "Holding branch" with "Current location" >- Replace "Location" with "Shelving location" >- Replace "Issues" with "Checkouts" >- Replace "Indifferent" with "Ignore" >- Replace "&" with "&" where necessary >- Correct page title and breadcrumbs >- Remove label "for" attribute from labels which do not directly target > a form field >- Correct label "for" attribute on labels which should target a form > field >- Correct date format hint > >This patch also makes one change to the way the page display works: > >The search results section is now in a separate div which uses a >different grid rule, allowing it to take up the full width of the >screen. To keep the page headers from looking weird I've changed the >markup so that each section has its own header. > >To test, perform a variety of searches and confirm that the output in >both Screen and CSV views looks correct. > >Confirm that search results which are output to the screen are formatted >nicely and that the "edit search" links work correctly to show the >search form. Submitting a new search after editing a search should hide >the form and redisplay the search results table. > >Followed test plan, works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> >--- > .../prog/en/includes/catalogue/itemsearch_item.inc | 2 +- > .../en/includes/catalogue/itemsearch_items.inc | 12 ++-- > .../prog/en/modules/catalogue/itemsearch.csv.tt | 2 +- > .../prog/en/modules/catalogue/itemsearch.tt | 74 ++++++++++---------- > 4 files changed, 46 insertions(+), 44 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.inc >index c02cfbf..5b08b91 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.inc >@@ -19,5 +19,5 @@ > <td>[% item.stocknumber %]</td> > <td>[% item.status %]</td> > <td>[% item.issues || 0 %]</td> >- <td><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber %]&itemnumber=[% item.itemnumber %]">Edit</a></td> >+ <td><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber %]&itemnumber=[% item.itemnumber %]">Edit</a></td> > </tr> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_items.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_items.inc >index 33b4c36..1f078a3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_items.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_items.inc >@@ -26,18 +26,18 @@ > <table> > <thead> > <tr> >- [% INCLUDE itemsearch_header name='title' label='title' text='Bibliographic reference' %] >+ [% INCLUDE itemsearch_header name='title' label='title' text='Title' %] > [% INCLUDE itemsearch_header name='publicationyear' label='publication date' text='Publication date' %] > [% INCLUDE itemsearch_header name='publishercode' label='publisher' text='Publisher' %] > [% INCLUDE itemsearch_header name='collectiontitle' label='collection' text='Collection' %] > [% INCLUDE itemsearch_header name='barcode' label='barcode' text='Barcode' %] >- [% INCLUDE itemsearch_header name='itemcallnumber' label='callnumber' text='Callnumber' %] >- [% INCLUDE itemsearch_header name='homebranch' label='home branch' text='Home branch' %] >- [% INCLUDE itemsearch_header name='holdingbranch' label='holding branch' text='Holding branch' %] >- [% INCLUDE itemsearch_header name='location' label='location' text='Location' %] >+ [% INCLUDE itemsearch_header name='itemcallnumber' label='callnumber' text='Call number' %] >+ [% INCLUDE itemsearch_header name='homebranch' label='home branch' text='Home library' %] >+ [% INCLUDE itemsearch_header name='holdingbranch' label='holding branch' text='Current location' %] >+ [% INCLUDE itemsearch_header name='location' label='location' text='Shelving location' %] > [% INCLUDE itemsearch_header name='stocknumber' label='stock number' text='Stock number' %] > [% INCLUDE itemsearch_header name='notforloan' label='status' text='Status' %] >- [% INCLUDE itemsearch_header name='issues' label='issues' text='Issues' %] >+ [% INCLUDE itemsearch_header name='issues' label='issues' text='Checkouts' %] > <th></th> > </tr> > </thead> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.csv.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.csv.tt >index b69f610..5b2bbea 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.csv.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.csv.tt >@@ -1,4 +1,4 @@ >-Bibliographic reference, Publication Date, Publisher, Collection, Barcode, Callnumber, Home branch, Holding branch, Location, Stock number, Status, Issues >+Title, Publication Date, Publisher, Collection, Barcode, Call number, Home library, Current location, Shelving location, Stock number, Status, Checkouts > [% FOREACH item IN results -%] > [%- INCLUDE 'catalogue/itemsearch_item.csv.inc' item = item -%] > [%- END -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >index 5ee86d5..57d605e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -59,7 +59,7 @@ > [% END %] > <select name="f" class="form-field-column"> > [% INCLUDE form_field_select_option value='barcode' label='Barcode' %] >- [% INCLUDE form_field_select_option value='itemcallnumber' label='Callnumber' %] >+ [% INCLUDE form_field_select_option value='itemcallnumber' label='Call number' %] > [% INCLUDE form_field_select_option value='stocknumber' label='Stock number' %] > [% INCLUDE form_field_select_option value='title' label='Title' %] > [% INCLUDE form_field_select_option value='author' label='Author' %] >@@ -117,9 +117,9 @@ > > [% BLOCK form_field_radio_yes_no %] > <div class="form-field"> >- <label class="form-field-label" for="[% name %]">[% label %]:</label> >+ <label class="form-field-label">[% label %]:</label> > <input type="radio" name="[% name %]" id="[% name %]_indifferent" value="" checked="checked"/> >- <label for="[% name %]_indifferent">Indifferent</label> >+ <label for="[% name %]_indifferent">Ignore</label> > <input type="radio" name="[% name %]" id="[% name %]_yes" value="yes" /> > <label for="[% name %]_yes">Yes</label> > <input type="radio" name="[% name %]" id="[% name %]_no" value="no" /> >@@ -130,11 +130,11 @@ > [%# Page starts here %] > > [% INCLUDE 'doc-head-open.inc' %] >- <title>Koha › Catalog › Advanced search</title> >+ <title>Koha › Catalog › Item search</title> > [% INCLUDE 'doc-head-close.inc' %] >+ <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> > [% INCLUDE 'datatables.inc' %] > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script> >- <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/itemsearchform.css" /> > <script type="text/javascript"> > //<![CDATA[ >@@ -178,18 +178,18 @@ > function submitForm($form) { > var tr = '' > + ' <tr>' >- + ' <th>' + _("Bibliographic reference") + '</th>' >+ + ' <th>' + _("Title") + '</th>' > + ' <th>' + _("Publication date") + '</th>' > + ' <th>' + _("Publisher") + '</th>' > + ' <th>' + _("Collection") + '</th>' > + ' <th>' + _("Barcode") + '</th>' >- + ' <th>' + _("Callnumber") + '</th>' >- + ' <th>' + _("Home branch") + '</th>' >- + ' <th>' + _("Holding branch") + '</th>' >- + ' <th>' + _("Location") + '</th>' >+ + ' <th>' + _("Call number") + '</th>' >+ + ' <th>' + _("Home library") + '</th>' >+ + ' <th>' + _("Current location") + '</th>' >+ + ' <th>' + _("Shelving location") + '</th>' > + ' <th>' + _("Stock number") + '</th>' > + ' <th>' + _("Status") + '</th>' >- + ' <th>' + _("Issues") + '</th>' >+ + ' <th>' + _("Checkouts") + '</th>' > + ' <th></th>' > + ' </tr>' > var table = '' >@@ -197,7 +197,10 @@ > + ' <thead>' + tr + tr + '</thead>' > + ' <tbody></tbody>' > + '</table>'; >- $('#results-wrapper').empty().html(table); >+ var results_heading = "<h1>" + _("Item search results") + "</h1>"; >+ results_heading += "<p><a href=\"/cgi-bin/koha/catalogue/search.pl\">" + _("Go to advanced search") + "</a></p>"; >+ results_heading += "<p><a class=\"editsearchlink\" href=\"#\">" + _("Edit search") + "</a></p>"; >+ $('#results-wrapper').empty().html(results_heading + table); > > var params = []; > $form.find('select,input[type="text"],input[type="hidden"]').not('[disabled]').each(function () { >@@ -254,9 +257,9 @@ > }); > } > >- function hideForm($form) { >- $form.hide(); >- $('#editsearchlink').show(); >+ function hideForm() { >+ $("#item-search-block").hide(); >+ $('.editsearchlink').show(); > } > > $(document).ready(function () { >@@ -289,16 +292,18 @@ > }); > > $('#itemsearchform').submit(function() { >- var format = $(this).find('input[name="format"]:checked').val(); >+ var searchform = $(this); >+ var format = searchform.find('input[name="format"]:checked').val(); > if (format == 'html') { >- submitForm($(this)); >- hideForm($(this)); >+ submitForm(searchform); >+ hideForm(); > return false; > } > }); > >- $('#editsearchlink').click(function() { >- $('#itemsearchform').show(); >+ $("body").on("click",".editsearchlink",function(e) { >+ e.preventDefault(); >+ $('#item-search-block').show(); > $(this).hide(); > return false; > }); >@@ -309,26 +314,24 @@ > <body id="catalog_itemsearch" class="catalog"> > [% INCLUDE 'header.inc' %] > <div id="breadcrumbs"> >- <a href="/cgi-bin/koha/mainpage.pl">Home</a> › Item search >+ <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> › Item search > </div> > > <div id="doc" class="yui-t7"> >- <div id="bd"> >+ <div id="item-search-block"> > <h1>Item search</h1> >- <a href="/cgi-bin/koha/catalogue/search.pl">Go to advanced search</a> >- <form action="" method="get" id="itemsearchform"> >- <fieldset> >- <legend>Item search</legend> >+ <p><a href="/cgi-bin/koha/catalogue/search.pl">Go to advanced search</a></p> >+ <form action="/cgi-bin/koha/catalogue/itemsearch.pl" method="get" id="itemsearchform"> > <fieldset> > [% INCLUDE form_field_select > name="homebranch" >- label="Home branch" >+ label="Home library" > options = branches >- empty_option = "All branches" >+ empty_option = "All libraries" > %] > [% INCLUDE form_field_select > name="location" >- label="Location" >+ label="Shelving location" > options = locations > empty_option = "All locations" > %] >@@ -375,7 +378,7 @@ > [% INCLUDE form_field_radio_yes_no name="damaged" label="Damaged" %] > [% INCLUDE form_field_radio_yes_no name="itemlost" label="Lost" %] > <div class="form-field"> >- <label class="form-field-label" for="issues">Issues count:</label> >+ <label class="form-field-label" for="issues_op">Checkout count:</label> > <select id="issues_op" name="issues_op"> > <option value=">">></option> > <option value="<"><</option> >@@ -385,14 +388,14 @@ > <input type="text" name="issues" /> > </div> > <div class="form-field"> >- <label class="form-field-label" for="datelastborrowed">Last issue date:</label> >+ <label class="form-field-label" for="datelastborrowed_op">Last checkout date:</label> > <select id="datelastborrowed_op" name="datelastborrowed_op"> > <option value=">">After</option> > <option value="<">Before</option> > <option value="=">On</option> > </select> > <input type="text" name="datelastborrowed" /> >- <span class="hint">ISO Format (AAAA-MM-DD)</span> >+ <span class="hint">ISO Format (YYYY-MM-DD)</span> > </div> > </fieldset> > <fieldset> >@@ -405,14 +408,14 @@ > <input type="submit" value="Search" /> > </div> > </fieldset> >- </fieldset> > </form> > > <p><a id="editsearchlink" href="#" style="display:none">Edit search</a></p> >- >+ </div> >+ </div> >+ <div id="doc3" class="yui-t7"> > <div id="results-wrapper"> > [% IF search_done %] >- > [% IF total_rows > 0 %] > <p>Found [% total_rows %] results.</p> > [% ELSE %] >@@ -429,6 +432,5 @@ > > [% END %] > </div> >- </div> > > [% INCLUDE 'intranet-bottom.inc' %] >-- >1.7.10.4
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 11425
:
23674
|
23675
|
26334
|
26335
|
26555
|
26556
|
26557
|
27111
|
27112
|
27113
|
27162
|
27975
|
27976
|
27977
|
27978
|
27979
|
29965
|
30195
|
30196
|
30197
|
30198
|
30199
|
30200
|
32304
|
32305
|
32306
|
32307
|
32308
|
32309
|
32669
|
32670
|
32671
|
32672
|
32673
|
32674
|
32675
|
32918
|
32926
|
32947
|
32948