mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-23 22:35:03 +00:00
Less popups for #943
This commit is contained in:
@@ -207,11 +207,13 @@ class CurrencyController extends Controller
|
|||||||
{
|
{
|
||||||
$currencies = $this->repository->get();
|
$currencies = $this->repository->get();
|
||||||
$defaultCurrency = $this->repository->getCurrencyByPreference(Preferences::get('currencyPreference', config('firefly.default_currency', 'EUR')));
|
$defaultCurrency = $this->repository->getCurrencyByPreference(Preferences::get('currencyPreference', config('firefly.default_currency', 'EUR')));
|
||||||
|
$isOwner = true;
|
||||||
if (!$this->userRepository->hasRole(auth()->user(), 'owner')) {
|
if (!$this->userRepository->hasRole(auth()->user(), 'owner')) {
|
||||||
$request->session()->flash('info', trans('firefly.ask_site_owner', ['owner' => env('SITE_OWNER')]));
|
$request->session()->flash('info', trans('firefly.ask_site_owner', ['owner' => env('SITE_OWNER')]));
|
||||||
|
$isOwner = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('currencies.index', compact('currencies', 'defaultCurrency'));
|
return view('currencies.index', compact('currencies', 'defaultCurrency','isOwner'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -19,7 +19,9 @@
|
|||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
{% if isOwner %}
|
||||||
<th> </th>
|
<th> </th>
|
||||||
|
{% endif %}
|
||||||
<th>{{ 'currency'|_ }}</th>
|
<th>{{ 'currency'|_ }}</th>
|
||||||
<th>{{ 'number_of_decimals'|_ }}</th>
|
<th>{{ 'number_of_decimals'|_ }}</th>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
@@ -28,12 +30,14 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% for currency in currencies %}
|
{% for currency in currencies %}
|
||||||
<tr>
|
<tr>
|
||||||
|
{% if isOwner %}
|
||||||
<td>
|
<td>
|
||||||
<div class="btn-group btn-group-xs">
|
<div class="btn-group btn-group-xs">
|
||||||
<a class="btn btn-default" href="{{ route('currencies.edit',currency.id) }}"><i class="fa fa-fw fa-pencil"></i></a>
|
<a class="btn btn-default" href="{{ route('currencies.edit',currency.id) }}"><i class="fa fa-fw fa-pencil"></i></a>
|
||||||
<a class="btn btn-danger" href="{{ route('currencies.delete',currency.id) }}"><i class="fa fa-fw fa-trash"></i></a>
|
<a class="btn btn-danger" href="{{ route('currencies.delete',currency.id) }}"><i class="fa fa-fw fa-trash"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
{% endif %}
|
||||||
<td>{{ currency.name }} ({{ currency.code }}) ({{ currency.symbol|raw }})</td>
|
<td>{{ currency.name }} ({{ currency.code }}) ({{ currency.symbol|raw }})</td>
|
||||||
<td>{{ currency.decimal_places }}</td>
|
<td>{{ currency.decimal_places }}</td>
|
||||||
<td class="defaultCurrency">
|
<td class="defaultCurrency">
|
||||||
|
Reference in New Issue
Block a user