Improve back button behavior

This commit is contained in:
Marcus Moore 2024-10-23 15:42:09 -07:00
parent 3616c92148
commit e390a95bd3
No known key found for this signature in database

View file

@ -7,8 +7,19 @@
@stop
@section('header_right')
@if (request()->routeIs('report-templates.edit'))
<a href="{{ route('report-templates.show', $template) }}" class="btn btn-primary pull-right">
{{ trans('general.back') }}
</a>
@elseif(request()->routeIs('report-templates.show'))
<a href="{{ route('reports/custom') }}" class="btn btn-primary pull-right">
{{ trans('general.back') }}
</a>
@else
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
{{ trans('general.back') }}</a>
{{ trans('general.back') }}
</a>
@endif
@stop