mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Started work for piggy banks [skip ci]
This commit is contained in:
parent
e0ed0cbeb2
commit
50cfcb8905
@ -33,9 +33,9 @@ class LimitController extends BaseController
|
||||
{
|
||||
$periods = \Config::get('firefly.periods_to_text');
|
||||
$prefilled = [
|
||||
'startdate' => Input::get('startdate') ? : date('Y-m-d'),
|
||||
'startdate' => Input::get('startdate') ? : date('Y-m-d'),
|
||||
'repeat_freq' => Input::get('repeat_freq') ? : 'monthly',
|
||||
'budget_id' => $budget ? $budget->id : null
|
||||
'budget_id' => $budget ? $budget->id : null
|
||||
];
|
||||
|
||||
$budgets = $this->_budgets->getAsSelectList();
|
||||
@ -55,13 +55,14 @@ class LimitController extends BaseController
|
||||
$limit = $this->_limits->find($limitId);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ($limit) {
|
||||
$limit->delete();
|
||||
|
||||
return Redirect::route('budgets.index');
|
||||
if (Input::get('from') == 'date') {
|
||||
return Redirect::route('budgets.index');
|
||||
} else {
|
||||
return Redirect::route('budgets.index.budget');
|
||||
}
|
||||
} else {
|
||||
return View::make('error')->with('message', 'No such limit!');
|
||||
}
|
||||
|
@ -84,9 +84,9 @@
|
||||
@endif
|
||||
<div class="col-sm-2 @if($limit->repeats == 0) col-sm-offset-2 @endif">
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="#" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-pencil"></span></a>
|
||||
<a href="{{route('budgets.limits.edit',$limit->id)}}?from=budget" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-pencil"></span></a>
|
||||
@if($limit->repeats == 0 || ($limit->repeats == 1 && $index == 0))
|
||||
<a href="#" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
<a href="{{route('budgets.limits.delete',$limit->id)}}?from=budget" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
@ -24,11 +24,12 @@ $r = Route::current()->getName();
|
||||
<li><a href="{{route('accounts.index')}}"><span class="glyphicon glyphicon-inbox"></span> Accounts</a></li>
|
||||
<li><a href="{{route('budgets.index')}}"><span class="glyphicon glyphicon-euro"></span> Budgets</a></li>
|
||||
<li><a href="{{route('categories.index')}}"><span class="glyphicon glyphicon-tags"></span> Categories</a></li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li><a href="{{route('transactions.index')}}"><span class="glyphicon glyphicon-list-alt"></span> Transactions</a></li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">One more separated link</a></li>
|
||||
<li><a href="#"><span class="glyphicon glyphicon-save"></span> Piggy banks</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user