More extensions and views. First home view is semi-complete, time to write some tests again.

This commit is contained in:
James Cole
2014-07-06 21:07:52 +02:00
parent 4192f2bc8f
commit 2f5afc80a3
14 changed files with 206 additions and 51 deletions

View File

@@ -32,9 +32,11 @@
</p>
</div>
@else
<!-- ACCOUNTS -->
<div class="row" style="border-top:1px #eee solid;">
@foreach($accounts as $index => $account)
<div class="col-lg-6">
<h4>{{{$account->name}}} chart</h4>
<div id="chart_{{{$account->id}}}" data-id="{{{$account->id}}}" class="homeChart" data-title="{{{$account->name}}}"></div>
<p>
Go to <a href="#" title="Overview for {{{$account->name}}}">{{{$account->name}}}</a>
@@ -42,11 +44,23 @@
</div>
@if($index % 2 == 1)
</div><div class="row" style="border-top:1px #eee solid;">
</div><div class="row">
@endif
@endforeach
</div>
<!-- TRANSACTIONS -->
<div class="row">
@foreach($accounts as $index => $account)
<div class="col-lg-6">
<h4>{{$account->name}}</h4>
@include('transactions.journals',['journals' => $account->transactionList])
</div>
@if($index % 2 == 1)
</div><div class="row" style="border-top:1px #eee solid;">
@endif
@endforeach
</div>
@endif

View File

@@ -0,0 +1,34 @@
<table class="table table-bordered table-striped table-condensed">
<tr>
<th>&nbsp;</th>
<th>Description</th>
<th>Date</th>
<th>Amount</th>
</tr>
@foreach($account->transactionList as $journal)
<tr>
<td>
@if($journal->transactiontype->type == 'Withdrawal')
<span class="glyphicon glyphicon-arrow-left" title="Withdrawal"></span>
@endif
@if($journal->transactiontype->type == 'Deposit')
<span class="glyphicon glyphicon-arrow-right" title="Deposit"></span>
@endif
@if($journal->transactiontype->type == 'Transfer')
<span class="glyphicon glyphicon-resize-full" title="Transfer"></span>
@endif
</td>
<td><a href="#">{{{$journal->description}}}</a></td>
<td>{{$journal->date->format('jS M Y')}}</td>
<td>
@foreach($journal->transactions as $t)
@if($t->account_id == $account->id)
{{mf($t->amount)}}
@endif
@endforeach
</td>
</tr>
@endforeach
</table>