Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
First code for #588
James Coled88246f2f6ec
diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.phpindex b0d2efd35f..aceb221eac 100644--- a/resources/lang/en_US/firefly.php+++ b/resources/lang/en_US/firefly.php@@ -967,4 +967,19 @@ return [// sandstorm.io errors and messages:'sandstorm_not_available' => 'This function is not available when you are using Firefly III within a Sandstorm.io environment.',++ // empty lists? instructions:+ 'empty_accounts_title_asset' => 'Let\'s create an asset account!',+ 'empty_accounts_intro_asset' => 'You have no asset accounts yet. Asset accounts are your main accounts: your checking account, savings account, shared account or even your credit card.',+ '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_title_revenue' => 'Let\'s create a revenue account!',+ 'empty_accounts_intro_revenue' => '',+ 'empty_accounts_imperative_revenue' => '',+ 'empty_accounts_create_revenue' => '',+];diff --git a/resources/views/accounts/index.twig b/resources/views/accounts/index.twigindex 84f653aacb..102627d313 100644--- a/resources/views/accounts/index.twig+++ b/resources/views/accounts/index.twig@@ -5,32 +5,38 @@{% endblock %}{% block content %}-- <div class="row">- <div class="col-lg-12 col-md-12 col-sm-12">- <div class="box" id="account-index-{{ what }}">- <div class="box-header with-border">- <h3 class="box-title">{{ subTitle }}</h3>-- <!-- ACTIONS MENU -->- <div class="box-tools pull-right">- <div class="btn-group">- <button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><i class="fa fa-ellipsis-v"></i></button>- <ul class="dropdown-menu" role="menu">- <li><a href="{{ route('accounts.create', what) }}"><i class="fa fa-plus fa-fw"></i> {{ ('make_new_' ~ what ~ '_account')|_ }}- </a></li>- </ul>+ {% if accounts.count > 0 %}+ <div class="row">+ <div class="col-lg-12 col-md-12 col-sm-12">+ <div class="box" id="account-index-{{ what }}">+ <div class="box-header with-border">+ <h3 class="box-title">{{ subTitle }}</h3>++ <!-- ACTIONS MENU -->+ <div class="box-tools pull-right">+ <div class="btn-group">+ <button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><i class="fa fa-ellipsis-v"></i></button>+ <ul class="dropdown-menu" role="menu">+ <li><a href="{{ route('accounts.create', what) }}"><i+ class="fa fa-plus fa-fw"></i> {{ ('make_new_' ~ what ~ '_account')|_ }}+ </a></li>+ </ul>+ </div></div>++</div>+ <div class="box-body table-responsive no-padding">+ {% include 'list.accounts' %}+ </div></div>- <div class="box-body table-responsive no-padding">- {% include 'list.accounts' %}- </div></div></div>- </div>+ {% else %}+ {% include 'empty.accounts' with {what: what} %}+ {% endif %}{% endblock %}{% block styles %}diff --git a/resources/views/empty/accounts.twig b/resources/views/empty/accounts.twignew file mode 100644index 0000000000..1f027086ac--- /dev/null+++ b/resources/views/empty/accounts.twig@@ -0,0 +1,23 @@+<div class="row">+ <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 col-lg-offset-3 col-md-offset-3">+ <div class="box box-success">+ <div class="box-header with-border">+ <h3 class="box-title">{{ ('empty_accounts_title_'~what)|_ }}</h3>+ </div>++ <div class="box-body table-responsive">+ <p>+ {{ ('empty_accounts_intro_'~what)|_ }}+ </p>+ <p>+ {{ ('empty_accounts_imperative_'~what)|_ }}++ </p>+ <p style="text-align: center;">+ <a class="btn btn-lg btn-success" href="{{ route('accounts.create', ['asset']) }}">{{ ('empty_accounts_create_'~what)|_ }}</a>+ </p>+ </div>++ </div>+ </div>+</div>\ No newline at end of file