master_template/resources/views/backend/sidebar.blade.php
2024-06-20 16:42:33 +05:45

162 lines
8.4 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>
<li class="nav-item">
<a class="nav-link menu-link collapsed" href="#sidebarMenu2" data-bs-toggle="collapse"
role="button" aria-expanded="false" aria-controls="sidebarMenu1">
<i class="ri-pages-line"></i> <span data-key="t-pages">News</span>
</a>
<div class="collapse menu-dropdown" id="sidebarMenu2">
<ul class="nav nav-sm flex-column">
{{ CCMS::createMenuLink('News Type', route('news_type.index')) }}
{{ CCMS::createMenuLink('News Categories', route('newscategories.index')) }}
{{ CCMS::createMenuLink('News', route('news.index')) }}
</ul>
</div>
</li>
<li class="nav-item">
<a class="nav-link menu-link collapsed" href="#sidebarMenu3" data-bs-toggle="collapse"
role="button" aria-expanded="false" aria-controls="sidebarMenu1">
<i class="ri-pages-line"></i> <span data-key="t-pages">Ads</span>
</a>
<div class="collapse menu-dropdown" id="sidebarMenu3">
<ul class="nav nav-sm flex-column">
{{ CCMS::createMenuLink('Advertisements', route('advertisements.index')) }}
{{ CCMS::createMenuLink('Ad Category', route('adcategories.index')) }}
</ul>
</div>
</li>
@role('admin')
<li class="nav-item">
<a class="nav-link menu-link collapsed" href="#sidebarMenu4" data-bs-toggle="collapse"
role="button" aria-expanded="false" aria-controls="sidebarMenu1">
<i class="ri-pages-line"></i> <span data-key="t-pages">Users</span>
</a>
<div class="collapse menu-dropdown" id="sidebarMenu4">
<ul class="nav nav-sm flex-column">
{{ CCMS::createMenuLink('Roles', route('roles.index')) }}
{{ CCMS::createMenuLink('Permissions', route('permissions.index')) }}
{{ CCMS::createMenuLink('Users', route('users.index')) }}
</ul>
</div>
</li>
@endrole
{{ CCMS::createMenuLink('Provinces', route('provinces.index')) }}
{{ CCMS::createMenuLink('Authors', route('authors.index')) }}
{{ CCMS::createMenuLink('Economy', route('economies.index')) }}
{{ CCMS::createMenuLink('Videos', route('videos.index')) }}
{{ CCMS::createMenuLink('Horoscope', route('horoscope.index')) }}
{{ CCMS::createMenuLink('Artilces', route('articles.index')) }}
{{ CCMS::createMenuLink('Teams', route('teams.index')) }}
</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