pushuo 2022-08-22 17:51:37 +08:00
parent f1304f51bf
commit 0265def552
1 changed files with 16 additions and 3 deletions

View File

@ -7,7 +7,13 @@
aria-expanded="false"> aria-expanded="false">
@foreach (currencies() as $currency) @foreach (currencies() as $currency)
@if ($currency->code == current_currency_code()) @if ($currency->code == current_currency_code())
{{ $currency->symbol_left }} {{ $currency->name }} @if ($currency->symbol_left)
{{ $currency->symbol_left }}
@endif
{{ $currency->name }}
@if ($currency->symbol_right)
{{ $currency->symbol_right }}
@endif
@endif @endif
@endforeach @endforeach
</a> </a>
@ -15,8 +21,15 @@
<div class="dropdown-menu" aria-labelledby="currency-dropdown"> <div class="dropdown-menu" aria-labelledby="currency-dropdown">
@foreach (currencies() as $currency) @foreach (currencies() as $currency)
<a class="dropdown-item" <a class="dropdown-item"
href="{{ shop_route('currency.switch', [$currency->code]) }}">{{ $currency->symbol_left }} href="{{ shop_route('currency.switch', [$currency->code]) }}">
{{ $currency->name }}</a> @if ($currency->symbol_left)
{{ $currency->symbol_left }}
@endif
{{ $currency->name }}
@if ($currency->symbol_right)
{{ $currency->symbol_right }}
@endif
</a>
@endforeach @endforeach
</div> </div>
</div> </div>