final commit
This commit is contained in:
@@ -7,12 +7,11 @@ use App\Model\helpdesk\Notification\Notification;
|
|||||||
use App\Model\helpdesk\Notification\UserNotification;
|
use App\Model\helpdesk\Notification\UserNotification;
|
||||||
use App\User;
|
use App\User;
|
||||||
|
|
||||||
class NotificationController extends Controller
|
class NotificationController extends Controller {
|
||||||
{
|
|
||||||
public $user;
|
public $user;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct() {
|
||||||
{
|
|
||||||
$user = new User();
|
$user = new User();
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
}
|
}
|
||||||
@@ -22,8 +21,7 @@ class NotificationController extends Controller
|
|||||||
*
|
*
|
||||||
* @return response
|
* @return response
|
||||||
*/
|
*/
|
||||||
public static function getNotifications()
|
public static function getNotifications() {
|
||||||
{
|
|
||||||
$notifications = UserNotification::join('notifications', 'user_notification.notification_id', '=', 'notifications.id')
|
$notifications = UserNotification::join('notifications', 'user_notification.notification_id', '=', 'notifications.id')
|
||||||
->join('notification_types', 'notifications.type_id', '=', 'notification_types.id')
|
->join('notification_types', 'notifications.type_id', '=', 'notification_types.id')
|
||||||
->where('user_notification.user_id', '=', \Auth::user()->id)
|
->where('user_notification.user_id', '=', \Auth::user()->id)
|
||||||
@@ -32,14 +30,13 @@ class NotificationController extends Controller
|
|||||||
return $notifications;
|
return $notifications;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create($model_id, $userid_created, $type_id, $forwhome = [])
|
public function create($model_id, $userid_created, $type_id, $forwhome = []) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
if (empty($forwhome)) {
|
if (empty($forwhome)) {
|
||||||
$forwhome = $this->user->where('role', '!=', 'user')->get()->toArray();
|
$forwhome = $this->user->where('role', '!=', 'user')->get()->toArray();
|
||||||
}
|
}
|
||||||
//dd($forwhome);
|
//dd($forwhome);
|
||||||
//system notification
|
//system notification
|
||||||
$notification = new Notification();
|
$notification = new Notification();
|
||||||
$UN = new UserNotification();
|
$UN = new UserNotification();
|
||||||
|
|
||||||
@@ -52,8 +49,16 @@ class NotificationController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function markRead($id)
|
public function markAllRead($id) {
|
||||||
{
|
$markasread = UserNotification::where('user_id', '=', \Auth::user()->id)->where('is_read', '=', '0')->get();
|
||||||
|
foreach ($markasread as $mark) {
|
||||||
|
$mark->is_read = '1';
|
||||||
|
$mark->save();
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function markRead($id) {
|
||||||
$markasread = UserNotification::where('notification_id', '=', $id)->where('user_id', '=', \Auth::user()->id)->where('is_read', '=', '0')->get();
|
$markasread = UserNotification::where('notification_id', '=', $id)->where('user_id', '=', \Auth::user()->id)->where('is_read', '=', '0')->get();
|
||||||
foreach ($markasread as $mark) {
|
foreach ($markasread as $mark) {
|
||||||
$mark->is_read = '1';
|
$mark->is_read = '1';
|
||||||
@@ -63,15 +68,13 @@ class NotificationController extends Controller
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show()
|
public function show() {
|
||||||
{
|
|
||||||
$notifications = $this->getNotifications();
|
$notifications = $this->getNotifications();
|
||||||
|
|
||||||
return view('notifications-all', compact('notifications'));
|
return view('notifications-all', compact('notifications'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete($id)
|
public function delete($id) {
|
||||||
{
|
|
||||||
$markasread = UserNotification::where('notification_id', '=', $id)->where('user_id', '=', \Auth::user()->id)->get();
|
$markasread = UserNotification::where('notification_id', '=', $id)->where('user_id', '=', \Auth::user()->id)->get();
|
||||||
foreach ($markasread as $mark) {
|
foreach ($markasread as $mark) {
|
||||||
$mark->delete();
|
$mark->delete();
|
||||||
@@ -79,4 +82,5 @@ class NotificationController extends Controller
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,7 @@ Route::group(['middleware' => 'roles', 'middleware' => 'auth', 'middleware' => '
|
|||||||
|
|
||||||
//Notification marking
|
//Notification marking
|
||||||
Route::post('mark-read/{id}', 'Common\NotificationController@markRead');
|
Route::post('mark-read/{id}', 'Common\NotificationController@markRead');
|
||||||
|
Route::post('mark-all-read/{id}', 'Common\NotificationController@markAllRead');
|
||||||
Breadcrumbs::register('notification.list', function ($breadcrumbs) {
|
Breadcrumbs::register('notification.list', function ($breadcrumbs) {
|
||||||
$breadcrumbs->parent('dashboard');
|
$breadcrumbs->parent('dashboard');
|
||||||
$breadcrumbs->push('All Notifications', route('notification.list'));
|
$breadcrumbs->push('All Notifications', route('notification.list'));
|
||||||
@@ -676,7 +677,7 @@ Route::get('/change-file-permission', ['as' => 'change-permission', 'uses' => 'I
|
|||||||
|=============================================================
|
|=============================================================
|
||||||
| Cron Job links
|
| Cron Job links
|
||||||
|=============================================================
|
|=============================================================
|
||||||
| These links are for cron job execution
|
| These links are for cron job execution
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
Route::get('readmails', ['as' => 'readmails', 'uses' => 'Agent\helpdesk\MailController@readmails']);
|
Route::get('readmails', ['as' => 'readmails', 'uses' => 'Agent\helpdesk\MailController@readmails']);
|
||||||
|
@@ -122,7 +122,7 @@ class="active"
|
|||||||
|
|
||||||
<!-- checkbox -->
|
<!-- checkbox -->
|
||||||
<input type="checkbox" value="" name="cc" class="noti_User clickfun" id="{{$notification -> notification_id}}">
|
<input type="checkbox" value="" name="cc" class="noti_User clickfun" id="{{$notification -> notification_id}}">
|
||||||
<label for='cl' data-toggle="tooltip" data-placement="top" title="Mark Read"><span></span> <img src="{{$user->profile_pic}}" class="img-circle" style="width:6%;height: 6%" alt="User Image" />
|
<label for='cl' data-toggle="tooltip" data-placement="top" title="Mark Read"><span></span> <img src="{{$user->profile_pic}}" class="img-circle" style="width:25px;height: 25px" alt="User Image" />
|
||||||
<!-- todo text -->
|
<!-- todo text -->
|
||||||
<h6 class="textcontent marginzero"><a href="{!! route('user.show', $notification->notification_id) !!}" id="{{$notification -> notification_id}}" class='noti_User'>{!! $notification->message !!}</a></h6>
|
<h6 class="textcontent marginzero"><a href="{!! route('user.show', $notification->notification_id) !!}" id="{{$notification -> notification_id}}" class='noti_User'>{!! $notification->message !!}</a></h6>
|
||||||
<small class="label label-danger"><i class="fa fa-clock-o"></i> {{ $notification -> created_at }}</small></label> <!-- Emphasis label -->
|
<small class="label label-danger"><i class="fa fa-clock-o"></i> {{ $notification -> created_at }}</small></label> <!-- Emphasis label -->
|
||||||
@@ -139,7 +139,7 @@ class="active"
|
|||||||
|
|
||||||
<!-- checkbox -->
|
<!-- checkbox -->
|
||||||
<input type="checkbox" value="" name="cc" class="noti_User clickfun" id="{{$notification -> notification_id}}">
|
<input type="checkbox" value="" name="cc" class="noti_User clickfun" id="{{$notification -> notification_id}}">
|
||||||
<label for='cl' data-toggle="tooltip" data-placement="top" title="Mark Read"><span></span> <img src="{{$user->profile_pic}}" class="img-circle" style="width:6%;height: 6%" alt="User Image" />
|
<label for='cl' data-toggle="tooltip" data-placement="top" title="Mark Read"><span></span> <img src="{{$user->profile_pic}}" class="img-circle" style="width:25px;height: 25px" alt="User Image" />
|
||||||
<!-- todo text -->
|
<!-- todo text -->
|
||||||
<h6 class="textcontent marginzero"><a href="{!! route('user.show', $notification->notification_id) !!}" id="{{$notification -> notification_id}}" class='noti_User'>{!! $notification->message !!}</a></h6>
|
<h6 class="textcontent marginzero"><a href="{!! route('user.show', $notification->notification_id) !!}" id="{{$notification -> notification_id}}" class='noti_User'>{!! $notification->message !!}</a></h6>
|
||||||
<small class="label label-danger"><i class="fa fa-clock-o"></i> {{ $notification -> created_at }}</small></label> <!-- Emphasis label -->
|
<small class="label label-danger"><i class="fa fa-clock-o"></i> {{ $notification -> created_at }}</small></label> <!-- Emphasis label -->
|
||||||
@@ -156,7 +156,7 @@ class="active"
|
|||||||
<li class="task">
|
<li class="task">
|
||||||
<?php $ticket_number = App\Model\helpdesk\Ticket\Tickets::whereId($notification -> model_id)->first(); ?>
|
<?php $ticket_number = App\Model\helpdesk\Ticket\Tickets::whereId($notification -> model_id)->first(); ?>
|
||||||
<input type="checkbox" value="" name="cc" data-toggle="tooltip" data-placement="top" title="Mark Read" class="noti_User clickfun" id="{{$notification -> notification_id}}">
|
<input type="checkbox" value="" name="cc" data-toggle="tooltip" data-placement="top" title="Mark Read" class="noti_User clickfun" id="{{$notification -> notification_id}}">
|
||||||
<label for='cl'><span></span> <img src="{{$user->profile_pic}}" class="img-circle" style="width:6%;height: 6%" alt="User Image" />
|
<label for='cl'><span></span> <img src="{{$user->profile_pic}}" class="img-circle" style="width:25px;height: 25px" alt="User Image" />
|
||||||
<h6 class="textcontent marginzero"><a href="{!! route('ticket.thread', $notification->model_id) !!}" id='{{ $notification->notification_id }}' class='noti_User'>{!! $notification->message !!} with id "{!!$ticket_number->ticket_number!!}"</a></h6>
|
<h6 class="textcontent marginzero"><a href="{!! route('ticket.thread', $notification->model_id) !!}" id='{{ $notification->notification_id }}' class='noti_User'>{!! $notification->message !!} with id "{!!$ticket_number->ticket_number!!}"</a></h6>
|
||||||
<small class="label label-info"><i class="fa fa-clock-o"></i> {{ $notification -> created_at }}</small>
|
<small class="label label-info"><i class="fa fa-clock-o"></i> {{ $notification -> created_at }}</small>
|
||||||
</label><div class="tools">
|
</label><div class="tools">
|
||||||
@@ -168,7 +168,7 @@ class="active"
|
|||||||
<li>
|
<li>
|
||||||
<?php $ticket_number = App\Model\helpdesk\Ticket\Tickets::whereId($notification -> model_id)->first(); ?>
|
<?php $ticket_number = App\Model\helpdesk\Ticket\Tickets::whereId($notification -> model_id)->first(); ?>
|
||||||
<input type="checkbox" value="" name="cc" data-toggle="tooltip" data-placement="top" title="Mark Read" class="noti_User clickfun" id="{{$notification -> notification_id}}">
|
<input type="checkbox" value="" name="cc" data-toggle="tooltip" data-placement="top" title="Mark Read" class="noti_User clickfun" id="{{$notification -> notification_id}}">
|
||||||
<label for='cl'><span></span> <img src="{{$user->profile_pic}}" class="img-circle" style="width:6%;height: 6%" alt="User Image" />
|
<label for='cl'><span></span> <img src="{{$user->profile_pic}}" class="img-circle" style="width:25px;height: 25px" alt="User Image" />
|
||||||
<h6 class="textcontent marginzero"><a href="{!! route('ticket.thread', $notification->model_id) !!}" id='{{ $notification->notification_id }}' class='noti_User'>{!! $notification->message !!} with id "{!!$ticket_number->ticket_number!!}"</a></h6>
|
<h6 class="textcontent marginzero"><a href="{!! route('ticket.thread', $notification->model_id) !!}" id='{{ $notification->notification_id }}' class='noti_User'>{!! $notification->message !!} with id "{!!$ticket_number->ticket_number!!}"</a></h6>
|
||||||
<small class="label label-info"><i class="fa fa-clock-o"></i> {{ $notification -> created_at }}</small>
|
<small class="label label-info"><i class="fa fa-clock-o"></i> {{ $notification -> created_at }}</small>
|
||||||
</label><div class="tools">
|
</label><div class="tools">
|
||||||
|
@@ -42,19 +42,17 @@
|
|||||||
@yield('HeadInclude')
|
@yield('HeadInclude')
|
||||||
</head>
|
</head>
|
||||||
<body class="skin-yellow fixed">
|
<body class="skin-yellow fixed">
|
||||||
<?php
|
<?php
|
||||||
$replacetop = 0;
|
$replacetop = 0;
|
||||||
$replacetop = \Event::fire('service.desk.admin.topbar.replace', array());
|
$replacetop = \Event::fire('service.desk.admin.topbar.replace', array());
|
||||||
|
if (count($replacetop) == 0) {
|
||||||
if (count($replacetop) == 0) {
|
$replacetop = 0;
|
||||||
$replacetop = 0;
|
}
|
||||||
}
|
$replaceside = 0;
|
||||||
$replaceside = 0;
|
$replaceside = \Event::fire('service.desk.admin.sidebar.replace', array());
|
||||||
$replaceside = \Event::fire('service.desk.admin.sidebar.replace', array());
|
if (count($replaceside) == 0) {
|
||||||
|
$replaceside = 0;
|
||||||
if (count($replaceside) == 0) {
|
}
|
||||||
$replaceside = 0;
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<header class="main-header">
|
<header class="main-header">
|
||||||
@@ -71,15 +69,15 @@
|
|||||||
<?php $notifications = App\Http\Controllers\Common\NotificationController::getNotifications(); ?>
|
<?php $notifications = App\Http\Controllers\Common\NotificationController::getNotifications(); ?>
|
||||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||||
<div class="collapse navbar-collapse" id="navbar-collapse">
|
<div class="collapse navbar-collapse" id="navbar-collapse">
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-left">
|
<ul class="nav navbar-nav navbar-left">
|
||||||
@if($replacetop==0)
|
@if($replacetop==0)
|
||||||
<li @yield('settings')><a href="{!! url('admin') !!}">{!! Lang::get('lang.home') !!}</a></li>
|
<li @yield('settings')><a href="{!! url('admin') !!}">{!! Lang::get('lang.home') !!}</a></li>
|
||||||
@endif
|
@endif
|
||||||
<?php \Event::fire('service.desk.admin.topbar', array()); ?>
|
<?php \Event::fire('service.desk.admin.topbar', array()); ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<?php $noti = \App\Model\helpdesk\Notification\UserNotification::where('user_id', '=', Auth::user()->id)->where('is_read', '0')->get(); ?>
|
<?php $noti = \App\Model\helpdesk\Notification\UserNotification::where('user_id', '=', Auth::user()->id)->where('is_read', '0')->get(); ?>
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
@@ -90,97 +88,95 @@
|
|||||||
<i class="fa fa-bell-o"></i>
|
<i class="fa fa-bell-o"></i>
|
||||||
<span class="label label-danger" id="count">{!! count($noti) !!}</span>
|
<span class="label label-danger" id="count">{!! count($noti) !!}</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu" style="width: -moz-max-content;
|
<ul class="dropdown-menu" style="width:500px">
|
||||||
width: -webkit-max-content;
|
|
||||||
width: -o-max-content;">
|
|
||||||
|
|
||||||
<div id="alert11" class="alert alert-success alert-dismissable" style="display:none;">
|
<div id="alert11" class="alert alert-success alert-dismissable" style="display:none;">
|
||||||
<button id="dismiss11" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button id="dismiss11" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<h4><i class="icon fa fa-check"></i>Alert!</h4>
|
<h4><i class="icon fa fa-check"></i>Alert!</h4>
|
||||||
<div id="message-success1"></div>
|
<div id="message-success1"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<li id="refreshNote">
|
<li id="refreshNote">
|
||||||
|
|
||||||
<li class="header">You have {!! count($noti) !!} notifications. <a class="pull-right" id="read-all" href="#">Mark all as read.</a></li>
|
<li class="header">You have {!! count($noti) !!} notifications. <a class="pull-right" id="read-all" href="#">Mark all as read.</a> </li>
|
||||||
|
|
||||||
<ul class="menu">
|
<ul class="menu">
|
||||||
@foreach($notifications as $notification)
|
@foreach($notifications as $notification)
|
||||||
<?php $user = App\User::whereId($notification->user_id)->first(); ?>
|
<?php $user = App\User::whereId($notification->user_id)->first(); ?>
|
||||||
@if($notification->type == 'registration')
|
@if($notification->type == 'registration')
|
||||||
@if($notification->is_read == 1)
|
@if($notification->is_read == 1)
|
||||||
<li class="task" style="list-style: none; margin-left: -30px;"><span> <img src="{{$user->profile_pic}}" class="user-image" style="width:6%;height: 5%" alt="User Image" />
|
<li class="task" style="list-style: none; margin-left: -30px;"><span> <img src="{{$user->profile_pic}}" class="user-image" style="width:6%;height: 5%" alt="User Image" />
|
||||||
<a href="{!! route('user.show', $notification->model_id) !!}" id="{{$notification->notification_id}}" class='noti_User'>
|
<a href="{!! route('user.show', $notification->model_id) !!}" id="{{$notification->notification_id}}" class='noti_User'>
|
||||||
{!! $notification->message !!}
|
{!! $notification->message !!}
|
||||||
</a></span>
|
</a></span>
|
||||||
</li>
|
</li>
|
||||||
@else
|
@else
|
||||||
<li style="list-style: none; margin-left: -30px;"><span> <img src="{{$user->profile_pic}}" class="user-image" style="width:6%;height: 5%" alt="User Image" />
|
<li style="list-style: none; margin-left: -30px;"><span> <img src="{{$user->profile_pic}}" class="user-image" style="width:6%;height: 5%" alt="User Image" />
|
||||||
<a href="{!! route('user.show', $notification->model_id) !!}" id="{{$notification->notification_id}}" class='noti_User'>
|
<a href="{!! route('user.show', $notification->model_id) !!}" id="{{$notification->notification_id}}" class='noti_User'>
|
||||||
{!! $notification->message !!}
|
{!! $notification->message !!}
|
||||||
</a></span>
|
</a></span>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
|
||||||
@else
|
|
||||||
|
|
||||||
<?php $ticket_number = App\Model\helpdesk\Ticket\Tickets::whereId($notification -> model_id)->first(); ?>
|
|
||||||
@if($notification->is_read == 1)
|
|
||||||
<li class="task" style="list-style: none;margin-left: -30px"><span> <img src="{{$user->profile_pic}}" class="img-circle" style="width:6%;height: 5%" alt="User Image" />
|
|
||||||
<a href="{!! route('ticket.thread', $notification->model_id) !!}" id='{{ $notification->notification_id}}' class='noti_User'>
|
|
||||||
{!! $notification->message !!} with id "{!!$ticket_number->ticket_number!!}"
|
|
||||||
</a></span>
|
|
||||||
</li>
|
|
||||||
@else
|
|
||||||
<li style="list-style: none;margin-left: -30px"><span> <img src="{{$user->profile_pic}}" class="img-circle" style="width:6%;height: 5%" alt="User Image" />
|
|
||||||
<a href="{!! route('ticket.thread', $notification->model_id) !!}" id='{{ $notification->notification_id}}' class='noti_User'>
|
|
||||||
{!! $notification->message !!} with id "{!!$ticket_number->ticket_number!!}"
|
|
||||||
</a></span>
|
|
||||||
</li>
|
|
||||||
@endif
|
|
||||||
@endif
|
|
||||||
@endforeach
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="footer no-border"><div class="col-md-5"></div><div class="col-md-2">
|
|
||||||
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}" style="display: none;" id="notification-loader">
|
|
||||||
</div><div class="col-md-5"></div></li>
|
|
||||||
<li class="footer"><a href="{{ url('notifications-list')}}">View all</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="dropdown user user-menu">
|
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
|
||||||
@if(Auth::user())
|
|
||||||
|
|
||||||
<img src="{{Auth::user()->profile_pic}}"class="user-image" alt="User Image"/>
|
|
||||||
|
|
||||||
<span class="hidden-xs">{!! Auth::user()->first_name." ".Auth::user()->last_name !!}</span>
|
|
||||||
@endif
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<!-- User image -->
|
|
||||||
<li class="user-header" style="background-color:#343F44;">
|
|
||||||
@if(Auth::user())
|
|
||||||
<img src="{{Auth::user()->profile_pic}}" class="img-circle" alt="User Image" />
|
|
||||||
<p>
|
|
||||||
{!! Auth::user()->first_name !!}{!! " ". Auth::user()->last_name !!} - {{Auth::user()->role}}
|
|
||||||
<small></small>
|
|
||||||
</p>
|
|
||||||
@endif
|
@endif
|
||||||
</li>
|
@else
|
||||||
<!-- Menu Footer-->
|
|
||||||
<li class="user-footer" style="background-color:#1a2226;">
|
<?php $ticket_number = App\Model\helpdesk\Ticket\Tickets::whereId($notification->model_id)->first(); ?>
|
||||||
<div class="pull-left">
|
@if($notification->is_read == 1)
|
||||||
<a href="{{url('profile')}}" class="btn btn-info btn-sm"><b>{!! Lang::get('lang.profile') !!}</b></a>
|
<li class="task" style="list-style: none;margin-left: -30px"><span> <img src="{{$user->profile_pic}}" class="img-circle" style="width:6%;height: 5%" alt="User Image" />
|
||||||
</div>
|
<a href="{!! route('ticket.thread', $notification->model_id) !!}" id='{{ $notification->notification_id}}' class='noti_User'>
|
||||||
<div class="pull-right">
|
{!! $notification->message !!} with id "{!!$ticket_number->ticket_number!!}"
|
||||||
<a href="{{url('auth/logout')}}" class="btn btn-danger btn-sm"><b>{!! Lang::get('lang.sign_out') !!}</b></a>
|
</a></span>
|
||||||
</div>
|
</li>
|
||||||
</li>
|
@else
|
||||||
</ul>
|
<li style="list-style: none;margin-left: -30px"><span> <img src="{{$user->profile_pic}}" class="img-circle" style="width:6%;height: 5%" alt="User Image" />
|
||||||
|
<a href="{!! route('ticket.thread', $notification->model_id) !!}" id='{{ $notification->notification_id}}' class='noti_User'>
|
||||||
|
{!! $notification->message !!} with id "{!!$ticket_number->ticket_number!!}"
|
||||||
|
</a></span>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="footer no-border"><div class="col-md-5"></div><div class="col-md-2">
|
||||||
|
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}" style="display: none;" id="notification-loader">
|
||||||
|
</div><div class="col-md-5"></div></li>
|
||||||
|
<li class="footer"><a href="{{ url('notifications-list')}}">View all</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="dropdown user user-menu">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
|
@if(Auth::user())
|
||||||
|
|
||||||
|
<img src="{{Auth::user()->profile_pic}}"class="user-image" alt="User Image"/>
|
||||||
|
|
||||||
|
<span class="hidden-xs">{!! Auth::user()->first_name." ".Auth::user()->last_name !!}</span>
|
||||||
|
@endif
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<!-- User image -->
|
||||||
|
<li class="user-header" style="background-color:#343F44;">
|
||||||
|
@if(Auth::user())
|
||||||
|
<img src="{{Auth::user()->profile_pic}}" class="img-circle" alt="User Image" />
|
||||||
|
<p>
|
||||||
|
{!! Auth::user()->first_name !!}{!! " ". Auth::user()->last_name !!} - {{Auth::user()->role}}
|
||||||
|
<small></small>
|
||||||
|
</p>
|
||||||
|
@endif
|
||||||
|
</li>
|
||||||
|
<!-- Menu Footer-->
|
||||||
|
<li class="user-footer" style="background-color:#1a2226;">
|
||||||
|
<div class="pull-left">
|
||||||
|
<a href="{{url('admin-profile')}}" class="btn btn-info btn-sm"><b>{!! Lang::get('lang.profile') !!}</b></a>
|
||||||
|
</div>
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="{{url('auth/logout')}}" class="btn btn-danger btn-sm"><b>{!! Lang::get('lang.sign_out') !!}</b></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
@@ -310,7 +306,8 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="header">{!! Lang::get('lang.Updates') !!}</li>
|
<li class="header">{!! Lang::get('lang.Updates') !!}</li>
|
||||||
<li @yield('update')>
|
<li @yield('update')>
|
||||||
<?php $update = App\Model\helpdesk\Utility\Version_Check::where('id', '=', 1)->first();
|
<?php
|
||||||
|
$update = App\Model\helpdesk\Utility\Version_Check::where('id', '=', 1)->first();
|
||||||
if ($update->current_version == $update->new_version) {
|
if ($update->current_version == $update->new_version) {
|
||||||
?>
|
?>
|
||||||
<a href="{!! URL::route('checkupdate') !!}" id="checkUpdate">
|
<a href="{!! URL::route('checkupdate') !!}" id="checkUpdate">
|
||||||
@@ -329,7 +326,7 @@
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
<?php \Event::fire('service.desk.admin.sidebar', array()); ?>
|
<?php \Event::fire('service.desk.admin.sidebar', array()); ?>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
<!-- /.sidebar -->
|
<!-- /.sidebar -->
|
||||||
@@ -388,7 +385,7 @@
|
|||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
//Add text editor
|
//Add text editor
|
||||||
$("textarea").wysihtml5();
|
$("textarea").wysihtml5();
|
||||||
});
|
});
|
||||||
// $(function(){
|
// $(function(){
|
||||||
// $("#checkUpdate").on('click',function(){
|
// $("#checkUpdate").on('click',function(){
|
||||||
@@ -402,55 +399,74 @@ $("textarea").wysihtml5();
|
|||||||
// alert(response);
|
// alert(response);
|
||||||
// $("#gif-update").hide();
|
// $("#gif-update").hide();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// })
|
// })
|
||||||
// return false;
|
// return false;
|
||||||
// });
|
// });
|
||||||
// });
|
// });
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
//Enable iCheck plugin for checkboxes
|
//Enable iCheck plugin for checkboxes
|
||||||
//iCheck for checkbox and radio inputs
|
//iCheck for checkbox and radio inputs
|
||||||
$('input[type="checkbox"]').iCheck({
|
$('input[type="checkbox"]').iCheck({
|
||||||
checkboxClass: 'icheckbox_flat-blue',
|
checkboxClass: 'icheckbox_flat-blue',
|
||||||
radioClass: 'iradio_flat-blue'
|
radioClass: 'iradio_flat-blue'
|
||||||
});
|
});
|
||||||
|
|
||||||
//Enable check and uncheck all functionality
|
//Enable check and uncheck all functionality
|
||||||
$(".checkbox-toggle").click(function() {
|
$(".checkbox-toggle").click(function() {
|
||||||
var clicks = $(this).data('clicks');
|
var clicks = $(this).data('clicks');
|
||||||
if (clicks) {
|
if (clicks) {
|
||||||
//Uncheck all checkboxes
|
//Uncheck all checkboxes
|
||||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||||
} else {
|
} else {
|
||||||
//Check all checkboxes
|
//Check all checkboxes
|
||||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||||
}
|
}
|
||||||
$(this).data("clicks", !clicks);
|
$(this).data("clicks", !clicks);
|
||||||
});
|
});
|
||||||
|
|
||||||
//Handle starring for glyphicon and font awesome
|
//Handle starring for glyphicon and font awesome
|
||||||
$(".mailbox-star").click(function(e) {
|
$(".mailbox-star").click(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
//detect type
|
//detect type
|
||||||
var $this = $(this).find("a > i");
|
var $this = $(this).find("a > i");
|
||||||
var glyph = $this.hasClass("glyphicon");
|
var glyph = $this.hasClass("glyphicon");
|
||||||
var fa = $this.hasClass("fa");
|
var fa = $this.hasClass("fa");
|
||||||
|
|
||||||
//Switch states
|
//Switch states
|
||||||
if (glyph) {
|
if (glyph) {
|
||||||
$this.toggleClass("glyphicon-star");
|
$this.toggleClass("glyphicon-star");
|
||||||
$this.toggleClass("glyphicon-star-empty");
|
$this.toggleClass("glyphicon-star-empty");
|
||||||
}
|
}
|
||||||
|
if (fa) {
|
||||||
if (fa) {
|
$this.toggleClass("fa-star");
|
||||||
$this.toggleClass("fa-star");
|
$this.toggleClass("fa-star-o");
|
||||||
$this.toggleClass("fa-star-o");
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<!-- // <script src="../plugins/jQuery/jQuery-2.1.3.min.js"></script> -->
|
<script>
|
||||||
|
$('#read-all').click(function() {
|
||||||
|
|
||||||
|
var id2 = <?php echo \Auth::user()->id ?>;
|
||||||
|
var dataString = 'id=' + id2;
|
||||||
|
$.ajax
|
||||||
|
({
|
||||||
|
type: "POST",
|
||||||
|
url: "{{url('mark-all-read')}}" + "/" + id2,
|
||||||
|
data: dataString,
|
||||||
|
cache: false,
|
||||||
|
beforeSend: function() {
|
||||||
|
$('#myDropdown').on('hide.bs.dropdown', function() {
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
$("#refreshNote").hide();
|
||||||
|
$("#notification-loader").show();
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
$("#refreshNote").load("<?php echo $_SERVER['REQUEST_URI']; ?> #refreshNote");
|
||||||
|
$("#notification-loader").hide();
|
||||||
|
$('#myDropdown').removeClass('open');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});</script>
|
||||||
|
<!-- // <script src="../plugins/jQuery/jQuery-2.1.3.min.js"></script> -->
|
||||||
<script src="{{asset("lb-faveo/js/tabby.js")}}"></script>
|
<script src="{{asset("lb-faveo/js/tabby.js")}}"></script>
|
||||||
<!-- // <script src="{{asset("dist/js/editor.js")}}"></script> -->
|
<!-- // <script src="{{asset("dist/js/editor.js")}}"></script> -->
|
||||||
<!-- CK Editor -->
|
<!-- CK Editor -->
|
||||||
|
@@ -102,9 +102,7 @@
|
|||||||
<i class="fa fa-bell-o"></i>
|
<i class="fa fa-bell-o"></i>
|
||||||
<span class="label label-danger" id="count">{!! count($noti) !!}</span>
|
<span class="label label-danger" id="count">{!! count($noti) !!}</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu" style="width: -moz-max-content;
|
<ul class="dropdown-menu" style="width:500px">
|
||||||
width: -webkit-max-content;
|
|
||||||
width: -o-max-content;">
|
|
||||||
|
|
||||||
<div id="alert11" class="alert alert-success alert-dismissable" style="display:none;">
|
<div id="alert11" class="alert alert-success alert-dismissable" style="display:none;">
|
||||||
<button id="dismiss11" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button id="dismiss11" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
@@ -172,7 +172,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{!! Form::close() !!}
|
{!! Form::close() !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<!-- Left side column. contains the logo and sidebar -->
|
<!-- Left side column. contains the logo and sidebar -->
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
<div id="main" class="site-main clearfix">
|
<div id="main" class="site-main clearfix">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="content-area">
|
<div class="content-area">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@if(Session::has('success'))
|
@if(Session::has('success'))
|
||||||
<div class="alert alert-success alert-dismissable">
|
<div class="alert alert-success alert-dismissable">
|
||||||
<i class="fa fa-check-circle"></i>
|
<i class="fa fa-check-circle"></i>
|
||||||
@@ -192,6 +192,13 @@
|
|||||||
{{Session::get('success')}}
|
{{Session::get('success')}}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
@if(Session::has('warning'))
|
||||||
|
<div class="alert alert-warning alert-dismissable">
|
||||||
|
<i class="fa fa-check-circle"></i>
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
{!! Session::get('warning') !!}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
<!-- failure message -->
|
<!-- failure message -->
|
||||||
@if(Session::has('fails'))
|
@if(Session::has('fails'))
|
||||||
@if(Session::has('check'))
|
@if(Session::has('check'))
|
||||||
@@ -219,7 +226,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.content-wrapper -->
|
<!-- /.content-wrapper -->
|
||||||
<?php
|
<?php
|
||||||
$footer1 = App\Model\helpdesk\Theme\Widgets::where('name', '=', 'footer1')->first();
|
$footer1 = App\Model\helpdesk\Theme\Widgets::where('name', '=', 'footer1')->first();
|
||||||
@@ -250,7 +257,7 @@
|
|||||||
<section id="section-latest-news" class="section">
|
<section id="section-latest-news" class="section">
|
||||||
<h2 class="section-title h4 clearfix">{!!$footer2->title!!}</h2>
|
<h2 class="section-title h4 clearfix">{!!$footer2->title!!}</h2>
|
||||||
<div class="textwidget">
|
<div class="textwidget">
|
||||||
<p>{!! $footer2->value !!}</p>
|
<p>{!! $footer2->value !!}</p>
|
||||||
</div>
|
</div>
|
||||||
</section><!-- #section-latest-news -->
|
</section><!-- #section-latest-news -->
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user