From ce6cf101b38448a316c96f65a162facfb3100e03 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 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. --- .../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 208b2dc..9ff1be2 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 c925d73..f825331 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.1.4