From 50cfcb890550b64a350d93a2d1a5e709d60cd056 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 31 Jul 2014 15:46:25 +0200 Subject: [PATCH] Started work for piggy banks [skip ci] --- app/controllers/LimitController.php | 13 +++++++------ app/views/budgets/indexByBudget.blade.php | 4 ++-- app/views/partials/menu/home.blade.php | 7 ++++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/app/controllers/LimitController.php b/app/controllers/LimitController.php index 40492a4d92..8898c74ece 100644 --- a/app/controllers/LimitController.php +++ b/app/controllers/LimitController.php @@ -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!'); } diff --git a/app/views/budgets/indexByBudget.blade.php b/app/views/budgets/indexByBudget.blade.php index ec974584ba..479bfdb019 100644 --- a/app/views/budgets/indexByBudget.blade.php +++ b/app/views/budgets/indexByBudget.blade.php @@ -84,9 +84,9 @@ @endif
- + @if($limit->repeats == 0 || ($limit->repeats == 1 && $index == 0)) - + @endif
diff --git a/app/views/partials/menu/home.blade.php b/app/views/partials/menu/home.blade.php index 0c2e69b5ee..3adf9d0a93 100644 --- a/app/views/partials/menu/home.blade.php +++ b/app/views/partials/menu/home.blade.php @@ -24,11 +24,12 @@ $r = Route::current()->getName();
  • Accounts
  • Budgets
  • Categories
  • + +
  • Transactions
  • +
  • -
  • Separated link
  • -
  • -
  • One more separated link
  • +
  • Piggy banks