From 87026c6cad4bd65d7ed643ece830462f0ee95639 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 22 Feb 2019 13:26:01 +0000 Subject: [PATCH] Bug 21308: Results from order search do not show the search parameters MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Séverine QUEUNE Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- .../prog/en/includes/filter-orders.inc | 2 +- .../prog/en/modules/acqui/histsearch.tt | 53 ++++++++++++++-------- 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc index 42a3060c68..8cc68b5df1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc @@ -10,7 +10,7 @@
  • - +
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt index c925d739e4..f825331b50 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt @@ -18,15 +18,17 @@
    + [% IF !order_loop && search_done %] +
    + Your search returned no results. +
    + [% END %] + + [% UNLESS ( order_loop ) %] + [% PROCESS filter_form context => "main" %] + [% END %] + -[% UNLESS ( order_loop ) %]
    -
    - Search orders - [% INCLUDE 'filter-orders.inc' %] -
    - -
    -
    [% END %] [% IF ( order_loop ) %]

    Search results

    @@ -101,8 +103,6 @@
    - [% ELSIF search_done %] - There is no order for this search. [% END %]
    @@ -110,6 +110,9 @@
    @@ -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' + }); }); [% END %] +[% BLOCK filter_form %] +
    + [% IF ( context == "sidebar" ) %] +
    +

    Search orders

    + [% ELSE %] +
    + Search orders + [% END %] + [% INCLUDE 'filter-orders.inc' %] +
    + +
    + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] -- 2.11.4.GIT