mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-14 05:38:28 +00:00
Started work for piggy banks [skip ci]
This commit is contained in:
@@ -33,9 +33,9 @@ class LimitController extends BaseController
|
|||||||
{
|
{
|
||||||
$periods = \Config::get('firefly.periods_to_text');
|
$periods = \Config::get('firefly.periods_to_text');
|
||||||
$prefilled = [
|
$prefilled = [
|
||||||
'startdate' => Input::get('startdate') ? : date('Y-m-d'),
|
'startdate' => Input::get('startdate') ? : date('Y-m-d'),
|
||||||
'repeat_freq' => Input::get('repeat_freq') ? : 'monthly',
|
'repeat_freq' => Input::get('repeat_freq') ? : 'monthly',
|
||||||
'budget_id' => $budget ? $budget->id : null
|
'budget_id' => $budget ? $budget->id : null
|
||||||
];
|
];
|
||||||
|
|
||||||
$budgets = $this->_budgets->getAsSelectList();
|
$budgets = $this->_budgets->getAsSelectList();
|
||||||
@@ -55,13 +55,14 @@ class LimitController extends BaseController
|
|||||||
$limit = $this->_limits->find($limitId);
|
$limit = $this->_limits->find($limitId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($limit) {
|
if ($limit) {
|
||||||
$limit->delete();
|
$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 {
|
} else {
|
||||||
return View::make('error')->with('message', 'No such limit!');
|
return View::make('error')->with('message', 'No such limit!');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,9 +84,9 @@
|
|||||||
@endif
|
@endif
|
||||||
<div class="col-sm-2 @if($limit->repeats == 0) col-sm-offset-2 @endif">
|
<div class="col-sm-2 @if($limit->repeats == 0) col-sm-offset-2 @endif">
|
||||||
<div class="btn-group btn-group-xs">
|
<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))
|
@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
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</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('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('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><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><a href="{{route('transactions.index')}}"><span class="glyphicon glyphicon-list-alt"></span> Transactions</a></li>
|
||||||
|
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
<li><a href="#">Separated link</a></li>
|
<li><a href="#"><span class="glyphicon glyphicon-save"></span> Piggy banks</a></li>
|
||||||
<li class="divider"></li>
|
|
||||||
<li><a href="#">One more separated link</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user