Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Ability to highlight a particular transaction. [skip ci]
James Coleebb28df6076a
diff --git a/app/controllers/BudgetController.php b/app/controllers/BudgetController.phpindex ce1ba59a51..c4e6a5ea1f 100644--- a/app/controllers/BudgetController.php+++ b/app/controllers/BudgetController.php@@ -117,7 +117,7 @@ class BudgetController extends BaseControllerreturn View::make('budgets.show')->with('budget', $budget)->with('repetitions', $repetitions)->with('filters', $filters- );+ )->with('highlight',Input::get('highlight'));}/**diff --git a/app/controllers/CategoryController.php b/app/controllers/CategoryController.phpindex 2e6bcbeccc..f3d3f1b946 100644--- a/app/controllers/CategoryController.php+++ b/app/controllers/CategoryController.php@@ -60,7 +60,9 @@ class CategoryController extends BaseController$journals = $this->_category->journalsInRange($category, $start, $end);- return View::make('categories.show')->with('category', $category)->with('journals', $journals);+ return View::make('categories.show')->with('category', $category)->with('journals', $journals)->with(+ 'highlight', Input::get('highlight')+ );}public function store()@@ -84,16 +86,17 @@ class CategoryController extends BaseControllerpublic function update(Category $category){$category = $this->_repository->update($category, Input::all());- if($category->validate()) {+ if ($category->validate()) {Session::flash('success', 'Category "' . $category->name . '" updated.');+return Redirect::route('categories.index');} else {Session::flash('success', 'Could not update category "' . $category->name . '".');+return Redirect::route('categories.edit')->withErrors($category->errors())->withInput();}-}diff --git a/app/views/budgets/show.blade.php b/app/views/budgets/show.blade.phpindex 86b0495bba..2aa38ed4e2 100644--- a/app/views/budgets/show.blade.php+++ b/app/views/budgets/show.blade.php@@ -49,9 +49,9 @@@endif</h4>@if($repetition['paginated'] == true)- @include('paginated.transactions',['journals' => $repetition['journals']])+ @include('paginated.transactions',['journals' => $repetition['journals'],'highlight' => $highlight])@else- @include('lists.transactions',['journals' => $repetition['journals'],'sum' => true])+ @include('lists.transactions',['journals' => $repetition['journals'],'sum' => true,'highlight' => $highlight])@endif</div></div>diff --git a/app/views/lists/transactions.blade.php b/app/views/lists/transactions.blade.phpindex 322802caf2..c09b7d4b54 100644--- a/app/views/lists/transactions.blade.php+++ b/app/views/lists/transactions.blade.php@@ -10,7 +10,11 @@</tr><?php $total = 0; ?>@foreach($journals as $journal)- <tr>+ <tr+ @if(isset($highlight) && $highlight == $journal->id)+ class="success"+ @endif+ ><td>@if($journal->transactiontype->type == 'Withdrawal')<span class="glyphicon glyphicon-arrow-left" title="Withdrawal"></span>@@ -28,10 +32,10 @@<td>@foreach($journal->components as $component)@if($component->class == 'Budget')- <a href="{{route('budgets.show',$component->id)}}#GETTHEREPSOMEHOW_ORLIMITQUERYbudget-overview-in-month"><span class="glyphicon glyphicon-tasks" title="Budget: {{{$component->name}}}"></span></a>+ <a href="{{route('budgets.show',$component->id)}}?highlight={{$journal->id}}"><span class="glyphicon glyphicon-tasks" title="Budget: {{{$component->name}}}"></span></a>@endif@if($component->class == 'Category')- <a href="#category-overview-in-month"><span class="glyphicon glyphicon-tag" title="Category: {{{$component->name}}}"></span></a>+ <a href="{{route('categories.show',$component->id)}}?highlight={{$journal->id}}"><span class="glyphicon glyphicon-tag" title="Category: {{{$component->name}}}"></span></a>@endif@endforeach</td>