mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Updated view toggle to store date
Also added test for user list order preferences
This commit is contained in:
19
resources/views/components/expand-toggle.blade.php
Normal file
19
resources/views/components/expand-toggle.blade.php
Normal file
@ -0,0 +1,19 @@
|
||||
{{--
|
||||
$target - CSS selector of items to expand
|
||||
$key - Unique key for checking existing stored state.
|
||||
--}}
|
||||
<?php $isOpen = setting()->getForCurrentUser('section_expansion#'. $key); ?>
|
||||
<a expand-toggle="{{ $target }}"
|
||||
expand-toggle-update-endpoint="{{ baseUrl('/settings/users/'. auth()->user()->id .'/update-expansion-preference/' . $key) }}"
|
||||
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>
|
||||
</a>
|
||||
@if($isOpen)
|
||||
@push('head')
|
||||
<style>
|
||||
{{ $target }} {display: block;}
|
||||
</style>
|
||||
@endpush
|
||||
@endif
|
Reference in New Issue
Block a user