diff --git a/src/accounting/templates/accounting/report/balance-sheet.html b/src/accounting/templates/accounting/report/balance-sheet.html index 7d66cd9..2a6aa91 100644 --- a/src/accounting/templates/accounting/report/balance-sheet.html +++ b/src/accounting/templates/accounting/report/balance-sheet.html @@ -31,41 +31,12 @@ First written: 2023/3/7 {% block content %}
- {% if accounting_can_edit() %} -
- - -
- {% endif %} - {% include "accounting/report/include/report-chooser.html" %} - {% include "accounting/report/include/currency-chooser.html" %} - - - - {{ A_("Download") }} - + {% with use_add_new = true, + use_report_chooser = true, + use_currency_chooser = true, + use_period_chooser = true %} + {% include "accounting/report/include/action-buttons.html" %} + {% endwith %}
{% with txn_types = report.txn_types %} @@ -73,12 +44,11 @@ First written: 2023/3/7 {% endwith %}
- {% include "accounting/report/include/report-chooser.html" %} - {% include "accounting/report/include/currency-chooser.html" %} - + {% with use_report_chooser = true, + use_currency_chooser = true, + use_period_chooser = true %} + {% include "accounting/report/include/action-buttons.html" %} + {% endwith %}
{% with period = report.period, period_chooser = report.period_chooser %} diff --git a/src/accounting/templates/accounting/report/include/action-buttons.html b/src/accounting/templates/accounting/report/include/action-buttons.html new file mode 100644 index 0000000..968bcc3 --- /dev/null +++ b/src/accounting/templates/accounting/report/include/action-buttons.html @@ -0,0 +1,121 @@ +{# +The Mia! Accounting Flask Project +action-buttons.html: The action buttons on the report + + Copyright (c) 2023 imacat. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +Author: imacat@mail.imacat.idv.tw (imacat) +First written: 2023/3/8 +#} +{% if use_add_new %} + {% if accounting_can_edit() %} +
+ + +
+ {% endif %} +{% endif %} +{% if use_report_chooser %} +
+ + +
+{% endif %} +{% if use_currency_chooser %} +
+ + +
+{% endif %} +{% if use_account_chooser %} +
+ + +
+{% endif %} +{% if use_period_chooser %} + +{% endif %} +{% if use_search %} + +{% endif %} + + + {{ A_("Download") }} + diff --git a/src/accounting/templates/accounting/report/include/currency-chooser.html b/src/accounting/templates/accounting/report/include/currency-chooser.html deleted file mode 100644 index 84123c6..0000000 --- a/src/accounting/templates/accounting/report/include/currency-chooser.html +++ /dev/null @@ -1,36 +0,0 @@ -{# -The Mia! Accounting Flask Project -currency-chooser.html: The currency chooser in the action buttons - - Copyright (c) 2023 imacat. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -Author: imacat@mail.imacat.idv.tw (imacat) -First written: 2023/3/8 -#} -
- - -
diff --git a/src/accounting/templates/accounting/report/include/report-chooser.html b/src/accounting/templates/accounting/report/include/report-chooser.html deleted file mode 100644 index 93bb815..0000000 --- a/src/accounting/templates/accounting/report/include/report-chooser.html +++ /dev/null @@ -1,38 +0,0 @@ -{# -The Mia! Accounting Flask Project -report-chooser.html: The report chooser - - Copyright (c) 2023 imacat. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -Author: imacat@mail.imacat.idv.tw (imacat) -First written: 2023/3/4 -#} -
- - -
diff --git a/src/accounting/templates/accounting/report/income-expenses.html b/src/accounting/templates/accounting/report/income-expenses.html index 1bcd501..c237ed4 100644 --- a/src/accounting/templates/accounting/report/income-expenses.html +++ b/src/accounting/templates/accounting/report/income-expenses.html @@ -32,56 +32,13 @@ First written: 2023/3/5 {% block content %}
- {% if accounting_can_edit() %} -
- - -
- {% endif %} - {% include "accounting/report/include/report-chooser.html" %} - {% include "accounting/report/include/currency-chooser.html" %} -
- - -
- - - - {{ A_("Download") }} - + {% with use_add_new = true, + use_report_chooser = true, + use_currency_chooser = true, + use_account_chooser = true, + use_period_chooser = true %} + {% include "accounting/report/include/action-buttons.html" %} + {% endwith %}
{% with txn_types = report.txn_types %} @@ -89,26 +46,12 @@ First written: 2023/3/5 {% endwith %}
- {% include "accounting/report/include/report-chooser.html" %} - {% include "accounting/report/include/currency-chooser.html" %} -
- - -
- + {% with use_report_chooser = true, + use_currency_chooser = true, + use_account_chooser = true, + use_period_chooser = true %} + {% include "accounting/report/include/action-buttons.html" %} + {% endwith %}
{% with period = report.period, period_chooser = report.period_chooser %} diff --git a/src/accounting/templates/accounting/report/income-statement.html b/src/accounting/templates/accounting/report/income-statement.html index 94c1978..d2339af 100644 --- a/src/accounting/templates/accounting/report/income-statement.html +++ b/src/accounting/templates/accounting/report/income-statement.html @@ -31,41 +31,12 @@ First written: 2023/3/7 {% block content %}
- {% if accounting_can_edit() %} -
- - -
- {% endif %} - {% include "accounting/report/include/report-chooser.html" %} - {% include "accounting/report/include/currency-chooser.html" %} - - - - {{ A_("Download") }} - + {% with use_add_new = true, + use_report_chooser = true, + use_currency_chooser = true, + use_period_chooser = true %} + {% include "accounting/report/include/action-buttons.html" %} + {% endwith %}
{% with txn_types = report.txn_types %} @@ -73,12 +44,11 @@ First written: 2023/3/7 {% endwith %}
- {% include "accounting/report/include/report-chooser.html" %} - {% include "accounting/report/include/currency-chooser.html" %} - + {% with use_report_chooser = true, + use_currency_chooser = true, + use_period_chooser = true %} + {% include "accounting/report/include/action-buttons.html" %} + {% endwith %}
{% with period = report.period, period_chooser = report.period_chooser %} diff --git a/src/accounting/templates/accounting/report/journal.html b/src/accounting/templates/accounting/report/journal.html index b8a660b..9f2fb86 100644 --- a/src/accounting/templates/accounting/report/journal.html +++ b/src/accounting/templates/accounting/report/journal.html @@ -32,40 +32,11 @@ First written: 2023/3/4 {% block content %}
- {% if accounting_can_edit() %} -
- - -
- {% endif %} - {% include "accounting/report/include/report-chooser.html" %} - - - - {{ A_("Download") }} - + {% with use_add_new = true, + use_report_chooser = true, + use_period_chooser = true %} + {% include "accounting/report/include/action-buttons.html" %} + {% endwith %}
{% with txn_types = report.txn_types %} @@ -73,11 +44,10 @@ First written: 2023/3/4 {% endwith %}
- {% include "accounting/report/include/report-chooser.html" %} - + {% with use_report_chooser = true, + use_period_chooser = true %} + {% include "accounting/report/include/action-buttons.html" %} + {% endwith %}
{% with period = report.period, period_chooser = report.period_chooser %} diff --git a/src/accounting/templates/accounting/report/ledger.html b/src/accounting/templates/accounting/report/ledger.html index dfdbbe3..fbda8b3 100644 --- a/src/accounting/templates/accounting/report/ledger.html +++ b/src/accounting/templates/accounting/report/ledger.html @@ -32,56 +32,13 @@ First written: 2023/3/5 {% block content %}
- {% if accounting_can_edit() %} -
- - -
- {% endif %} - {% include "accounting/report/include/report-chooser.html" %} - {% include "accounting/report/include/currency-chooser.html" %} -
- - -
- - - - {{ A_("Download") }} - + {% with use_add_new = true, + use_report_chooser = true, + use_currency_chooser = true, + use_account_chooser = true, + use_period_chooser = true %} + {% include "accounting/report/include/action-buttons.html" %} + {% endwith %}
{% with txn_types = report.txn_types %} @@ -89,26 +46,12 @@ First written: 2023/3/5 {% endwith %}
- {% include "accounting/report/include/report-chooser.html" %} - {% include "accounting/report/include/currency-chooser.html" %} -
- - -
- + {% with use_report_chooser = true, + use_currency_chooser = true, + use_account_chooser = true, + use_period_chooser = true %} + {% include "accounting/report/include/action-buttons.html" %} + {% endwith %}
{% with period = report.period, period_chooser = report.period_chooser %} diff --git a/src/accounting/templates/accounting/report/search.html b/src/accounting/templates/accounting/report/search.html index ca832f3..f28f669 100644 --- a/src/accounting/templates/accounting/report/search.html +++ b/src/accounting/templates/accounting/report/search.html @@ -31,45 +31,13 @@ First written: 2023/3/8 {% block content %}
- {% if accounting_can_edit() %} -
- - -
- {% endif %} - {% include "accounting/report/include/report-chooser.html" %} - - - - {{ A_("Download") }} - + {% with use_add_new = true, + use_report_chooser = true, + use_search = true, + search_platform = "desktop", + search_aria_label = A_("Search for Desktop") %} + {% include "accounting/report/include/action-buttons.html" %} + {% endwith %}
{% with txn_types = report.txn_types %} @@ -77,16 +45,12 @@ First written: 2023/3/8 {% endwith %}
- {% include "accounting/report/include/report-chooser.html" %} - + {% with use_report_chooser = true, + use_search = true, + search_platform = "mobile", + search_aria_label = A_("Search for Mobile") %} + {% include "accounting/report/include/action-buttons.html" %} + {% endwith %}
{% include "accounting/report/include/search-modal.html" %} diff --git a/src/accounting/templates/accounting/report/trial-balance.html b/src/accounting/templates/accounting/report/trial-balance.html index 7084aaf..2c2aabb 100644 --- a/src/accounting/templates/accounting/report/trial-balance.html +++ b/src/accounting/templates/accounting/report/trial-balance.html @@ -31,41 +31,12 @@ First written: 2023/3/5 {% block content %}
- {% if accounting_can_edit() %} -
- - -
- {% endif %} - {% include "accounting/report/include/report-chooser.html" %} - {% include "accounting/report/include/currency-chooser.html" %} - - - - {{ A_("Download") }} - + {% with use_add_new = true, + use_report_chooser = true, + use_currency_chooser = true, + use_period_chooser = true %} + {% include "accounting/report/include/action-buttons.html" %} + {% endwith %}
{% with txn_types = report.txn_types %} @@ -73,12 +44,11 @@ First written: 2023/3/5 {% endwith %}
- {% include "accounting/report/include/report-chooser.html" %} - {% include "accounting/report/include/currency-chooser.html" %} - + {% with use_report_chooser = true, + use_currency_chooser = true, + use_period_chooser = true %} + {% include "accounting/report/include/action-buttons.html" %} + {% endwith %}
{% with period = report.period, period_chooser = report.period_chooser %}