Bug 20345: Put saved report keyword search form on reports home
authorOwen Leonard <oleonard@myacpl.org>
Tue, 6 Mar 2018 18:48:08 +0000 (18:48 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 26 Mar 2018 20:31:27 +0000 (17:31 -0300)
This patch makes cosmetic changes to the reports home page in the staff
client following the pattern set on the Administration home page with
the system preferences search box. A reports keyword search form is
added, and reports actions have font-awesome icons.

To test, apply the patch and view the reports home page. Confirm that
all affected links work correctly and that the search form works
correctly.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt

index f8b8067..527f7a3 100644 (file)
     <div class="row">
         <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
 
-        <h2>Guided reports</h2>
-        <div class="row">
-            <div class="col-xs-6">
+            <div class="row">
+                <div class="col-xs-6">
 
-        <ul>
-            <li><a href="/cgi-bin/koha/reports/guided_reports.pl">Guided reports wizard</a></li>
-            [% IF ( CAN_user_reports_create_reports ) %]<li><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build new</a></li>[% END %]
-            [% IF ( CAN_user_reports_execute_reports ) %]<li><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Use saved</a></li>[% END %]
-            [% IF ( CAN_user_reports_create_reports ) %]<li><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create%20report%20from%20SQL">Create from SQL</a></li>[% END %]
-        </ul>
+                    [% IF ( CAN_user_reports_execute_reports || CAN_user_reports_create_reports ) %]
+                        <form action="/cgi-bin/koha/reports/guided_reports.pl" method="get">
+                            <fieldset class="brief">
+                                <h2>Guided reports</h2>
+                                <input name="phase" value="Use saved" type="hidden">
+                                <input name="filter_set" value="1" type="hidden">
+                                [% IF ( CAN_user_reports_create_reports ) %]
+                                    <p>
+                                        <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new"><i class="fa fa-code-fork"></i> Create guided report</a>
+                                    </p>
+                                    <p>
+                                        <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create%20report%20from%20SQL"><i class="fa fa-plus"></i> Create from SQL</a>
+                                    </p>
+                                [% END %]
+                                <p>
+                                    <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved"><i class="fa fa-list"></i> Use saved</a>
+                                </p>
+                                <label for="filter_keyword">Search by keyword:</label> <input id="filter_keyword" name="filter_keyword" value="" size="16" type="text" /> <input value="Search" type="submit" />
+                            </fieldset>
+                        </form>
+                    [% END %]
 
         <h5>Reports dictionary</h5>
         <ul>