mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
81 lines
4.0 KiB
PHP
81 lines
4.0 KiB
PHP
<?php
|
|
$nbOfNotification = 0;
|
|
foreach (Auth::user()->unreadNotifications as $notification) {
|
|
$nbOfNotification = $nbOfNotification + 1;
|
|
}
|
|
?>
|
|
<header id="header" class="header">
|
|
|
|
<div class="header-menu">
|
|
|
|
<div class="col-sm-7">
|
|
<a id="menuToggle" class="menutoggle pull-left"><i class="fa fa fa-tasks"></i></a>
|
|
<div class="header-left">
|
|
<button class="search-trigger"><i class="fa fa-search"></i></button>
|
|
<div class="form-inline">
|
|
<form class="search-form">
|
|
<input class="form-control mr-sm-2" type="text" placeholder="{{ trans('admin/header.search_bar')}}" aria-label="Search">
|
|
<button class="search-close" type="submit"><i class="fa fa-close"></i></button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="dropdown for-notification">
|
|
<button class="btn btn-secondary dropdown-toggle" type="button" id="notification" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<i class="fa fa-bell"></i>
|
|
<?php
|
|
if($nbOfNotification != 0){ ?>
|
|
<span class="count bg-danger">{{ $nbOfNotification }}</span>
|
|
<?php } ?>
|
|
</button>
|
|
<div class="dropdown-menu" aria-labelledby="notification">
|
|
<a class="btn btn-primary btn-block" href="/admin/notication/mark">Manquer toutes les notifications comme lu</a>
|
|
<hr>
|
|
<?php
|
|
foreach (Auth::user()->unreadNotifications as $notification) {
|
|
$fa_icon = "fa-info";
|
|
$found = strpos($notification->data['msg'],"Ajout");
|
|
if ($found !== false) {
|
|
$fa_icon = "fa-plus";
|
|
}
|
|
$found = strpos($notification->data['msg'],"Suppression");
|
|
if ($found !== false) {
|
|
$fa_icon = "fa-plus";
|
|
}
|
|
echo '<form method="post" action="/admin/notication/mark/'.$notification->id.'">'.csrf_field().'<button name="url" type="submit" value="'.$notification->data['url'].'" class="dropdown-item media cs-notification" href="#"><i class="fa '.$fa_icon.'"></i><p>'.$notification->data['msg'].'</p></button></form>';
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-5">
|
|
<div class="user-area dropdown float-right">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
|
|
<div class="btn">{{ Auth::User()->lastname }} {{ Auth::User()->firstname }}</div>
|
|
<img class="user-avatar rounded-circle" src="/assets/admin/images/avatar/user-{{ Auth::User()->avatar }}.jpg" alt="User Avatar">
|
|
</a>
|
|
|
|
<div class="user-menu dropdown-menu">
|
|
<a class="nav-link" href="/admin/profil"><i class="fa fa-user"></i> {{ trans('admin/header.profil')}}</a>
|
|
<!--<a class="nav-link" href="/admin/settings"><i class="fa fa-cog"></i> {{ trans('admin/header.settings')}}</a>-->
|
|
<a class="nav-link" href="/logout"><i class="fa fa-power-off"></i> {{ trans('admin/header.logout')}}</a>
|
|
</div>
|
|
</div>
|
|
|
|
<!--<div class="language-select dropdown" id="language-select">
|
|
<a class="dropdown-toggle" href="#" data-toggle="dropdown" id="language" aria-haspopup="true" aria-expanded="true">
|
|
<i class="flag-icon flag-icon-ca"></i>
|
|
</a>
|
|
<div class="dropdown-menu" aria-labelledby="language" >
|
|
<div class="dropdown-item">
|
|
<span class="flag-icon flag-icon-us"></span>
|
|
</div>
|
|
</div>
|
|
</div>-->
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</header><!-- /header -->
|