diff --git a/resources/views/components/backend/buttons/public-view.blade.php b/resources/views/components/backend/buttons/public-view.blade.php new file mode 100644 index 000000000..6947d5855 --- /dev/null +++ b/resources/views/components/backend/buttons/public-view.blade.php @@ -0,0 +1,10 @@ +@props(["href" => "", "small" => "true", "text" => "Public View"]) + + + {!! $text != "" ? " " . $text : "" !!} + {!! $slot != "" ? " " . $slot : "" !!} + diff --git a/resources/views/components/backend/buttons/public.blade.php b/resources/views/components/backend/buttons/public.blade.php new file mode 100644 index 000000000..9cdf14b91 --- /dev/null +++ b/resources/views/components/backend/buttons/public.blade.php @@ -0,0 +1,20 @@ +@props([ + "route" => "", + "icon" => "fa-solid fa-arrow-up-right-from-square", + "title", + "small" => "", + "class" => "", +]) + +@if ($route) + + + {!! $slot != "" ? " " . $slot : "" !!} + +@endif diff --git a/resources/views/components/backend/section-header.blade.php b/resources/views/components/backend/section-header.blade.php index daef24442..717d65009 100644 --- a/resources/views/components/backend/section-header.blade.php +++ b/resources/views/components/backend/section-header.blade.php @@ -84,6 +84,15 @@ class="ms-1" small="true" /> @elseif (Str::endsWith(Route::currentRouteName(), "show")) + @if (Route::has("frontend.$module_name.show")) + + @endif + @if (auth()->user()->can("edit_" . $module_name) && Route::has("backend." . $module_name . ".edit"))