BookStack/resources/views/partials/view-toggle.blade.php
Dan Brown 7ba6962707
Removed lesser-used middleware and updated localization middleware
So that DB/User access is not explicitly enforced.
Same for GlobalViewData middleware although that was also just doubling
up on ways to access user/auth info.
Also cleaned up Localization Middleware doc blocks.
2021-01-17 13:41:43 +00:00

18 lines
768 B
PHP

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