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();
|
||||
$defaultCurrency = $this->repository->getCurrencyByPreference(Preferences::get('currencyPreference', config('firefly.default_currency', 'EUR')));
|
||||
$isOwner = true;
|
||||
if (!$this->userRepository->hasRole(auth()->user(), '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">
|
||||
<thead>
|
||||
<tr>
|
||||
{% if isOwner %}
|
||||
<th> </th>
|
||||
{% endif %}
|
||||
<th>{{ 'currency'|_ }}</th>
|
||||
<th>{{ 'number_of_decimals'|_ }}</th>
|
||||
<th> </th>
|
||||
@@ -28,12 +30,14 @@
|
||||
<tbody>
|
||||
{% for currency in currencies %}
|
||||
<tr>
|
||||
{% if isOwner %}
|
||||
<td>
|
||||
<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-danger" href="{{ route('currencies.delete',currency.id) }}"><i class="fa fa-fw fa-trash"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>{{ currency.name }} ({{ currency.code }}) ({{ currency.symbol|raw }})</td>
|
||||
<td>{{ currency.decimal_places }}</td>
|
||||
<td class="defaultCurrency">
|
||||
|
Reference in New Issue
Block a user