mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-30 04:33:41 +08:00
45ce7a7126
Swapped back handling to instead be pre-determined instead of being based upon session/referrer which would cause inconsistent results when referrer data was not available (redirect to app-loaded images/files). To support, this adds a mechansism to provide a URL through request data. Also cleaned up some imports in code while making changes. Closes #4656.
19 lines
784 B
PHP
19 lines
784 B
PHP
<div>
|
|
<form action="{{ url("/preferences/change-view/" . $type) }}" method="POST" class="inline">
|
|
{{ csrf_field() }}
|
|
{{ method_field('patch') }}
|
|
<input type="hidden" name="_return" value="{{ url()->current() }}">
|
|
|
|
@if ($view === 'list')
|
|
<button type="submit" name="view" value="grid" class="icon-list-item text-link">
|
|
<span class="icon">@icon('grid')</span>
|
|
<span>{{ trans('common.grid_view') }}</span>
|
|
</button>
|
|
@else
|
|
<button type="submit" name="view" value="list" class="icon-list-item text-link">
|
|
<span class="icon">@icon('list')</span>
|
|
<span>{{ trans('common.list_view') }}</span>
|
|
</button>
|
|
@endif
|
|
</form>
|
|
</div> |