From c56f937521085356a11b5feffa55e72a19e6fb2b Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 20 Nov 2016 17:36:11 +0100 Subject: [PATCH] Improved sorting in various views. --- resources/views/admin/users/index.twig | 2 +- resources/views/list/accounts.twig | 6 +++--- resources/views/list/bills.twig | 16 ++++++++-------- resources/views/list/categories.twig | 10 +++++----- resources/views/reports/category/month.twig | 16 ++++++++-------- resources/views/reports/default/year.twig | 4 ++++ resources/views/reports/partials/accounts.twig | 10 +++++----- resources/views/reports/partials/bills.twig | 10 +++++----- .../views/reports/partials/budget-period.twig | 8 ++++---- resources/views/rules/index.twig | 2 +- resources/views/search/index.twig | 15 ++++++++++----- resources/views/search/partials/accounts.twig | 12 +++++++----- resources/views/search/partials/budgets.twig | 6 ++++-- resources/views/search/partials/categories.twig | 6 ++++-- resources/views/search/partials/tags.twig | 8 +++++--- .../views/search/partials/transactions.twig | 16 ++++++++-------- 16 files changed, 82 insertions(+), 65 deletions(-) diff --git a/resources/views/admin/users/index.twig b/resources/views/admin/users/index.twig index f71843647c..af0a04df9f 100644 --- a/resources/views/admin/users/index.twig +++ b/resources/views/admin/users/index.twig @@ -37,7 +37,7 @@ #{{ user.id }} {{ user.email }} - + {{ user.created_at.formatLocalized(monthAndDayFormat) }} {{ user.created_at.format('H:i') }} diff --git a/resources/views/list/accounts.twig b/resources/views/list/accounts.twig index 995ae450ee..2f0eb6544f 100644 --- a/resources/views/list/accounts.twig +++ b/resources/views/list/accounts.twig @@ -22,7 +22,7 @@ - {{ account.name }} + {{ account.name }} {% if what == "asset" %} {% for entry in account.accountmeta %} @@ -42,11 +42,11 @@ {% endif %} {% if account.lastActivityDate %} - + {{ account.lastActivityDate.formatLocalized(monthAndDayFormat) }} {% else %} - + {{ 'never'|_ }} {% endif %} diff --git a/resources/views/list/bills.twig b/resources/views/list/bills.twig index 02ae6daedb..2bf6f5b128 100644 --- a/resources/views/list/bills.twig +++ b/resources/views/list/bills.twig @@ -21,7 +21,7 @@ - + {{ entry.name }} @@ -37,33 +37,33 @@ {% if entry.paidDates.count() == 0 and entry.payDates.count() == 0 and entry.active %} - + {{ 'not_expected_period'|_ }} - + {{ entry.nextExpectedMatch.formatLocalized(monthAndDayFormat) }} {% endif %} {% if entry.paidDates.count() == 0 and entry.payDates.count() > 0 and entry.active %} - + {{ 'not_or_not_yet'|_ }} - + {{ entry.nextExpectedMatch.formatLocalized(monthAndDayFormat) }} {% endif %} {% if entry.paidDates.count() == entry.payDates.count() and entry.payDates.count() > 0 and entry.active %} - + {% for date in entry.paidDates %} {{ date.formatLocalized(monthAndDayFormat) }}
{% endfor %} - + {{ entry.nextExpectedMatch.formatLocalized(monthAndDayFormat) }} {% endif %} {% if not entry.active %} - + ~ diff --git a/resources/views/list/categories.twig b/resources/views/list/categories.twig index 16deef6773..5e97abe7e4 100644 --- a/resources/views/list/categories.twig +++ b/resources/views/list/categories.twig @@ -2,8 +2,8 @@   - {{ trans('list.name') }} - {{ trans('list.lastActivity') }} + {{ trans('list.name') }} + {{ trans('list.lastActivity') }} @@ -20,15 +20,15 @@ - + {{ category.name }} {% if category.lastActivity.year != "1900" %} - + {{ category.lastActivity.formatLocalized(monthAndDayFormat) }} {% else %} - + {{ 'never'|_ }} {% endif %} diff --git a/resources/views/reports/category/month.twig b/resources/views/reports/category/month.twig index 7e860d70c5..49556850ac 100644 --- a/resources/views/reports/category/month.twig +++ b/resources/views/reports/category/month.twig @@ -276,13 +276,13 @@ {{ row.name }} - + {{ row.average|formatAmount }} - + {{ row.sum|formatAmount }} - + {{ row.count }} @@ -304,9 +304,9 @@ {{ 'description'|_ }} - {{ 'date'|_ }} + {{ 'date'|_ }} {{ 'account'|_ }} - {{ 'amount'|_ }} + {{ 'amount'|_ }} @@ -325,15 +325,15 @@ {% endif %} - + {{ row.date.formatLocalized(monthAndDayFormat) }} - + {{ row.opposing_account_name }} - + {{ row.transaction_amount|formatAmount }} diff --git a/resources/views/reports/default/year.twig b/resources/views/reports/default/year.twig index de0a4df7bb..8ef09d32af 100644 --- a/resources/views/reports/default/year.twig +++ b/resources/views/reports/default/year.twig @@ -115,6 +115,7 @@ {% endblock %} {% block scripts %} + @@ -140,3 +141,6 @@ {% endblock %} +{% block styles %} + +{% endblock %} \ No newline at end of file diff --git a/resources/views/reports/partials/accounts.twig b/resources/views/reports/partials/accounts.twig index cbdeaa68f5..ef3ad787e7 100644 --- a/resources/views/reports/partials/accounts.twig +++ b/resources/views/reports/partials/accounts.twig @@ -1,16 +1,16 @@ - - - - + + + + {% for account in accountReport.getAccounts %} - diff --git a/resources/views/reports/partials/bills.twig b/resources/views/reports/partials/bills.twig index 22c84668f3..fe234655ef 100644 --- a/resources/views/reports/partials/bills.twig +++ b/resources/views/reports/partials/bills.twig @@ -6,11 +6,11 @@
{{ 'name'|_ }}{{ 'difference'|_ }}{{ 'name'|_ }}{{ 'difference'|_ }}
+ {{ account.name }}
- - - - - + + + + + diff --git a/resources/views/reports/partials/budget-period.twig b/resources/views/reports/partials/budget-period.twig index e801a6e1b6..53308f4606 100644 --- a/resources/views/reports/partials/budget-period.twig +++ b/resources/views/reports/partials/budget-period.twig @@ -1,17 +1,17 @@
{{ trans('form.name') }}{{ trans('form.amount') }}{{ trans('form.under') }}{{ trans('form.name') }}{{ trans('form.amount') }}{{ trans('form.under') }}
- + {% for period in periods %} - + {% endfor %} - + {% for id, info in budgets %} - {% for amount in info.entries %} diff --git a/resources/views/rules/index.twig b/resources/views/rules/index.twig index 86e530da0f..f126463521 100644 --- a/resources/views/rules/index.twig +++ b/resources/views/rules/index.twig @@ -64,7 +64,7 @@

{% if ruleGroup.rules.count > 0 %} -
{{ 'budget'|_ }}{{ 'budget'|_ }}{{ period }}{{ period }}{{ 'sum'|_ }}{{ 'sum'|_ }}
+ {{ info.name }}
+
diff --git a/resources/views/search/index.twig b/resources/views/search/index.twig index 88107c52d6..e2e3a76ffe 100644 --- a/resources/views/search/index.twig +++ b/resources/views/search/index.twig @@ -104,8 +104,13 @@ {% endblock %} - {% block scripts %} - - {% endblock %} +{% block scripts %} + + +{% endblock %} + +{% block styles %} + +{% endblock %} \ No newline at end of file diff --git a/resources/views/search/partials/accounts.twig b/resources/views/search/partials/accounts.twig index e21b443d59..45c4a2466a 100644 --- a/resources/views/search/partials/accounts.twig +++ b/resources/views/search/partials/accounts.twig @@ -2,10 +2,10 @@ - - - - + + + + @@ -17,7 +17,9 @@ - + - + @@ -14,7 +14,9 @@ - + {% endfor %} diff --git a/resources/views/search/partials/categories.twig b/resources/views/search/partials/categories.twig index 4176de3240..7dfef5da15 100644 --- a/resources/views/search/partials/categories.twig +++ b/resources/views/search/partials/categories.twig @@ -2,7 +2,7 @@ - + @@ -14,7 +14,9 @@ - + {% endfor %} diff --git a/resources/views/search/partials/tags.twig b/resources/views/search/partials/tags.twig index c4b3e21a2c..919fa19daf 100644 --- a/resources/views/search/partials/tags.twig +++ b/resources/views/search/partials/tags.twig @@ -2,8 +2,8 @@ - - + + @@ -15,7 +15,9 @@ - + {% endfor %} diff --git a/resources/views/search/partials/transactions.twig b/resources/views/search/partials/transactions.twig index c20da1ff07..279a336a3c 100644 --- a/resources/views/search/partials/transactions.twig +++ b/resources/views/search/partials/transactions.twig @@ -1,17 +1,17 @@ {{ journals.render|raw }} -
{{ 'rule_name'|_ }}
{{ trans('list.name') }}{{ trans('list.name') }}
{{ account.name }} + {{ account.name }} + {{ trans('firefly.'~account.accountType.type) }}
{{ trans('list.name') }}{{ trans('list.name') }}
{{ budget.name }} + {{ budget.name }} +
{{ trans('list.name') }}{{ trans('list.name') }}
{{ category.name }} + {{ category.name }} +
{{ trans('list.name') }}{{ trans('list.type') }}{{ trans('list.name') }}{{ trans('list.type') }}
{{ tag.tag }} + {{ tag.tag }}< + /td> {{ ('tag'~tag.tagMode)|_ }}
+
- - - - + + + + {% for transaction in transactions %} - + - -
{{ trans('list.description') }}{{ trans('list.amount') }}{{ trans('list.description') }}{{ trans('list.amount') }}
+ {{ formatAmountWithCode(transaction.transaction_amount, transaction.transaction_currency_code) }} @@ -47,7 +47,7 @@