mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-21 03:39:00 +00:00
Cleaning up.
This commit is contained in:
@@ -26,6 +26,7 @@ class AccountController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
View::share('mainTitleIcon', 'fa-credit-card');
|
View::share('mainTitleIcon', 'fa-credit-card');
|
||||||
View::share('title', 'Accounts');
|
View::share('title', 'Accounts');
|
||||||
}
|
}
|
||||||
|
@@ -29,6 +29,7 @@ class BillController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
View::share('title', 'Bills');
|
View::share('title', 'Bills');
|
||||||
View::share('mainTitleIcon', 'fa-calendar-o');
|
View::share('mainTitleIcon', 'fa-calendar-o');
|
||||||
}
|
}
|
||||||
|
@@ -29,8 +29,10 @@ class BudgetController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
View::share('title', 'Budgets');
|
View::share('title', 'Budgets');
|
||||||
View::share('mainTitleIcon', 'fa-tasks');
|
View::share('mainTitleIcon', 'fa-tasks');
|
||||||
|
View::share('hideBudgets', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -185,12 +187,11 @@ class BudgetController extends Controller
|
|||||||
return view('error')->with('message', 'Invalid selection.');
|
return view('error')->with('message', 'Invalid selection.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$hideBudget = true; // used in transaction list.
|
|
||||||
$journals = $repository->getJournals($budget, $repetition);
|
$journals = $repository->getJournals($budget, $repetition);
|
||||||
$limits = !is_null($repetition->id) ? [$repetition->budgetLimit] : $repository->getBudgetLimits($budget);
|
$limits = !is_null($repetition->id) ? [$repetition->budgetLimit] : $repository->getBudgetLimits($budget);
|
||||||
$subTitle = !is_null($repetition->id) ? e($budget->name) . ' in ' . $repetition->startdate->format('F Y') : e($budget->name);
|
$subTitle = !is_null($repetition->id) ? e($budget->name) . ' in ' . $repetition->startdate->format('F Y') : e($budget->name);
|
||||||
|
|
||||||
return view('budgets.show', compact('limits', 'budget', 'repetition', 'journals', 'subTitle', 'hideBudget'));
|
return view('budgets.show', compact('limits', 'budget', 'repetition', 'journals', 'subTitle'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -26,6 +26,7 @@ class CategoryController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
View::share('title', 'Categories');
|
View::share('title', 'Categories');
|
||||||
View::share('mainTitleIcon', 'fa-bar-chart');
|
View::share('mainTitleIcon', 'fa-bar-chart');
|
||||||
}
|
}
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
use Illuminate\Foundation\Bus\DispatchesCommands;
|
use Illuminate\Foundation\Bus\DispatchesCommands;
|
||||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||||
use Illuminate\Routing\Controller as BaseController;
|
use Illuminate\Routing\Controller as BaseController;
|
||||||
|
use View;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Controller
|
* Class Controller
|
||||||
@@ -14,4 +15,14 @@ abstract class Controller extends BaseController
|
|||||||
|
|
||||||
use DispatchesCommands, ValidatesRequests;
|
use DispatchesCommands, ValidatesRequests;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
View::share('hideBudgets', false);
|
||||||
|
View::share('hideCategories', false);
|
||||||
|
View::share('hideBills', false);
|
||||||
|
View::share('hideTags', false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -27,7 +27,7 @@ class CurrencyController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
View::share('title', 'Currencies');
|
View::share('title', 'Currencies');
|
||||||
View::share('mainTitleIcon', 'fa-usd');
|
View::share('mainTitleIcon', 'fa-usd');
|
||||||
}
|
}
|
||||||
|
@@ -1,12 +1,8 @@
|
|||||||
<?php namespace FireflyIII\Http\Controllers;
|
<?php namespace FireflyIII\Http\Controllers;
|
||||||
|
|
||||||
use Cache;
|
|
||||||
use ErrorException;
|
|
||||||
use FireflyIII\Helpers\Help\HelpInterface;
|
use FireflyIII\Helpers\Help\HelpInterface;
|
||||||
use League\CommonMark\CommonMarkConverter;
|
|
||||||
use Log;
|
use Log;
|
||||||
use Response;
|
use Response;
|
||||||
use Route;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class HelpController
|
* Class HelpController
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
<?php namespace FireflyIII\Http\Controllers;
|
<?php namespace FireflyIII\Http\Controllers;
|
||||||
|
|
||||||
use Amount;
|
use Amount;
|
||||||
use Auth;
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Helpers\Report\ReportQueryInterface;
|
use FireflyIII\Helpers\Report\ReportQueryInterface;
|
||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
|
@@ -32,6 +32,7 @@ class PiggyBankController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
View::share('title', 'Piggy banks');
|
View::share('title', 'Piggy banks');
|
||||||
View::share('mainTitleIcon', 'fa-sort-amount-asc');
|
View::share('mainTitleIcon', 'fa-sort-amount-asc');
|
||||||
}
|
}
|
||||||
|
@@ -20,7 +20,7 @@ class PreferencesController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
View::share('title', 'Preferences');
|
View::share('title', 'Preferences');
|
||||||
View::share('mainTitleIcon', 'fa-gear');
|
View::share('mainTitleIcon', 'fa-gear');
|
||||||
}
|
}
|
||||||
|
@@ -49,7 +49,8 @@ class ProfileController extends Controller
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function postDeleteAccount(DeleteAccountFormRequest $request) {
|
public function postDeleteAccount(DeleteAccountFormRequest $request)
|
||||||
|
{
|
||||||
// old, new1, new2
|
// old, new1, new2
|
||||||
if (!Hash::check($request->get('password'), Auth::user()->password)) {
|
if (!Hash::check($request->get('password'), Auth::user()->password)) {
|
||||||
Session::flash('error', 'Invalid password!');
|
Session::flash('error', 'Invalid password!');
|
||||||
@@ -60,11 +61,11 @@ class ProfileController extends Controller
|
|||||||
// DELETE!
|
// DELETE!
|
||||||
Auth::user()->delete();
|
Auth::user()->delete();
|
||||||
Session::flush();
|
Session::flush();
|
||||||
|
|
||||||
return Redirect::route('index');
|
return Redirect::route('index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View
|
* @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View
|
||||||
*/
|
*/
|
||||||
|
@@ -10,11 +10,11 @@ use FireflyIII\Models\Tag;
|
|||||||
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
||||||
use Input;
|
use Input;
|
||||||
use Preferences;
|
use Preferences;
|
||||||
|
use Redirect;
|
||||||
use Response;
|
use Response;
|
||||||
use Session;
|
use Session;
|
||||||
use View;
|
|
||||||
use URL;
|
use URL;
|
||||||
use Redirect;
|
use View;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class TagController
|
* Class TagController
|
||||||
@@ -31,7 +31,7 @@ class TagController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
View::share('title', 'Tags');
|
View::share('title', 'Tags');
|
||||||
View::share('mainTitleIcon', 'fa-tags');
|
View::share('mainTitleIcon', 'fa-tags');
|
||||||
$tagOptions = [
|
$tagOptions = [
|
||||||
@@ -199,7 +199,8 @@ class TagController extends Controller
|
|||||||
/**
|
/**
|
||||||
* @param Tag $tag
|
* @param Tag $tag
|
||||||
*/
|
*/
|
||||||
public function update(Tag $tag, TagFormRequest $request, TagRepositoryInterface $repository) {
|
public function update(Tag $tag, TagFormRequest $request, TagRepositoryInterface $repository)
|
||||||
|
{
|
||||||
if (Input::get('setTag') == 'true') {
|
if (Input::get('setTag') == 'true') {
|
||||||
$latitude = strlen($request->get('latitude')) > 0 ? $request->get('latitude') : null;
|
$latitude = strlen($request->get('latitude')) > 0 ? $request->get('latitude') : null;
|
||||||
$longitude = strlen($request->get('longitude')) > 0 ? $request->get('longitude') : null;
|
$longitude = strlen($request->get('longitude')) > 0 ? $request->get('longitude') : null;
|
||||||
|
@@ -28,6 +28,7 @@ class TransactionController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
View::share('title', 'Transactions');
|
View::share('title', 'Transactions');
|
||||||
View::share('mainTitleIcon', 'fa-repeat');
|
View::share('mainTitleIcon', 'fa-repeat');
|
||||||
}
|
}
|
||||||
|
@@ -9,13 +9,18 @@
|
|||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
<th>From</th>
|
<th>From</th>
|
||||||
<th>To</th>
|
<th>To</th>
|
||||||
@if(!isset($hideBudget) || (isset($hideBudget) && $hideBudget=== false))
|
{{-- Hide budgets? --}}
|
||||||
|
@if($hideBudgets)
|
||||||
<th><i class="fa fa-tasks fa-fw" title="Budget"></i></th>
|
<th><i class="fa fa-tasks fa-fw" title="Budget"></i></th>
|
||||||
@endif
|
@endif
|
||||||
@if(!isset($hideCategory) || (isset($hideCategory) && $hideCategory=== false))
|
|
||||||
|
{{-- Hide categories? --}}
|
||||||
|
@if($hideCategories)
|
||||||
<th><i class="fa fa-bar-chart fa-fw" title="Category"></i></th>
|
<th><i class="fa fa-bar-chart fa-fw" title="Category"></i></th>
|
||||||
@endif
|
@endif
|
||||||
@if(!isset($hideBill) || (isset($hideBill) && $hideBill=== false))
|
|
||||||
|
{{-- Hide bills? --}}
|
||||||
|
@if(!$hideBills)
|
||||||
<th><i class="fa fa-fw fa-rotate-right" title="Bill"></i></th>
|
<th><i class="fa fa-fw fa-rotate-right" title="Bill"></i></th>
|
||||||
@endif
|
@endif
|
||||||
</tr>
|
</tr>
|
||||||
@@ -29,7 +34,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td>{{{$journal->description}}}</td>
|
<td>{{{$journal->description}}}</td>
|
||||||
<td colspan="7"><em>Invalid journal: Found {{$journal->transactions()->count()}} transaction(s)</td>
|
<td colspan="7"><em>Invalid journal: Found {{$journal->transactions()->count()}} transaction(s)</em></td>
|
||||||
</tr>
|
</tr>
|
||||||
@else
|
@else
|
||||||
<tr class="drag" data-date="{{$journal->date->format('Y-m-d')}}" data-id="{{$journal->id}}">
|
<tr class="drag" data-date="{{$journal->date->format('Y-m-d')}}" data-id="{{$journal->id}}">
|
||||||
@@ -60,15 +65,18 @@
|
|||||||
<a href="{{route('transactions.show',$journal->id)}}" title="{{{$journal->description}}}">{{{$journal->description}}}</a>
|
<a href="{{route('transactions.show',$journal->id)}}" title="{{{$journal->description}}}">{{{$journal->description}}}</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if($journal->transactiontype->type == 'Withdrawal')
|
@if(!$hideTags)
|
||||||
|
{{-- If relevant, refer to tag instead of amount. --}}
|
||||||
|
<!--
|
||||||
|
transaction can only have one advancePayment or balancingAct.
|
||||||
|
Other attempts to put in such a tag are blocked.
|
||||||
|
also show an error when editing a tag and it becomes either
|
||||||
|
of these two types. Or rather, block editing of the tag.
|
||||||
|
-->
|
||||||
{!! Amount::formatJournal($journal) !!}
|
{!! Amount::formatJournal($journal) !!}
|
||||||
@endif
|
@else
|
||||||
@if($journal->transactiontype->type == 'Deposit')
|
|
||||||
{!! Amount::formatJournal($journal) !!}
|
{!! Amount::formatJournal($journal) !!}
|
||||||
@endif
|
@endif
|
||||||
@if($journal->transactiontype->type == 'Transfer')
|
|
||||||
<span class="text-info">{{Amount::formatTransaction($journal->transactions[1],false)}}</span>
|
|
||||||
@endif
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{$journal->date->format('j F Y')}}
|
{{$journal->date->format('j F Y')}}
|
||||||
@@ -87,7 +95,9 @@
|
|||||||
<a href="{{route('accounts.show',$journal->transactions[1]->account_id)}}">{{{$journal->transactions[1]->account->name}}}</a>
|
<a href="{{route('accounts.show',$journal->transactions[1]->account_id)}}">{{{$journal->transactions[1]->account->name}}}</a>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
@if(!isset($hideBudget) || (isset($hideBudget) && $hideBudget=== false))
|
|
||||||
|
{{-- Do NOT hide the budget? --}}
|
||||||
|
@if(!$hideBudgets)
|
||||||
<td>
|
<td>
|
||||||
<?php $budget = isset($journal->budgets[0]) ? $journal->budgets[0] : null; ?>
|
<?php $budget = isset($journal->budgets[0]) ? $journal->budgets[0] : null; ?>
|
||||||
@if($budget)
|
@if($budget)
|
||||||
@@ -95,7 +105,9 @@
|
|||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
@endif
|
@endif
|
||||||
@if(!isset($hideCategory) || (isset($hideCategory) && $hideCategory=== false))
|
|
||||||
|
{{-- Do NOT hide the category? --}}
|
||||||
|
@if(!$hideCategories)
|
||||||
<td>
|
<td>
|
||||||
<?php $category = isset($journal->categories[0]) ? $journal->categories[0] : null; ?>
|
<?php $category = isset($journal->categories[0]) ? $journal->categories[0] : null; ?>
|
||||||
@if($category)
|
@if($category)
|
||||||
@@ -103,7 +115,9 @@
|
|||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
@endif
|
@endif
|
||||||
@if(!isset($hideBill) || (isset($hideBill) && $hideBill=== false))
|
|
||||||
|
{{-- Do NOT hide the bill? --}}
|
||||||
|
@if(!$hideBills)
|
||||||
<td>
|
<td>
|
||||||
@if($journal->bill)
|
@if($journal->bill)
|
||||||
<a href="{{route('bills.show',$journal->bill_id)}}">{{{$journal->bill->name}}}</a>
|
<a href="{{route('bills.show',$journal->bill_id)}}">{{{$journal->bill->name}}}</a>
|
||||||
|
Reference in New Issue
Block a user