summaryrefslogtreecommitdiff
authorOwen Leonard <oleonard@myacpl.org>2014-10-29 13:48:39 (GMT)
committer Tomas Cohen Arazi <tomascohen@gmail.com>2014-11-04 22:10:29 (GMT)
commitdc85139da272689e3aaaa9b4b5a29a6634b6656e (patch) (side-by-side diff)
treea0959c7548bc1ed17e10fc29276a9619cf6642e0
parent643a9cd0caca6048741fd4d9d7a75343d05e085c (diff)
Bug 11425 [Template follow-up] Search form for items
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 "&amp;" 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> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described, improves display.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.inc2
-rw-r--r--koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_items.inc12
-rw-r--r--koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.csv.tt2
-rw-r--r--koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt74
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&amp;biblionumber=[% item.biblionumber %]&amp;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 &rsaquo; Catalog &rsaquo; Advanced search</title>
+ <title>Koha &rsaquo; Catalog &rsaquo; 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> &rsaquo; Item search
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> &rsaquo; 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=">">&gt;</option>
<option value="<">&lt;</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' %]