From 1b43cab3dd4fb34e4c3a1509415057448496eb82 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 30 Jul 2018 17:33:29 +0000 Subject: [PATCH] Bug 21132: Highlight active filters on saved report page This patch adds a more obvious way of see which search terms have been submitted to filter the table of saved reports. The patch also moves embedded CSS into a separate file. To test you should have multiple saved reports. - Apply the patch and go to Reports -> Use saved. - Filter the table of reports by submitting one or more terms in the sidebar "Filter" form. - Confirm that the terms you submit are shown at the top of the table of results. - Confirm that clicking the "Clear" link clears the search filter. Signed-off-by: Maryse Simard Followed the test plan and it works. Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- koha-tmpl/intranet-tmpl/prog/css/reports.css | 75 +++++++++++++++++++ .../modules/reports/guided_reports_start.tt | 37 +++++---- 2 files changed, 93 insertions(+), 19 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/css/reports.css diff --git a/koha-tmpl/intranet-tmpl/prog/css/reports.css b/koha-tmpl/intranet-tmpl/prog/css/reports.css new file mode 100644 index 0000000000..4ccee11209 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/css/reports.css @@ -0,0 +1,75 @@ +#sql { + height: 9em; + width: 90%; +} + +#update_sql .modal-dialog { + width: 80%; +} + +ins { + background-color: #e6ffe6; +} + +del { + background-color: #ffe6e6; +} + +#col1, +#col2 { + float: left; + width: 45%; +} + +#col1 ins, +#col2 del { + display: none; +} + +.show_sql { + font-family: monospace; +} + +.send_to_item_mod { + background-color: #EBF3FF; + border: 1px solid #88b0e8; + border-radius: 5px; + display: inline-block; + font-size: 75%; + margin: 3px 5px; + padding: 3px 5px; + white-space: nowrap; +} + +.filter { + background-color: #EBF3FF; + border-radius: 5px; + display: inline-block; + font-size: 85%; + margin: 3px; + padding: 0 1em; + white-space: nowrap; +} + +.filter span, +.filter a { + padding: .5em 0; +} + +.filter span { + border-right: 1px solid #A4BEDD; + display: inline-block; + margin-right: .5em; + padding-right: .5em; +} + +.clear_filter { + display: inline-block; + font-weight: bold; + margin-left: .5em; + padding-left: 1em; +} + +.clear_filter i { + color: #C00; +} \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 9dde0263a3..5d0546ba98 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -31,26 +31,8 @@ [%- END -%] [% INCLUDE 'doc-head-close.inc' %] - [% IF ( saved1 ) %] + [% Asset.css("css/reports.css") %] [% Asset.css("css/datatables.css") %] [% END %] @@ -145,6 +127,23 @@ canned reports and writing custom SQL reports.

[% IF ( saved1 ) %] [% IF ( savedreports ) %]

Saved reports

+[% IF ( filters.date || filters.author || filters.keyword ) %] +

Filtered by: + + [% IF ( filters.date ) %] + Date: [% filters.date %] + [% END %] + [% IF ( filters.author ) %] + Author: [% filters.author %] + [% END %] + [% IF ( filters.keyword ) %] + Keyword: [% filters.keyword %] + [% END %] + Clear + +

+[% END %] +
  • All
  • -- 2.39.5