Fixed the tables (again) for account and for index.

This commit is contained in:
James Cole
2014-11-14 09:07:13 +01:00
parent 96ab112b22
commit a58a560bbb
6 changed files with 112 additions and 20 deletions

View File

@@ -0,0 +1,37 @@
<table class="table table-bordered table-striped">
<tr>
<th>&nbsp;</th>
<th>Name</th>
<th>Current balance</th>
<th>Active</th>
<th>Last activity</th>
</tr>
@foreach($accounts as $account)
<tr>
<td>
<div class="btn-group btn-group-xs">
<a class="btn btn-default btn-xs" href="{{route('accounts.edit',$account->id)}}"><span class="glyphicon glyphicon-pencil"></span></a>
<a class="btn btn-danger btn-xs" href="{{route('accounts.delete',$account->id)}}"><span class="glyphicon glyphicon-trash"></span></a>
</div>
</td>
<td><a href="{{route('accounts.show',$account->id)}}">{{{$account->name}}}</a></td>
<td>{{mf($account->balance())}}</td>
<td>
@if($account->active)
<i class="fa fa-fw fa-check"></i>
@else
<i class="fa fa-fw fa-ban"></i>
@endif
</td>
<td>
<?php $active = $account->lastActionDate(); ?>
@if($active)
{{{$active->format('j F Y @ H:i')}}}
@else
<em>Never</em>
@endif
</td>
</tr>
@endforeach
</table>