mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-16 18:25:00 -06:00
New buttons.
This commit is contained in:
parent
1fbdb3d0ae
commit
1e76a5fc3f
@ -67,6 +67,18 @@ class TransactionController extends BaseController
|
||||
$piggies = $toolkit->makeSelectList($piggyRepository->get());
|
||||
$piggies[0] = '(no piggy bank)';
|
||||
|
||||
/*
|
||||
* respond to a possible given values in the URL.
|
||||
*/
|
||||
$prefilled = Session::has('prefilled') ? Session::get('prefilled') : [];
|
||||
$respondTo = ['account_id', 'account_from_id'];
|
||||
foreach ($respondTo as $r) {
|
||||
if (!is_null(Input::get($r))) {
|
||||
$prefilled[$r] = Input::get($r);
|
||||
}
|
||||
}
|
||||
Session::put('prefilled', $prefilled);
|
||||
|
||||
return View::make('transactions.create')->with('accounts', $assetAccounts)->with('budgets', $budgets)->with(
|
||||
'what', $what
|
||||
)->with('piggies', $piggies)->with('subTitle', 'Add a new ' . $what);
|
||||
|
@ -190,6 +190,14 @@ class Form
|
||||
*/
|
||||
$options['placeholder'] = ucfirst($name);
|
||||
|
||||
/*
|
||||
* Get prefilled value:
|
||||
*/
|
||||
if(\Session::has('prefilled')) {
|
||||
$prefilled = \Session::get('prefilled');
|
||||
$value = isset($prefilled[$name]) ? $prefilled[$name] : null;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the value.
|
||||
*/
|
||||
|
@ -82,6 +82,25 @@
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-money fa-fw"></i>
|
||||
<a href="{{route('accounts.show',$data[1]->id)}}">{{{$data[1]->name}}}</a>
|
||||
|
||||
|
||||
<!-- ACTIONS MENU -->
|
||||
<div class="pull-right">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
|
||||
Actions
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<li><a href="{{route('transactions.create','withdrawal')}}?account_id={{{$data[1]->id}}}"><i class="fa fa-long-arrow-left fa-fw"></i> New withdrawal</a></li>
|
||||
<li><a href="{{route('transactions.create','deposit')}}?account_id={{{$data[1]->id}}}"><i class="fa fa-long-arrow-right fa-fw"></i> New deposit</a></li>
|
||||
<li><a href="{{route('transactions.create','transfer')}}?account_from_id={{{$data[1]->id}}}"><i class="fa fa-arrows-h fa-fw"></i> New transfer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
@include('transactions.journals-small-index',['transactions' => $data[0],'account' => $data[1]])
|
||||
|
Loading…
Reference in New Issue
Block a user