More code.

This commit is contained in:
James Cole
2015-02-25 21:19:06 +01:00
parent c0f96aa948
commit defad3d820
15 changed files with 821 additions and 9 deletions

View File

@@ -0,0 +1,103 @@
@extends('layouts.default')
@section('content')
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) !!}
<!-- form -->
{!! Form::open(['class' => 'form-horizontal','id' => 'preferences']) !!}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-credit-card fa-fw"></i> Home screen accounts
</div>
<div class="panel-body">
<p class="text-info">Which accounts should be displayed on the home page?</p>
@foreach($accounts as $account)
<div class="form-group">
<div class="col-sm-10">
<div class="checkbox">
<label>
@if(in_array($account->id,$frontPageAccounts->data) || count($frontPageAccounts->data) == 0)
<input type="checkbox" name="frontPageAccounts[]" value="{{$account->id}}" checked> {{{$account->name}}}
@else
<input type="checkbox" name="frontPageAccounts[]" value="{{$account->id}}"> {{{$account->name}}}
@endif
</label>
</div>
</div>
</div>
@endforeach
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-credit-card fa-fw"></i> Budget settings
</div>
<div class="panel-body">
<p class="text-info">
What's the maximum amount of money a budget envelope may contain?
</p>
{!! ExpandedForm::amount('budgetMaximum',$budgetMaximum,['label' => 'Budget maximum']) !!}
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-clock-o fa-fw"></i> Home view range
</div>
<div class="panel-body">
<p class="text-info">By default, Firefly will show you one month of data.</p>
<div class="radio">
<label>
<input type="radio" name="viewRange" value="1D" @if($viewRange == '1D') checked @endif>
One day
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="viewRange" value="1W" @if($viewRange == '1W') checked @endif>
One week
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="viewRange" value="1M" @if($viewRange == '1M') checked @endif>
One month
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="viewRange" value="3M" @if($viewRange == '3M') checked @endif>
Three months
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="viewRange" value="6M" @if($viewRange == '6M') checked @endif>
Six months
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="form-group">
<div class="col-sm-12">
<button type="submit" class="btn btn-success btn-lg">Save settings</button>
</div>
</div>
</div>
</div>
<!-- form close -->
{!! Form::close() !!}
@stop

View File

@@ -0,0 +1,54 @@
@extends('layouts.default')
@section('content')
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) !!}
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
Change your password
</div>
<div class="panel-body">
@if($errors->count() > 0)
<ul>
@foreach($errors->all() as $err)
<li class="text-danger">{{$err}}</li>
@endforeach
</ul>
@endif
{!! Form::open(['class' => 'form-horizontal','id' => 'change-password']) !!}
<div class="form-group">
<label for="inputOldPassword" class="col-sm-4 control-label">Old password</label>
<div class="col-sm-8">
<input type="password" class="form-control" id="inputOldPassword" placeholder="Old password" name="current_password">
</div>
</div>
<div class="form-group">
<label for="inputNewPassword1" class="col-sm-4 control-label">New password</label>
<div class="col-sm-8">
<input type="password" class="form-control" id="inputNewPassword1" placeholder="New password" name="new_password">
</div>
</div>
<div class="form-group">
<label for="inputNewPassword2" class="col-sm-4 control-label">New password (again)</label>
<div class="col-sm-8">
<input type="password" class="form-control" id="inputNewPassword2" placeholder="New password (again)" name="new_password_confirmation">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-10">
<button type="submit" class="btn btn-success">Change your password</button>
</div>
</div>
{!! Form::close() !!}
</div>
</div>
</div>
</div>
@stop
@section('scripts')
@stop

View File

@@ -0,0 +1,18 @@
@extends('layouts.default')
@section('content')
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) !!}
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
Options
</div>
<div class="panel-body">
<a href="{{route('change-password')}}">Change your password</a>
</div>
</div>
</div>
</div>
@stop
@section('scripts')
@stop

View File

@@ -0,0 +1,27 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">Relate "{{{$journal->description}}}" to other transactions</h4>
</div>
<div class="modal-body">
<form class="form-inline" role="form" id="searchRelated">
<div class="form-group">
<input type="text" style="width:400px;" class="form-control" name="related" id="relatedSearchValue" placeholder="Search for related transactions">
</div>
<button type="submit" class="btn btn-default">Search</button>
</form>
<h5>Search results</h5>
<div>
<table id="relatedSearchResults" class="table table-bordered table-striped"></table>
</div>
<h5>(Already) related transactions</h5>
<div>
<table id="alreadyRelated" class="table table-bordered table-striped"></table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>

View File

@@ -1,6 +1,6 @@
@extends('layouts.default')
@section('content')
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $journal) }}
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $journal) !!}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-default">
@@ -74,7 +74,14 @@
<tr>
<td><input type="checkbox" checked="checked" data-relatedto="{{$journal->id}}" data-id="{{$jrnl->id}}" class="unrelate-checkbox" /></td>
<td><a href="#">{{{$jrnl->description}}}</a></td>
<td>{{Amount::formatJournal($jrnl, $jrnl->getAmount())}}</td>
<td>
@foreach($jrnl->transactions()->get() as $t)
@if($t->amount > 0)
{!! Amount::formatTransaction($t) !!}
@endif
@endforeach
</td>
</tr>
@endforeach
</table>
@@ -97,11 +104,11 @@
<table class="table table-striped table-bordered">
<tr>
<td>Amount</td>
<td>{{Amount::formatTransaction($t)}}</td>
<td>{!! Amount::formatTransaction($t) !!}</td>
</tr>
<tr>
<td>New balance</td>
<td>{{Amount::format($t->before)}} &rarr; {{Amount::format($t->after)}}</td>
<td>{!! Amount::format($t->before) !!} &rarr; {!! Amount::format($t->after) !!}</td>
</tr>
@if(!is_null($t->description))
<tr>
@@ -126,6 +133,9 @@
@stop
@section('scripts')
{{HTML::script('assets/javascript/firefly/transactions.js')}}
{{HTML::script('assets/javascript/firefly/related-manager.js')}}
<script type="text/javascript">
var token = "{{csrf_token()}}";
</script>
<script type="text/javascript" src="js/transactions.js"></script>
<script type="text/javascript" src="js/related-manager.js"></script>
@stop