From 4306ed739f0c8747fbeda3fa6cc7e02bc6232a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Wed, 8 Mar 2023 22:44:12 +0800 Subject: [PATCH] Added the is_search property to the report chooser to highlight the search when it is on the search page. --- src/accounting/report/reports/utils/report_chooser.py | 2 ++ .../templates/accounting/report/include/action-buttons.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/accounting/report/reports/utils/report_chooser.py b/src/accounting/report/reports/utils/report_chooser.py index 9f2acfe..4e1e2c8 100644 --- a/src/accounting/report/reports/utils/report_chooser.py +++ b/src/accounting/report/reports/utils/report_chooser.py @@ -65,6 +65,8 @@ class ReportChooser: """The links to the reports.""" self.current_report: str | LazyString = "" """The title of the current report.""" + self.is_search: bool = active_report == ReportType.SEARCH + """Whether the current report is the search page.""" self.__reports.append(self.__journal) self.__reports.append(self.__ledger) self.__reports.append(self.__income_expenses) diff --git a/src/accounting/templates/accounting/report/include/action-buttons.html b/src/accounting/templates/accounting/report/include/action-buttons.html index b82af7f..61d2da2 100644 --- a/src/accounting/templates/accounting/report/include/action-buttons.html +++ b/src/accounting/templates/accounting/report/include/action-buttons.html @@ -62,7 +62,7 @@ First written: 2023/3/8 {% endfor %}
  • - + {{ A_("Search") }}