Bug 21308: Results from order search do not show the search parameters

This patch modifies the orders search results page so that the search
form appears in the sidebar. This allows the user to view and re-use
their search parameters.

This patch also moves the "no search results" message to the top of the
page in a message box.

To test, apply the patch and go to Acquisitions -> Orders search.

 - Perform a search which will return results. In the sidebar you should
   see the full orders search form with your search parameters in the
   form fields.

 - Perform a search which will return no results. You should see the
   "Your search returned no results." message in a standard message
   dialog.

Signed-off-by: Bin Wen <bin.wen@inlibro.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Owen Leonard 2019-02-22 13:26:01 +00:00 committed by Nick Clemens
parent 296e0ce224
commit 87026c6cad
2 changed files with 36 additions and 19 deletions

View file

@ -10,7 +10,7 @@
<li><label for="name">Vendor: </label> <input type="text" name="name" id="name" value="[% filters.name | html %]" /></li>
<li><label for="basket">Basket: </label> <input type="text" name="basket" id="basket" value="[% filters.basket | html %]" /></li>
<li><label for="basket_creators">Basket created by: </label>
<input autocomplete="off" id="find_patron" type="text" style="width:150px" class="noEnterSubmit" />
<input autocomplete="off" id="find_patron" type="text" class="noEnterSubmit" />
<div>
<div id="basket_creators" style="float:left;"></div>
</div>

View file

@ -18,15 +18,17 @@
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
[% IF !order_loop && search_done %]
<div class="dialog message">
Your search returned no results.
</div>
[% END %]
[% UNLESS ( order_loop ) %]
[% PROCESS filter_form context => "main" %]
[% END %]
[% UNLESS ( order_loop ) %]<form action="/cgi-bin/koha/acqui/histsearch.pl" method="post">
<fieldset class="rows">
<legend>Search orders</legend>
[% INCLUDE 'filter-orders.inc' %]
</fieldset>
<input type="hidden" name="do_search" value="1" />
<fieldset class="action"><input type="submit" value="Search" /></fieldset>
</form>[% END %]
[% IF ( order_loop ) %]<h1>Search results</h1>
<div id="acqui_histsearch">
<table id="histsearcht">
@ -101,8 +103,6 @@
</tbody>
</table>
</div>
[% ELSIF search_done %]
There is no order for this search.
[% END %]
</main>
@ -110,6 +110,9 @@
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% IF ( order_loop ) %]
[% PROCESS filter_form context => "sidebar" %]
[% END %]
[% INCLUDE 'acquisitions-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
@ -133,16 +136,30 @@
"sPaginationType": "four_button"
}, columns_settings );
[% UNLESS order_loop %]
patron_autocomplete({
patron_container: $("#basket_creators"),
input_autocomplete: $("#find_patron"),
patron_input_name: 'created_by',
field_to_retrieve: 'borrowernumber'
});
[% END %]
patron_autocomplete({
patron_container: $("#basket_creators"),
input_autocomplete: $("#find_patron"),
patron_input_name: 'created_by',
field_to_retrieve: 'borrowernumber'
});
});
</script>
[% END %]
[% BLOCK filter_form %]
<form action="/cgi-bin/koha/acqui/histsearch.pl" method="post">
[% IF ( context == "sidebar" ) %]
<fieldset class="brief">
<h4>Search orders</h4>
[% ELSE %]
<fieldset class="rows">
<legend>Search orders</legend>
[% END %]
[% INCLUDE 'filter-orders.inc' %]
</fieldset>
<input type="hidden" name="do_search" value="1" />
<fieldset class="action"><input type="submit" value="Search" /></fieldset>
</form>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]