Implement roles management;
Add user profile; Improve Ui; Clean code; Minor fix; Typo;
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
||||
<title>{{ config('app.name', 'Motula-Translate') }}</title>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
@@ -20,6 +20,9 @@
|
||||
'resources/vendors/flatpickr/flatpickr.min.css',
|
||||
'resources/vendors/fontawesome/css/all.min.css',
|
||||
])
|
||||
|
||||
@include('layouts.partials.styles')
|
||||
@stack('head-scripts')
|
||||
</head>
|
||||
<body class="font-sans antialiased sidebar-dark">
|
||||
<div class="main-wrapper">
|
||||
@@ -28,6 +31,7 @@
|
||||
<div class="page-wrapper">
|
||||
@include('layouts.partials.navbar')
|
||||
<div class="page-content">
|
||||
@include('layouts.partials.flesh-message')
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
||||
@@ -36,6 +40,6 @@
|
||||
</div>
|
||||
|
||||
@include('layouts.partials.scripts')
|
||||
|
||||
@stack('body-scripts')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
35
resources/views/layouts/partials/flesh-message.blade.php
Normal file
35
resources/views/layouts/partials/flesh-message.blade.php
Normal file
@@ -0,0 +1,35 @@
|
||||
@if ($message = Session::get('success'))
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($message = Session::get('error'))
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($message = Session::get('warning'))
|
||||
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($message = Session::get('info'))
|
||||
<div class="alert alert-info alert-dismissible fade show" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<strong>Please check the form below for errors</strong>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
@endif
|
||||
@@ -233,14 +233,24 @@
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="profileDropdown" role="button"
|
||||
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<img class="wd-30 ht-30 rounded-circle" src="https://via.placeholder.com/30x30"
|
||||
alt="profile">
|
||||
@if(Auth::user()->image)
|
||||
<img class="wd-30 ht-30 rounded-circle" src="{{asset('/storage/images/'.auth()->user()->image)}}" alt="{{auth()->user()->name}}">
|
||||
@else
|
||||
<img class="wd-30 ht-30 rounded-circle" src="https://via.placeholder.com/30x30"
|
||||
alt="profile">
|
||||
@endif
|
||||
|
||||
</a>
|
||||
<div class="dropdown-menu p-0" aria-labelledby="profileDropdown">
|
||||
<div class="d-flex flex-column align-items-center border-bottom px-5 py-3">
|
||||
<div class="mb-3">
|
||||
<img class="wd-80 ht-80 rounded-circle" src="https://via.placeholder.com/80x80"
|
||||
alt="">
|
||||
@if(Auth::user()->image)
|
||||
<img class="wd-80 ht-80 rounded-circle" src="{{asset('/storage/images/'.auth()->user()->image)}}" alt="{{auth()->user()->name}}">
|
||||
@else
|
||||
<img class="wd-80 ht-80 rounded-circle" src="https://via.placeholder.com/80x80"
|
||||
alt="profile">
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<p class="tx-16 fw-bolder">{{ auth()->user()->name }}</p>
|
||||
@@ -249,13 +259,13 @@
|
||||
</div>
|
||||
<ul class="list-unstyled p-1">
|
||||
<li class="dropdown-item py-2">
|
||||
<a href="{{route('profile.edit')}}" class="text-body ms-0">
|
||||
<a href="{{ route('users.show', auth()->user()->id) }}" class="text-body ms-0">
|
||||
<i class="me-2 icon-md" data-feather="user"></i>
|
||||
<span>Profile</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown-item py-2">
|
||||
<a href="javascript:;" class="text-body ms-0">
|
||||
<a href="{{ route('users.edit', auth()->user()->id) }}" class="text-body ms-0">
|
||||
<i class="me-2 icon-md" data-feather="edit"></i>
|
||||
<span>Edit Profile</span>
|
||||
</a>
|
||||
|
||||
@@ -14,3 +14,4 @@
|
||||
<!-- Custom js for this page -->
|
||||
<script src="/assets/js/dashboard-dark.js"></script>
|
||||
<!-- End custom js for this page -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/js/select2.full.min.js"></script>
|
||||
|
||||
@@ -24,15 +24,21 @@
|
||||
<span class="link-title">Table Words</span>
|
||||
</a>
|
||||
</li>
|
||||
@if(auth()->user()->hasRole('ADMIN'))
|
||||
<li class="nav-item nav-category">Admin</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{route('users.index')}}">
|
||||
<i class="link-icon" data-feather="users"></i>
|
||||
<span class="link-title">Users</span>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@role('ADMIN')
|
||||
<li class="nav-item nav-category">Admin</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{route('users.index')}}">
|
||||
<i class="link-icon fa-regular fa-users"></i>
|
||||
<span class="link-title">Users</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{route('roles.index')}}">
|
||||
<i class="link-icon fa-regular fa-user-shield"></i>
|
||||
<span class="link-title">Roles</span>
|
||||
</a>
|
||||
</li>
|
||||
@endrole
|
||||
|
||||
|
||||
{{-- <li class="nav-item nav-category">web apps</li>--}}
|
||||
@@ -335,13 +341,13 @@
|
||||
{{-- </ul>--}}
|
||||
{{-- </div>--}}
|
||||
{{-- </li>--}}
|
||||
<li class="nav-item nav-category">Docs</li>
|
||||
<li class="nav-item">
|
||||
<a href="https://www.nobleui.com/html/documentation/docs.html" target="_blank" class="nav-link">
|
||||
<i class="link-icon" data-feather="hash"></i>
|
||||
<span class="link-title">Documentation</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item nav-category">Docs</li>
|
||||
<li class="nav-item">
|
||||
<a href="https://www.nobleui.com/html/documentation/docs.html" target="_blank" class="nav-link">
|
||||
<i class="link-icon" data-feather="hash"></i>
|
||||
<span class="link-title">Documentation</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.3.0/dist/select2-bootstrap-5-theme.min.css" />
|
||||
|
||||
Reference in New Issue
Block a user