2015-05-01 11:44:49 -05:00
|
|
|
{% extends "./layout/default.twig" %}
|
|
|
|
{% block content %}
|
|
|
|
{{ Breadcrumbs.renderIfExists }}
|
|
|
|
|
2015-06-01 11:13:54 -05:00
|
|
|
{% include 'partials/boxes.twig' %}
|
2015-05-01 11:44:49 -05:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-8 col-md-12 col-sm-12">
|
|
|
|
<!-- ACCOUNTS -->
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
2015-05-14 05:10:42 -05:00
|
|
|
<i class="fa fa-credit-card fa-fw"></i> <a href="#">{{ 'yourAccounts'|_ }}</a>
|
2015-05-01 11:44:49 -05:00
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<div id="accounts-chart"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- BUDGETS -->
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
2015-05-14 05:10:42 -05:00
|
|
|
<i class="fa fa-tasks fa-fw"></i> <a href="{{route('budgets.index')}}">{{ 'budgetsAndSpending'|_ }}</a>
|
2015-05-01 11:44:49 -05:00
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<div id="budgets-chart"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- CATEGORIES -->
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
2015-05-14 05:10:42 -05:00
|
|
|
<i class="fa fa-bar-chart fa-fw"></i> <a href="{{route('categories.index')}}">{{ 'categories'|_ }}</a>
|
2015-05-01 11:44:49 -05:00
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<div id="categories-chart"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- SAVINGS -->
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
2015-05-14 05:10:42 -05:00
|
|
|
<i class="fa fa-line-chart"></i> {{ 'savings'|_ }}
|
2015-05-01 11:44:49 -05:00
|
|
|
<span class="pull-right">{{ savingsTotal|formatAmount }}</span>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
{% if savings|length == 0 %}
|
2015-05-14 05:10:42 -05:00
|
|
|
<p class="small"><em>{{ 'markAsSavingsToContinue'|_ }}</em></p>
|
2015-05-01 11:44:49 -05:00
|
|
|
{% else %}
|
|
|
|
{% for account in savings %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"><h5><a href="{{ route('accounts.show') }}">{{ account.name }}</a></h5></div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<!-- start -->
|
|
|
|
<div class="col-lg-2 col-md-2 col-sm-3 col-xs-4">{{ account.startBalance|formatAmount }}</div>
|
|
|
|
<!-- bar -->
|
|
|
|
<div class="col-lg-8 col-md-8 col-sm-6 col-xs-4">
|
|
|
|
{% if account.difference < 0 %}
|
|
|
|
<!-- green (100-pct), then red (pct) -->
|
|
|
|
<div class="progress">
|
|
|
|
<div class="progress-bar progress-bar-success progress-bar-striped" style="width: {{ 100 - account.percentage }}%">
|
|
|
|
{% if account.percentage <= 50 %}
|
2015-05-03 03:00:03 -05:00
|
|
|
{{account.difference|formatAmountPlain}}
|
2015-05-01 11:44:49 -05:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="progress-bar progress-bar-danger progress-bar-striped" style="width: {{ account.percentage }}%">
|
|
|
|
{% if account.percentage > 50 %}
|
2015-05-03 03:00:03 -05:00
|
|
|
{{account.difference|formatAmountPlain}}
|
2015-05-01 11:44:49 -05:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<!-- green (pct), then blue (100-pct) -->
|
|
|
|
<div class="progress">
|
|
|
|
<div class="progress-bar progress-bar-success progress-bar-striped" style="width: {{account.percentage}}%">
|
|
|
|
{% if account.percentage <= 50 %}
|
2015-05-03 03:00:03 -05:00
|
|
|
{{account.difference|formatAmountPlain}}
|
|
|
|
{{account.difference|formatAmountPlain}}
|
2015-05-01 11:44:49 -05:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="progress-bar progress-bar-info progress-bar-striped" style="width: {{100 - account.percentage}}%">
|
|
|
|
{% if account.percentage > 50 %}
|
2015-05-03 03:00:03 -05:00
|
|
|
{{account.difference|formatAmountPlain}}
|
2015-05-01 11:44:49 -05:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- end -->
|
|
|
|
<div class="col-lg-2 col-md-2 col-sm-3 col-xs-4">{{ account.endBalance|formatAmount }}</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- PIGGY BANKS -->
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
2015-05-14 05:10:42 -05:00
|
|
|
<i class="fa fa-sort-amount-asc fa-fw"></i> {{ 'piggyBanks'|_ }}
|
2015-05-01 11:44:49 -05:00
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
{% if piggyBankAccounts|length == 0%}
|
2015-05-14 05:10:42 -05:00
|
|
|
<p class="small"><em>{{ 'createPiggyToContinue'|_ }}</em></p>
|
2015-05-01 11:44:49 -05:00
|
|
|
{% else %}
|
|
|
|
{% for account in piggyBankAccounts %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"><h5><a href="{{route('accounts.show')}}">{{account.name}}</a></h5></div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<!-- start -->
|
|
|
|
<div class="col-lg-2 col-md-2 col-sm-3 col-xs-4">{{ account.startBalance|formatAmount }}</div>
|
|
|
|
<!-- bar -->
|
|
|
|
<div class="col-lg-8 col-md-8 col-sm-6 col-xs-4">
|
|
|
|
|
|
|
|
<div class="progress">
|
|
|
|
<div class="progress-bar progress-bar-info progress-bar-striped" style="width: {{100 - account.percentage}}%">
|
|
|
|
{% if account.percentage <= 50 %}
|
2015-05-14 05:10:42 -05:00
|
|
|
{{account.piggyBalance|formatAmountPlain}} {{ 'divided'|_}}
|
2015-05-01 11:44:49 -05:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="progress-bar progress-bar-success progress-bar-striped" style="width: {{account.percentage}}%">
|
|
|
|
{% if account.percentage > 50 %}
|
2015-05-14 05:10:42 -05:00
|
|
|
{{account.difference|formatAmountPlain}} {{ 'toDivide'|_}}
|
2015-05-01 11:44:49 -05:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- end -->
|
|
|
|
<div class="col-lg-2 col-md-2 col-sm-3 col-xs-4">{{ account.piggyBalance|formatAmount }}</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-4 col-md-6 col-sm-12">
|
|
|
|
|
|
|
|
<!-- REMINDERS -->
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
2015-05-14 05:10:42 -05:00
|
|
|
<i class="fa fa-calendar-o"></i> <a href="{{route('bills.index')}}">{{ 'bills'|_ }}</a>
|
2015-05-01 11:44:49 -05:00
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<div id="bills-chart"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- TRANSACTIONS -->
|
|
|
|
{% for data in transactions %}
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<i class="fa fa-money fa-fw"></i>
|
2015-05-02 15:50:40 -05:00
|
|
|
<a href="{{route('accounts.show',data[1].id)}}">{{data[1].name}}</a> ({{ (data[1]|balance)|formatAmount }})
|
2015-05-01 11:44:49 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ACTIONS MENU -->
|
|
|
|
<div class="pull-right">
|
|
|
|
<div class="btn-group">
|
|
|
|
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
|
2015-05-14 03:26:15 -05:00
|
|
|
{{ 'actions'|_ }}
|
2015-05-01 11:44:49 -05:00
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu pull-right" role="menu">
|
2015-05-14 05:10:42 -05:00
|
|
|
<li><a href="{{route('transactions.create','withdrawal')}}?account_id={{data[1].id}}"><i class="fa fa-long-arrow-left fa-fw"></i> {{ 'newWithdrawal'|_ }}</a></li>
|
|
|
|
<li><a href="{{route('transactions.create','deposit')}}?account_id={{data[1].id}}"><i class="fa fa-long-arrow-right fa-fw"></i> {{ 'newDeposit'|_ }}</a></li>
|
|
|
|
<li><a href="{{route('transactions.create','transfer')}}?account_from_id={{data[1].id}}"><i class="fa fa-fw fa-exchange"></i> {{ 'newTransfer'|_ }}</a></li>
|
2015-05-01 11:44:49 -05:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
|
|
|
|
{% include 'list/journals-tiny.twig' with {'transactions': data[0],'account': data[1]} %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
|
|
<!-- load the libraries and scripts necessary for Google Charts: -->
|
|
|
|
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
|
|
|
|
<script type="text/javascript" src="js/gcharts.options.js"></script>
|
|
|
|
<script type="text/javascript" src="js/gcharts.js"></script>
|
|
|
|
<script type="text/javascript" src="js/index.js"></script>
|
2015-05-05 05:51:57 -05:00
|
|
|
{% endblock %}
|