mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
a3fcc98d6e
Changes their endpoints and remove the user id from the URLs. Simplifies list changes to share a single endpoint, which aligns it to the behaviour of the existing sort preference endpoint. Also added test to ensure user preferences are deleted on user delete.
19 lines
654 B
PHP
19 lines
654 B
PHP
{{--
|
|
$target - CSS selector of items to expand
|
|
$key - Unique key for checking existing stored state.
|
|
--}}
|
|
<?php $isOpen = setting()->getForCurrentUser('section_expansion#'. $key); ?>
|
|
<button type="button" expand-toggle="{{ $target }}"
|
|
expand-toggle-update-endpoint="{{ url('/preferences/change-expansion/' . $key) }}"
|
|
expand-toggle-is-open="{{ $isOpen ? 'yes' : 'no' }}"
|
|
class="icon-list-item {{ $classes ?? '' }}">
|
|
<span>@icon('expand-text')</span>
|
|
<span>{{ trans('common.toggle_details') }}</span>
|
|
</button>
|
|
@if($isOpen)
|
|
@push('head')
|
|
<style>
|
|
{{ $target }} {display: block;}
|
|
</style>
|
|
@endpush
|
|
@endif
|