update v 1.0.7.5

This commit is contained in:
Sujit Prasad
2016-06-13 20:41:55 +05:30
parent aa9786d829
commit 283d97e3ea
5078 changed files with 339851 additions and 175995 deletions

View File

@@ -1,455 +1,457 @@
@extends('themes.default1.client.layout.client')
@section('HeadInclude')
@stop
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here') !!}: </li>
<li><a href="#">{!! Lang::get('lang.home') !!}</a></li>
<li class="active">{!! Lang::get('lang.ticket_status') !!}</li>
</ol>
</div>
@stop
@section('content')
<?php
$tickets = App\Model\helpdesk\Ticket\Tickets::where('id','=',\Crypt::decrypt($id))->first();
$thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id','=',\Crypt::decrypt($id))->first();
//$user = App\User::where('id','=',$id1)->first();?>
<?php
$tickets = App\Model\helpdesk\Ticket\Tickets::where('id', '=', \Crypt::decrypt($id))->first();
$thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Crypt::decrypt($id))->first();
//$user = App\User::where('id','=',$id1)->first();
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header">
<div class="row">
<div class="col-md-9">
<section class="content-header"><h3 class="box-title"><i class="fa fa-user"> </i> {{$thread->title}} </h3> ( {{$tickets->ticket_number}} )
</section>
</div>
<div class="col-md-3">
<div class="pull-right">
<!-- <button type="button" class="btn btn-default"><i class="fa fa-edit" style="color:green;"> </i> Edit</button> -->
{{-- <button type="button" class="btn btn-default"><i class="fa fa-print" style="color:blue;"> </i> {!! link_to_route('ticket.print','Print',[$tickets->id]) !!}</button> --}}
<!-- </div> -->
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-exchange" style="color:teal;"> </i>
{!! Lang::get('lang.change_status') !!} <span class="caret"></span>
</button>
<?php $statuses = \App\Model\helpdesk\Ticket\Ticket_Status::all(); ?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header">
<div class="row">
<div class="col-md-9">
<section class="content-header"><h3 class="box-title"><i class="fa fa-user"> </i> {{$thread->title}} </h3> ( {{$tickets->ticket_number}} )
</section>
</div>
<div class="col-md-3">
<div class="pull-right">
<!-- <button type="button" class="btn btn-default"><i class="fa fa-edit" style="color:green;"> </i> Edit</button> -->
{{-- <button type="button" class="btn btn-default"><i class="fa fa-print" style="color:blue;"> </i> {!! link_to_route('ticket.print','Print',[$tickets->id]) !!}</button> --}}
<!-- </div> -->
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-exchange" style="color:teal;"> </i>
{!! Lang::get('lang.change_status') !!} <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="#" id="open"><i class="fa fa-folder-open" style="color:#FFD600;"> </i>{!! Lang::get('lang.open') !!}</a></li>
<li><a href="#" id="close"><i class="fa fa-check" style="color:#15F109;"> </i>{!! Lang::get('lang.close') !!}</a></li>
<li><a href="#" id="resolved"><i class="fa fa-check-circle " style="color:#0EF1BE;"> </i> {!! Lang::get('lang.resolved') !!}</a></li>
</ul>
</div>
{!! Form::close() !!}
<ul class="dropdown-menu">
<li><a href="#" id="open"><i class="fa fa-folder-open" style="color:#FFD600;"> </i>{!! Lang::get('lang.open') !!}</a></li>
<li><a href="#" id="close"><i class="fa fa-check" style="color:#15F109;"> </i>{!! Lang::get('lang.close') !!}</a></li>
<li><a href="#" id="resolved"><i class="fa fa-check-circle " style="color:#0EF1BE;"> </i> {!! Lang::get('lang.resolved') !!}</a></li>
</ul>
</div>
{!! Form::close() !!}
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="ticketratings pull-right">
<table><tbody>
<?php $ratings = App\Model\helpdesk\Ratings\Rating::orderby('display_order')->get(); ?>
<form id="foo">
@foreach($ratings as $rating)
@if($rating->rating_area == 'Helpdesk Area')
<?php
$rating_value = App\Model\helpdesk\Ratings\RatingRef::where('rating_id', '=', $rating->id)->where('ticket_id', '=', $tickets->id)->first();
if ($rating_value == null) {
$ratingval = '0';
} else {
$ratingval = $rating_value->rating_value;
}
?>
<tr>
<th><div class="ticketratingtitle">{!! $rating->name !!} &nbsp;</div></th>&nbsp
<td>
<?php for ($i = 1; $i <= $rating->rating_scale; $i++) { ?>
<input type="radio" class="star" id="star5" name="{!! $rating->name !!}" value="{!! $i !!}"<?php echo ($ratingval == $i) ? 'checked' : '' ?> />
<?php } ?>
</td>
</tr>
@endif
@endforeach
</form></tbody> </table>
</div>
</div>
</div>
</div>
<div class="box-body" style="margin-bottom:-10px">
<div class="row">
<div id="loader" style="display:none;">
<div class="col-xs-5">
</div>
<div class="col-xs-1">
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}"><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</div>
<div class="col-xs-6">
</div>
</div>
<section class="content" id="refresh" style="margin-bottom:-10px;margin-top:-10px">
<div class="col-md-12">
<?php
$priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first();
?>
<div class="callout callout-default ">
<div class="row">
<div class="col-md-3">
<?php
$sla = $tickets->sla;
$SlaPlan = App\Model\helpdesk\Manage\Sla_plan::where('id', '=', 1)->first();
?>
<b>{!! Lang::get('lang.sla_plan') !!}: {{$SlaPlan->grace_period}} </b>
</div>
</div>
<div class="col-md-3">
<b>{!! Lang::get('lang.created_date') !!}: </b> {{ UTC::usertimezone($tickets->created_at) }}
</div>
<div class="row">
<div class="col-md-12">
<div class="ticketratings pull-right">
<table><tbody>
<form id="foo">
<tr>
<th><div class="ticketratingtitle">Overall Satisfaction &nbsp;</div></th>&nbsp
<td>
<input type="radio" class="star" id="star5" name="rating" value="1"<?php echo ($tickets->rating=='1')?'checked':'' ?> />
<input type="radio" class="star" id="star4" name="rating" value="2"<?php echo ($tickets->rating=='2')?'checked':'' ?> />
<input type="radio" class="star" id="star3" name="rating" value="3"<?php echo ($tickets->rating=='3')?'checked':'' ?>/>
<input type="radio" class="star" id="star2" name="rating" value="4"<?php echo ($tickets->rating=='4')?'checked':'' ?>/>
<input type="radio" class="star" id="star1" name="rating" value="5"<?php echo ($tickets->rating=='5')?'checked':'' ?> />
</td>
</tr>
</form>
</tbody> </table>
</div>
<div class="col-md-3">
<b>{!! Lang::get('lang.due_date') !!}: </b>
<?php
$time = $tickets->created_at;
$time = date_create($time);
date_add($time, date_interval_create_from_date_string($SlaPlan->grace_period));
echo UTC::usertimezone(date_format($time, 'd/m/Y H:i:s'));
?>
</div>
</div>
</div>
<div class="box-body" style="margin-bottom:-10px">
<div class="row">
<div id="loader" style="display:none;">
<div class="col-xs-5">
</div>
<div class="col-xs-1">
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}"><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</div>
<div class="col-xs-6">
</div>
</div>
<section class="content" id="refresh" style="margin-bottom:-10px;margin-top:-10px">
<div class="col-md-12">
<?php
$priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id','=',$tickets->priority_id)->first();
?>
<div class="callout callout-default ">
<div class="row">
<div class="col-md-3">
<?php
$sla = $tickets->sla;
$SlaPlan = App\Model\helpdesk\Manage\Sla_plan::where('id','=',1)->first();?>
<b>{!! Lang::get('lang.sla_plan') !!}: {{$SlaPlan->grace_period}} </b>
</div>
<div class="col-md-3">
<b>{!! Lang::get('lang.created_date') !!}: </b> {{ UTC::usertimezone($tickets->created_at) }}
</div>
<div class="col-md-3">
<b>{!! Lang::get('lang.due_date') !!}: </b>
<?php
$time = $tickets->created_at;
$time = date_create($time);
date_add($time, date_interval_create_from_date_string($SlaPlan->grace_period));
echo UTC::usertimezone(date_format($time, 'd/m/Y H:i:s'));
?>
</div>
<div class="col-md-3">
<?php $response = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id','=',$tickets->id)->where('is_internal','=',0)->get();?>
@foreach($response as $last)
<?php $ResponseDate = $last->created_at; ?>
@endforeach
<b>{!! Lang::get('lang.last_response') !!}: </b> {{ UTC::usertimezone($ResponseDate)}}
</div>
</div>
</div>
</div>
<div class="col-md-6">
<table class="table table-hover">
<!-- <tr><th></th><th></th></tr> -->
<tr><td><b>{!! Lang::get('lang.status') !!}:</b></td> <?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id','=',$tickets->status)->first();?>
@if($status->id == 1)
<td title="{{$status->properties}}" style="color:orange">{{$status->name}}</td></tr>
@elseif($status->id == 2)
<td title="{{$status->properties}}" style="color:green">{{$status->name}}</td></tr>
@elseif($status->id == 3)
<td title="{{$status->properties}}" style="color:green">{{$status->name}}</td></tr>
@endif
<tr><td><b>{!! Lang::get('lang.priority') !!}:</b></td> <?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id','=',$tickets->priority_id)->first();?>
@if($priority->priority_id == 1)
<td title="{{$priority->priority_desc}}" style="color:green">{{$priority->priority_desc}}</td>
@elseif($priority->priority_id == 2)
<td title="{{$priority->priority_desc}}" style="color:orange">{{$priority->priority_desc}}</td>
@elseif($priority->priority_id == 3)
<td title="{{$priority->priority_desc}}" style="color:red">{{$priority->priority_desc}}</td>
@endif
</tr>
<tr><td><b>{!! Lang::get('lang.department') !!}:</b></td>
<?php
$help_topic = App\Model\helpdesk\Manage\Help_topic::where('id','=',$tickets->help_topic_id)->first();
$department = App\Model\helpdesk\Agent\Department::where('id', '=', $help_topic->department)->first();
?>
<td title="{{ $department->name }}">{!! $department->name !!}</td></tr>
</table>
<!-- </div> -->
</div>
<div class="col-md-6">
<!-- <div class="callout callout-success"> -->
<table class="table table-hover">
<!-- <tr><th></th><th></th></tr> -->
<tr><td><b>{!! Lang::get('lang.help_topic') !!}:</b></td> <?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id','=',$tickets->help_topic_id)->first();?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr>
<tr><td><b>{!! Lang::get('lang.last_message') !!}:</b></td> <td>{{ucwords($last->poster)}}</td></tr>
</table>
</div>
<!-- </div> -->
</section>
<div class="col-md-3">
<?php $response = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->where('is_internal', '=', 0)->get(); ?>
@foreach($response as $last)
<?php $ResponseDate = $last->created_at; ?>
@endforeach
<b>{!! Lang::get('lang.last_response') !!}: </b> {{ UTC::usertimezone($ResponseDate)}}
</div>
</div>
</div>
</div>
<div class="col-md-6">
<table class="table table-hover">
<!-- <tr><th></th><th></th></tr> -->
<tr><td><b>{!! Lang::get('lang.status') !!}:</b></td> <?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id', '=', $tickets->status)->first(); ?>
@if($status->id == 1)
<td title="{{$status->properties}}" style="color:orange">{{$status->name}}</td></tr>
@elseif($status->id == 2)
<td title="{{$status->properties}}" style="color:green">{{$status->name}}</td></tr>
@elseif($status->id == 3)
<td title="{{$status->properties}}" style="color:green">{{$status->name}}</td></tr>
@endif
<tr><td><b>{!! Lang::get('lang.priority') !!}:</b></td> <?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first(); ?>
@if($priority->priority_id == 1)
<td title="{{$priority->priority_desc}}" style="color:green">{{$priority->priority_desc}}</td>
@elseif($priority->priority_id == 2)
<td title="{{$priority->priority_desc}}" style="color:orange">{{$priority->priority_desc}}</td>
@elseif($priority->priority_id == 3)
<td title="{{$priority->priority_desc}}" style="color:red">{{$priority->priority_desc}}</td>
@endif
</tr>
<tr><td><b>{!! Lang::get('lang.department') !!}:</b></td>
<?php
$help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first();
$department = App\Model\helpdesk\Agent\Department::where('id', '=', $help_topic->department)->first();
?>
<td title="{{ $department->name }}">{!! $department->name !!}</td></tr>
</table>
<!-- </div> -->
</div>
<div class="col-md-6">
<!-- <div class="callout callout-success"> -->
<table class="table table-hover">
<!-- <tr><th></th><th></th></tr> -->
<tr><td><b>{!! Lang::get('lang.help_topic') !!}:</b></td> <?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); ?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr>
<tr><td><b>{!! Lang::get('lang.last_message') !!}:</b></td> <td>{{ucwords($last->poster)}}</td></tr>
</table>
</div>
<!-- </div> -->
</section>
</div>
</div>
</div>
<?php
$conversations = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->where('is_internal', '=', 0)->paginate(10);
foreach ($conversations as $conversation) {
$ConvDate1 = $conversation->created_at;
$ConvDate1 = $conversation->created_at;
$ConvDate = explode(' ', $ConvDate1);
$date = $ConvDate[0];
$time = $ConvDate[1];
$time = substr($time, 0, -3);
if (isset($data) && $date == $data) {
} else {
$data = $ConvDate[0];
$data = $ConvDate[0];
}
$role = App\User::where('id','=',$conversation->user_id)->first();
$role = App\User::where('id', '=', $conversation->user_id)->first();
$attachment = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->first();
if($attachment == null ) {
$attachment = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->first();
if ($attachment == null) {
$body = $conversation->body;
} else {
$body = $conversation->body;
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->orderBy('id', 'DESC')->get();
foreach ($attachments as $attachment) {
if ($attachment->type == 'pdf') {
} elseif ($attachment->type == 'docx') {
} else {
$image = @imagecreatefromstring($attachment->file);
ob_start();
imagejpeg($image, null, 80);
$data = ob_get_contents();
ob_end_clean();
$var = '<img src="data:image/jpg;base64,' . base64_encode($data) . '" />';
$body = str_replace($attachment->name, "data:image/jpg;base64," . base64_encode($data), $body);
$string = $body;
$start = "<head>";
$end = "</head>";
if (strpos($string, $start) == false || strpos($string, $start) == false) {
} else {
$ini = strpos($string, $start);
$ini += strlen($start);
$len = strpos($string, $end, $ini) - $ini;
$parsed = substr($string, $ini, $len);
$body2 = $parsed;
$body = str_replace($body2, " ", $body);
}
}
}
}
else {
$body = $conversation->body;
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->orderBy('id', 'DESC')->get();
foreach($attachments as $attachment)
{
if($attachment->type == 'pdf')
{
}elseif($attachment->type == 'docx')
{
}
else
{
$image = @imagecreatefromstring($attachment->file);
ob_start();
imagejpeg($image, null, 80);
$data = ob_get_contents();
ob_end_clean();
$var = '<img src="data:image/jpg;base64,' . base64_encode($data) . '" />';
$body = str_replace($attachment->name, "data:image/jpg;base64," . base64_encode($data), $body);
$string = $body;
$start = "<head>";
$end = "</head>";
if (strpos($string, $start) == false || strpos($string, $start) == false) {
} else {
$ini = strpos($string, $start);
$ini += strlen($start);
$len = strpos($string, $end, $ini) - $ini;
$parsed = substr($string, $ini, $len);
$body2 = $parsed;
$body = str_replace($body2, " ", $body);
}
?>
<ol class="comment-list" >
<li class="comment">
<article class="comment-body">
<footer class="comment-meta"<?php if ($role->role == "user") { ?> style="background-color: hsla(100, 100%, 51%, 0.15)" <?php } else { ?> style="background-color:#FFFCB3" <?php } ?> >
<div class="comment-author">
$string = $body;
$start = "<head>";
$end = "</head>";
if(strpos($string,$start) == false || strpos($string,$start) == false)
{
}
else
{
$ini = strpos($string,$start);
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
$parsed = substr($string,$ini,$len);
$body2 = $parsed;
$body = str_replace($body2 ," " ,$body);
}
<img src="{{$role->profile_pic}}"alt="" height="50" width="50" class="avatar" <?php if ($role->role == "user") { ?>style="box-shadow: 0 1px 3px #00FF26;" <?php } else { ?> style="box-shadow: 0 1px 3px #FFEC00;" <?php } ?> >
@if($role->role == "user")
<b class="fn"><a href="#" rel="external" class="url">{{$role->user_name}}</a></b>
@else
<b class="fn"><a href="#" rel="external" class="url">{{$role->first_name." ".$role->last_name}}</a></b>
<div class="ticketratings pull-right"> <table><tbody>
@foreach($ratings as $rating)
@if($rating->rating_area == 'Comment Area')
<?php
$rating_value = App\Model\helpdesk\Ratings\RatingRef::where('rating_id', '=', $rating->id)->where('thread_id', '=', $conversation->id)->first();
if ($rating_value == null) {
$ratingval = '0';
} else {
$ratingval = $rating_value->rating_value;
}
?>
<form class="foo2">
<tr>
<th><div class="ticketratingtitle">{!! $rating->name !!} &nbsp;</div></th>&nbsp
<td>
<?php for ($i = 1; $i <= $rating->rating_scale; $i++) { ?>
<input type="radio" class="star" id="star5" name="{!! $rating->name !!},{!! $conversation->id !!}" value="{!! $i !!}"<?php echo ($ratingval == $i) ? 'checked' : '' ?> />
<?php } ?>
<!-- <input type="radio" class="star" id="star4" name="rating" value="2"<?php echo ($tickets->rating == '2') ? 'checked' : '' ?> />
<input type="radio" class="star" id="star3" name="rating" value="3"<?php echo ($tickets->rating == '3') ? 'checked' : '' ?>/>
<input type="radio" class="star" id="star2" name="rating" value="4"<?php echo ($tickets->rating == '4') ? 'checked' : '' ?>/>
<input type="radio" class="star" id="star1" name="rating" value="5"<?php echo ($tickets->rating == '5') ? 'checked' : '' ?> />-->
</td>
</tr>
</form>
@endif
@endforeach
</tbody></table></div>
@endif
</div><!-- .comment-author -->
<div class="comment-metadata">
<small class="date text-muted">
<time datetime="2013-10-23T01:50:50+00:00"><i class="fa fa-clock-o"> </i> {{ UTC::usertimezone($conversation->created_at) }}</time>
</small>
</div><!-- .comment-metadata -->
</footer><!-- .comment-meta -->
<div class="comment-content">
<p>{!! $body !!}</p>
</div><!-- .comment-content -->
<div class="timeline-footer" style="margin-bottom:-5px">
<?php
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->get();
$i = 0;
foreach ($attachments as $attachment) {
if ($attachment->poster == 'ATTACHMENT') {
$i++;
}
}
}
$string = $body;
$start = "<head>";
$end = "</head>";
if(strpos($string,$start) == false || strpos($string,$start) == false)
{
if ($i > 0) {
echo "<hr style='border-top: 1px dotted #FFFFFF;margin-top:0px;margin-bottom:0px;background-color:#8B8C90;'><h4 class='box-title'><b>" . $i . " </b> Attachments</h4>";
}
?>
<ul class='mailbox-attachments clearfix'>
<?php
foreach ($attachments as $attachment) {
$size = $attachment->size;
$units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
$power = $size > 0 ? floor(log($size, 1024)) : 0;
$value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
if ($attachment->poster == 'ATTACHMENT') {
if ($attachment->type == 'jpg' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'gif' || $attachment->type == 'GIF') {
$image = @imagecreatefromstring($attachment->file);
ob_start();
imagejpeg($image, null, 80);
$data = ob_get_contents();
ob_end_clean();
$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">' . $var . '</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></div></li>';
} else {
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
}
}
else
{
$ini = strpos($string,$start);
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
$parsed = substr($string,$ini,$len);
$body2 = $parsed;
$body = str_replace($body2 ," " ,$body);
}
?>
<ol class="comment-list" >
<li class="comment">
<article class="comment-body">
<footer class="comment-meta"<?php if($role->role == "user") { ?> style="background-color: hsla(100, 100%, 51%, 0.15)" <?php } else { ?> style="background-color:#FFFCB3" <?php } ?> >
<div class="comment-author">
@if($role->profile_pic)
<img src="{{asset('lb-faveo/media/profilepic')}}{{'/'}}{{$role->profile_pic}}"alt="" height="50" width="50" class="avatar" <?php if($role->role == "user") { ?>style="box-shadow: 0 1px 3px #00FF26;" <?php } else { ?> style="box-shadow: 0 1px 3px #FFEC00;" <?php } ?> >
@else
<img src="{{ Gravatar::src($role->email) }}" alt="" height="50" width="50" class="avatar" <?php if($role->role == "user") { ?>style="box-shadow: 0 1px 3px #00FF26;" <?php } else { ?> style="box-shadow: 0 1px 3px #FFEC00;" <?php } ?> >
@endif
@if($role->role == "user")
<b class="fn"><a href="#" rel="external" class="url">{{$role->user_name}}</a></b>
@else
<b class="fn"><a href="#" rel="external" class="url">{{$role->first_name." ".$role->last_name}}</a></b>
<div class="ticketratings pull-right"> <table><tbody>
<form id="foo2">
<tr>
<th> <div class="ticketratingtitle">Reply rating &nbsp;</div></th>&nbsp
<td>
<input type="radio" class="star" id="star5" name="rating2" value="1"<?php echo ($conversation->reply_rating=='1')?'checked':'' ?> />
<input type="radio" class="star" id="star4" name="rating2" value="2"<?php echo ($conversation->reply_rating=='2')?'checked':'' ?> />
<input type="radio" class="star" id="star3" name="rating2" value="3"<?php echo ($conversation->reply_rating=='3')?'checked':'' ?> />
<input type="radio" class="star" id="star2" name="rating2" value="4"<?php echo ($conversation->reply_rating=='4')?'checked':'' ?> />
<input type="radio" class="star" id="star1" name="rating2" value="5"<?php echo ($conversation->reply_rating=='5')?'checked':'' ?> />
</td></tr></form></tbody></table></div>
@endif
</div><!-- .comment-author -->
<div class="comment-metadata">
<small class="date text-muted">
<time datetime="2013-10-23T01:50:50+00:00"><i class="fa fa-clock-o"> </i> {{ UTC::usertimezone($conversation->created_at) }}</time>
</small>
</div><!-- .comment-metadata -->
</footer><!-- .comment-meta -->
<div class="comment-content">
<p>{!! $body !!}</p>
</div><!-- .comment-content -->
<div class="timeline-footer" style="margin-bottom:-5px">
<?php
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->get();
$i = 0;
foreach($attachments as $attachment) {
if($attachment->poster == 'ATTACHMENT') {
$i++;
}
}
if($i>0)
{
echo "<hr style='border-top: 1px dotted #FFFFFF;margin-top:0px;margin-bottom:0px;background-color:#8B8C90;'><h4 class='box-title'><b>".$i." </b> Attachments</h4>";
}
?>
<ul class='mailbox-attachments clearfix'>
<?php
foreach($attachments as $attachment)
{
}
?>
</ul>
</div>
</article><!-- .comment-body -->
</li><!-- .comment -->
</ol>
$size = $attachment->size;
$units = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
$power = $size > 0 ? floor(log($size, 1024)) : 0;
$value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
if($attachment->poster == 'ATTACHMENT')
{
if($attachment->type == 'jpg'||$attachment->type == 'JPG'||$attachment->type == 'jpeg'||$attachment->type == 'JPEG'||$attachment->type == 'png'||$attachment->type == 'PNG'||$attachment->type == 'gif'||$attachment->type == 'GIF')
{
$image = @imagecreatefromstring($attachment->file);
ob_start();
imagejpeg($image, null, 80);
$data = ob_get_contents();
ob_end_clean();
$var = '<a href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
<?php
?>
echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">'.$var.'</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">'.$attachment->name.'</b><br/><p>'.$value.'</p></div></li>';
}
else
{
$var = '<a style="max-width:200px;height:133px;color:#666;" href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">'.strtoupper($attachment->type).'</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">'.$attachment->name.'</b><br/><p>'.$value.'</p></span></div></a>';
echo '<li style="background-color:#f4f4f4;">'.$var.'</li>';
}
}
}
?>
</ul>
</div>
</article><!-- .comment-body -->
</li><!-- .comment -->
</ol>
<?php
?>
<?php }
?>
<div class="pull-right" style="margin-top:-30px;margin-bottom:-30px">
<?php echo $conversations->setPath( url('check_ticket/{'.$id.'}'))->render(); ?>
<div class="pull-right" style="margin-top:-30px;margin-bottom:-30px">
<?php echo $conversations->setPath(url('check_ticket/{' . $id . '}'))->render(); ?>
</div>
<br/><br/>
@if(Session::has('success1'))
<div class="alert alert-success alert-dismissable" id='formabc'>
<i class="fa fa-check-circle"></i>
<b>Success!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success1')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails1'))
<div class="alert alert-danger alert-dismissable" id='formabc'>
<i class="fa fa-ban"></i>
<b>Alert!</b> Failed.
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails1')}}
</div>
@endif
@if(Session::has('success1'))
<div class="alert alert-success alert-dismissable" id='formabc'>
<i class="fa fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success1')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails1'))
<div class="alert alert-danger alert-dismissable" id='formabc'>
<i class="fa fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails1')}}
</div>
@endif
<?php $id2 = Crypt::decrypt($id); ?>
<div id="respond" class="comment-respond form-border">
<h3 id="reply-title" class="comment-reply-title section-title"><i class="line"></i>{!! Lang::get('lang.leave_a_reply') !!}</h3>
@if(Auth::user())
{!! Form::open(['url'=>'post/reply/'.$id2.'#formabc']) !!}
{!! Form::open(['url'=>'post/reply/'.$id2.'#formabc']) !!}
@else
{!! Form::open(['url'=>'post-ticket-reply/'.$id.'#formabc']) !!}
{!! Form::open(['url'=>'post-ticket-reply/'.$id.'#formabc']) !!}
@endif
<div class="row">
<div class="form-group">
<div class="col-md-12">
<div class="form-group ">
<textarea class="form-control" name="comment" cols="30" rows="8"></textarea>
</div>
</div>
</div>
</div>
<div class="text-right">
<button type="submit" class="btn btn-custom btn-lg">{!! Lang::get('lang.post_comment') !!}</button>
<div class="row">
<div class="form-group">
<div class="col-md-12">
<div class="form-group ">
<textarea class="form-control" name="comment" cols="30" rows="8"></textarea>
</div>
</div>
</div>
</div>
<div class="text-right">
<button type="submit" class="btn btn-custom btn-lg">{!! Lang::get('lang.post_comment') !!}</button>
</div>
{!! Form::close() !!}
</div>
<script type="text/javascript">
$(document).ready(function() {
var Data = $('input[name="rating"]:checked').val();
var Data2 = $('input[name="rating2"]:checked').val();
if (Data) {
$('input[name=rating]').rating('readOnly');
jQuery('.star').attr('disabled', true);
}
$('input[name=rating]').change(function() {
$('#foo').submit();
});
$('input[name=rating2]').change(function() {
$('#foo2').submit();
});
// process the form
$('#foo').submit(function(event) {
// get the form data
// there are many ways to get this data using jQuery (you can use the class or id also)
var formData = $('input[name="rating"]:checked').val();
//$('#foo').serialize();
// process the form
$("#cc_page").on('click', '.search_r', function() {
var search_r = $('a', this).attr('id');
$.ajax({
type : 'POST', // define the type of HTTP verb we want to use (POST for our form)
url : '../rating/'+<?php echo $tickets->id ?>+'/'+formData, // the url where we want to POST
data : formData, // our data object
dataType : 'json', // what type of data do we expect back from the server
success : function() {
type: "GET",
url: "../ticket/status/{{$tickets->id}}/" + search_r,
beforeSend: function() {
$("#refresh").hide();
$("#loader").show();
},
success: function(response) {
$("#refresh").load("../check_ticket/{!! $id !!} #refresh");
$("#refresh").show();
$("#loader").hide();
var message = response;
$("#alert11").show();
$('#message-success1').html(message);
setInterval(function() {
$("#alert11").hide();
}, 4000);
}
});
// using the done promise callback
// stop the form from submitting the normal way and refreshing the page
event.preventDefault();
return false;
});
// process the form
$('#foo2').submit(function(event) {
// get the form data
// there are many ways to get this data using jQuery (you can use the class or id also)
var formData = $('input[name="rating2"]:checked').val();
//$('#foo').serialize();
// process the form
$.ajax({
type : 'POST', // define the type of HTTP verb we want to use (POST for our form)
url : '../rating2/'+<?php echo $thread->id ?>+'/'+formData, // the url where we want to POST
data : formData, // our data object
dataType : 'json', // what type of data do we expect back from the server
success : function() {
}
$(document).ready(function() {
var Data = $('input[name="rating"]:checked').val();
var Data2 = $('input[name="rating2"]:checked').val();
if (Data) {
$('input[name=rating]').rating('readOnly');
jQuery('.star').attr('disabled', true);
}
$('.star').change(function() {
$('#foo').submit();
$('.foo2').submit();
});
// process the form
$('#foo').submit(function(event) {
// get the form data
// there are many ways to get this data using jQuery (you can use the class or id also)
var formData = $(this).serialize();
//$('#foo').serialize();
// process the form
$.ajax({
type: 'POST', // define the type of HTTP verb we want to use (POST for our form)
url: '../rating/' +<?php echo $tickets->id ?>, // the url where we want to POST
data: formData, // our data object
dataType: 'json', // what type of data do we expect back from the server
success: function() {
}
});
// using the done promise callback
// stop the form from submitting the normal way and refreshing the page
event.preventDefault();
// stop the form from submitting the normal way and refreshing the page
event.preventDefault();
});
// process the form
$('.foo2').submit(function(event) {
// get the form data
// there are many ways to get this data using jQuery (you can use the class or id also)
var formData = $(this).serialize();
//$('#foo').serialize();
// process the form
$.ajax({
type: 'POST', // define the type of HTTP verb we want to use (POST for our form)
url: '../rating2/' +<?php echo $tickets->id ?>, // the url where we want to POST
data: formData, // our data object
dataType: 'json', // what type of data do we expect back from the server
success: function() {
}
});
// using the done promise callback
// stop the form from submitting the normal way and refreshing the page
event.preventDefault();
});
});
});
$(function () {
$(function() {
//Add text editor
$("textarea").wysihtml5();
});
jQuery(document).ready(function() {
// Close a ticket
$('#close').on('click', function(e) {
@@ -495,18 +497,18 @@ $('#foo2').submit();
$("#refresh").load("../check_ticket/{!! $id !!} #refresh");
$("#refresh").show();
$("#loader").hide();
var message = "Success! Your Ticket have been Resolved";
$("#alert11").show();
$('#message-success1').html(message);
setInterval(function(){$("#alert11").hide();
setInterval(function() {
$("#alert11").hide();
setTimeout(function() {
var link = document.querySelector('#load-inbox');
if(link) {
if (link) {
link.click();
}
}, 500);
},2000);
}, 2000);
}
})
return false;
@@ -529,25 +531,13 @@ $('#foo2').submit();
var message = "Success! Your Ticket have been Opened";
$("#alert11").show();
$('#message-success1').html(message);
setInterval(function(){$("#alert11").hide(); },4000);
setInterval(function() {
$("#alert11").hide();
}, 4000);
}
})
return false;
});
});
</script>
@stop
@stop

View File

@@ -0,0 +1,550 @@
@extends('themes.default1.client.layout.client')
@section('HeadInclude')
@stop
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here') !!}: </li>
<li><a href="#">{!! Lang::get('lang.home') !!}</a></li>
<li class="active">{!! Lang::get('lang.ticket_status') !!}</li>
</ol>
</div>
@stop
@section('content')
<?php
$tickets = App\Model\helpdesk\Ticket\Tickets::where('id','=',\Crypt::decrypt($id))->first();
$thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id','=',\Crypt::decrypt($id))->first();
//$user = App\User::where('id','=',$id1)->first();?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header">
<div class="row">
<div class="col-md-9">
<section class="content-header"><h3 class="box-title"><i class="fa fa-user"> </i> {{$thread->title}} </h3> ( {{$tickets->ticket_number}} )
</section>
</div>
<div class="col-md-3">
<div class="pull-right">
<!-- <button type="button" class="btn btn-default"><i class="fa fa-edit" style="color:green;"> </i> Edit</button> -->
{{-- <button type="button" class="btn btn-default"><i class="fa fa-print" style="color:blue;"> </i> {!! link_to_route('ticket.print','Print',[$tickets->id]) !!}</button> --}}
<!-- </div> -->
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-exchange" style="color:teal;"> </i>
{!! Lang::get('lang.change_status') !!} <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="#" id="open"><i class="fa fa-folder-open" style="color:#FFD600;"> </i>{!! Lang::get('lang.open') !!}</a></li>
<li><a href="#" id="close"><i class="fa fa-check" style="color:#15F109;"> </i>{!! Lang::get('lang.close') !!}</a></li>
<li><a href="#" id="resolved"><i class="fa fa-check-circle " style="color:#0EF1BE;"> </i> {!! Lang::get('lang.resolved') !!}</a></li>
</ul>
</div>
{!! Form::close() !!}
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="ticketratings pull-right">
<table><tbody>
<form id="foo">
<tr>
<th><div class="ticketratingtitle">Overall Satisfaction &nbsp;</div></th>&nbsp
<td>
<input type="radio" class="star" id="star5" name="rating" value="1"<?php echo ($tickets->rating=='1')?'checked':'' ?> />
<input type="radio" class="star" id="star4" name="rating" value="2"<?php echo ($tickets->rating=='2')?'checked':'' ?> />
<input type="radio" class="star" id="star3" name="rating" value="3"<?php echo ($tickets->rating=='3')?'checked':'' ?>/>
<input type="radio" class="star" id="star2" name="rating" value="4"<?php echo ($tickets->rating=='4')?'checked':'' ?>/>
<input type="radio" class="star" id="star1" name="rating" value="5"<?php echo ($tickets->rating=='5')?'checked':'' ?> />
</td>
</tr>
</form>
</tbody> </table>
</div>
</div>
</div>
</div>
<div class="box-body" style="margin-bottom:-10px">
<div class="row">
<div id="loader" style="display:none;">
<div class="col-xs-5">
</div>
<div class="col-xs-1">
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}"><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</div>
<div class="col-xs-6">
</div>
</div>
<section class="content" id="refresh" style="margin-bottom:-10px;margin-top:-10px">
<div class="col-md-12">
<?php
$priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id','=',$tickets->priority_id)->first();
?>
<div class="callout callout-default ">
<div class="row">
<div class="col-md-3">
<?php
$sla = $tickets->sla;
$SlaPlan = App\Model\helpdesk\Manage\Sla_plan::where('id','=',1)->first();?>
<b>{!! Lang::get('lang.sla_plan') !!}: {{$SlaPlan->grace_period}} </b>
</div>
<div class="col-md-3">
<b>{!! Lang::get('lang.created_date') !!}: </b> {{ UTC::usertimezone($tickets->created_at) }}
</div>
<div class="col-md-3">
<b>{!! Lang::get('lang.due_date') !!}: </b>
<?php
$time = $tickets->created_at;
$time = date_create($time);
date_add($time, date_interval_create_from_date_string($SlaPlan->grace_period));
echo UTC::usertimezone(date_format($time, 'd/m/Y H:i:s'));
?>
</div>
<div class="col-md-3">
<?php $response = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id','=',$tickets->id)->where('is_internal','=',0)->get();?>
@foreach($response as $last)
<?php $ResponseDate = $last->created_at; ?>
@endforeach
<b>{!! Lang::get('lang.last_response') !!}: </b> {{ UTC::usertimezone($ResponseDate)}}
</div>
</div>
</div>
</div>
<div class="col-md-6">
<table class="table table-hover">
<!-- <tr><th></th><th></th></tr> -->
<tr><td><b>{!! Lang::get('lang.status') !!}:</b></td> <?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id','=',$tickets->status)->first();?>
@if($status->id == 1)
<td title="{{$status->properties}}" style="color:orange">{{$status->name}}</td></tr>
@elseif($status->id == 2)
<td title="{{$status->properties}}" style="color:green">{{$status->name}}</td></tr>
@elseif($status->id == 3)
<td title="{{$status->properties}}" style="color:green">{{$status->name}}</td></tr>
@endif
<tr><td><b>{!! Lang::get('lang.priority') !!}:</b></td> <?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id','=',$tickets->priority_id)->first();?>
@if($priority->priority_id == 1)
<td title="{{$priority->priority_desc}}" style="color:green">{{$priority->priority_desc}}</td>
@elseif($priority->priority_id == 2)
<td title="{{$priority->priority_desc}}" style="color:orange">{{$priority->priority_desc}}</td>
@elseif($priority->priority_id == 3)
<td title="{{$priority->priority_desc}}" style="color:red">{{$priority->priority_desc}}</td>
@endif
</tr>
<tr><td><b>{!! Lang::get('lang.department') !!}:</b></td>
<?php
$help_topic = App\Model\helpdesk\Manage\Help_topic::where('id','=',$tickets->help_topic_id)->first();
$department = App\Model\helpdesk\Agent\Department::where('id', '=', $help_topic->department)->first();
?>
<td title="{{ $department->name }}">{!! $department->name !!}</td></tr>
</table>
<!-- </div> -->
</div>
<div class="col-md-6">
<!-- <div class="callout callout-success"> -->
<table class="table table-hover">
<!-- <tr><th></th><th></th></tr> -->
<tr><td><b>{!! Lang::get('lang.help_topic') !!}:</b></td> <?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id','=',$tickets->help_topic_id)->first();?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr>
<tr><td><b>{!! Lang::get('lang.last_message') !!}:</b></td> <td>{{ucwords($last->poster)}}</td></tr>
</table>
</div>
<!-- </div> -->
</section>
</div>
</div>
</div>
<?php
$conversations = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->where('is_internal', '=', 0)->paginate(10);
foreach ($conversations as $conversation) {
$ConvDate1 = $conversation->created_at;
$ConvDate = explode(' ', $ConvDate1);
$date = $ConvDate[0];
$time = $ConvDate[1];
$time = substr($time, 0, -3);
if (isset($data) && $date == $data) {
} else {
$data = $ConvDate[0];
}
$role = App\User::where('id', '=', $conversation->user_id)->first();
$attachment = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->first();
if ($attachment == null ) {
$body = $conversation->body;
} else {
$body = $conversation->body;
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->orderBy('id', 'DESC')->get();
foreach($attachments as $attachment)
{
if($attachment->type == 'pdf') {
} elseif($attachment->type == 'docx') {
} else {
$image = @imagecreatefromstring($attachment->file);
ob_start();
imagejpeg($image, null, 80);
$data = ob_get_contents();
ob_end_clean();
$var = '<img src="data:image/jpg;base64,' . base64_encode($data) . '" />';
$body = str_replace($attachment->name, "data:image/jpg;base64," . base64_encode($data), $body);
$string = $body;
$start = "<head>";
$end = "</head>";
if(strpos($string,$start) == false || strpos($string,$start) == false)
{
}
else
{
$ini = strpos($string,$start);
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
$parsed = substr($string,$ini,$len);
$body2 = $parsed;
$body = str_replace($body2 ," " ,$body);
}
}
}
}
$string = $body;
$start = "<head>";
$end = "</head>";
if(strpos($string,$start) == false || strpos($string,$start) == false)
{
}
else
{
$ini = strpos($string,$start);
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
$parsed = substr($string,$ini,$len);
$body2 = $parsed;
$body = str_replace($body2 ," " ,$body);
}
?>
<ol class="comment-list" >
<li class="comment">
<article class="comment-body">
<footer class="comment-meta"<?php if($role->role == "user") { ?> style="background-color: hsla(100, 100%, 51%, 0.15)" <?php } else { ?> style="background-color:#FFFCB3" <?php } ?> >
<div class="comment-author">
@if($role->profile_pic)
<img src="{{asset('lb-faveo/media/profilepic')}}{{'/'}}{{$role->profile_pic}}"alt="" height="50" width="50" class="avatar" <?php if($role->role == "user") { ?>style="box-shadow: 0 1px 3px #00FF26;" <?php } else { ?> style="box-shadow: 0 1px 3px #FFEC00;" <?php } ?> >
@else
<img src="{{ Gravatar::src($role->email) }}" alt="" height="50" width="50" class="avatar" <?php if($role->role == "user") { ?>style="box-shadow: 0 1px 3px #00FF26;" <?php } else { ?> style="box-shadow: 0 1px 3px #FFEC00;" <?php } ?> >
@endif
@if($role->role == "user")
<b class="fn"><a href="#" rel="external" class="url">{{$role->user_name}}</a></b>
@else
<b class="fn"><a href="#" rel="external" class="url">{{$role->first_name." ".$role->last_name}}</a></b>
<div class="ticketratings pull-right"> <table><tbody>
<form id="foo2">
<tr>
<th> <div class="ticketratingtitle">Reply rating &nbsp;</div></th>&nbsp
<td>
<input type="radio" class="star" id="star5" name="rating2" value="1"<?php echo ($conversation->reply_rating=='1')?'checked':'' ?> />
<input type="radio" class="star" id="star4" name="rating2" value="2"<?php echo ($conversation->reply_rating=='2')?'checked':'' ?> />
<input type="radio" class="star" id="star3" name="rating2" value="3"<?php echo ($conversation->reply_rating=='3')?'checked':'' ?> />
<input type="radio" class="star" id="star2" name="rating2" value="4"<?php echo ($conversation->reply_rating=='4')?'checked':'' ?> />
<input type="radio" class="star" id="star1" name="rating2" value="5"<?php echo ($conversation->reply_rating=='5')?'checked':'' ?> />
</td></tr></form></tbody></table></div>
@endif
</div><!-- .comment-author -->
<div class="comment-metadata">
<small class="date text-muted">
<time datetime="2013-10-23T01:50:50+00:00"><i class="fa fa-clock-o"> </i> {{ UTC::usertimezone($conversation->created_at) }}</time>
</small>
</div><!-- .comment-metadata -->
</footer><!-- .comment-meta -->
<div class="comment-content">
<p>{!! $body !!}</p>
</div><!-- .comment-content -->
<div class="timeline-footer" style="margin-bottom:-5px">
<?php
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->get();
$i = 0;
foreach($attachments as $attachment) {
if($attachment->poster == 'ATTACHMENT') {
$i++;
}
}
if($i>0)
{
echo "<hr style='border-top: 1px dotted #FFFFFF;margin-top:0px;margin-bottom:0px;background-color:#8B8C90;'><h4 class='box-title'><b>".$i." </b> Attachments</h4>";
}
?>
<ul class='mailbox-attachments clearfix'>
<?php
foreach($attachments as $attachment)
{
$size = $attachment->size;
$units = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
$power = $size > 0 ? floor(log($size, 1024)) : 0;
$value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
if($attachment->poster == 'ATTACHMENT')
{
if($attachment->type == 'jpg'||$attachment->type == 'JPG'||$attachment->type == 'jpeg'||$attachment->type == 'JPEG'||$attachment->type == 'png'||$attachment->type == 'PNG'||$attachment->type == 'gif'||$attachment->type == 'GIF')
{
$image = @imagecreatefromstring($attachment->file);
ob_start();
imagejpeg($image, null, 80);
$data = ob_get_contents();
ob_end_clean();
$var = '<a href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">'.$var.'</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">'.$attachment->name.'</b><br/><p>'.$value.'</p></div></li>';
}
else
{
$var = '<a style="max-width:200px;height:133px;color:#666;" href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">'.strtoupper($attachment->type).'</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">'.$attachment->name.'</b><br/><p>'.$value.'</p></span></div></a>';
echo '<li style="background-color:#f4f4f4;">'.$var.'</li>';
}
}
}
?>
</ul>
</div>
</article><!-- .comment-body -->
</li><!-- .comment -->
</ol>
<?php
?>
<?php }
?>
<div class="pull-right" style="margin-top:-30px;margin-bottom:-30px">
<?php echo $conversations->setPath( url('check_ticket/{'.$id.'}'))->render(); ?>
</div>
<br/><br/>
@if(Session::has('success1'))
<div class="alert alert-success alert-dismissable" id='formabc'>
<i class="fa fa-check-circle"></i>
<b>Success!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success1')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails1'))
<div class="alert alert-danger alert-dismissable" id='formabc'>
<i class="fa fa-ban"></i>
<b>Alert!</b> Failed.
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails1')}}
</div>
@endif
<?php $id2 = Crypt::decrypt($id); ?>
<div id="respond" class="comment-respond form-border">
<h3 id="reply-title" class="comment-reply-title section-title"><i class="line"></i>{!! Lang::get('lang.leave_a_reply') !!}</h3>
@if(Auth::user())
{!! Form::open(['url'=>'post/reply/'.$id2.'#formabc']) !!}
@else
{!! Form::open(['url'=>'post-ticket-reply/'.$id.'#formabc']) !!}
@endif
<div class="row">
<div class="form-group">
<div class="col-md-12">
<div class="form-group ">
<textarea class="form-control" name="comment" cols="30" rows="8"></textarea>
</div>
</div>
</div>
</div>
<div class="text-right">
<button type="submit" class="btn btn-custom btn-lg">{!! Lang::get('lang.post_comment') !!}</button>
</div>
{!! Form::close() !!}
</div>
<script type="text/javascript">
$(document).ready(function() {
var Data = $('input[name="rating"]:checked').val();
var Data2 = $('input[name="rating2"]:checked').val();
if (Data) {
$('input[name=rating]').rating('readOnly');
jQuery('.star').attr('disabled', true);
}
$('input[name=rating]').change(function() {
$('#foo').submit();
});
$('input[name=rating2]').change(function() {
$('#foo2').submit();
});
// process the form
$('#foo').submit(function(event) {
// get the form data
// there are many ways to get this data using jQuery (you can use the class or id also)
var formData = $('input[name="rating"]:checked').val();
//$('#foo').serialize();
// process the form
$.ajax({
type : 'POST', // define the type of HTTP verb we want to use (POST for our form)
url : '../rating/'+<?php echo $tickets->id ?>+'/'+formData, // the url where we want to POST
data : formData, // our data object
dataType : 'json', // what type of data do we expect back from the server
success : function() {
}
});
// using the done promise callback
// stop the form from submitting the normal way and refreshing the page
event.preventDefault();
});
// process the form
$('#foo2').submit(function(event) {
// get the form data
// there are many ways to get this data using jQuery (you can use the class or id also)
var formData = $('input[name="rating2"]:checked').val();
//$('#foo').serialize();
// process the form
$.ajax({
type : 'POST', // define the type of HTTP verb we want to use (POST for our form)
url : '../rating2/'+<?php echo $thread->id ?>+'/'+formData, // the url where we want to POST
data : formData, // our data object
dataType : 'json', // what type of data do we expect back from the server
success : function() {
}
});
// using the done promise callback
// stop the form from submitting the normal way and refreshing the page
event.preventDefault();
});
});
$(function () {
//Add text editor
$("textarea").wysihtml5();
});
jQuery(document).ready(function() {
// Close a ticket
$('#close').on('click', function(e) {
$.ajax({
type: "GET",
url: "../ticket/close/{{$tickets->id}}",
beforeSend: function() {
$("#refresh").hide();
$("#loader").show();
},
success: function(response) {
$("#refresh").load("../check_ticket/{!! $id !!} #refresh");
$("#refresh").show();
$("#loader").hide();
// $("#d1").trigger("click");
// var message = "Success! Your Ticket have been Closed";
// $("#alert11").show();
// $('#message-success1').html(message);
// setInterval(function(){
// $("#alert11").hide();
// setTimeout(function() {
// var link = document.querySelector('#load-inbox');
// if(link) {
// link.click();
// }
// }, 500);
// },2000);
}
})
return false;
});
// Resolved a ticket
$('#resolved').on('click', function(e) {
$.ajax({
type: "GET",
url: "../ticket/resolve/{{$tickets->id}}",
beforeSend: function() {
$("#refresh").hide();
$("#loader").show();
},
success: function(response) {
$("#refresh").load("../check_ticket/{!! $id !!} #refresh");
$("#refresh").show();
$("#loader").hide();
var message = "Success! Your Ticket have been Resolved";
$("#alert11").show();
$('#message-success1').html(message);
setInterval(function(){$("#alert11").hide();
setTimeout(function() {
var link = document.querySelector('#load-inbox');
if(link) {
link.click();
}
}, 500);
},2000);
}
})
return false;
});
// Open a ticket
$('#open').on('click', function(e) {
$.ajax({
type: "GET",
url: "../ticket/open/{{$tickets->id}}",
beforeSend: function() {
$("#refresh").hide();
$("#loader").show();
},
success: function(response) {
$("#refresh").load("../check_ticket/{!! $id !!} #refresh");
$("#refresh").show();
$("#loader").hide();
var message = "Success! Your Ticket have been Opened";
$("#alert11").show();
$('#message-success1').html(message);
setInterval(function(){$("#alert11").hide(); },4000);
}
})
return false;
});
});
</script>
@stop

View File

@@ -1,40 +1,51 @@
@extends('themes.default1.client.layout.client')
@section('title')
Submit A Ticket -
{!! Lang::get('lang.submit_a_ticket') !!} -
@stop
@section('submit')
class = "active"
class = "active"
@stop
<!-- breadcrumbs -->
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here') !!}: </li>
<li><a href="{!! URL::route('form') !!}">{!! Lang::get('lang.submit_a_ticket') !!}</a></li>
</ol>
</div>
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here') !!}: </li>
<li><a href="{!! URL::route('form') !!}">{!! Lang::get('lang.submit_a_ticket') !!}</a></li>
</ol>
</div>
@stop
<!-- /breadcrumbs -->
@section('check')
<div class="banner-wrapper text-center clearfix">
<h3 class="banner-title text-info h4">{!! Lang::get('lang.have_a_ticket') !!}?</h3>
<div class="banner-content">
<div class="banner-wrapper clearfix">
<h3 class="banner-title text-center text-info h4">{!! Lang::get('lang.have_a_ticket') !!}?</h3>
@if(Session::has('check'))
@if (count($errors) > 0)
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!} !</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</div>
@endif
@endif
<div class="banner-content text-center">
{!! Form::open(['url' => 'checkmyticket' , 'method' => 'POST'] )!!}
{!! Form::label('email',Lang::get('lang.email')) !!}
{!! $errors->first('email', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('email',null,['class' => 'form-control']) !!}
{!! Form::label('ticket_number',Lang::get('lang.ticket_number'),['style' => 'display: block']) !!}
{!! $errors->first('ticket_number', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('ticket_number',null,['class' => 'form-control']) !!}
<br/><input type="submit" value="{!! Lang::get('lang.check_ticket_status') !!}" class="btn btn-info">
{!! Form::label('email',Lang::get('lang.email')) !!}<span class="text-red"> *</span>
{!! Form::text('email_address',null,['class' => 'form-control']) !!}
{!! Form::label('ticket_number',Lang::get('lang.ticket_number')) !!}<span class="text-red">*</span>
{!! Form::text('ticket_number',null,['class' => 'form-control']) !!}
<br/><input type="submit" value="{!! Lang::get('lang.check_ticket_status') !!}" class="btn btn-info">
{!! Form::close() !!}
</div>
</div>
</div>
</div>
@stop
<!-- content -->
@section('content')
@@ -42,130 +53,158 @@
@if(Session::has('message'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"></i>
<b>Success!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{!! Session::get('message') !!}
</div>
@endif
<!-- open a form -->
{{-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> --}}
<script src="{{asset("lb-faveo/js/jquery2.0.2.min.js")}}" type="text/javascript"></script>
<!--
|====================================================
| SELECT FROM
|====================================================
-->
<?php
$encrypter = app('Illuminate\Encryption\Encrypter');
$encrypted_token = $encrypter->encrypt(csrf_token());
?>
<input id="token" type="hidden" value="{{$encrypted_token}}">
{!! Form::open(['action'=>'Client\helpdesk\FormController@postedForm','method'=>'post', 'enctype'=>'multipart/form-data']) !!}
<div>
<div class="content-header">
<h4>{!! Lang::get('lang.ticket') !!} {!! Form::submit(Lang::get('lang.send'),['class'=>'form-group btn btn-info pull-right'])!!}</h4>
@if (count($errors) > 0)
@if(Session::has('check'))
<?php goto a; ?>
@endif
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!} !</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
<div class="row col-md-12">
<div class="col-md-12 form-group {{ $errors->has('help_topic') ? 'has-error' : '' }}">
{!! Form::label('help_topic', Lang::get('lang.choose_a_help_topic')) !!}
{!! $errors->first('help_topic', '<spam class="help-block">:message</spam>') !!}
<?php
$forms = App\Model\helpdesk\Form\Forms::get();
$helptopic = App\Model\helpdesk\Manage\Help_topic::get();
?>
<select name="helptopic" class="form-control" id="selectid">
<?php
$system_default_department = App\Model\helpdesk\Settings\System::where('id','=',1)->first();
if($system_default_department->department) {
$department_relation_helptopic = App\Model\helpdesk\Manage\Help_topic::where('department','=',$system_default_department->department)->first();
$default_helptopic = $department_relation_helptopic->id;
} else {
$default_helptopic = 0;
}
<?php a: ?>
@endif
?>
@foreach($helptopic as $topic)
<!-- open a form -->
{{-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> --}}
<script src="{{asset("lb-faveo/js/jquery2.0.2.min.js")}}" type="text/javascript"></script>
<!--
|====================================================
| SELECT FROM
|====================================================
-->
<?php
$encrypter = app('Illuminate\Encryption\Encrypter');
$encrypted_token = $encrypter->encrypt(csrf_token());
?>
<input id="token" type="hidden" value="{{$encrypted_token}}">
{!! Form::open(['action'=>'Client\helpdesk\FormController@postedForm','method'=>'post', 'enctype'=>'multipart/form-data']) !!}
<div>
<div class="content-header">
<h4>{!! Lang::get('lang.ticket') !!} </h4>
</div>
<div class="row col-md-12">
<div class="col-md-12 form-group {{ $errors->has('help_topic') ? 'has-error' : '' }}">
{!! Form::label('help_topic', Lang::get('lang.choose_a_help_topic')) !!}
{!! $errors->first('help_topic', '<spam class="help-block">:message</spam>') !!}
<?php
$forms = App\Model\helpdesk\Form\Forms::get();
$helptopic = App\Model\helpdesk\Manage\Help_topic::get();
?>
<select name="helptopic" class="form-control" id="selectid">
<?php
$system_default_department = App\Model\helpdesk\Settings\System::where('id', '=', 1)->first();
if ($system_default_department->department) {
$department_relation_helptopic = App\Model\helpdesk\Manage\Help_topic::where('department', '=', $system_default_department->department)->first();
$default_helptopic = $department_relation_helptopic->id;
} else {
$default_helptopic = 0;
}
?>
@foreach($helptopic as $topic)
<option value="{!! $topic->id !!}">{!! $topic->topic !!}</option>
@endforeach
{{-- @foreach($forms as $key=>$value) --}}
{{-- <option value="{!! $value->id !!}">{!! ucfirst($value->formname) !!}</option> --}}
{{-- @endforeach --}}
</select>
@endforeach
</select>
</div>
<div class="col-md-12 form-group {{ $errors->has('Name') ? 'has-error' : '' }}">
{!! Form::label('Name',Lang::get('lang.name')) !!}<span class="text-red"> *</span>
{!! Form::text('Name',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-12 form-group {{ $errors->has('Email') ? 'has-error' : '' }}">
{!! Form::label('Email',Lang::get('lang.email')) !!}<span class="text-red"> *</span>
{!! Form::text('Email',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
{!! Form::label('Code',Lang::get('lang.country-code')) !!}
{!! Form::text('Code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
</div>
<div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
{!! Form::label('Mobile',Lang::get('lang.mobile_number')) !!}
{!! Form::text('Mobile',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
{!! Form::label('Phone',Lang::get('lang.phone')) !!}
{!! Form::text('Phone',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
{!! Form::label('Subject',Lang::get('lang.subject')) !!}
{!! Form::text('Subject',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-12 form-group {{ $errors->has('Subject') ? 'has-error' : '' }}">
{!! Form::label('Details',Lang::get('lang.message')) !!}<span class="text-red"> *</span>
{!! Form::textarea('Details',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-12 form-group">
<div class="btn btn-default btn-file"><i class="fa fa-paperclip"> </i> {!! Lang::get('lang.attachment') !!}<input type="file" name="attachment[]" multiple/></div><br/>
{!! Lang::get('lang.max') !!}. 10MB
</div>
{{-- Event fire --}}
<?php Event::fire(new App\Events\ClientTicketForm()); ?>
<div class="col-md-12" id="response"> </div>
<div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div>
<div class="col-md-12 form-group">{!! Form::submit(Lang::get('lang.Send'),['class'=>'form-group btn btn-info pull-left'])!!}</div>
</div>
<div class="col-md-12 form-group {{ $errors->has('Name') ? 'has-error' : '' }}">
{!! Form::label('Name',Lang::get('lang.name')) !!}
{!! $errors->first('Name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('Name',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-6 form-group {{ $errors->has('Email') ? 'has-error' : '' }}">
{!! Form::label('Email',Lang::get('lang.email')) !!}
{!! $errors->first('Email', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('Email',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-6 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
{!! Form::label('Phone',Lang::get('lang.phone')) !!}
{!! $errors->first('Phone', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('Phone',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-12 form-group {{ $errors->has('Subject') ? 'has-error' : '' }}">
{!! Form::label('Subject',Lang::get('lang.subject')) !!}
{!! $errors->first('Subject', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('Subject',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-12 form-group {{ $errors->has('Details') ? 'has-error' : '' }}">
{!! Form::label('Details',Lang::get('lang.message')) !!}
{!! $errors->first('Details', '<spam class="help-block">:message</spam>') !!}
{!! Form::textarea('Details',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-12 form-group">
<div class="btn btn-default btn-file"><i class="fa fa-paperclip"> </i> {!! Lang::get('lang.attachment') !!}<input type="file" name="attachment[]" multiple/></div><br/>
{!! Lang::get('lang.max') !!}. 10MB
</div>
{{-- Event fire --}}
<?php Event::fire(new App\Events\ClientTicketForm()); ?>
<div class="col-md-12" id="response"> </div>
<div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div>
</div>
</div>
{!! Form::close() !!}
{!! Form::close() !!}
</div>
<!--
|====================================================
| SELECTED FORM STORED IN SCRIPT
|====================================================
-->
-->
<script type="text/javascript">
$('#selectid').on('change',function() {
$('#selectid').on('change', function() {
var value = $('#selectid').val();
$.ajax({
url: "postform/"+ value,
url: "postform/" + value,
type: "post",
data: value,
success: function(data) {
$('#response').html(data);
//location.reload();
$('#response').html(data);
//location.reload();
}
});
});
$(function () {
//Add text editor
$(function() {
//Add text editor
$("textarea").wysihtml5();
});

View File

@@ -0,0 +1,413 @@
@extends('themes.default1.client.layout.client')
<?php $user = App\User::where('id','=',$tickets->user_id)->first();?>
@section('nav1')
class="active"
@stop
@section('My')
class="active"
@stop
@section('sidebar')
<li class="header">TICKET INFORMATION</li>
<li>
<a href="">
<span>TICKET ID</span>
</br><b>#{{$tickets->ticket_number}}</b>
</a>
</li>
<li>
<a href="">
<span>USER</span>
</br><i class="fa fa-user"> </i> <b>{{$user->email}}</b>
</a>
</li>
<li>
<a href="">
@if($tickets->assigned_to > 0)
<span>ASSIGNED TO</span>
</br> <b>{{$tickets ->assigned_to}}</b>
@else
<span>UNASSIGNED</span>
@endif
</a>
</li>
@stop
@section('content')
<!-- Main content -->
<!-- Main content -->
<div class="box box-primary">
<div class="box-header">
<section class="content-header"><h3 class="box-title"><i class="fa fa-user"> </i> {{$thread->title}} </h3> ( {{$tickets->ticket_number}} )
</section>
<div class="pull-right">
<!-- <button type="button" class="btn btn-default"><i class="fa fa-edit" style="color:green;"> </i> Edit</button> -->
<button type="button" class="btn btn-default"><i class="fa fa-print" style="color:blue;"> </i> {!! link_to_route('ticket.print','Print',[$tickets->id]) !!}</button>
<!-- </div> -->
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-exchange" style="color:teal;"> </i>
Change Status <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="#" id="open"><i class="fa fa-folder-open-o" style="color:yellow;"> </i>Open</a></li>
<li><a href="#" id="close"><i class="fa fa-check" style="color:green;"> </i>Close</a></li>
<li><a href="#" id="resolved"><i class="fa fa-check-circle-o " style="color:green;"> </i> Resolved</a></li>
</ul>
</div>
{!! Form::close() !!}
</div>
</div>
<div class="box-body">
<div class="row">
<section class="content" id="refresh">
<div class="col-md-12">
<?php
$priority = App\Model\Ticket\Ticket_Priority::where('priority_id','=',$tickets->priority_id)->first();
?>
<div class="callout callout-{!! $priority->priority_color !!}">
<div class="row">
<div class="col-md-3">
<?php
$sla = $tickets->sla;
$SlaPlan = App\Model\Manage\Sla_plan::where('id','=',1)->first();?>
<b>SLA Plan: {{$SlaPlan->grace_period}} </b>
</div>
<div class="col-md-3">
<b>Created Date: </b> {{date_format($tickets->created_at, 'd/m/Y H:i:s')}}
</div>
<div class="col-md-3">
<b>Due Date: </b>
<?php
$time = $tickets->created_at;
$time = date_create($time);
date_add($time, date_interval_create_from_date_string($SlaPlan->grace_period));
echo date_format($time, 'd/m/Y H:i:s');
?>
</div>
<div class="col-md-3">
<?php $response = App\Model\Ticket\Ticket_Thread::where('ticket_id','=',$tickets->id)->get();?>
@foreach($response as $last)
<?php $ResponseDate = $last->created_at; ?>
@endforeach
<b>Last Response: </b> {{date_format($ResponseDate, 'd/m/Y H:i:s')}}
</div>
</div>
</div>
</div>
<div class="col-md-6">
<table class="table table-hover">
<!-- <tr><th></th><th></th></tr> -->
<tr><td><b>Status:</b></td> <?php $status = App\Model\Ticket\Ticket_Status::where('id','=',$tickets->status)->first();?><td title="{{$status->properties}}">{{$status->state}}</td></tr>
<tr><td><b>Priority:</b></td> <?php $priority = App\Model\Ticket\Ticket_Priority::where('priority_id','=',$tickets->priority_id)->first();?><td title="{{$priority->priority_desc}}">{{$priority->priority}}</td></tr>
<tr><td><b>Department:</b></td> <?php $help_topic = App\Model\Manage\Help_topic::where('id','=',$tickets->help_topic_id)->first();?><td title="{{$help_topic->topic}}">{{$help_topic->department}}</td></tr>
</table>
<!-- </div> -->
</div>
<div class="col-md-6">
<!-- <div class="callout callout-success"> -->
<table class="table table-hover">
<!-- <tr><th></th><th></th></tr> -->
<tr><td><b>Help Topic:</b></td> <?php $help_topic = App\Model\Manage\Help_topic::where('id','=',$tickets->help_topic_id)->first();?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr>
<tr><td><b>Last Message:</b></td> <td>{{$last->poster}}</td></tr>
</table>
</div>
<!-- </div> -->
</section>
</div>
</div>
</div>
<div class='row'>
<div class='col-xs-12'>
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#General" data-toggle="tab" style="color:green;"><i class="fa fa-reply-all"> </i> Reply</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="General">
<div id="t1">
{!! Form::open(['route'=>'ticket.reply']) !!}
<div class="form-group">
</div>
<div class="form-group">
<div class="row">
<input type="hidden" name="ticket_ID" value="{{$tickets->id}}">
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
<div class="col-md-2">
{!! Form::label('To', 'To:') !!}
</div>
<div class="col-md-10">
{!! Form::text('To',$user->email,['class'=>'form-control','style'=>'width:55%'])!!}
{!! $errors->first('To', '<spam class="help-block text-red">:message</spam>') !!}
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
<div class="col-md-2">
{!! Form::label('Reply Content', 'reply_content:') !!}
</div>
<div class="col-md-10">
<textarea name="reply_content"></textarea>
{!! $errors->first('reply_content', '<spam class="help-block text-red">:message</spam>') !!}
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
<div class="col-md-2">
</div>
<div class="col-md-10">
<button type="submit" class="btn btn-primary"><i class="fa fa-check-square-o" style="color:blue;"> </i> Update</button> </div>
</div>
</div>
</div>
{!!Form::close()!!}
</div>
<div id="t2" style="display:none">
{!! Form::open(['route'=>'ticket.reply']) !!}
<div class="form-group">
<button type="submit" id="tt1" class="btn btn-default"><i class="fa fa-check-square-o" style="color:green;"> </i> Update</button>
<button style="display:none;" type="submit" id="tt2" class="btn btn-default"><i class="fa fa-check-square-o" style="color:blue;"> </i> Update</button>
<button type="button" class="btn btn-default"><i class="fa fa-hand-o-right" style="color:orange;"> </i> {!! link_to_route('assign.ticket','Assign') !!}</button>
<button type="button" id="internal" class="btn btn-default"><i class="fa fa-file-text" style="color:blue;"> </i> Internal Notes</button>
<button type="button" class="btn btn-default"><i class="fa fa-arrows-alt" style="color:red;"> </i> Surrender</button>
</div>
<div class="form-group">
<div class="row">
<input type="hidden" name="ticket_ID" value="{{$tickets->id}}">
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
<div class="col-md-2">
<label>Subject</label>
</div>
<div class="col-md-10">
{!! Form::text('To',$user->email,['class'=>'form-control','style'=>'width:55%'])!!}
{!! $errors->first('To', '<spam class="help-block text-red">:message</spam>') !!}
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
<div class="col-md-2">
<label>Message</label>
</div>
<div class="col-md-10">
<textarea name="reply_content"></textarea>
{!! $errors->first('reply_content', '<spam class="help-block text-red">:message</spam>') !!}
</div>
</div>
</div>
</div>
{!!Form::close()!!}
</div>
</div>
<div class="tab-pane" id="Reply" >
<div class="form-group">
<button type="button" class="btn btn-default"><i class="fa fa-mail-forward" style="color:green;"> </i> Send</button>
<button type="button" class="btn btn-default"><i class="fa fa-th-large" style="color:teal;"> </i> Option</button>
<button type="button" class="btn btn-default"><i class="fa fa-file-text" style="color:blue;"> </i> Internal Notes</button>
</div>
<form>
<div class="form-group">
<div class="row">
<div class="col-md-2">
<label>From</label>
</div>
<div class="col-md-10">
<input type="text" class="form-control" name="from" id="from" style="width:40%" />
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-2">
<label>To</label>
</div>
<div class="col-md-10">
<input type="text" class="form-control" name="to" id="to" style="width:55%" />
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-2">
<label>Subject</label>
</div>
<div class="col-md-10">
<input type="text" class="form-control" name="from" id="from" style="width:100%" />
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-2">
<label>Response</label>
</div>
<div class="col-md-10">
<select class="form-control" style="width:55%" >
<option>Select a canned response</option>
<option>Original Message</option>
<option>Last Message</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-2">
<label>Reply Content</label>
</div>
<div class="col-md-10">
<textarea id="txtEditor2"> </textarea>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- row -->
<div class="row">
<div class="col-md-12">
<!-- The time line -->
<ul class="timeline">
<!-- timeline time label -->
<?php $conversations = App\Model\Ticket\Ticket_Thread::where('ticket_id','=',$tickets->id)->paginate(2);
foreach ($conversations as $conversation) {
?>
<li class="time-label">
<?php
$ConvDate1 = $conversation->created_at;
$ConvDate = explode(' ',$ConvDate1);
$date = $ConvDate[0];
$time = $ConvDate[1];
$time = substr($time, 0, -3);
if(isset($data) && $date==$data){
} else {
?> <span class="bg-green">
{{date_format($conversation->created_at, 'd/m/Y')}}
</span> <?php
$data = $ConvDate[0];
}
?>
</li>
<li>
<?php if($conversation->staff_id > 0) { ?>
<i class="fa fa-group bg-yellow" title="Posted by Support Team"></i>
<?php } elseif($conversation->user_id > 0) { ?>
<i class="fa fa-user bg-aqua" title="Posted by Customer"></i>
<?php } else { ?>
<i class="fa fa-mail-reply-all bg-purple" title="Posted by System"></i>
<?php } ?>
<div class="timeline-item">
<span id="date" class="time"><i class="fa fa-clock-o"> </i> {{date_format($conversation->created_at, 'd/m/Y H:i:s')}}</span>
<h3 class="timeline-header"><a href="#">{{$conversation->poster}}</a></h3>
<div class="timeline-body">
{!! $conversation->body !!}
</div>
</div>
</li>
<?php $lastid = $conversation->id ?>
<?php } ?>
<li>
<i class="fa fa-clock-o bg-gray"></i>
</li>
<ul class="pull-right">
<?php echo $conversations->setPath( url('/thread/'.'1'))->render(); ?>
</ul>
</ul>
</div><!-- /.col -->
</div><!-- /.row -->
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('#close').on('click', function (e) {
$.ajax({
type : "GET",
url : "http://localhost/faveo/public/ticket/close/{{$tickets->id}}",
success : function(response) {
$( "#refresh" ).load( "http://localhost/faveo/public/thread/{{$tickets->id}} #refresh");
}
})
return false;
});
$('#resolved').on('click', function (e) {
$.ajax({
type : "GET",
url : "http://localhost/faveo/public/ticket/resolve/{{$tickets->id}}",
success : function(response) {
$( "#refresh" ).load( "http://localhost/faveo/public/thread/{{$tickets->id}} #refresh");
}
})
return false;
});
$('#open').on('click', function (e) {
$.ajax({
type : "GET",
url : "http://localhost/faveo/public/ticket/open/{{$tickets->id}}",
success : function(response) {
$( "#refresh" ).load( "http://localhost/faveo/public/thread/{{$tickets->id}} #refresh");
$('#refresh').load('thread/2 #refresh');
}
})
return false;
});
});
</script>
@stop

View File

@@ -28,25 +28,25 @@
@if(Auth::user())
@else
<span onclick="javascript: window.location.href='{{url('auth/register')}}';">
<a href="{{url('auth/register')}}" class="widgetrowitem defaultwidget" style="background-image: URL('https://support.ebs.in/app/__swift/themes/client/images/icon_widget_register.png');">
<a href="{{url('auth/register')}}" class="widgetrowitem defaultwidget" style="background-image: URL('lb-faveo/media/images/register.png');">
<span class="widgetitemtitle">{!! Lang::get('lang.register') !!}</span>
</a>
</span>
@endif
@if(App\Model\helpdesk\Settings\System::first()->status == 1)
<span onclick="javascript: window.location.href='https://support.ebs.in/app/index.php?/Tickets/Submit';">
<a href="{!! URL::route('form') !!}" class="widgetrowitem defaultwidget" style="background-image: URL('https://support.ebs.in/app/__swift/themes/client/images/icon_widget_submitticket.png');">
<span onclick="javascript: window.location.href='{!! URL::route('form') !!}';">
<a href="{!! URL::route('form') !!}" class="widgetrowitem defaultwidget" style="background-image: URL('lb-faveo/media/images/submitticket.png');">
<span class="widgetitemtitle">{!! Lang::get('lang.submit_a_ticket') !!}</span>
</a>
</span>
@endif
<span onclick="javascript: window.location.href='https://support.ebs.in/app/index.php?/News/List';">
<a href="{{url('mytickets')}}" class="widgetrowitem defaultwidget" style="background-image: URL('https://support.ebs.in/app/__swift/themes/client/images/icon_widget_news.png');">
<span onclick="javascript: window.location.href='{{url('mytickets')}}';">
<a href="{{url('mytickets')}}" class="widgetrowitem defaultwidget" style="background-image: URL('lb-faveo/media/images/news.png');">
<span class="widgetitemtitle">{!! Lang::get('lang.my_tickets') !!}</span>
</a>
</span>
<span onclick="javascript: window.location.href='https://support.ebs.in/app/index.php?/News/List';">
<a href="{{url('/knowledgebase')}}" class="widgetrowitem defaultwidget" style="background-image: URL('https://support.ebs.in/app/__swift/themes/client/images/icon_widget_knowledgebase.png');">
<span onclick="javascript: window.location.href='{{url('/knowledgebase')}}';">
<a href="{{url('/knowledgebase')}}" class="widgetrowitem defaultwidget" style="background-image: URL('lb-faveo/media/images/knowledgebase.png');">
<span class="widgetitemtitle">{!! Lang::get('lang.knowledge_base') !!}</span>
</a>
</span>
@@ -54,5 +54,6 @@
</div>
<script type="text/javascript"> $(function(){ $('.dialogerror, .dialoginfo, .dialogalert').fadeIn('slow');$("form").bind("submit", function(e){$(this).find("input:submit").attr("disabled", "disabled");});});</script>
<script type="text/javascript" >try {if (top.location.hostname != self.location.hostname) { throw 1; }} catch (e) { top.location.href = self.location.href; }</script>
</div>
</div>
@stop

View File

@@ -1,238 +1,226 @@
@extends('themes.default1.client.layout.client')
@section('title')
My Tickets -
My Tickets -
@stop
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here') !!}: </li>
<li class="active"><a href="{!! URL::route('ticket2') !!}">{!! Lang::get('lang.my_tickets') !!}</a></li>
</ol>
</div>
@stop
@section('myticket')
class="active"
class="active"
@stop
@section('content')
<!-- Main content -->
<div id="content" class="site-content col-md-12">
<?php
$open = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=' , Auth::user()->id)
->where('status', '=', 1)
->orderBy('id', 'DESC')
->paginate(20);
?>
<?php
$open = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', Auth::user()->id)
->where('status', '=', 1)
->orderBy('id', 'DESC')
->paginate(20);
?>
<?php
$close = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', Auth::user()->id)
->whereIn('status', [2, 3])
->orderBy('id', 'DESC')
->paginate(20);
?>
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab_1" data-toggle="tab" aria-expanded="true">{!! Lang::get('lang.opened') !!} <small class="label bg-orange">{!! $open->total() !!}</small></a></li>
<li class=""><a href="#tab_2" data-toggle="tab" aria-expanded="false">{!! Lang::get('lang.closed') !!} <small class="label bg-green">{!! $close->total() !!}</small></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab_1">
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
<div class="mailbox-controls">
<!-- Check all button -->
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
<a class="btn btn-default btn-sm" id="click1"><i class="fa fa-refresh"></i></a>
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="{!! Lang::get('lang.close') !!}">
<div class="pull-right" id="refresh21">
{!! $open->count().'-'.$open->total(); !!}
</div>
</div>
<div class=" table-responsive mailbox-messages" id="refresh1">
<p style="display:none;text-align:center; position:fixed; margin-left:37%;margin-top:-80px;" id="show1" class="text-red"><b>Loading...</b></p>
<!-- table -->
<table class="table table-hover table-striped">
<thead>
<th></th>
<th>
{!! Lang::get('lang.subject') !!}
</th>
<th>
{!! Lang::get('lang.ticket_id') !!}
</th>
<th>
{!! Lang::get('lang.priority') !!}
</th>
<th>
{!! Lang::get('lang.last_replier') !!}
</th>
<th>
{!! Lang::get('lang.last_activity') !!}
</th>
<th>
{!! Lang::get('lang.status') !!}
</th>
</thead>
<tbody id="hello">
@foreach ($open as $ticket )
<tr <?php if ($ticket->seen_by == null) { ?> style="color:green;" <?php }
?> >
<td><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
<?php
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
$string = strip_tags($title->title);
if (strlen($string) > 40) {
$stringCut = substr($string, 0, 40);
$string = substr($stringCut, 0, strrpos($stringCut, ' ')) . ' ...';
}
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
if ($LastResponse->role == "user") {
$rep = "#F39C12";
$username = $LastResponse->user_name;
} else {
$rep = "#000";
$username = $LastResponse->first_name . " " . $LastResponse->last_name;
if ($LastResponse->first_name == null || $LastResponse->last_name == null) {
$username = $LastResponse->user_name;
}
}
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
$count = count($titles);
foreach ($titles as $title) {
$title = $title;
}
?>
<td class="mailbox-name"><a href="{!! URL('check_ticket',[Crypt::encrypt($ticket->id)]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i></td>
<td class="mailbox-Id">#{!! $ticket->ticket_number !!}</td>
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first(); ?>
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
<?php
$close = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=' , Auth::user()->id)
->whereIn('status', [2, 3])
->orderBy('id', 'DESC')
->paginate(20);
?>
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab_1" data-toggle="tab" aria-expanded="true">{!! Lang::get('lang.opened') !!} <small class="label bg-orange">{!! $open->total() !!}</small></a></li>
<li class=""><a href="#tab_2" data-toggle="tab" aria-expanded="false">{!! Lang::get('lang.closed') !!} <small class="label bg-green">{!! $close->total() !!}</small></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab_1">
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
<div class="mailbox-controls">
<!-- Check all button -->
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
<a class="btn btn-default btn-sm" id="click1"><i class="fa fa-refresh"></i></a>
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="{!! Lang::get('lang.close') !!}">
<div class="pull-right" id="refresh21">
{!! $open->count().'-'.$open->total(); !!}
<td class="mailbox-last-reply" style="color: {!! $rep !!}">{!! $username !!}</td>
<td class="mailbox-last-activity">{!! $title->updated_at !!}</td>
<?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id', '=', $ticket->status)->first(); ?>
<td class="mailbox-date">{!! $status->name !!}</td>
</tr>
@endforeach
</tbody>
</table><!-- /.table -->
<div class="pull-right">
<?php echo $open->setPath(url('mytickets'))->render(); ?>&nbsp;
</div>
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->
{{-- /.tab_1 --}}
<div class="tab-pane" id="tab_2">
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
<div class="mailbox-controls">
<!-- Check all button -->
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
<a class="btn btn-default btn-sm" id="click2"><i class="fa fa-refresh"></i></a>
<input type="submit" class="btn btn-default text-blue btn-sm" name="submit" value="{!! Lang::get('lang.open') !!}">
<div class="pull-right" id="refresh22">
{!! $close->count().'-'.$close->total(); !!}
</div>
</div>
<div class=" table-responsive mailbox-messages" id="refresh2">
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show2" class="text-red"><b>Loading...</b></p>
<!-- table -->
<table class="table table-hover table-striped">
<thead>
<th></th>
<th>
{!! Lang::get('lang.subject') !!}
</th>
<th>
{!! Lang::get('lang.ticket_id') !!}
</th>
<th>
{!! Lang::get('lang.priority') !!}
</th>
<th>
{!! Lang::get('lang.last_replier') !!}
</th>
<th>
{!! Lang::get('lang.last_activity') !!}
</th>
<th>
{!! Lang::get('lang.status') !!}
</th>
</thead>
<tbody id="hello">
@foreach ($close as $ticket )
<tr <?php if ($ticket->seen_by == null) { ?> style="color:green;" <?php }
?> >
<td><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
<?php
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
$string = strip_tags($title->title);
if (strlen($string) > 40) {
$stringCut = substr($string, 0, 40);
$string = substr($stringCut, 0, strrpos($stringCut, ' ')) . ' ...';
}
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
if ($LastResponse->role == "user") {
$rep = "#F39C12";
$username = $LastResponse->user_name;
} else {
$rep = "#000";
$username = $LastResponse->first_name . " " . $LastResponse->last_name;
if ($LastResponse->first_name == null || $LastResponse->last_name == null) {
$username = $LastResponse->user_name;
}
}
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
$count = count($titles);
foreach ($titles as $title) {
$title = $title;
}
?>
<td class="mailbox-name"><a href="{!! URL('check_ticket',[Crypt::encrypt($ticket->id)]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i></td>
<td class="mailbox-Id">#{!! $ticket->ticket_number !!}</td>
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first(); ?>
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
<td class="mailbox-last-reply" style="color: {!! $rep !!}">{!! $username !!}</td>
<td class="mailbox-last-activity">{!! $title->updated_at !!}</td>
<?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id', '=', $ticket->status)->first(); ?>
<td class="mailbox-date">{!! $status->name !!}</td>
</tr>
@endforeach
</tbody>
</table><!-- /.table -->
<div class="pull-right">
<?php echo $close->setPath(url('mytickets'))->render(); ?>&nbsp;
</div>
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div>
</div>
<div class=" table-responsive mailbox-messages" id="refresh1">
<p style="display:none;text-align:center; position:fixed; margin-left:37%;margin-top:-80px;" id="show1" class="text-red"><b>Loading...</b></p>
<!-- table -->
<table class="table table-hover table-striped">
<thead>
<th></th>
<th>
{!! Lang::get('lang.subject') !!}
</th>
<th>
{!! Lang::get('lang.ticket_id') !!}
</th>
<th>
{!! Lang::get('lang.priority') !!}
</th>
<th>
{!! Lang::get('lang.last_replier') !!}
</th>
<th>
{!! Lang::get('lang.last_activity') !!}
</th>
<th>
{!! Lang::get('lang.status') !!}
</th>
</thead>
<tbody id="hello">
@foreach ($open as $ticket )
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php }
?> >
<td><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
<?php $title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
$string = strip_tags($title->title);
if (strlen($string) > 40) {
$stringCut = substr($string, 0, 40);
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
}
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
if($LastResponse->role == "user") {
$rep = "#F39C12";
$username = $LastResponse->user_name;
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
$username = $LastResponse->user_name;
}}
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
$count = count($titles);
foreach($titles as $title)
{
$title = $title;
} ?>
<td class="mailbox-name"><a href="{!! URL('check_ticket',[Crypt::encrypt($ticket->id)]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i></td>
<td class="mailbox-Id">#{!! $ticket->ticket_number !!}</td>
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
<td class="mailbox-last-reply" style="color: {!! $rep !!}">{!! $username !!}</td>
<td class="mailbox-last-activity">{!! $title->updated_at !!}</td>
<?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id', '=', $ticket->status)->first(); ?>
<td class="mailbox-date">{!! $status->name !!}</td>
</tr>
@endforeach
</tbody>
</table><!-- /.table -->
<div class="pull-right">
<?php echo $open->setPath(url('mytickets'))->render();?>&nbsp;
</div>
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->
{{-- /.tab_1 --}}
<div class="tab-pane" id="tab_2">
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
<div class="mailbox-controls">
<!-- Check all button -->
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
<a class="btn btn-default btn-sm" id="click2"><i class="fa fa-refresh"></i></a>
<input type="submit" class="btn btn-default text-blue btn-sm" name="submit" value="{!! Lang::get('lang.open') !!}">
<div class="pull-right" id="refresh22">
{!! $close->count().'-'.$close->total(); !!}
</div>
</div>
<div class=" table-responsive mailbox-messages" id="refresh2">
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show2" class="text-red"><b>Loading...</b></p>
<!-- table -->
<table class="table table-hover table-striped">
<thead>
<th></th>
<th>
{!! Lang::get('lang.subject') !!}
</th>
<th>
{!! Lang::get('lang.ticket_id') !!}
</th>
<th>
{!! Lang::get('lang.priority') !!}
</th>
<th>
{!! Lang::get('lang.last_replier') !!}
</th>
<th>
{!! Lang::get('lang.last_activity') !!}
</th>
<th>
{!! Lang::get('lang.status') !!}
</th>
</thead>
<tbody id="hello">
@foreach ($close as $ticket )
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php }
?> >
<td><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
<?php $title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
$string = strip_tags($title->title);
if (strlen($string) > 40) {
$stringCut = substr($string, 0, 40);
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
}
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
if($LastResponse->role == "user") {
$rep = "#F39C12";
$username = $LastResponse->user_name;
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
$username = $LastResponse->user_name;
}}
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
$count = count($titles);
foreach($titles as $title)
{
$title = $title;
} ?>
<td class="mailbox-name"><a href="{!! URL('check_ticket',[Crypt::encrypt($ticket->id)]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i></td>
<td class="mailbox-Id">#{!! $ticket->ticket_number !!}</td>
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
<td class="mailbox-last-reply" style="color: {!! $rep !!}">{!! $username !!}</td>
<td class="mailbox-last-activity">{!! $title->updated_at !!}</td>
<?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id', '=', $ticket->status)->first(); ?>
<td class="mailbox-date">{!! $status->name !!}</td>
</tr>
@endforeach
</tbody>
</table><!-- /.table -->
<div class="pull-right">
<?php echo $close->setPath(url('mytickets'))->render();?>&nbsp;
</div>
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /. box -->
</div>
</div><!-- /. box -->
</div>
</div>
<script>
$(function () {
$(function() {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
});
});
});
$(function() {
// Enable check and uncheck all functionality
@@ -249,7 +237,6 @@ $close = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=' , Auth::user()-
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click1').click(function() {
$('#refresh1').load('mytickets #refresh1');
@@ -258,8 +245,6 @@ $close = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=' , Auth::user()-
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click2').click(function() {
$('#refresh2').load('mytickets #refresh2');
@@ -268,7 +253,5 @@ $close = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=' , Auth::user()-
});
});
</script>
@stop

View File

@@ -1,164 +1,139 @@
@extends('themes.default1.client.layout.client')
@section('HeadInclude')
<link href="{{asset("lb-faveo/css/AdminLTE.css")}}" rel="stylesheet" type="text/css" />
<link href="{{asset("lb-faveo/css/AdminLTE.css")}}" rel="stylesheet" type="text/css" />
@stop
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">You are here: </li>
<li><a href="#">My Profile</a></li>
<li class="active"><a href="{!! URL::route('client.profile') !!}">Edit Profile</a></li>
</ol>
</div>
@stop
@section('profile')
class="active"
class="active"
@stop
@section('content')
<div id="content" class="site-content col-md-12">
<section class="section-title">
<h2>
Profile Settings </h2>
<h2>{!! Lang::get('lang.profile_settings') !!} </h2>
</section>
<div class="row">
<div class="col-md-6">
{!! Form::model($user,['url'=>'client-profile-edit', 'method' => 'PATCH','files'=>true]) !!}
<div class="box box-primary">
<div class="content-header">
<h4>Profile {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
</div>
<div class="box-body">
@if(Session::has('success1'))
<div class="col-md-6">
{!! Form::model($user,['url'=>'client-profile-edit', 'method' => 'PATCH','files'=>true]) !!}
<div class="box box-primary">
<div class="box-header with-border">
<h4 class="box-title">{!! Lang::get('lang.profile') !!} </h4>
</div>
<div class="box-body">
@if(Session::has('success1'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Success.
<i class="fa fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success1')}}
</div>
@endif
<!-- fail message -->
@if(Session::has('fails1'))
@endif
@if (count($errors) > 0)
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Failed.
<b>{!! Lang::get('lang.alert') !!} !</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</div>
@endif
<!-- fail message -->
@if(Session::has('fails1'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails1')}}
</div>
@endif
@endif
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
<!-- first name -->
{!! Form::label('first_name',Lang::get('lang.first_name')) !!}<span class="text-red"> *</span>
{!! Form::text('first_name',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
<!-- last name -->
{!! Form::label('last_name',Lang::get('lang.last_name')) !!}
{!! Form::text('last_name',null,['class' => 'form-control']) !!}
</div>
<div class="form-group">
<!-- gender -->
{!! Form::label('gender',Lang::get('lang.gender')) !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('gender','1',true) !!}{{Lang::get('lang.male')}}
</div>
<div class="col-xs-3">
{!! Form::radio('gender','0') !!}{{Lang::get('lang.female')}}
</div>
</div>
</div>
<div class="form-group">
<!-- email -->
{!! Form::label('email',Lang::get('lang.email_address')) !!}
<div>
{{$user->email}}
</div>
</div>
<div class="form-group {{ $errors->has('company') ? 'has-error' : '' }}">
<!-- company -->
{!! Form::label('company',Lang::get('lang.company')) !!}
{!! Form::text('company',null,['class' => 'form-control']) !!}
</div>
<div class="row">
<div class="col-xs-2 form-group {{ $errors->has('country_code') ? 'has-error' : '' }}">
<!-- phone extensionn -->
{!! Form::label('country_code',Lang::get('lang.country-code')) !!}
{!! Form::text('country_code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
<!-- first name -->
{!! Form::label('first_name',Lang::get('lang.first_name')) !!}
{!! $errors->first('first_name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('first_name',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
<!-- last name -->
{!! Form::label('last_name',Lang::get('lang.last_name')) !!}
{!! $errors->first('last_name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('last_name',null,['class' => 'form-control']) !!}
</div>
<div class="form-group">
<!-- gender -->
{!! Form::label('gender',Lang::get('lang.gender')) !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('gender','1',true) !!}{{Lang::get('lang.male')}}
</div>
<div class="col-xs-3">
{!! Form::radio('gender','0') !!}{{Lang::get('lang.female')}}
</div>
</div>
</div>
<div class="form-group">
<!-- email -->
{!! Form::label('email',Lang::get('lang.email_address')) !!}
<div>
{{$user->email}}
</div>
</div>
<div class="form-group {{ $errors->has('company') ? 'has-error' : '' }}">
<!-- company -->
{!! Form::label('company',Lang::get('lang.company')) !!}
{!! $errors->first('company', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('company',null,['class' => 'form-control']) !!}
</div>
<div class="row">
<div class="col-xs-3 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
<!-- phone extensionn -->
{!! Form::label('ext',Lang::get('lang.ext')) !!}
{!! $errors->first('ext', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('ext',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-9 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
<!-- phone number -->
{!! Form::label('phone_number',Lang::get('lang.phone')) !!}
{!! $errors->first('phone_number', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
<!-- mobile -->
{!! Form::label('mobile',Lang::get('lang.mobile_number')) !!}
{!! $errors->first('mobile', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('profile_pic') ? 'has-error' : '' }}">
<!-- profile pic -->
{!! Form::label('profile_pic',Lang::get('lang.profile_pic')) !!}
{!! $errors->first('profile_pic', '<spam class="help-block">:message</spam>') !!}
{!! Form::file('profile_pic') !!}
</div>
{!! Form::token() !!}
{!! Form::close() !!}
</div>
</div>
</div>
<div class="col-md-6">
{!! Form::model($user,['url'=>'client-profile-password' , 'method' => 'PATCH']) !!}
<div class="box box-primary">
<div class="content-header">
<h4>Change Password {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
</div>
<div class="box-body">
@if(Session::has('success2'))
</div>
<div class="col-xs-2 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
<!-- phone extensionn -->
{!! Form::label('ext',Lang::get('lang.ext')) !!}
{!! Form::text('ext',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-8 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
<!-- phone number -->
{!! Form::label('phone_number',Lang::get('lang.phone')) !!}
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
<!-- mobile -->
{!! Form::label('mobile',Lang::get('lang.mobile_number')) !!}
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('profile_pic') ? 'has-error' : '' }}">
<!-- profile pic -->
{!! Form::label('profile_pic',Lang::get('lang.profile_pic')) !!}
{!! Form::file('profile_pic') !!}
</div>
{!! Form::token() !!}
{!! Form::close() !!}
</div>
<div class="box-footer">
{!! Form::submit(Lang::get('lang.update'),['class'=>'btn btn-primary'])!!}
</div>
</div>
</div>
<div class="col-md-6">
{!! Form::model($user,['url'=>'client-profile-password' , 'method' => 'PATCH']) !!}
<div class="box box-primary">
<div class="box-header with-border">
<h4 class="box-title">{!! Lang::get('lang.change_password') !!}</h4>
</div>
<div class="box-body">
@if(Session::has('success2'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Success.
<i class="fa fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success2')}}
</div>
@@ -167,39 +142,39 @@
@if(Session::has('fails2'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Failed.
<b>{!! Lang::get('lang.alert') !!} !</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails2')}}
</div>
@endif
<!-- old password -->
<div class="form-group has-feedback {{ $errors->has('old_password') ? 'has-error' : '' }}">
{!! Form::label('old_password',Lang::get('lang.old_password')) !!}
{!! Form::password('old_password',['placeholder'=>'Password','class' => 'form-control']) !!}
{!! $errors->first('old_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
<!-- old password -->
<div class="form-group has-feedback {{ $errors->has('old_password') ? 'has-error' : '' }}">
{!! Form::label('old_password',Lang::get('lang.old_password')) !!}<span class="text-red"> *</span>
{!! Form::password('old_password',['placeholder'=>'Password','class' => 'form-control']) !!}
{!! $errors->first('old_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<!-- new password -->
<div class="form-group has-feedback {{ $errors->has('new_password') ? 'has-error' : '' }}">
{!! Form::label('new_password',Lang::get('lang.new_password')) !!}<span class="text-red"> *</span>
{!! Form::password('new_password',['placeholder'=>'New Password','class' => 'form-control']) !!}
{!! $errors->first('new_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<!-- cofirm password -->
<div class="form-group has-feedback {{ $errors->has('confirm_password') ? 'has-error' : '' }}">
{!! Form::label('confirm_password',Lang::get('lang.confirm_password')) !!}<span class="text-red"> *</span>
{!! Form::password('confirm_password',['placeholder'=>'Confirm Password','class' => 'form-control']) !!}
{!! $errors->first('confirm_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
</div>
<div class="box-footer">
{!! Form::submit(Lang::get('lang.update'),['class'=>'btn btn-primary'])!!}
</div>
</div>
</div>
</div>
<!-- new password -->
<div class="form-group has-feedback {{ $errors->has('new_password') ? 'has-error' : '' }}">
{!! Form::label('new_password',Lang::get('lang.new_password')) !!}
{!! Form::password('new_password',['placeholder'=>'New Password','class' => 'form-control']) !!}
{!! $errors->first('new_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<!-- cofirm password -->
<div class="form-group has-feedback {{ $errors->has('confirm_password') ? 'has-error' : '' }}">
{!! Form::label('confirm_password',Lang::get('lang.confirm_password')) !!}
{!! Form::password('confirm_password',['placeholder'=>'Confirm Password','class' => 'form-control']) !!}
{!! $errors->first('confirm_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
</div>
</div>
</div>
</div>
{!! Form::close() !!}
{!! Form::close() !!}
</div>
@stop

View File

@@ -0,0 +1,476 @@
@extends('themes.default1.client.layout.client')
@section('content')
<?php
$thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();
//$user = App\User::where('id','=',$id1)->first();
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header">
<div class="row">
<div class="col-md-9">
<section class="content-header"><h3 class="box-title"><i class="fa fa-user"> </i> {{$thread->title}} </h3> ( {{$tickets->ticket_number}} )
</section>
</div>
<div class="col-md-3">
<div class="pull-right">
<!-- <button type="button" class="btn btn-default"><i class="fa fa-edit" style="color:green;"> </i> Edit</button> -->
{{-- <button type="button" class="btn btn-default"><i class="fa fa-print" style="color:blue;"> </i> {!! link_to_route('ticket.print','Print',[$tickets->id]) !!}</button> --}}
<!-- </div> -->
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-exchange" style="color:teal;"> </i>
{!! Lang::get('lang.change_status') !!} <span class="caret"></span>
</button>
<?php $statuses = \App\Model\helpdesk\Ticket\Ticket_Status::all(); ?>
<ul class="dropdown-menu" id='cc_page'>
@foreach($statuses as $status)
<?php if ($status->name == 'Deleted' or $status->name == 'Accepted') continue; ?>
<li class="search_r"><a href="#" onclick="changeStatus({!! $status->id !!})"><i class="{!! $status->icon_class !!}" style="color:#FFD600;"> </i>{!! $status->name !!}</a>
</li>
@endforeach
</ul>
</div>
{!! Form::close() !!}
</div>
</div>
</div>
<br/>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success alert-dismissable" id="alert11" style="display:none;">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<i class="fa fa-check-circle"></i> <span id="message-success1">
</span>
</div>
<div class="ticketratings pull-right">
<table><tbody>
<?php $ratings = App\Model\helpdesk\Ratings\Rating::orderby('display_order')->get(); ?>
<form id="foo">
@foreach($ratings as $rating)
@if($rating->rating_area == 'Helpdesk Area')
<?php
$rating_value = App\Model\helpdesk\Ratings\RatingRef::where('rating_id', '=', $rating->id)->where('ticket_id', '=', $tickets->id)->first();
if ($rating_value == null) {
$ratingval = '0';
} else {
$ratingval = $rating_value->rating_value;
}
?>
<tr>
<th><div class="ticketratingtitle">{!! $rating->name !!} &nbsp;</div></th>&nbsp
<td>
<?php for ($i = 1; $i <= $rating->rating_scale; $i++) { ?>
<input type="radio" class="star" id="star5" name="{!! $rating->name !!}" value="{!! $i !!}"<?php echo ($ratingval == $i) ? 'checked' : '' ?> />
<?php } ?>
</td>
</tr>
@endif
@endforeach
</form></tbody> </table>
</div>
</div>
</div>
</div>
<div class="box-body" style="margin-bottom:-10px">
<div class="row">
<div id="loader" style="display:none;">
<div class="col-xs-5">
</div>
<div class="col-xs-1">
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}"><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</div>
<div class="col-xs-6">
</div>
</div>
<section class="content" id="refresh" style="margin-bottom:-10px;margin-top:-10px">
<div class="col-md-12">
<?php
$priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first();
?>
<div class="callout callout-default ">
<div class="row">
<div class="col-md-3">
<?php
$sla = $tickets->sla;
$SlaPlan = App\Model\helpdesk\Manage\Sla_plan::where('id', '=', 1)->first();
?>
<b>{!! Lang::get('lang.sla_plan') !!}: {{$SlaPlan->grace_period}} </b>
</div>
<div class="col-md-3">
<b>{!! Lang::get('lang.created_date') !!}: </b> {{ UTC::usertimezone($tickets->created_at) }}
</div>
<div class="col-md-3">
<b>{!! Lang::get('lang.due_date') !!}: </b>
<?php
$time = $tickets->created_at;
$time = date_create($time);
date_add($time, date_interval_create_from_date_string($SlaPlan->grace_period));
echo UTC::usertimezone(date_format($time, 'd/m/Y H:i:s'));
?>
</div>
<div class="col-md-3">
<?php $response = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->where('is_internal', '=', 0)->get(); ?>
@foreach($response as $last)
<?php $ResponseDate = $last->created_at; ?>
@endforeach
<b>{!! Lang::get('lang.last_response') !!}: </b> {{ UTC::usertimezone($ResponseDate)}}
</div>
</div>
</div>
</div>
<div class="col-md-6">
<table class="table table-hover">
<!-- <tr><th></th><th></th></tr> -->
<tr><td><b>{!! Lang::get('lang.status') !!}:</b></td> <?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id', '=', $tickets->status)->first(); ?>
@if($status->id == 1)
<td title="{{$status->properties}}" style="color:orange">{{$status->name}}</td></tr>
@elseif($status->id == 2)
<td title="{{$status->properties}}" style="color:green">{{$status->name}}</td></tr>
@elseif($status->id == 3)
<td title="{{$status->properties}}" style="color:green">{{$status->name}}</td></tr>
@endif
<tr><td><b>{!! Lang::get('lang.priority') !!}:</b></td> <?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first(); ?>
@if($priority->priority_id == 1)
<td title="{{$priority->priority_desc}}" style="color:green">{{$priority->priority_desc}}</td>
@elseif($priority->priority_id == 2)
<td title="{{$priority->priority_desc}}" style="color:orange">{{$priority->priority_desc}}</td>
@elseif($priority->priority_id == 3)
<td title="{{$priority->priority_desc}}" style="color:red">{{$priority->priority_desc}}</td>
@endif
</tr>
<tr><td><b>{!! Lang::get('lang.department') !!}:</b></td>
<?php
$help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first();
$department = App\Model\helpdesk\Agent\Department::where('id', '=', $help_topic->department)->first();
?>
<td title="{{ $department->name }}">{!! $department->name !!}</td></tr>
</table>
<!-- </div> -->
</div>
<div class="col-md-6">
<!-- <div class="callout callout-success"> -->
<table class="table table-hover">
<!-- <tr><th></th><th></th></tr> -->
<tr><td><b>{!! Lang::get('lang.help_topic') !!}:</b></td> <?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); ?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr>
<tr><td><b>{!! Lang::get('lang.last_message') !!}:</b></td> <td>{{ucwords($last->poster)}}</td></tr>
</table>
</div>
<!-- </div> -->
</section>
</div>
</div>
</div>
<?php
$conversations = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->where('is_internal', '=', 0)->paginate(10);
foreach ($conversations as $conversation) {
$ConvDate1 = $conversation->created_at;
$ConvDate = explode(' ', $ConvDate1);
$date = $ConvDate[0];
$time = $ConvDate[1];
$time = substr($time, 0, -3);
if (isset($data) && $date == $data) {
} else {
$data = $ConvDate[0];
}
$role = App\User::where('id', '=', $conversation->user_id)->first();
$attachment = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->first();
if ($attachment == null) {
$body = $conversation->body;
} else {
$body = $conversation->body;
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->orderBy('id', 'DESC')->get();
foreach ($attachments as $attachment) {
if ($attachment->type == 'pdf') {
} elseif ($attachment->type == 'docx') {
} else {
$image = @imagecreatefromstring($attachment->file);
ob_start();
imagejpeg($image, null, 80);
$data = ob_get_contents();
ob_end_clean();
$var = '<img src="data:image/jpg;base64,' . base64_encode($data) . '" />';
$body = str_replace($attachment->name, "data:image/jpg;base64," . base64_encode($data), $body);
$string = $body;
$start = "<head>";
$end = "</head>";
if (strpos($string, $start) == false || strpos($string, $start) == false) {
} else {
$ini = strpos($string, $start);
$ini += strlen($start);
$len = strpos($string, $end, $ini) - $ini;
$parsed = substr($string, $ini, $len);
$body2 = $parsed;
$body = str_replace($body2, " ", $body);
}
}
}
}
$string = $body;
$start = "<head>";
$end = "</head>";
if (strpos($string, $start) == false || strpos($string, $start) == false) {
} else {
$ini = strpos($string, $start);
$ini += strlen($start);
$len = strpos($string, $end, $ini) - $ini;
$parsed = substr($string, $ini, $len);
$body2 = $parsed;
$body = str_replace($body2, " ", $body);
}
?>
<ol class="comment-list" >
<li class="comment">
<article class="comment-body">
<footer class="comment-meta"<?php if ($role->role == "user") { ?> style="background-color: hsla(100, 100%, 51%, 0.15)" <?php } else { ?> style="background-color:#FFFCB3" <?php } ?> >
<div class="comment-author">
<img src="{{$role->profile_pic}}"alt="" height="50" width="50" class="avatar" <?php if ($role->role == "user") { ?>style="box-shadow: 0 1px 3px #00FF26;" <?php } else { ?> style="box-shadow: 0 1px 3px #FFEC00;" <?php } ?> >
@if($role->role == "user")
<b class="fn"><a href="#" rel="external" class="url">{{$role->user_name}}</a></b>
@else
<b class="fn"><a href="#" rel="external" class="url">{{$role->first_name." ".$role->last_name}}</a></b>
<div class="ticketratings pull-right"> <table><tbody>
@foreach($ratings as $rating)
@if($rating->rating_area == 'Comment Area')
<?php
$rating_value = App\Model\helpdesk\Ratings\RatingRef::where('rating_id', '=', $rating->id)->where('thread_id', '=', $conversation->id)->first();
if ($rating_value == null) {
$ratingval = '0';
} else {
$ratingval = $rating_value->rating_value;
}
?>
<form class="foo2">
<tr>
<th><div class="ticketratingtitle">{!! $rating->name !!} &nbsp;</div></th>&nbsp
<td>
<?php for ($i = 1; $i <= $rating->rating_scale; $i++) { ?>
<input type="radio" class="star" id="star5" name="{!! $rating->name !!},{!! $conversation->id !!}" value="{!! $i !!}"<?php echo ($ratingval == $i) ? 'checked' : '' ?> />
<?php } ?>
<!-- <input type="radio" class="star" id="star4" name="rating" value="2"<?php echo ($tickets->rating == '2') ? 'checked' : '' ?> />
<input type="radio" class="star" id="star3" name="rating" value="3"<?php echo ($tickets->rating == '3') ? 'checked' : '' ?>/>
<input type="radio" class="star" id="star2" name="rating" value="4"<?php echo ($tickets->rating == '4') ? 'checked' : '' ?>/>
<input type="radio" class="star" id="star1" name="rating" value="5"<?php echo ($tickets->rating == '5') ? 'checked' : '' ?> />-->
</td>
</tr>
</form>
@endif
@endforeach
</tbody></table></div>
@endif
</div><!-- .comment-author -->
<div class="comment-metadata">
<small class="date text-muted">
<time datetime="2013-10-23T01:50:50+00:00"><i class="fa fa-clock-o"> </i> {{ UTC::usertimezone($conversation->created_at) }}</time>
</small>
</div><!-- .comment-metadata -->
</footer><!-- .comment-meta -->
<div class="comment-content">
<p>{!! $body !!}</p>
</div><!-- .comment-content -->
<div class="timeline-footer" style="margin-bottom:-5px">
<?php
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->get();
$i = 0;
foreach ($attachments as $attachment) {
if ($attachment->poster == 'ATTACHMENT') {
$i++;
}
}
if ($i > 0) {
echo "<hr style='border-top: 1px dotted #FFFFFF;margin-top:0px;margin-bottom:0px;background-color:#8B8C90;'><h4 class='box-title'><b>" . $i . " </b> Attachments</h4>";
}
?>
<ul class='mailbox-attachments clearfix'>
<?php
foreach ($attachments as $attachment) {
$size = $attachment->size;
$units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
$power = $size > 0 ? floor(log($size, 1024)) : 0;
$value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
if ($attachment->poster == 'ATTACHMENT') {
if ($attachment->type == 'jpg' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'gif' || $attachment->type == 'GIF') {
$image = @imagecreatefromstring($attachment->file);
ob_start();
imagejpeg($image, null, 80);
$data = ob_get_contents();
ob_end_clean();
$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">' . $var . '</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></div></li>';
} else {
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
}
}
}
?>
</ul>
</div>
</article><!-- .comment-body -->
</li><!-- .comment -->
</ol>
<?php
?>
<?php }
?>
<div class="pull-right" style="margin-top:-30px;margin-bottom:-30px">
<?php echo $conversations->setPath(url('show-ticket/{' . $tickets->id . '}/' . $token))->render(); ?>
</div>
<br/><br/>
@if(Session::has('success1'))
<div class="alert alert-success alert-dismissable" id='formabc'>
<i class="fa fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success1')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails1'))
<div class="alert alert-danger alert-dismissable" id='formabc'>
<i class="fa fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails1')}}
</div>
@endif
<?php $id2 = $tickets->id; ?>
<div id="respond" class="comment-respond form-border">
<h3 id="reply-title" class="comment-reply-title section-title"><i class="line"></i>{!! Lang::get('lang.leave_a_reply') !!}</h3>
{!! Form::open(['url'=>'post-ticket-reply/'.$tickets->id.'#formabc']) !!}
<div class="row">
<div class="form-group">
<div class="col-md-12">
<div class="form-group ">
<textarea class="form-control" name="comment" cols="30" rows="8"></textarea>
</div>
</div>
</div>
</div>
<div class="text-right">
<button type="submit" class="btn btn-custom btn-lg">{!! Lang::get('lang.post_comment') !!}</button>
</div>
{!! Form::close() !!}
</div>
<script type="text/javascript">
// $("#cc_page").on('click', '.search_r', function() {
// var search_r = $('a', this).attr('id');
// $.ajax({
// type: "GET",
// url: "../ticket/status/{{$tickets->id}}/" + search_r,
// beforeSend: function() {
// $("#refresh").hide();
// $("#loader").show();
// },
// success: function(response) {
// $("#refresh").load("../show-ticket/{!! $tickets->id !!}/{!! $token !!} #refresh");
// $("#refresh").show();
// $("#loader").hide();
// var message = response;
// $("#alert11").show();
// $('#message-success1').html(message);
// setInterval(function() {
// $("#alert11").hide();
// }, 4000);
// }
// });
// return false;
// });
$(document).ready(function() {
var Data = $('input[name="rating"]:checked').val();
var Data2 = $('input[name="rating2"]:checked').val();
if (Data) {
$('input[name=rating]').rating('readOnly');
jQuery('.star').attr('disabled', true);
}
$('.star').change(function() {
$('#foo').submit();
$('.foo2').submit();
});
// process the form
$('#foo').submit(function(event) {
// get the form data
// there are many ways to get this data using jQuery (you can use the class or id also)
var formData = $(this).serialize();
//$('#foo').serialize();
// process the form
$.ajax({
type: 'POST', // define the type of HTTP verb we want to use (POST for our form)
url: '../../show/rating/' +<?php echo $tickets->id ?>, // the url where we want to POST
data: formData, // our data object
dataType: 'json', // what type of data do we expect back from the server
success: function() {
}
});
// using the done promise callback
// stop the form from submitting the normal way and refreshing the page
event.preventDefault();
});
// process the form
$('.foo2').submit(function(event) {
// get the form data
// there are many ways to get this data using jQuery (you can use the class or id also)
var formData = $(this).serialize();
//$('#foo').serialize();
// process the form
$.ajax({
type: 'POST', // define the type of HTTP verb we want to use (POST for our form)
url: '../../show/rating2/' +<?php echo $tickets->id ?>, // the url where we want to POST
data: formData, // our data object
dataType: 'json', // what type of data do we expect back from the server
success: function() {
}
});
// using the done promise callback
// stop the form from submitting the normal way and refreshing the page
event.preventDefault();
});
});
$(function() {
//Add text editor
$("textarea").wysihtml5();
});
function changeStatus(id, ticket_id){
$.ajax({
type: "GET",
url: "../../show/change-status/"+ id +"/"+ {!! $tickets->id !!},
beforeSend: function() {
$("#refresh").hide();
$("#loader").show();
},
success: function(response) {
$("#refresh").load("../../show-ticket/{!! $tickets->id !!}/{!! $token !!} #refresh");
$("#refresh").show();
$("#loader").hide();
var message = response;
$("#alert11").show();
$('#message-success1').html(message);
}
})
return false;
}
</script>
@stop

View File

@@ -8,17 +8,6 @@
class = "active"
@stop
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here')!!}: </li>
<li>{!! Lang::get('lang.home') !!}</li>
<li>{!! Lang::get('lang.knowledge_base') !!}</li>
<li class="active">{!! Lang::get('lang.article') !!}</li>
</ol>
</div>
@stop
@section('content')
<div id="content" class="site-content col-md-9 archive-list archive-article">
@foreach($article as $arti)
@@ -33,8 +22,7 @@
<?php $content = trim(preg_replace("/<img[^>]+\>/i", "", $excerpt), " \t.") ?>
{!! strip_tags($content) !!}
<p><a class="readmore-link" href="{{url('show/'.$arti->slug)}}">{!! Lang::get('lang.read_more') !!}</a></p>
</blockquote>
</blockquote>
<footer class="entry-footer">
<div class="entry-meta text-muted">
<span class="date"><i class="fa fa-clock-o fa-fw"></i> <time datetime="2013-10-22T20:01:58+00:00">{{$arti->created_at->format('l, d-m-Y')}}</time></span>

View File

@@ -1,28 +1,17 @@
@extends('themes.default1.client.layout.client')
<?php $category = App\Model\kb\Category::where('id', '=', $id)->first(); ?>
@section('title')
All Category -
{!! $category->name !!} -
@stop
@section('kb')
class = "active"
class = "active"
@stop
<?php $category = App\Model\kb\Category::where('id','=',$id)->first(); ?>
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here') !!}: </li>
<li>{!! Lang::get('lang.home') !!}</li>
<li class="active">{!! Lang::get('lang.knowledge_base') !!}</li>
<li class="active">{!! $category->name !!}</li>
</ol>
</div>
@stop
@section('content')
<div id="content" class="site-content col-md-9">
<header class="archive-header">
<h1 >{!! $category->name !!}</h1>
</header><!-- .archive-header -->
<blockquote class="archive-description" style="display: none;">
@@ -51,7 +40,7 @@
</footer><!-- .entry-footer -->
</article><!-- .hentry -->
@endforeach
<?php
<?php
}
//echo $all->render();
?>
@@ -78,11 +67,11 @@
<h2 class="section-title h4 clearfix">{!! Lang::get('lang.categories') !!}<small class="pull-right"><i class="fa fa-hdd-o fa-fw"></i></small></h2>
<ul class="nav nav-pills nav-stacked nav-categories">
@foreach($categorys as $category)
<?php
$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get();
$article_id = $num->lists('article_id');
$numcount = count($article_id);
?>
<?php
$num = \App\Model\kb\Relationship::where('category_id', '=', $category->id)->get();
$article_id = $num->lists('article_id');
$numcount = count($article_id);
?>
<li><a href="{{url('category-list/'.$category->slug)}}"><span class="badge pull-right">{{$numcount}}</span>{{$category->name}}</a></li>
@endforeach
</ul>

View File

@@ -1,79 +1,59 @@
@extends('themes.default1.client.layout.client')
@section('title')
Category List -
Category List -
@stop
@section('kb')
class = "active"
@stop
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here')!!}: </li>
<li>{!! Lang::get('lang.home') !!}</li>
<li>{!! Lang::get('lang.knowledge_base') !!}</li>
<li class="active">{!! Lang::get('lang.category') !!}</li>
</ol>
</div>
class = "active"
@stop
@section('content')
<div id="content" class="site-content col-md-12">
<!-- Start of Page Container -->
<div class="row home-listing-area">
<div class="span8">
<h2>{!! Lang::get('lang.categories') !!}</h2>
<!-- Start of Page Container -->
<div class="row home-listing-area">
<div class="span8">
<h2>{!! Lang::get('lang.categories') !!}</h2>
</div>
</div>
</div>
<div class="row separator">
@foreach($categorys as $category)
<div class="col-xs-6">
{{-- get the article_id where category_id == current category --}}
<?php
$all = App\Model\kb\Relationship::where('category_id', $category->id)->get();
//dd($all);
/* from whole attribute pick the article_id */
$article_id = $all->lists('article_id');
?>
<section class="articles-list">
<h3><i class="fa fa-folder-open-o fa-fw text-muted"></i> <a href="{{url('category-list/'.$category->slug)}}">{{$category->name}}</a> <span>({{count($all)}})</span></h3>
<ul class="articles">
<hr>
<?php foreach ($article_id as $id) {
?>
<?php
$article = App\Model\kb\Article::where('id', $id)->get();
$article = $article->where('status', 1);
$article = $article->where('type', 1);
//dd($article);
<div class="row separator">
@foreach($categorys as $category)
<div class="col-xs-6">
{{-- get the article_id where category_id == current category --}}
<?php
$all = App\Model\kb\Relationship::where('category_id', $category->id)->get();
/* from whole attribute pick the article_id */
$article_id = $all->lists('article_id');
?>
<section class="articles-list">
<h3><i class="fa fa-folder-open-o fa-fw text-muted"></i> <a href="{{url('category-list/'.$category->slug)}}">{{$category->name}}</a> <span>({{count($all)}})</span></h3>
<ul class="articles">
<hr>
<?php foreach ($article_id as $id) {
?>
<?php
$article = App\Model\kb\Article::where('id', $id)->get();
$article = $article->where('status', 1);
$article = $article->where('type', 1);
//dd($article);
?>
@foreach($article as $arti)
<li class="article-entry image" style="margin-left: 50px;">
<h4><a href="{{url('show/'.$arti->slug)}}">{{$arti->name}}</a></h4>
<span class="article-meta">{{$arti->created_at->format('l, d-m-Y')}}
<?php $str = $arti->description ?>
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 55) ?>
<p>{!!$excerpt!!} <a class="readmore-link" href="{{url('show/'.$arti->slug)}}">{!! Lang::get('lang.read_more') !!}</a></p>
</li>
@endforeach
<?php }
?>
@foreach($article as $arti)
<li class="article-entry image" style="margin-left: 50px;">
<h4><a href="{{url('show/'.$arti->slug)}}">{{$arti->name}}</a></h4>
<span class="article-meta">{{$arti->created_at->format('l, d-m-Y')}}
<?php $str = $arti->description ?>
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 55) ?>
<p>{!!$excerpt!!} <a class="readmore-link" href="{{url('show/'.$arti->slug)}}">{!! Lang::get('lang.read_more') !!}</a></p>
</li>
@endforeach
<?php }
?>
</ul>
</section>
</ul>
</section>
</div>
@endforeach
</div>
@endforeach
</div>
</div>
<!-- end of page content -->
@stop

View File

@@ -4,18 +4,8 @@
class = "active"
@stop
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">You are here: </li>
<li>Home</li>
<li class="active">Contact Us</li>
</ol>
</div>
@stop
@section('check')
<!-- Start of Page Container -->
<div style="padding-top: 60px;">
@if($settings->address)

View File

@@ -1,18 +1,17 @@
@extends('themes.default1.client.layout.client')
@section('title')
Knowledge Base -
Knowledge Base -
@stop
@section('knowledgebase')
class = "active"
class = "active"
@stop
@section('content')
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"></i>
<b>Success!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@@ -21,23 +20,12 @@
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Failed.
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li>{!! Lang::get('lang.you_are_here') !!}: </li>
<li>{!! Lang::get('lang.home') !!}</li>
<li>{!! Lang::get('lang.knowledge_base') !!}</li>
</ol>
</div>
@stop
<div id="content" class="site-content col-md-9">
<div class="row">
<?php $categories = App\Model\kb\Category::all();
@@ -47,7 +35,7 @@
<?php
$all = App\Model\kb\Relationship::all();
/* from whole attribute pick the article_id */
$page = App\Model\kb\Relationship::where('category_id', '=',$category->id)->paginate('3');
$page = App\Model\kb\Relationship::where('category_id', '=', $category->id)->paginate('3');
/* from whole attribute pick the article_id */
$article_id = $page->lists('article_id');
$count = count($article_id);
@@ -60,41 +48,48 @@
{{$category->name}}
</h1>
<ul class="fa-ul">
<?php foreach ($article_id as $id) {
//$format = App\Model\helpdesk\Settings\System::where('id','1')->first()->date_time_format;
$tz = App\Model\helpdesk\Settings\System::where('id','1')->first()->time_zone;
$tz = \App\Model\helpdesk\Utility\Timezones::where('id',$tz)->first()->name;
date_default_timezone_set($tz);
$date = \Carbon\Carbon::now()->toDateTimeString();
//dd($date);
$article = App\Model\kb\Article::where('id', '=', $id)->where('status', '=','1')->where('type', '=','1')->where('publish_time','<',$date)->get();
<?php
foreach ($article_id as $id) {
//$format = App\Model\helpdesk\Settings\System::where('id','1')->first()->date_time_format;
$tz = App\Model\helpdesk\Settings\System::where('id', '1')->first()->time_zone;
$tz = \App\Model\helpdesk\Utility\Timezones::where('id', $tz)->first()->name;
date_default_timezone_set($tz);
$date = \Carbon\Carbon::now()->toDateTimeString();
//dd($date);
$article = App\Model\kb\Article::where('id', '=', $id);
if (Auth::check()) {
if (\Auth::user()->role == 'user') {
$article = $article->where('status', '1');
}
} else {
$article = $article->where('status', '1');
}
$article = $article->where('type', '1');
$article = $article->get();
?>
@forelse($article as $arti)
<li>
<i class="fa-li fa fa-list-alt fa-fw text-muted"></i>
<h3 class="h5"><a href="#"><a href="{{url('show/'.$arti->slug)}}">{{$arti->name}}</a></h3>
<span class="article-meta">{{$arti->created_at->format('l, d-m-Y')}}</span>
<?php $str = $arti->description;
$len = strlen($str);
<?php
$str = $arti->description;
$len = strlen($str);
$excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 50); ?>
{!! $excerpt !!} <br/><a class="more-link text-center" href="{{url('show/'.$arti->slug)}}" style="color: orange">{!! Lang::get('lang.read_more') !!}</a>
$excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 50);
?>
{!! strip_tags($excerpt) !!} <br/><a class="more-link text-center" href="{{url('show/'.$arti->slug)}}" style="color: orange">{!! Lang::get('lang.read_more') !!}</a>
</li>
@empty
<p>No Articles</p>
<p>{!! Lang::get('lang.no_article') !!}</p>
@endforelse
<?php } ?>
<?php } ?>
</ul>
<p class="more-link text-center"><a href="{{url('category-list/'.$category->slug)}}" class="btn btn-custom btn-xs">{!! Lang::get('lang.view_all') !!}</a></p>
</section>
</div>
@endforeach
</div>
<section class="section">
<div class="banner-wrapper banner-horizontal clearfix">
@@ -112,11 +107,11 @@
<h2 class="section-title h4 clearfix">{!! Lang::get('lang.categories') !!}<small class="pull-right"><i class="fa fa-hdd-o fa-fw"></i></small></h2>
<ul class="nav nav-pills nav-stacked nav-categories">
@foreach($categorys as $category)
<?php
$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get();
$article_id = $num->lists('article_id');
$numcount = count($article_id);
?>
<?php
$num = \App\Model\kb\Relationship::where('category_id', '=', $category->id)->get();
$article_id = $num->lists('article_id');
$numcount = count($article_id);
?>
<li><a href="{{url('category-list/'.$category->slug)}}"><span class="badge pull-right">{{$numcount}}</span>{{$category->name}}</a></li>
@endforeach
</ul>

View File

@@ -2,44 +2,24 @@
@section('HeadInclude')
<link href="{{asset("lb-faveo/css/AdminLTE.css")}}" rel="stylesheet" type="text/css" />
@stop
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">You are here: </li>
<li>Home</li>
<li class="active">Edit Profile</li>
</ol>
</div>
@stop
@section('content')
<div id="content" class="site-content col-md-12">
<section class="section-title">
<h2>
Profile Settings </h2>
{!! Lang::get('lang.profile_settings') !!} </h2>
</section>
<div class="row">
<div class="col-md-6">
{!! Form::model($user,['url'=>'client-profile-edit', 'method' => 'PATCH','files'=>true]) !!}
<div class="box box-primary">
<div class="content-header">
<h4>Profile {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
<div class="box-header with-border">
<h4>{!! Lang::get('lang.pofile') !!} </h4>
</div>
<div class="box-body">
@if(Session::has('success1'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Success.
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success1')}}
</div>
@@ -48,28 +28,23 @@
@if(Session::has('fails1'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Failed.
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails1')}}
</div>
@endif
<div class="form-group {{ $errors->has('firstname') ? 'has-error' : '' }}">
<!-- first name -->
{!! Form::label('firstname',Lang::get('lang.firstname')) !!}
{!! $errors->first('firstname', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('firstname',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('lastname') ? 'has-error' : '' }}">
<!-- last name -->
{!! Form::label('lastname',Lang::get('lang.lastname')) !!}
{!! $errors->first('lastname', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('lastname',null,['class' => 'form-control']) !!}
</div>
<div class="form-group">
<!-- gender -->
{!! Form::label('gender',Lang::get('lang.gender')) !!}
@@ -82,9 +57,6 @@
</div>
</div>
</div>
<div class="form-group">
<!-- email -->
{!! Form::label('email',Lang::get('lang.email')) !!}
@@ -92,42 +64,32 @@
{{$user->email}}
</div>
</div>
<div class="form-group {{ $errors->has('company') ? 'has-error' : '' }}">
<!-- company -->
{!! Form::label('company',Lang::get('lang.company')) !!}
{!! $errors->first('company', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('company',null,['class' => 'form-control']) !!}
</div>
<div class="row">
<div class="col-xs-3 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
<!-- phone extensionn -->
{!! Form::label('ext',Lang::get('lang.ext')) !!}
{!! $errors->first('ext', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('ext',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-9 form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
<!-- phone number -->
{!! Form::label('phone_number',Lang::get('lang.phone')) !!}
{!! $errors->first('phone_number', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
<!-- mobile -->
{!! Form::label('mobile',Lang::get('lang.mobile')) !!}
{!! $errors->first('mobile', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('profile_pic') ? 'has-error' : '' }}" >
<!-- profile pic -->
<div class="btn btn-default btn-file">
@@ -135,26 +97,21 @@
{!! $errors->first('profile_pic', '<spam class="help-block">:message</spam>') !!}
{!! Form::file('profile_pic') !!}
</div>
</div>
{!! Form::token() !!}
{!! Form::close() !!}
</div>
<div class="box-footer">
{!! Form::submit(Lang::get('lang.update'),['class'=>'btn btn-primary'])!!}
</div>
</div>
</div>
<div class="col-md-6">
{!! Form::model($user,['url'=>'client-profile-password' , 'method' => 'PATCH']) !!}
<div class="box box-primary">
<div class="content-header">
<h4>Change Password {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
<div class="box-header with-border">
<h4>{!! Lang::get('lang.change_password') !!} {!! Form::submit(Lang::get('lang.update'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
</div>
<div class="box-body">
@if(Session::has('success2'))
<div class="alert alert-success alert-dismissable">

View File

@@ -10,7 +10,7 @@
@stop
@section('content')
<div id="content" class="site-content col-md-9">
@foreach($result as $arti)
@forelse($result as $arti)
<article class="format-standard type-post hentry clearfix">
<header class="clearfix">
@@ -31,7 +31,9 @@
<span class="date"><i class="fa fa-clock-o fa-fw"></i> {{$arti->created_at->format('l, d-m-Y')}}</span>
</div><!-- end of post meta -->
<hr>
@endforeach
@empty
<p><h3><b>Sorry!</b></h3> No result has found.</p>
@endforelse
</article>
<!-- end of page content -->

View File

@@ -6,7 +6,7 @@
$all = App\Model\kb\Relationship::where('article_id','=', $arti->id)->get();
//dd($all);
/* from whole attribute pick the article_id */
$category_id = $all->lists('category_id');
$category_id = $all->lists('category_id')->toArray();
?>
<div class="site-hero clearfix">
@@ -19,7 +19,10 @@ $category_id = $all->lists('category_id');
<li class="active">{{$arti->name}}</li>
</ol>
</div>
@stop
@stop
@section('title')
{!! $arti->name !!} -
@stop
@section('content')
<div id="content" class="site-content col-md-9">
<!--

View File

@@ -1,336 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title> Faveo Knowledge Base</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<!-- Bootstrap 3.3.2 -->
{{-- <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> --}}
<link href="{{asset("lb-faveo/downloads/bootstrap.min.css")}}" rel="stylesheet" type="text/css" />
<!-- Font Awesome Icons -->
{{-- <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" /> --}}
<link href="{{asset("lb-faveo/dist/css/font-awesome.min.css")}}" rel="stylesheet" type="text/css" />
<!-- Ionicons -->
{{-- <link href="http://code.ionicframework.com/ionicons/2.0.0/css/ionicons.min.css" rel="stylesheet" type="text/
css" /> --}}
<link href="{{asset("lb-faveo/dist/css/ionicons.min.css")}}" rel="stylesheet" type="text/css" />
<!-- fullCalendar 2.2.5-->
<link href="{{asset("lb-faveo/plugins/fullcalendar/fullcalendar.min.css")}}" rel="stylesheet" type="text/css" />
<link href="{{asset("lb-faveo/plugins/fullcalendar/fullcalendar.print.css")}}" rel="stylesheet" type="text/css" media='print' />
<link href="{{asset("lb-faveo/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css")}}" rel="stylesheet" type="text/css" />
<!-- Theme style -->
<link href="{{asset("lb-faveo/dist/css/app.css")}}" rel="stylesheet" type="text/css" />
{{-- // <script src="ckeditor/ckeditor.js"></script> --}}
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
@yield('HeadInclude')
</head>
<body>
<div id="page" class="hfeed site">
<header id="masthead" class="site-header" role="banner">
<div class="container">
<div id="logo" class="site-logo text-center" style="font-size: 40px">
<a href="{{url('/')}}" rel="home"><?php $company = App\Model\kb\Settings::where('id', '=', '1')->first(); ?>
@if($company->logo)
<img src="{{asset('lb-faveo/dist/image')}}{{'/'}}{{$company->logo}}" class="logo" alt="" width="200"/>
@elseif($company->company_name)
<b>{{$company->company_name}} </b>
@else
<b>Knowledge</b> Base
@endif
</a>
</div><!-- #logo -->
<div id="navbar" class="navbar-wrapper text-center">
<nav class="navbar navbar-default site-navigation" role="navigation">
<ul class="nav navbar-nav navbar-menu">
<li class="active"><a href="{{route('home')}}">Home</a></li>
<li><a href="#">KnowledgeBase</a>
<ul class="dropdown-menu">
<li><a href="{{route('article-list')}}">Articles</a></li>
</ul>
</li>
</li>
<?php $pages = App\Model\kb\Page::where('status', '1')->where('visibility', '1')->get();
?>
@foreach($pages as $page)
<li><a href="{{route('pages',$page->name)}}">{{$page->name}}</a></li>
@endforeach
<li><a href="{{route('contact')}}">Contact us</a></li>
@if(Auth::user())
<li><a href="#" >My Profile</a>
<ul class="dropdown-menu">
<li>
<div class="banner-wrapper user-menu text-center clearfix">
@if(Auth::user())
@if(Auth::user()->profile_pic)
<img src="{{asset('lb-faveo/dist/img')}}{{'/'}}{{Auth::user()->profile_pic}}" class="img-circle" alt="User Image"/>
@else
<img src="{{ Gravatar::src(Auth::user()->email) }}" class="img-circle" alt="User Image">
@endif
@endif
<span class="hidden-xs">{!! Auth::user()->firstname." ".Auth::user()->lastname !!}</span>
<div class="banner-content">
<a href="{{url('client-profile')}}" class="btn btn-custom btn-xs">Edit Profile</a> <a href="{{url('auth/logout')}}" class="btn btn-custom btn-xs">Log out</a>
</div>
</div>
</li>
</ul>
</li>
</ul><!-- .navbar-user -->
@else
<ul class="nav navbar-nav navbar-login">
<li><a href="#" class="collapsed" data-toggle="collapse" data-target="#login-form">Login <i class="sub-indicator fa fa-chevron-circle-down fa-fw text-muted"></i></a></li>
</ul><!-- .navbar-login -->
<div id="login-form" class="login-form collapse fade clearfix">
{!! Form::open(['action'=>'Auth\AuthController@postLogin', 'method'=>'post']) !!}
<div class="form-group has-feedback {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::text('email',null,['placeholder'=>'Email','class' => 'form-control']) !!}
{!! $errors->first('email', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback {{ $errors->has('password') ? 'has-error' : '' }}">
{!! Form::password('password',['placeholder'=>'Password','class' => 'form-control']) !!}
{!! $errors->first('password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<ul class="list-unstyled pull-left">
<li><a href="{{url('password/email')}}">Forgot password</a><br></li>
<li><a href="{{url('auth/register')}}">Create Account</a></li>
</ul>
<button type="submit" class="btn btn-custom pull-right">Login</button>
{!! Form::close() !!}
</div><!-- #login-form -->
@endif
</nav><!-- #site-navigation -->
</div><!-- #navbar -->
<div id="header-search" class="site-search clearfix">
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"></i>
<b>Success!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Failed.
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
<div id="header-search" class="site-search clearfix" style="padding-top: 30px;"><!-- #header-search -->
{!!Form::open(['method'=>'get','action'=>'client\kb\UserController@search','class'=>'search-form clearfix'])!!}
<div class="form-border">
<div class="form-inline ">
<div class="form-group">
<input type="text" name="s" class="search-field form-control input-lg" title="Enter search term" placeholder="Have a question? Type your search term here..." />
</div>
<button type="submit" class="search-submit btn btn-custom btn-lg pull-right">Search</button>
</div>
</div>
{!! Form::close() !!}
</div>
</div>
</div>
</header>
<!-- Left side column. contains the logo and sidebar -->
<!-- Right side column. Contains the navbar and content of the page -->
@yield('breadcrumb')
<!-- Main content -->
<div id="main" class="site-main clearfix">
<div class="container">
<div class="content-area">
<div class="row">
@yield('content')
<div id="sidebar" class="site-sidebar col-md-3">
<div class="widget-area">
<section id="section-banner" class="section">
@yield('check')
</section><!-- #section-banner -->
<section id="section-categories" class="section">
@yield('category')
</section><!-- #section-categories -->
</div>
</div><!-- #sidebar -->
</div>
</div>
</div>
</div>
<!-- /.content-wrapper -->
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="container">
<div class="row">
<div class="col-md-3">
<div class="widget-area">
<section id="section-about" class="section">
<?php $footer = App\Model\kb\Footer::whereId('1')->first(); ?>
<h2 class="section-title h4 clearfix">{{$footer->title}}</h2>
<div class="textwidget">
<p>{!!$footer->footer!!}</p>
</div>
</section><!-- #section-about -->
</div>
</div>
<div class="col-md-3">
<div class="widget-area">
<section id="section-latest-news" class="section">
<?php $footer2 = App\Model\kb\Footer2::whereId('1')->first(); ?>
@if($footer2->title)
<h2 class="section-title h4 clearfix">{{$footer2->title}}</h2>
<p>{!!$footer2->footer!!}</p>
@else
<h2 class="section-title h4 clearfix">Categories</h2>
<?php $categorys = App\Model\kb\Category::get(); ?>
@foreach($categorys as $category)
<p><a href="{{url('category-list/'.$category->slug)}}">{{$category->name}}</a> </p>
@endforeach
@endif
</section><!-- #section-latest-news -->
</div>
</div>
<div class="col-md-3">
<div class="widget-area">
<section id="section-newsletter" class="section">
<?php $footer3 = App\Model\kb\Footer3::whereId('1')->first(); ?>
<h2 class="section-title h4 clearfix">{{$footer3->title}}</h2>
<p>{!!$footer3->footer!!}</p>
</section><!-- #section-newsletter -->
</div>
</div>
<div class="col-md-3">
<div class="widget-area">
<section id="section-newsletter" class="section">
<?php $footer4 = App\Model\kb\Footer4::whereId('1')->first(); ?>
<h2 class="section-title h4 clearfix">{{$footer4->title}}</h2>
<p style="list-style: none;">{!!$footer4->footer!!}</p>
</section>
</div>
</div>
</div>
<div class="clearfix"></div>
<hr />
<div class="row">
<div class="site-info col-md-6">
<p class="text-muted">Copyright &copy; {!! date('Y') !!} <a href="{!! $company->website !!}">{!! $company->company_name !!}</a>. All rights reserved. Powered by <a href="http://www.faveohelpdesk.com/">Faveo</a></p>
</div>
<div class="site-social text-right col-md-6">
<?php $social = App\Model\kb\Social::where('id', '1')->first(); ?>
<ul class="list-inline hidden-print">
@if($social->facebook)
<li><a href="{{$social->facebook}}" class="btn btn-social btn-facebook"><i class="fa fa-facebook fa-fw"></i></a></li>
@endif
@if($social->twitter)
<li><a href="{{$social->twitter}}" class="btn btn-social btn-twitter"><i class="fa fa-twitter fa-fw"></i></a></li>
@endif
@if($social->google)
<li><a href="{{$social->google}}" class="btn btn-social btn-google-plus"><i class="fa fa-google-plus fa-fw"></i></a></li>
@endif
@if($social->linkedin)
<li><a href="{{$social->linkedin}}" class="btn btn-social btn-linkedin"><i class="fa fa-linkedin fa-fw"></i></a></li>
@endif
@if($social->vimeo)
<li><a href="{{$social->vimeo}}" class="btn btn-social btn-vimeo"><i class="fa fa-vimeo-square fa-fw"></i></a></li>
@endif
@if($social->youtube)
<li><a href="{{$social->youtube}}" class="btn btn-social btn-youtube"><i class="fa fa-youtube-play fa-fw"></i></a></li>
@endif
@if($social->pinterest)
<li><a href="{{$social->pinterest}}" class="btn btn-social btn-pinterest"><i class="fa fa-pinterest fa-fw"></i></a></li>
@endif
@if($social->dribbble)
<li><a href="{{$social->dribbble}}" class="btn btn-social btn-dribbble"><i class="fa fa-dribbble fa-fw"></i></a></li>
@endif
@if($social->flickr)
<li><a href="{{$social->flickr}}" class="btn btn-social btn-flickr"><i class="fa fa-flickr fa-fw"></i></a></li>
@endif
@if($social->instagram)
<li><a href="{{$social->instagram}}" class="btn btn-social btn-instagram"><i class="fa fa-instagram fa-fw"></i></a></li>
@endif
@if($social->rss)
<li><a href="{{$social->rss}}" class="btn btn-social btn-rss"><i class="fa fa-rss fa-fw"></i></a></li>
@endif
</ul>
</div>
</div>
</footer><!-- #colophon -->
</div>
<!-- jQuery 2.1.3 -->
{{-- // <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> --}}
<script src="{{asset("lb-faveo/dist/js/jquery2.1.1.min.js")}}" type="text/javascript"></script>
<!-- Bootstrap 3.3.2 JS -->
{{-- // <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" type="text/javascript"></script> --}}
<script src="{{asset("lb-faveo/downloads/bootstrap.min.js")}}" type="text/javascript"></script>
<!-- Slimscroll -->
<script src="{{asset("lb-faveo/dist/js/superfish.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/dist/js/mobilemenu.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/dist/js/know.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js")}}" type="text/javascript"></script>
<script>
$(function() {
//Enable iCheck plugin for checkboxes
//iCheck for checkbox and radio inputs
$('input[type="checkbox"]').iCheck({
checkboxClass: 'icheckbox_flat-blue',
radioClass: 'iradio_flat-blue'
});
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
//Handle starring for glyphicon and font awesome
$(".mailbox-star").click(function(e) {
e.preventDefault();
//detect type
var $this = $(this).find("a > i");
var glyph = $this.hasClass("glyphicon");
var fa = $this.hasClass("fa");
//Switch states
if (glyph) {
$this.toggleClass("glyphicon-star");
$this.toggleClass("glyphicon-star-empty");
}
if (fa) {
$this.toggleClass("fa-star");
$this.toggleClass("fa-star-o");
}
});
});
</script>
</body>
</html>

View File

@@ -2,12 +2,12 @@
<html>
<head>
<meta charset="UTF-8">
<?php
$title = App\Model\helpdesk\Settings\System::where('id','=','1')->first();
if(isset($title->name)){
$title_name = $title->name;
<?php
$title = App\Model\helpdesk\Settings\System::where('id', '=', '1')->first();
if (isset($title->name)) {
$title_name = $title->name;
} else {
$title_name = "SUPPORT CENTER";
$title_name = "SUPPORT CENTER";
}
?>
<title> @yield('title') {!! strip_tags($title_name) !!} </title>
@@ -30,7 +30,7 @@
<link href="{{asset("lb-faveo/css/jquery.rating.css")}}" rel="stylesheet" type="text/css" />
<link href="{{asset("lb-faveo/css/app.css")}}" rel="stylesheet" type="text/css" />
<link href="{{asset("lb-faveo/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css")}}" rel="stylesheet" type="text/css" />
{{-- // <script src="ckeditor/ckeditor.js"></script> --}}
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
@@ -41,330 +41,334 @@
@yield('HeadInclude')
</head>
<body>
<div id="page" class="hfeed site">
<div id="page" class="hfeed site">
<header id="masthead" class="site-header" role="banner">
<div class="container" style="">
<div id="logo" class="site-logo text-center" style="font-size: 30px;">
<?php
$company = App\Model\helpdesk\Settings\Company::where('id', '=', '1')->first();
$system = App\Model\helpdesk\Settings\System::where('id', '=', '1')->first();
?>
@if($system->url)
<a href="{!! $system->url !!}" rel="home">
@else
<a href="{{url('/')}}" rel="home">
@endif
@if($company->use_logo == 1)
<img src="{{asset('lb-faveo/media/company')}}{{'/'}}{{$company->logo}}" alt="User Image" width="200px" height="200px"/>
@else
@if($system->name)
{!! $system->name !!}
@else
<b>SUPPORT</b> CENTER
@endif
@endif
</a>
</div><!-- #logo -->
<div id="navbar" class="navbar-wrapper text-center">
<nav class="navbar navbar-default site-navigation" role="navigation">
<ul class="nav navbar-nav navbar-menu">
<li @yield('home')><a href="{{url('/')}}">{!! Lang::get('lang.home') !!}</a></li>
@if($system->first()->status == 1)
<li @yield('submit')><a href="{{URL::route('form')}}">{!! Lang::get('lang.submit_a_ticket') !!}</a></li>
@endif
<li @yield('kb')><a href="{!! url('knowledgebase') !!}">{!! Lang::get('lang.knowledge_base') !!}</a>
<ul class="dropdown-menu">
<li><a href="{{route('category-list')}}">{!! Lang::get('lang.categories') !!}</a></li>
<li><a href="{{route('article-list')}}">{!! Lang::get('lang.articles') !!}</a></li>
</ul>
</li>
<?php $pages = App\Model\kb\Page::where('status', '1')->where('visibility', '1')->get();
<div id="logo" class="site-logo text-center" style="font-size: 30px;">
<?php
$company = App\Model\helpdesk\Settings\Company::where('id', '=', '1')->first();
$system = App\Model\helpdesk\Settings\System::where('id', '=', '1')->first();
?>
@if($system->url)
<a href="{!! $system->url !!}" rel="home">
@else
<a href="{{url('/')}}" rel="home">
@endif
@if($company->use_logo == 1)
<img src="{{asset('lb-faveo/media/company')}}{{'/'}}{{$company->logo}}" alt="User Image" width="200px" height="200px"/>
@else
@if($system->name)
{!! $system->name !!}
@else
<b>SUPPORT</b> CENTER
@endif
@endif
</a>
</div><!-- #logo -->
<div id="navbar" class="navbar-wrapper text-center">
<nav class="navbar navbar-default site-navigation" role="navigation">
<ul class="nav navbar-nav navbar-menu">
<li @yield('home')><a href="{{url('/')}}">{!! Lang::get('lang.home') !!}</a></li>
@if($system->first()->status == 1)
<li @yield('submit')><a href="{{URL::route('form')}}">{!! Lang::get('lang.submit_a_ticket') !!}</a></li>
@endif
<li @yield('kb')><a href="{!! url('knowledgebase') !!}">{!! Lang::get('lang.knowledge_base') !!}</a>
<ul class="dropdown-menu">
<li><a href="{{route('category-list')}}">{!! Lang::get('lang.categories') !!}</a></li>
<li><a href="{{route('article-list')}}">{!! Lang::get('lang.articles') !!}</a></li>
</ul>
</li>
<?php $pages = App\Model\kb\Page::where('status', '1')->where('visibility', '1')->get();
?>
@foreach($pages as $page)
<li><a href="{{route('pages',$page->slug)}}">{{$page->name}}</a></li>
<li><a href="{{route('pages',$page->slug)}}">{{$page->name}}</a></li>
@endforeach
@if(Auth::user())
<li @yield('myticket')><a href="{{url('mytickets')}}">{!! Lang::get('lang.my_tickets') !!}</a></li>
{{-- <li @yield('contact')><a href="{{route('contact')}}">Contact us</a></li> --}}
<li @yield('profile')><a href="#" >{!! Lang::get('lang.my_profile') !!}</a>
<ul class="dropdown-menu">
<li>
<div class="banner-wrapper user-menu text-center clearfix">
<img src="{{Auth::user()->profile_pic}}"class="img-circle" alt="User Image" height="80" width="80"/>
<h3 class="banner-title text-info h4">{{Auth::user()->first_name." ".Auth::user()->last_name}}</h3>
<div class="banner-content">
{{-- <a href="{{url('kb/client-profile')}}" class="btn btn-custom btn-xs">Edit Profile</a> --}} <a href="{{url('auth/logout')}}" class="btn btn-custom btn-xs">{!! Lang::get('lang.log_out') !!}</a>
</div>
@if(Auth::user())
@if(Auth::user()->role != 'user')
<div class="banner-content">
<a href="{{url('dashboard')}}" class="btn btn-custom btn-xs">{!! Lang::get('lang.dashboard') !!}</a>
</div>
@endif
@endif
@if(Auth::user())
@if(Auth::user()->role == 'user')
<div class="banner-content">
<a href="{{url('client-profile')}}" class="btn btn-custom btn-xs">{!! Lang::get('lang.profile') !!}</a>
</div>
@endif
@endif
</div>
</li>
</ul>
</li>
</ul><!-- .navbar-user -->
@else
</ul>
<ul class="nav navbar-nav navbar-login">
<li <?php if($errors->first('email') || $errors->first('password')){ ?> class="sfHover" <?php } else { ?> <?php } ?> ><a href="#" data-toggle="collapse" <?php if($errors->first('email') || $errors->first('password')){ } else { ?> class="collapsed" <?php } ?> data-target="#login-form">{!! Lang::get('lang.login') !!} <i class="sub-indicator fa fa-chevron-circle-down fa-fw text-muted"></i></a></li>
</ul><!-- .navbar-login -->
<div id="login-form" <?php if($errors->first('email') || $errors->first('password')){ ?> class="login-form collapse fade clearfix in" <?php } else { ?> class="login-form collapse fade clearfix" <?php } ?> >
{!! Form::open(['action'=>'Auth\AuthController@postLogin', 'method'=>'post']) !!}
@if(Session::has('errors'))
<div class="alert alert-danger alert-dismissable">
<!-- <i class="fa fa-ban"> </i> <b> {!! Lang::get('lang.alert') !!}! </b> -->
<!-- <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> -->
@if(Session::has('error'))
{!! Session::get('error') !!}
@else
{!! Lang::get('lang.required-error') !!}
@endif
</div>
@endif
<div class="form-group has-feedback {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::text('email',null,['placeholder'=>Lang::get('lang.e-mail'),'class' => 'form-control']) !!}
<!-- {!! $errors->first('email', '<spam class="help-block">:message</spam>') !!} -->
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
@if(Auth::user())
<li @yield('myticket')><a href="{{url('mytickets')}}">{!! Lang::get('lang.my_tickets') !!}</a></li>
<div class="form-group has-feedback {{ $errors->has('password') ? 'has-error' : '' }}">
{!! Form::password('password',['placeholder'=>Lang::get('lang.password'),'class' => 'form-control']) !!}
<!-- {!! $errors->first('password', '<spam class="help-block">:message</spam>') !!} -->
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<ul class="list-unstyled pull-left">
<li><a href="{{url('password/email')}}">{!! Lang::get('lang.forgot_password') !!}</a><br></li>
<li><a href="{{url('auth/register')}}">{!! Lang::get('lang.create_account') !!}</a></li>
</ul>
<button type="submit" class="btn btn-custom pull-right">{!! Lang::get('lang.login') !!}</button>
{!! Form::close() !!}
</div><!-- #login-form -->
@endif
</nav><!-- #site-navigation -->
</div><!-- #navbar -->
<div id="header-search" class="site-search clearfix" style="padding-bottom:5px"><!-- #header-search -->
{!!Form::open(['method'=>'get','action'=>'Client\kb\UserController@search','class'=>'search-form clearfix'])!!}
<div class="form-border">
<div class="form-inline ">
<div class="form-group">
<input type="text" name="s" class="search-field form-control input-lg" title="Enter search term" placeholder="{!! Lang::get('lang.have_a_question?_type_your_search_term_here') !!}" />
</div>
<button type="submit" class="search-submit btn btn-custom btn-lg pull-right">{!! Lang::get('lang.search') !!}</button>
{{-- <li @yield('contact')><a href="{{route('contact')}}">Contact us</a></li> --}}
<li @yield('profile')><a href="#" >{!! Lang::get('lang.my_profile') !!}</a>
<ul class="dropdown-menu">
<li>
<div class="banner-wrapper user-menu text-center clearfix">
<img src="{{Auth::user()->profile_pic}}"class="img-circle" alt="User Image" height="80" width="80"/>
<h3 class="banner-title text-info h4">{{Auth::user()->first_name." ".Auth::user()->last_name}}</h3>
<div class="banner-content">
{{-- <a href="{{url('kb/client-profile')}}" class="btn btn-custom btn-xs">{!! Lang::get('lang.edit_profile') !!}</a> --}} <a href="{{url('auth/logout')}}" class="btn btn-custom btn-xs">{!! Lang::get('lang.log_out') !!}</a>
</div>
@if(Auth::user())
@if(Auth::user()->role != 'user')
<div class="banner-content">
<a href="{{url('dashboard')}}" class="btn btn-custom btn-xs">{!! Lang::get('lang.dashboard') !!}</a>
</div>
@endif
@endif
@if(Auth::user())
@if(Auth::user()->role == 'user')
<div class="banner-content">
<a href="{{url('client-profile')}}" class="btn btn-custom btn-xs">{!! Lang::get('lang.profile') !!}</a>
</div>
@endif
@endif
</div>
</li>
</ul>
</li>
</ul><!-- .navbar-user -->
@else
</ul>
<ul class="nav navbar-nav navbar-login">
<li <?php if ($errors->first('email') || $errors->first('password')) { ?> class="sfHover" <?php } else { ?> <?php } ?> ><a href="#" data-toggle="collapse" <?php
if ($errors->first('email') || $errors->first('password')) {
} else {
?> class="collapsed" <?php } ?> data-target="#login-form">{!! Lang::get('lang.login') !!} <i class="sub-indicator fa fa-chevron-circle-down fa-fw text-muted"></i></a></li>
</ul><!-- .navbar-login -->
<div id="login-form" <?php if ($errors->first('email') || $errors->first('password')) { ?> class="login-form collapse fade clearfix in" <?php } else { ?> class="login-form collapse fade clearfix" <?php } ?> >
{!! Form::open(['action'=>'Auth\AuthController@postLogin', 'method'=>'post']) !!}
@if(Session::has('errors'))
@if(Session::has('check'))
<?php goto b; ?>
@endif
<div class="alert alert-danger alert-dismissable">
<!-- <i class="fa fa-ban"> </i> <b> {!! Lang::get('lang.alert') !!}! </b> -->
<!-- <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> -->
@if(Session::has('error'))
{!! Session::get('error') !!}
@else
{!! Lang::get('lang.required-error') !!}
@endif
</div>
<?php b: ?>
@endif
<div class="form-group has-feedback {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::text('email',null,['placeholder'=>Lang::get('lang.e-mail'),'class' => 'form-control']) !!}
<!-- {!! $errors->first('email', '<spam class="help-block">:message</spam>') !!} -->
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback {{ $errors->has('password') ? 'has-error' : '' }}">
{!! Form::password('password',['placeholder'=>Lang::get('lang.password'),'class' => 'form-control']) !!}
<!-- {!! $errors->first('password', '<spam class="help-block">:message</spam>') !!} -->
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<ul class="list-unstyled pull-left">
<li><a href="{{url('password/email')}}">{!! Lang::get('lang.forgot_password') !!}</a><br></li>
<li><a href="{{url('auth/register')}}">{!! Lang::get('lang.create_account') !!}</a></li>
</ul>
<button type="submit" class="btn btn-custom pull-right">{!! Lang::get('lang.login') !!}</button>
{!! Form::close() !!}
</div><!-- #login-form -->
@endif
</nav><!-- #site-navigation -->
</div><!-- #navbar -->
<div id="header-search" class="site-search clearfix" style="padding-bottom:5px"><!-- #header-search -->
{!!Form::open(['method'=>'get','action'=>'Client\kb\UserController@search','class'=>'search-form clearfix'])!!}
<div class="form-border">
<div class="form-inline ">
<div class="form-group">
<input type="text" name="s" class="search-field form-control input-lg" title="Enter search term" placeholder="{!! Lang::get('lang.have_a_question?_type_your_search_term_here') !!}" />
</div>
<button type="submit" class="search-submit btn btn-custom btn-lg pull-right">{!! Lang::get('lang.search') !!}</button>
</div>
{!! Form::close() !!}
</div>
</div>
{!! Form::close() !!}
</div>
</div>
</header>
<!-- Left side column. contains the logo and sidebar -->
<!-- Right side column. Contains the navbar and content of the page -->
<div class="site-hero clearfix">
{!! Breadcrumbs::render() !!}
</div>
</header>
<!-- Left side column. contains the logo and sidebar -->
<!-- Right side column. Contains the navbar and content of the page -->
@yield('breadcrumb')
<!-- Main content -->
<div id="main" class="site-main clearfix">
<div class="container">
<div class="content-area">
<div class="row">
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"></i>
<b>Success!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Failed.
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
@yield('content')
<div id="sidebar" class="site-sidebar col-md-3">
<div class="widget-area">
<section id="section-banner" class="section">
@yield('check')
</section><!-- #section-banner -->
<section id="section-categories" class="section">
@yield('category')
</section><!-- #section-categories -->
</div>
</div><!-- #sidebar -->
<!-- Main content -->
<div id="main" class="site-main clearfix">
<div class="container">
<div class="content-area">
<div class="row">
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails'))
@if(Session::has('check'))
<?php goto a; ?>
@endif
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!} !</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
<?php a: ?>
@endif
@yield('content')
<div id="sidebar" class="site-sidebar col-md-3">
<div class="widget-area">
<section id="section-banner" class="section">
@yield('check')
</section><!-- #section-banner -->
<section id="section-categories" class="section">
@yield('category')
</section><!-- #section-categories -->
</div>
</div><!-- #sidebar -->
</div>
</div>
</div>
</div>
</div>
<!-- /.content-wrapper -->
<?php
$footer1 = App\Model\helpdesk\Theme\Widgets::where('name','=','footer1')->first();
$footer2 = App\Model\helpdesk\Theme\Widgets::where('name','=','footer2')->first();
$footer3 = App\Model\helpdesk\Theme\Widgets::where('name','=','footer3')->first();
$footer4 = App\Model\helpdesk\Theme\Widgets::where('name','=','footer4')->first();
?>
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="container">
<div class="row col-md-12">
@if($footer1->title == null)
@else
<div class="col-md-3">
<div class="widget-area">
<section id="section-about" class="section">
<h2 class="section-title h4 clearfix">{!!$footer1->title!!}</h2>
<div class="textwidget">
<p>{!!$footer1->value!!}</p>
</div>
</section><!-- #section-about -->
</div>
</div>
@endif
@if($footer2->title == null)
@else
<div class="col-md-3">
<div class="widget-area">
<section id="section-latest-news" class="section">
<h2 class="section-title h4 clearfix">{!!$footer2->title!!}</h2>
<div class="textwidget">
<p>{!! $footer2->value !!}</p>
</div>
</section><!-- #section-latest-news -->
</div>
</div>
@endif
@if($footer3->title == null)
@else
<div class="col-md-3">
<div class="widget-area">
<section id="section-newsletter" class="section">
<h2 class="section-title h4 clearfix">{!!$footer3->title!!}</h2>
<div class="textwidget">
<p>{!! $footer3->value !!}</p>
</div>
</section><!-- #section-newsletter -->
</div>
</div>
@endif
@if($footer4->title == null)
@else
<div class="col-md-3">
<div class="widget-area">
<section id="section-newsletter" class="section">
<h2 class="section-title h4 clearfix">{{$footer4->title}}</h2>
<div class="textwidget">
<p>{!! $footer4->value !!}</p>
</div>
</section>
</div>
</div>
@endif
</div>
<div class="clearfix"></div>
<hr/>
</div>
<!-- /.content-wrapper -->
<?php
$footer1 = App\Model\helpdesk\Theme\Widgets::where('name', '=', 'footer1')->first();
$footer2 = App\Model\helpdesk\Theme\Widgets::where('name', '=', 'footer2')->first();
$footer3 = App\Model\helpdesk\Theme\Widgets::where('name', '=', 'footer3')->first();
$footer4 = App\Model\helpdesk\Theme\Widgets::where('name', '=', 'footer4')->first();
?>
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="container">
<div class="row col-md-12">
@if($footer1->title == null)
@else
<div class="col-md-3">
<div class="widget-area">
<section id="section-about" class="section">
<h2 class="section-title h4 clearfix">{!!$footer1->title!!}</h2>
<div class="textwidget">
<p>{!!$footer1->value!!}</p>
</div>
</section><!-- #section-about -->
</div>
</div>
@endif
@if($footer2->title == null)
@else
<div class="col-md-3">
<div class="widget-area">
<section id="section-latest-news" class="section">
<h2 class="section-title h4 clearfix">{!!$footer2->title!!}</h2>
<div class="textwidget">
<p>{!! $footer2->value !!}</p>
</div>
</section><!-- #section-latest-news -->
</div>
</div>
@endif
@if($footer3->title == null)
@else
<div class="col-md-3">
<div class="widget-area">
<section id="section-newsletter" class="section">
<h2 class="section-title h4 clearfix">{!!$footer3->title!!}</h2>
<div class="textwidget">
<p>{!! $footer3->value !!}</p>
</div>
</section><!-- #section-newsletter -->
</div>
</div>
@endif
@if($footer4->title == null)
@else
<div class="col-md-3">
<div class="widget-area">
<section id="section-newsletter" class="section">
<h2 class="section-title h4 clearfix">{{$footer4->title}}</h2>
<div class="textwidget">
<p>{!! $footer4->value !!}</p>
</div>
</section>
</div>
</div>
@endif
</div>
<div class="clearfix"></div>
<hr style="color:#E5E5E5"/>
<div class="row">
<div class="site-info col-md-6">
<div class="site-info col-md-6">
<p class="text-muted">{!! Lang::get('lang.copyright') !!} &copy; {!! date('Y') !!} <a href="{!! $company->website !!}" target="_blank">{!! $company->company_name !!}</a>. {!! Lang::get('lang.all_rights_reserved') !!}. {!! Lang::get('lang.powered_by') !!} <a href="http://www.faveohelpdesk.com/" target="_blank">Faveo</a></p>
</div>
<div class="site-social text-right col-md-6">
<?php $socials = App\Model\helpdesk\Theme\Widgets::all(); ?>
<?php $socials = App\Model\helpdesk\Theme\Widgets::all(); ?>
<ul class="list-inline hidden-print">
@foreach($socials as $social)
@if($social->name == 'facebook')
@if($social->value)
<li><a href="{!! $social->value !!}" class="btn btn-social btn-facebook"><i class="fa fa-facebook fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "twitter")
@if($social->value)
<li><a href="{{ $social->value }}" class="btn btn-social btn-twitter"><i class="fa fa-twitter fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "google")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-google-plus"><i class="fa fa-google-plus fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "linkedin")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-linkedin"><i class="fa fa-linkedin fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "vimeo")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-vimeo"><i class="fa fa-vimeo-square fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "youtube")
@if($social->value)
<li><a href="{{$social->vlaue}}" class="btn btn-social btn-youtube"><i class="fa fa-youtube-play fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "pinterest")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-pinterest"><i class="fa fa-pinterest fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "dribbble")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-dribbble"><i class="fa fa-dribbble fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "flickr")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-flickr"><i class="fa fa-flickr fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "instagram")
@if($social->value)
<li><a href="{{$social->value }}" class="btn btn-social btn-instagram"><i class="fa fa-instagram fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "rss")
@if($social->value)
<li><a href="{{$social->rss}}" class="btn btn-social btn-rss"><i class="fa fa-rss fa-fw"></i></a></li>
@endif
@endif
@endforeach
@foreach($socials as $social)
@if($social->name == 'facebook')
@if($social->value)
<li><a href="{!! $social->value !!}" class="btn btn-social btn-facebook"><i class="fa fa-facebook fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "twitter")
@if($social->value)
<li><a href="{{ $social->value }}" class="btn btn-social btn-twitter"><i class="fa fa-twitter fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "google")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-google-plus"><i class="fa fa-google-plus fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "linkedin")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-linkedin"><i class="fa fa-linkedin fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "vimeo")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-vimeo"><i class="fa fa-vimeo-square fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "youtube")
@if($social->value)
<li><a href="{{$social->vlaue}}" class="btn btn-social btn-youtube"><i class="fa fa-youtube-play fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "pinterest")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-pinterest"><i class="fa fa-pinterest fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "dribbble")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-dribbble"><i class="fa fa-dribbble fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "flickr")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-flickr"><i class="fa fa-flickr fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "instagram")
@if($social->value)
<li><a href="{{$social->value }}" class="btn btn-social btn-instagram"><i class="fa fa-instagram fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "rss")
@if($social->value)
<li><a href="{{$social->rss}}" class="btn btn-social btn-rss"><i class="fa fa-rss fa-fw"></i></a></li>
@endif
@endif
@endforeach
</ul>
</div>
</div>
</footer><!-- #colophon -->
<!-- jQuery 2.1.3 -->
{{-- // <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> --}}
<script src="{{asset("lb-faveo/js/jquery2.1.1.min.js")}}" type="text/javascript"></script>
<!-- Bootstrap 3.3.2 JS -->
{{-- // <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" type="text/javascript"></script> --}}
<script src="{{asset("lb-faveo/js/bootstrap.min.js")}}" type="text/javascript"></script>
<!-- Slimscroll -->
<script src="{{asset("lb-faveo/js/superfish.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/js/mobilemenu.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/js/know.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/js/jquery.rating.pack.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/plugins/iCheck/icheck.min.js")}}" type="text/javascript"></script>
<script>
</div>
</footer><!-- #colophon -->
<!-- jQuery 2.1.3 -->
{{-- // <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> --}}
<script src="{{asset("lb-faveo/js/jquery2.1.1.min.js")}}" type="text/javascript"></script>
<!-- Bootstrap 3.3.2 JS -->
{{-- // <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" type="text/javascript"></script> --}}
<script src="{{asset("lb-faveo/js/bootstrap.min.js")}}" type="text/javascript"></script>
<!-- Slimscroll -->
<script src="{{asset("lb-faveo/js/superfish.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/js/mobilemenu.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/js/know.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/js/jquery.rating.pack.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/plugins/iCheck/icheck.min.js")}}" type="text/javascript"></script>
<script>
$(function() {
//Enable check and uncheck all functionality
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
@@ -376,27 +380,24 @@ $(function() {
}
$(this).data("clicks", !clicks);
});
//Handle starring for glyphicon and font awesome
//Handle starring for glyphicon and font awesome
$(".mailbox-star").click(function(e) {
e.preventDefault();
//detect type
//detect type
var $this = $(this).find("a > i");
var glyph = $this.hasClass("glyphicon");
var fa = $this.hasClass("fa");
//Switch states
//Switch states
if (glyph) {
$this.toggleClass("glyphicon-star");
$this.toggleClass("glyphicon-star-empty");
}
if (fa) {
$this.toggleClass("fa-star");
$this.toggleClass("fa-star-o");
}
});
});
</script>
</body>
</html>
</script>
</body>
</html>