From b3df1f3d26038728ca3a708214072e148281ab1b Mon Sep 17 00:00:00 2001
From: James Cole
Date: Thu, 23 Feb 2017 07:02:28 +0100
Subject: [PATCH] Move template around
---
resources/lang/en_US/firefly.php | 12 ++++++------
resources/views/accounts/index.twig | 2 +-
resources/views/budgets/index.twig | 6 +++++-
.../{empty/accounts.twig => partials/empty.twig} | 2 +-
4 files changed, 13 insertions(+), 9 deletions(-)
rename resources/views/{empty/accounts.twig => partials/empty.twig} (89%)
diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php
index aceb221eac..4cd34fb3eb 100644
--- a/resources/lang/en_US/firefly.php
+++ b/resources/lang/en_US/firefly.php
@@ -974,12 +974,12 @@ return [
'empty_accounts_imperative_asset' => 'To start using Firefly III you must create at least one asset account. Let\'s do so now:',
'empty_accounts_create_asset' => 'Create an asset account',
'empty_accounts_title_expense' => 'Let\'s create an expense account!',
- 'empty_accounts_intro_expense' => '',
- 'empty_accounts_imperative_expense' => '',
- 'empty_accounts_create_expense' => '',
+ 'empty_accounts_intro_expense' => 'You have no expense accounts yet. Expense accounts are the places where you spend money, such as shops and supermarkets.',
+ 'empty_accounts_imperative_expense' => 'Expense accounts are created automatically when you create transactions, but you can create one manually too, if you want.',
+ 'empty_accounts_create_expense' => 'Create an expense account',
'empty_accounts_title_revenue' => 'Let\'s create a revenue account!',
- 'empty_accounts_intro_revenue' => '',
- 'empty_accounts_imperative_revenue' => '',
- 'empty_accounts_create_revenue' => '',
+ 'empty_accounts_intro_revenue' => 'You have no revenue accounts yet. Revenue accounts are the places where you receive money from, such as your employer.',
+ 'empty_accounts_imperative_revenue' => 'Expense accounts are created automatically when you create transactions, but you can create one manually too, if you want.',
+ 'empty_accounts_create_revenue' => 'Create a revenue account',
];
diff --git a/resources/views/accounts/index.twig b/resources/views/accounts/index.twig
index 102627d313..e40e3984a3 100644
--- a/resources/views/accounts/index.twig
+++ b/resources/views/accounts/index.twig
@@ -35,7 +35,7 @@
{% else %}
- {% include 'empty.accounts' with {what: what} %}
+ {% include 'partials.empty' with {what: what, type: 'accounts',route: route('accounts.create', [what])} %}
{% endif %}
{% endblock %}
diff --git a/resources/views/budgets/index.twig b/resources/views/budgets/index.twig
index f1aa8a889a..9bdd4da8f4 100644
--- a/resources/views/budgets/index.twig
+++ b/resources/views/budgets/index.twig
@@ -71,7 +71,7 @@
-
+ {% if budgets.count > 0 and inactive.count > 0 %}
+ {% endif %}
+ {% if budgets.count == 0 and inactive.count == 0 %}
+ {% include 'empty.budgets' %}
+ {% endif %}
{% for budget in budgets %}
diff --git a/resources/views/empty/accounts.twig b/resources/views/partials/empty.twig
similarity index 89%
rename from resources/views/empty/accounts.twig
rename to resources/views/partials/empty.twig
index 1f027086ac..51155d22ec 100644
--- a/resources/views/empty/accounts.twig
+++ b/resources/views/partials/empty.twig
@@ -14,7 +14,7 @@
- {{ ('empty_accounts_create_'~what)|_ }}
+ {{ ('empty_accounts_create_'~what)|_ }}