2019-04-14 14:01:51 +02:00
|
|
|
{{--
|
|
|
|
$target - CSS selector of items to expand
|
|
|
|
$key - Unique key for checking existing stored state.
|
|
|
|
--}}
|
|
|
|
<?php $isOpen = setting()->getForCurrentUser('section_expansion#'. $key); ?>
|
2019-08-24 19:26:28 +02:00
|
|
|
<button type="button" expand-toggle="{{ $target }}"
|
2019-08-04 15:26:39 +02:00
|
|
|
expand-toggle-update-endpoint="{{ url('/settings/users/'. $currentUser->id .'/update-expansion-preference/' . $key) }}"
|
2019-04-14 14:01:51 +02:00
|
|
|
expand-toggle-is-open="{{ $isOpen ? 'yes' : 'no' }}"
|
|
|
|
class="text-muted icon-list-item text-primary">
|
|
|
|
<span>@icon('expand-text')</span>
|
|
|
|
<span>{{ trans('common.toggle_details') }}</span>
|
2019-08-24 19:26:28 +02:00
|
|
|
</button>
|
2019-04-14 14:01:51 +02:00
|
|
|
@if($isOpen)
|
|
|
|
@push('head')
|
|
|
|
<style>
|
|
|
|
{{ $target }} {display: block;}
|
|
|
|
</style>
|
|
|
|
@endpush
|
|
|
|
@endif
|