2018-12-01 15:28:17 -05:00
|
|
|
<div>
|
2019-02-02 06:41:41 -05:00
|
|
|
<form action="{{ baseUrl("/settings/users/{$currentUser->id}/switch-${type}-view") }}" method="POST" class="inline">
|
2018-12-01 15:28:17 -05:00
|
|
|
{!! csrf_field() !!}
|
|
|
|
{!! method_field('PATCH') !!}
|
2018-12-07 13:33:32 -05:00
|
|
|
<input type="hidden" value="{{ $view === 'list'? 'grid' : 'list' }}" name="view_type">
|
|
|
|
@if ($view === 'list')
|
2018-12-01 15:28:17 -05:00
|
|
|
<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>
|