master_template/resources/views/backend/sidebar.blade.php
2024-06-10 18:06:58 +05:45

112 lines
5.2 KiB
PHP

<div class="app-menu navbar-menu">
<!-- LOGO -->
<div class="navbar-brand-box">
<!-- Dark Logo-->
<a href="{{ route('admin.dashboard') }}" class="logo logo-dark">
<span class="logo-sm">
<img src="{{ asset('assets/images/logo-sm.png') }}" alt="" height="22">
</span>
<span class="logo-lg">
<img src="{{ asset('assets/images/logo-dark.png') }}" alt="" height="57">
</span>
</a>
<!-- Light Logo-->
<a href="{{ route('admin.dashboard') }}" class="logo logo-light">
<span class="logo-sm">
<img src="{{ asset('assets/images/logo-sm.png') }}" alt="" height="22">
</span>
<span class="logo-lg">
<img src="{{ asset('assets/images/logo-light.png') }}" alt="" height="57">
</span>
</a>
<button type="button" class="btn btn-sm fs-20 header-item float-end btn-vertical-sm-hover p-0"
id="vertical-hover">
<i class="ri-record-circle-line"></i>
</button>
</div>
<div id="scrollbar">
<div class="container-fluid">
<div id="two-column-menu">
</div>
<ul class="navbar-nav" id="navbar-nav">
<li class="menu-title"><span data-key="t-menu">Menu</span></li>
<div class="simplebar-content" style="padding: 0px;">
@if (auth()->user()->email == 'prajwalbro@hotmail.com')
<li class="nav-item">
<a class="nav-link menu-link active" href="{{ route('form.create') }}">
<i class="ri-dashboard-2-line"></i> <span data-key="t-dashboards">CRUD</span>
</a>
</li> <!-- end Dashboard Menu -->
<!-- end Dashboard Menu -->
{{ CCMS::createMenuLink('Menu Location', route('menulocations.index')) }}
<li class="nav-item">
<a class="nav-link menu-link collapsed" href="#sidebarMenu0" data-bs-toggle="collapse"
role="button" aria-expanded="false" aria-controls="sidebarMenu0">
<i class="ri-pages-line"></i> <span data-key="t-pages">Settings</span>
</a>
<div class="menu-dropdown collapse" id="sidebarMenu0">
<ul class="nav nav-sm flex-column">
{{ CCMS::createMenuLink('Website Setting', route('settings.edit', 1)) }}
{{ CCMS::createMenuLink('Backup Database', route('backup.db')) }}
</ul>
</div>
</li>
<li class="nav-item">
<a class="nav-link menu-link collapsed" href="#sidebarMenu1" data-bs-toggle="collapse"
role="button" aria-expanded="false" aria-controls="sidebarMenu1">
<i class="ri-pages-line"></i> <span data-key="t-pages">Menu Items</span>
</a>
<div class="menu-dropdown collapse" id="sidebarMenu1">
<ul class="nav nav-sm flex-column">
{{ CCMS::createMenuLink('All Menu Locations', route('menulocations.index')) }}
@foreach (DB::select('select * from tbl_menulocations where status=1 order by display_order') as $menulocation)
{{ CCMS::createMenuLink($menulocation->title, route('menuitems.index', ['menulocation' => $menulocation->menulocation_id])) }}
@endforeach
{{ CCMS::createMenuLink('All Menu Items', route('menuitems.index')) }}
</ul>
</div>
</li>
@endif
<li class="nav-item">
<a class="nav-link menu-link" href="{{ route('admin.dashboard') }}">
<i class="ri-dashboard-2-line"></i> <span data-key="t-dashboards">Dashboard</span>
</a>
</li> <!-- end Dashboard Menu -->
<li class="menu-title"><i class="ri-more-fill"></i> <span data-key="t-pages">Pages</span></li>
</div>
</ul>
</div>
<!-- Sidebar -->
</div>
<div class="sidebar-background"></div>
</div>
@push('js')
<script>
var menuDropdowns = document.querySelectorAll('div.menu-dropdown');
menuDropdowns.forEach(function(menuDropdown) {
var childLinks = menuDropdown.querySelectorAll('ul > li > a');
var hasActiveLink = Array.from(childLinks).some(function(childLink) {
return childLink.classList.contains('active');
});
if (hasActiveLink) {
menuDropdown.classList.add('show');
} else {
menuDropdown.classList.remove('show');
}
});
</script>
@endpush