From 526f565ea70ebf7b88390a6149199ba0ffeb0521 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 20 Jun 2015 21:55:55 +0200 Subject: [PATCH] Updated stuff from the control list. --- public/js/transactions.js | 2 +- resources/twig/layout/default.twig | 2 + resources/twig/list/journals.twig | 2 +- resources/twig/partials/control-bar.twig | 6 +-- resources/twig/transactions/create.twig | 17 ++++---- resources/twig/transactions/delete.twig | 27 +++++++------ resources/twig/transactions/edit.twig | 13 ++++--- resources/twig/transactions/index.twig | 6 ++- resources/twig/transactions/show.twig | 49 ++++++++++-------------- 9 files changed, 58 insertions(+), 66 deletions(-) diff --git a/public/js/transactions.js b/public/js/transactions.js index bb70ee82c8..22d5bdc545 100644 --- a/public/js/transactions.js +++ b/public/js/transactions.js @@ -53,7 +53,7 @@ function updateLayout() { $('#subTitle').text(title[what]); $('.breadcrumb .active').text(breadcrumbs[what]); $('.breadcrumb li:nth-child(2)').html('' + middleCrumbName[what] + ''); - $('#transaction-btn').html(' ' + button[what]); + $('#transaction-btn').text(button[what]); } function updateForm() { diff --git a/resources/twig/layout/default.twig b/resources/twig/layout/default.twig index 60ea988fe3..d4cf46274b 100644 --- a/resources/twig/layout/default.twig +++ b/resources/twig/layout/default.twig @@ -27,6 +27,8 @@ + {% block styles %}{% endblock %} + {{ ExpandedForm.select('piggy_bank_id',piggies) }} + @@ -82,19 +83,15 @@
{{ ExpandedForm.optionsList('create','transaction') }}
+ -
-
-

- -

-
-
- + {{ Form.close|raw }} {% endblock %} {% block scripts %} diff --git a/resources/twig/transactions/delete.twig b/resources/twig/transactions/delete.twig index 25fd320873..b1c2f387ae 100644 --- a/resources/twig/transactions/delete.twig +++ b/resources/twig/transactions/delete.twig @@ -21,23 +21,22 @@

{{ trans('form.journal_areYouSure', {'description': journal.description}) }}

-

- - {% if journal.transactiontype.type == 'Withdrawal' %} - {{ trans('form.cancel') }} - {% endif %} - {% if journal.transactiontype.type == 'Deposit' %} - {{ trans('form.cancel') }} - {% endif %} - {% if journal.transactiontype.type == 'Transfer' %} - {{ trans('form.cancel') }} - {% endif %} -

+ + - - +{{ Form.close|raw }} {% endblock %} diff --git a/resources/twig/transactions/edit.twig b/resources/twig/transactions/edit.twig index ab0d2a0dca..534f7b6bd0 100644 --- a/resources/twig/transactions/edit.twig +++ b/resources/twig/transactions/edit.twig @@ -14,7 +14,7 @@
- {{ 'mandatoryFields'|_ }} +

{{ 'mandatoryFields'|_ }}

@@ -53,7 +53,7 @@
- {{ 'optionalFields'|_ }} +

{{ 'optionalFields'|_ }}

@@ -78,11 +78,14 @@
- {{ 'options'|_ }} +

{{ 'options'|_ }}

{{ ExpandedForm.optionsList('update','transaction') }}
+
@@ -90,9 +93,7 @@

- +

diff --git a/resources/twig/transactions/index.twig b/resources/twig/transactions/index.twig index 5394682fe7..407d6e84ea 100644 --- a/resources/twig/transactions/index.twig +++ b/resources/twig/transactions/index.twig @@ -9,9 +9,11 @@
- {{ subTitle }} +

{{ subTitle }}

+
+
+ {% include 'list.journals' %}
- {% include 'list.journals' %}
diff --git a/resources/twig/transactions/show.twig b/resources/twig/transactions/show.twig index ba48fbde6b..3d1184e415 100644 --- a/resources/twig/transactions/show.twig +++ b/resources/twig/transactions/show.twig @@ -9,10 +9,10 @@
- - Metadata +

Metadata

- +
+
@@ -66,6 +66,13 @@ {% endif %}
{{ trans('list.date') }} {{ journal.date.formatLocalized(monthAndDayFormat) }}
+
+
{% if journal.piggyBankEvents|length > 0 %} @@ -84,25 +91,17 @@ {% for t in journal.transactions %}
- {% if t.account.accounttype.type == 'Asset account' %} - - {% endif %} - {% if t.account.accounttype.type == 'Default account' %} - - {% endif %} - {% if t.account.accounttype.type == 'Expense account' %} - - {% endif %} - {% if t.account.accounttype.type == 'Beneficiary account' %} - - {% endif %} - - {% if t.account.accounttype.type == 'Revenue account' %} - - {% endif %} - {{ t.account.name }} ({{ t.account.accounttype.type|_ }}) +

{{ t.account.name }}

- +
+ + + + + + + + @@ -123,14 +122,6 @@ - - {% endblock %} {% block scripts %}
{{ 'account'|_ }}{{ t.account.name }}
{{ 'account_type'|_ }}{{ t.account.accounttype.type|_ }}
{{ 'amount'|_ }} {{ t|formatTransaction }}