Bug 16061: Use Font Awesome icons in reports when filter returns no results

In Reports -> Saved reports, when the filter form returns no results a
dialog is shown. This patch updates the dialog to use Font Awesome
icons.

Also changed: The dialog now includes a button for creating a new SQL
report, not just one to create a new guided report. The "clear" link in
the sidebar has been modified to pass HTML validation.

To test, apply the patch and go to Reports -> Saved reports.

- In the left-hand sidebar filter, submit terms which will return no
  results.
- Verify that the resulting dialog is correctly styled.
- Confirm that all three buttons in the dialog work correctly: New
  guided report, new SQL report, and Cancel.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
I'm passing this one, while I don't like it is hardcoding a URL path,
because it will make is easier to spot it when time comes and we
make Koha delpoyable in any endpoint.

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
This commit is contained in:
Owen Leonard 2016-03-08 14:40:02 -05:00 committed by Brendan Gallagher
parent 974ea0c8bd
commit aa6457f38f
1 changed files with 8 additions and 3 deletions

View File

@ -378,14 +378,19 @@ canned reports and writing custom SQL reports.</p>
[% IF ( CAN_user_reports_create_reports ) %]
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="get">
<input type="hidden" name="phase" value="Build new" />
<input type="submit" class="edit" value="Build a new report" accesskey="y" />
<button type="submit" class="new"><i class="fa fa-plus"></i> New guided report</button>
</form>
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="get">
<input type="hidden" name="phase" value="Create report from SQL" />
<button type="submit" class="new"><i class="fa fa-plus"></i> New SQL report</button>
</form>
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="get">
<input type="hidden" name="phase" value="Use saved" />
<input type="hidden" name="filter_set" value="1" />
<input type="hidden" name="filter_keyword" value="" />
<input type="submit" class="deny" value="Cancel filter" accesskey="n" />
<button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> Cancel filter</button>
</form>
[% END %]
@ -1031,7 +1036,7 @@ Sub report:<select name="subreport">
</fieldset>
<fieldset class="action">
<input type="submit" value="Apply filter" />
<a id="resetReportsFilter" href="?phase=Use saved&clear_filters=1">Clear</a>
<a id="resetReportsFilter" href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved&clear_filters=1">Clear</a>
</fieldset>
</form>
</div>