All kinds of new stuff. Started with perfecting the account controller. [skip ci]

This commit is contained in:
James Cole
2014-07-26 18:53:41 +02:00
parent d088b2c558
commit b782bb8d93
75 changed files with 1075 additions and 8362 deletions

View File

@@ -17,7 +17,6 @@
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
@if($total > 0)
<h3>Your accounts</h3>
<p style="width:50%;" class="text-info">
These are your personal accounts.
@@ -45,9 +44,6 @@
personal accounts) it gets added or drawn from this account.
</p>
@include('accounts.list',['accounts' => $accounts['cash']])
@else
<a href="{{route('accounts.create')}}" class="btn btn-lg btn-info">Create a new account</a>
@endif
</div>
</div>

View File

@@ -16,6 +16,12 @@
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<h4>Transactions</h4>
</div>
</div>
@stop
@section('scripts')
<script type="text/javascript">

View File

@@ -95,12 +95,8 @@
@stop
@section('scripts')
<script src="assets/javascript/highcharts.js"></script>
<script src="assets/javascript/highcharts-more.js"></script>
<script src="assets/javascript/highslide-full.min.js"></script>
<script src="assets/javascript/highslide.config.js"></script>
<script src="assets/javascript/index.js"></script>
<?php echo javascript_include_tag('index'); ?>
@stop
@section('styles')
<link href="assets/css/highslide.css" rel="stylesheet">
<?php echo stylesheet_link_tag('index'); ?>
@stop

View File

@@ -7,16 +7,23 @@
<base href="{{URL::route('index')}}/">
<title>Firefly</title>
<?php echo stylesheet_link_tag(); ?>
@yield('styles')
<!-- Bootstrap -->
<!--
<link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/css/site.css" rel="stylesheet">
@yield('styles')
-->
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<!--
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
-->
<![endif]-->
</head>
<body>
@@ -27,10 +34,12 @@
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<!--
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/javascript/bootstrap3-typeahead.min.js"></script>
-->
<?php echo javascript_include_tag(); ?>
@yield('scripts')
</body>
</html>

View File

@@ -7,8 +7,7 @@
<base href="{{URL::route('index')}}/">
<title>Firefly</title>
<!-- Bootstrap -->
<link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<?php echo stylesheet_link_tag(); ?>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->

View File

@@ -1,68 +1,6 @@
@extends('layouts.default')
@section('content')
<table class="table">
<tr>
<th></th>
</tr>
@foreach($transactions 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
@if($journal->transactiontype->type == 'Opening balance')
<span class="glyphicon glyphicon-ban-circle" title="Opening balance"></span>
@endif
</td>
<td>
bud / cat
</td>
<td><a href="#" title="{{{$journal->description}}}">{{{$journal->description}}}</a></td>
<td>
@if($journal->transactiontype->type == 'Withdrawal')
<span class="text-danger">{{mf($journal->transactions[1]->amount,false)}}</span>
@endif
@if($journal->transactiontype->type == 'Deposit')
<span class="text-success">{{mf($journal->transactions[1]->amount,false)}}</span>
@endif
@if($journal->transactiontype->type == 'Transfer')
<span class="text-info">{{mf($journal->transactions[1]->amount,false)}}</span>
@endif
</td>
<td>
@if($journal->transactions[0]->account->accounttype->description == 'Cash account')
<span class="text-success">(cash)</span>
@else
<a href="#">{{{$journal->transactions[0]->account->name}}}</a>
@endif
</td>
<td>
@if($journal->transactions[1]->account->accounttype->description == 'Cash account')
<span class="text-success">(cash)</span>
@else
<a href="#">{{{$journal->transactions[1]->account->name}}}</a>
@endif
</td>
<td>
<div class="btn-group btn-group-xs">
<a href="{{route('transactions.edit',$journal->id)}}" class="btn btn-default">
<span class="glyphicon glyphicon-pencil"></span>
<a href="{{route('transactions.delete',$journal->id)}}" class="btn btn-danger">
<span class="glyphicon glyphicon-trash"></span>
</a>
</div>
</td>
</tr>
@endforeach
</table>
{{$transactions->links()}}
Bla bla TODO
@stop

View File

@@ -0,0 +1,63 @@
<table class="table">
<tr>
<th></th>
</tr>
@foreach($journals 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
@if($journal->transactiontype->type == 'Opening balance')
<span class="glyphicon glyphicon-ban-circle" title="Opening balance"></span>
@endif
</td>
<td>
bud / cat
</td>
<td><a href="#" title="{{{$journal->description}}}">{{{$journal->description}}}</a></td>
<td>
@if($journal->transactiontype->type == 'Withdrawal')
<span class="text-danger">{{mf($journal->transactions[1]->amount,false)}}</span>
@endif
@if($journal->transactiontype->type == 'Deposit')
<span class="text-success">{{mf($journal->transactions[1]->amount,false)}}</span>
@endif
@if($journal->transactiontype->type == 'Transfer')
<span class="text-info">{{mf($journal->transactions[1]->amount,false)}}</span>
@endif
</td>
<td>
@if($journal->transactions[0]->account->accounttype->description == 'Cash account')
<span class="text-success">(cash)</span>
@else
<a href="#">{{{$journal->transactions[0]->account->name}}}</a>
@endif
</td>
<td>
@if($journal->transactions[1]->account->accounttype->description == 'Cash account')
<span class="text-success">(cash)</span>
@else
<a href="#">{{{$journal->transactions[1]->account->name}}}</a>
@endif
</td>
<td>
<div class="btn-group btn-group-xs">
<a href="{{route('transactions.edit',$journal->id)}}" class="btn btn-default">
<span class="glyphicon glyphicon-pencil"></span>
<a href="{{route('transactions.delete',$journal->id)}}" class="btn btn-danger">
<span class="glyphicon glyphicon-trash"></span>
</a>
</div>
</td>
</tr>
@endforeach
</table>
{{$journals->links()}}