BookStack/resources/views/books/view-toggle.blade.php
Dan Brown 4c574c22a8
Implemented functionality to make books sort function
Also changed public user settings to be stored in session rather than DB.
Cleaned existing list view type logic.
2018-12-07 18:33:53 +00:00

18 lines
818 B
PHP

<div>
<form action="{{ baseUrl("/settings/users/{$currentUser->id}/switch-book-view") }}" method="POST" class="inline">
{!! csrf_field() !!}
{!! method_field('PATCH') !!}
<input type="hidden" value="{{ $view === 'list'? 'grid' : 'list' }}" name="view_type">
@if ($view === 'list')
<a onclick="this.closest('form').submit()" type="submit" class="icon-list-item">
<span class="icon">@icon('grid')</span>
<span>{{ trans('common.grid_view') }}</span>
</a>
@else
<a onclick="this.closest('form').submit()" type="submit" class="icon-list-item">
<span class="icon">@icon('list')</span>
<span>{{ trans('common.list_view') }}</span>
</a>
@endif
</form>
</div>