mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Fixed page editor back button sometimes going nowhere
Updated the back button to be a proper link instead of a reference to the last viewed URL since it could break if the last page was the current one (On validation for example). Includes test to cover. Also applied some styleCI changes. Fixes #2834
This commit is contained in:
@ -20,7 +20,8 @@
|
||||
<div class="grid third no-break v-center">
|
||||
|
||||
<div class="action-buttons text-left px-m py-xs">
|
||||
<a href="{{ back()->getTargetUrl() }}" class="text-button text-primary">@icon('back')<span class="hide-under-l">{{ trans('common.back') }}</span></a>
|
||||
<a href="{{ $page->draft ? $page->getParent()->getUrl() : $page->getUrl() }}"
|
||||
class="text-button text-primary">@icon('back')<span class="hide-under-l">{{ trans('common.back') }}</span></a>
|
||||
</div>
|
||||
|
||||
<div class="text-center px-m py-xs">
|
||||
|
Reference in New Issue
Block a user