update sidebar layout

This commit is contained in:
Daeng Deni Mardaeni 2023-07-05 17:35:34 +07:00
parent 315a9afaaf
commit bf4facb148
2 changed files with 86 additions and 60 deletions

View File

@ -8,7 +8,7 @@
<h1 class="page-heading d-flex text-dark fw-bold fs-3 flex-column justify-content-center my-0 text-capitalize">
{{ ucfirst(str_replace('-',' ',$route[0])) }}
@if(count($route) > 1)
@if($route[1] !== 'index' && $route[1] !== 'users')
@if($route[1] !== 'index' && $route[1] !== 'users' && $route[1] !== 'show')
{{ $route[1] }}
@endif
@endif
@ -32,6 +32,7 @@
<!--begin::Item-->
<li class="breadcrumb-item text-muted text-capitalize">{{ ucfirst(str_replace('-',' ',$route[0])) }}</li>
<!--end::Item-->
@if(isset($route[1]) && $route[1]!=='show')
<!--begin::Item-->
<li class="breadcrumb-item">
<span class="bullet bg-gray-400 w-5px h-2px"></span>
@ -40,6 +41,7 @@
<!--begin::Item-->
<li class="breadcrumb-item text-muted text-capitalize">{{ ucfirst(str_replace('-',' ',$route[1]))}}</li>
<!--end::Item-->
@endif
@else
<!--begin::Item-->
<li class="breadcrumb-item text-muted text-capitalize">{{ ucfirst(str_replace('-',' ',$route[0])) }}</li>

View File

@ -1,21 +1,27 @@
@php
$route = explode('.',Route::currentRouteName());
@endphp
@if(file_exists(dirname(__FILE__, 4) . '/Modules/'.ucwords($route[0]).'/Resources/views/partials/_toolbar.blade.php'))
@include(strtolower($route[0]).'::partials._toolbar')
@else
<!--begin::Toolbar-->
<div id="kt_app_toolbar" class="app-toolbar py-3 py-lg-6">
<!--begin::Toolbar container-->
<div id="kt_app_toolbar_container" class="app-container container-fluid d-flex flex-stack">
@include(config('settings.KT_THEME_LAYOUT_DIR').'/partials/sidebar-layout/_page-title')
@php
$route = explode('.',Route::currentRouteName());
@endphp
@if(isset($route[0]) && $route[0]!=='cardboard-detail')
@if(isset($route[1]) && $route[1] == 'index')
@if($route[0]=='document')<!--begin::Actions-->
@if($route[0]=='document')
<!--begin::Actions-->
<div class="d-flex align-items-center gap-2 gap-lg-3">
<!--begin::Primary button-->
<a href="{{ route($route[0].'.create') }}" class="btn btn-sm fw-bold btn-primary text-capitalize">Add {{ str_replace('-',' ',$route[0]) }}</a>
<!--end::Primary button-->
</div>
<!--end::Actions-->
@else
@elseif($route[0]!=='settings')
<!--begin::Actions-->
<div class="d-flex align-items-center gap-2 gap-lg-3">
<!--begin::Primary button-->
@ -25,7 +31,7 @@
<!--end::Actions-->
@endif
@elseif(isset($route[2]) && $route[2] == 'index')
@if($route[1]!=='users')
@if($route[1]!=='users' || $route[0] !=='log')
<!--begin::Actions-->
<div class="d-flex align-items-center gap-2 gap-lg-3">
<!--begin::Primary button-->
@ -44,7 +50,25 @@
<!--end::Actions-->
@endif
@endif
@elseif($route[0]=='cardboard-detail' && isset($route[1]) && $route[1] == 'show')
@php
$link = explode('/',url()->current());
$id = end($link);
@endphp
<!--begin::Actions-->
<div class="d-flex align-items-center gap-2 gap-lg-3">
<!--begin::Primary button-->
<a href="{{ route($route[0].'.index') }}?id={{ $id }}" class="btn btn-sm fw-bold btn-primary text-capitalize">Add Odner</a>
<!--end::Primary button-->
<!--begin::Primary button-->
<a href="{{ route('cardboard.index') }}" class="btn btn-sm fw-bold btn-warning text-capitalize">Back</a>
<!--end::Primary button-->
</div>
<!--end::Actions-->
@endif
</div>
<!--end::Toolbar container-->
</div>
<!--end::Toolbar-->
@endif