Bootstrap4 :: Client panel completed
This commit is contained in:
@@ -6,90 +6,150 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
|
||||
//$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">
|
||||
<style type="text/css">
|
||||
.caret {
|
||||
border-left: 4px solid transparent;
|
||||
border-right: 4px solid transparent;
|
||||
border-top: 4px solid;
|
||||
display: inline-block;
|
||||
height: 0;
|
||||
margin-left: 2px;
|
||||
vertical-align: middle;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
<!-- <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> -->
|
||||
.mailbox-attachments li{float:left;width:200px;border:1px solid #eee;margin-bottom:10px;margin-right:10px}
|
||||
|
||||
.mailbox-attachment-name{font-weight:bold;color:#666;word-break: break-word;}
|
||||
|
||||
.mailbox-attachment-icon,.mailbox-attachment-info,.mailbox-attachment-size{display:block}
|
||||
|
||||
.mailbox-attachment-info{padding:10px;background:#f4f4f4;height: 80px;}
|
||||
|
||||
.mailbox-attachment-size{color:#999;font-size:12px}
|
||||
|
||||
.mailbox-attachment-icon{text-align:center;font-size:65px;color:#666;padding:20px 10px}
|
||||
|
||||
.mailbox-attachment-icon.has-img{padding:0}
|
||||
|
||||
.mailbox-attachment-icon.has-img>img{max-width:100%;height:auto}
|
||||
|
||||
#clearfix {display: inline-block!important;list-style-type: none!important;}
|
||||
|
||||
.ml40 {margin-left: -40px!important;}
|
||||
</style>
|
||||
|
||||
<div id="content" class="site-content col-sm-12">
|
||||
|
||||
<article class="hentry">
|
||||
|
||||
<header class="entry-header">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-9">
|
||||
|
||||
<h3 class="entry-title"><i class="fas fa-ticket-alt"> </i> {{$thread->title}}
|
||||
|
||||
<small> ( {{$tickets->ticket_number}} ) </small>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3 text-right">
|
||||
|
||||
@if( $common_setting->status == '1')
|
||||
<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>
|
||||
|
||||
<div>
|
||||
|
||||
<button type="button" class="btn btn-light dropdown-toggle" data-toggle="dropdown">
|
||||
|
||||
<i class="fas fa-exchange-alt" 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">
|
||||
<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>@endif
|
||||
{!! Form::close() !!}
|
||||
<div class="dropdown-menu">
|
||||
|
||||
<a class="dropdown-item" href="#" id="open">
|
||||
<i class="fas fa-folder-open" style="color:#FFD600;"> </i> {!! Lang::get('lang.open') !!}
|
||||
</a>
|
||||
|
||||
<a class="dropdown-item" href="#" id="close">
|
||||
<i class="fas fa-check" style="color:#15F109;"> </i> {!! Lang::get('lang.close') !!}
|
||||
</a>
|
||||
|
||||
<a class="dropdown-item" href="#" id="resolved">
|
||||
<i class="fas fa-check-circle " style="color:#0EF1BE;"> </i> {!! Lang::get('lang.resolved') !!}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="ticketratings pull-right">
|
||||
<table><tbody>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 mb-1">
|
||||
|
||||
<div class="ticketratings float-right">
|
||||
|
||||
<table>
|
||||
|
||||
<tbody>
|
||||
<?php $ratings = App\Model\helpdesk\Ratings\Rating::orderby('display_order')->get(); ?>
|
||||
<form id="foo">
|
||||
{!! csrf_field() !!}
|
||||
@foreach($ratings as $rating)
|
||||
<form id="foo">
|
||||
{!! csrf_field() !!}
|
||||
@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;
|
||||
}
|
||||
?>
|
||||
@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 !!} </div></th> 
|
||||
<tr>
|
||||
|
||||
<th><div class="ticketratingtitle">{!! $rating->name !!} </div></th> 
|
||||
|
||||
<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>
|
||||
<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>
|
||||
</header>
|
||||
|
||||
</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 class="entry-content clearfix">
|
||||
|
||||
<div class="col-md-12 offset-md-5" id="loader" style="display:none;">
|
||||
|
||||
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}"><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
|
||||
</div>
|
||||
<section class="content" id="refresh" style="margin-bottom:-10px;margin-top:-10px">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div id="refresh">
|
||||
<div>
|
||||
<?php
|
||||
$priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first();
|
||||
?>
|
||||
<div class="callout callout-default ">
|
||||
<div class="alert alert-secondary">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<?php
|
||||
@@ -119,245 +179,314 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
|
||||
</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);
|
||||
$ij = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();
|
||||
$user = App\User::where('id', '=', $tickets->user_id)->first();
|
||||
foreach ($conversations as $conversation) {
|
||||
$role = $conversation->user;
|
||||
$body = $conversation->thread($conversation->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')
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<table class="table">
|
||||
|
||||
<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>
|
||||
|
||||
@elseif($status->id == 2)
|
||||
|
||||
<td title="{{$status->properties}}" style="color:green">{{$status->name}}</td>
|
||||
|
||||
@elseif($status->id == 3)
|
||||
|
||||
<td title="{{$status->properties}}" style="color:green">{{$status->name}}</td>
|
||||
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
<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 class="col-md-6">
|
||||
|
||||
<table class="table">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
<div class="comments-area mb-0" id="comments">
|
||||
|
||||
<?php
|
||||
$conversations = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->where('is_internal', '=', 0)->paginate(10);
|
||||
$ij = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();
|
||||
$user = App\User::where('id', '=', $tickets->user_id)->first();
|
||||
foreach ($conversations as $conversation) {
|
||||
$role = $conversation->user;
|
||||
$body = $conversation->thread($conversation->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 float-right" style="margin-top: -12px;">
|
||||
|
||||
<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">
|
||||
{{ csrf_field() }}
|
||||
<tr>
|
||||
<th><div class="ticketratingtitle">{!! $rating->name !!} </div></th>
|
||||
|
||||
<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 } ?>
|
||||
</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">
|
||||
|
||||
@if($conversation->firstContent()=='yes')
|
||||
<div class="embed-responsive{{$conversation->id}} embed-responsive-16by9 "></div>
|
||||
<script>
|
||||
setTimeout(function(){
|
||||
var $iframe="Id{{$conversation->id}}";
|
||||
$('<iframe src="about:blank" id='+$iframe+' class="iframe" frameborder="0" scrolling="no" width="100%" style="height:1px"></iframe>').appendTo(".embed-responsive{{$conversation->id}}");
|
||||
setTimeout(function(){
|
||||
$('#'+$iframe).contents().find('body').append('<body><style>body{display:inline-block;}</style>{!!$conversation->purify(true)!!}<body>');
|
||||
},100)
|
||||
setTimeout(function(){
|
||||
var frameid=document.getElementById($iframe);
|
||||
if(parseInt($("#"+$iframe).contents().find('img').css('width'))>700){
|
||||
$("#"+$iframe).contents().find('img').css('width','96%');
|
||||
}
|
||||
frameid.contentWindow.document.body.style.width="100%";
|
||||
var iframe_height=frameid.contentWindow.document.body.scrollHeight;
|
||||
frameid.style.height=iframe_height+"px";
|
||||
}, 1000);
|
||||
}, 0);
|
||||
</script>
|
||||
@else
|
||||
{!! $conversation->body !!}
|
||||
@endif
|
||||
|
||||
@if($conversation->id == $ij->id)
|
||||
<?php $ticket_form_datas = App\Model\helpdesk\Ticket\Ticket_Form_Data::where('ticket_id', '=', $tickets->id)->get(); ?>
|
||||
@if(isset($ticket_form_datas))
|
||||
|
||||
<br/>
|
||||
<table class="table">
|
||||
|
||||
<tbody>
|
||||
@foreach($ticket_form_datas as $ticket_form_data)
|
||||
<tr>
|
||||
<td style="width: 30%">{!! $ticket_form_data->getFieldKeyLabel() !!}</td>
|
||||
<td>{!! removeUnderscore($ticket_form_data->content) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
@endif
|
||||
</div><!-- .comment-content -->
|
||||
<br/><br/>
|
||||
|
||||
<div class="timeline-footer">
|
||||
|
||||
@if(!$conversation->is_internal)
|
||||
@if($conversation->user_id != null)
|
||||
<?php Event::fire(new App\Events\Timeline($conversation, $role, $user)); ?>
|
||||
@endif
|
||||
@endif
|
||||
<?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;'><br><h5 class='entry-title'><b>" . $i . " </b> Attachments</h5>";
|
||||
}
|
||||
?>
|
||||
|
||||
<ul id="clearfix" class="mailbox-attachments clearfix ml40">
|
||||
|
||||
<?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;
|
||||
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 (mime($attachment->type) == true) {
|
||||
$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="width:200px;height:120px;" src="data:image/jpg;base64,' . $attachment->file . '"/></a>';
|
||||
|
||||
echo '<li><span class="mailbox-attachment-icon has-img">' . $var . '</span><div class="mailbox-attachment-info"><a class="mailbox-attachment-name">' . $attachment->name . '</a><span class="mailbox-attachment-size">' . $value . '</span></div></li>';
|
||||
} else {
|
||||
//$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;height:133px;" src="data:'.$attachment->type.';base64,' . base64_encode($data) . '"/></a>';
|
||||
$var = '<a style="width:200px;height:120px;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"></a><span class="mailbox-attachment-icon" style="background:#fff;height:120px;font-size:16px;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><a class="mailbox-attachment-name">' . $attachment->name . '</a><span class="mailbox-attachment-size">' . $value . '</span></div>';
|
||||
|
||||
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form class="foo2">
|
||||
{{ csrf_field() }}
|
||||
<tr>
|
||||
<th><div class="ticketratingtitle">{!! $rating->name !!} </div></th> 
|
||||
</ul>
|
||||
</div>
|
||||
</article><!-- .comment-body -->
|
||||
</li><!-- .comment -->
|
||||
</ol>
|
||||
<?php
|
||||
?>
|
||||
|
||||
<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">
|
||||
@if($conversation->firstContent()=='yes')
|
||||
<div class="embed-responsive{{$conversation->id}} embed-responsive-16by9 "></div>
|
||||
<script>
|
||||
setTimeout(function(){
|
||||
var $iframe="Id{{$conversation->id}}";
|
||||
$('<iframe src="about:blank" id='+$iframe+' class="iframe" frameborder="0" scrolling="no" width="100%" style="height:1px"></iframe>').appendTo(".embed-responsive{{$conversation->id}}");
|
||||
setTimeout(function(){
|
||||
$('#'+$iframe).contents().find('body').append('<body><style>body{display:inline-block;}</style>{!!$conversation->purify(true)!!}<body>');
|
||||
},100)
|
||||
setTimeout(function(){
|
||||
var frameid=document.getElementById($iframe);
|
||||
if(parseInt($("#"+$iframe).contents().find('img').css('width'))>700){
|
||||
$("#"+$iframe).contents().find('img').css('width','96%');
|
||||
}
|
||||
frameid.contentWindow.document.body.style.width="100%";
|
||||
var iframe_height=frameid.contentWindow.document.body.scrollHeight;
|
||||
frameid.style.height=iframe_height+"px";
|
||||
}, 1000);
|
||||
}, 0);
|
||||
</script> @else
|
||||
{!! $conversation->body !!}
|
||||
@endif
|
||||
|
||||
@if($conversation->id == $ij->id)
|
||||
<?php $ticket_form_datas = App\Model\helpdesk\Ticket\Ticket_Form_Data::where('ticket_id', '=', $tickets->id)->get(); ?>
|
||||
@if(isset($ticket_form_datas))
|
||||
<?php }
|
||||
?>
|
||||
|
||||
<br/>
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
@foreach($ticket_form_datas as $ticket_form_data)
|
||||
<tr>
|
||||
<td style="width: 30%">{!! $ticket_form_data->getFieldKeyLabel() !!}</td>
|
||||
<td>{!! removeUnderscore($ticket_form_data->content) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody></table>
|
||||
<div class="float-right" style="margin-top:-30px;margin-bottom:-30px">
|
||||
<?php echo $conversations->setPath(url('check_ticket/{' . $id . '}'))->render(); ?>
|
||||
</div>
|
||||
<br/><br/>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
@endif
|
||||
</div><!-- .comment-content -->
|
||||
<br/><br/>
|
||||
<div class="timeline-footer" style="margin-bottom:-5px">
|
||||
@if(!$conversation->is_internal)
|
||||
@if($conversation->user_id != null)
|
||||
<?php Event::fire(new App\Events\Timeline($conversation, $role, $user)); ?>
|
||||
@endif
|
||||
@endif
|
||||
<?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 (mime($attachment->type) == true) {
|
||||
$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,' . $attachment->file . '"/></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 href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;height:133px;" src="data:'.$attachment->type.';base64,' . base64_encode($data) . '"/></a>';
|
||||
$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; font-size:18px;">' . 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>
|
||||
@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">×</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">×</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="col-md-12">
|
||||
<div class="form-group ">
|
||||
<textarea class="form-control" id="reply-input" name="comment" cols="30" rows="8"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</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">×</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" id="reply-input" name="comment" cols="30" rows="8"></textarea>
|
||||
|
||||
<div class="text-right">
|
||||
|
||||
<button type="submit" onClick="return checkFunction();" class="btn btn-custom btn-lg">{!! Lang::get('lang.post_comment') !!}</button>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<button type="submit" onClick="return checkFunction();" class="btn btn-custom btn-lg">{!! Lang::get('lang.post_comment') !!}</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -444,10 +573,22 @@ foreach ($conversations as $conversation) {
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
||||
$(function () {
|
||||
//Add text editor
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
|
||||
$(function() {
|
||||
//Add text editor
|
||||
$("textarea").summernote({
|
||||
height: 300,
|
||||
tabsize: 2,
|
||||
toolbar: [
|
||||
['style', ['bold', 'italic', 'underline', 'clear']],
|
||||
['font', ['strikethrough', 'superscript', 'subscript']],
|
||||
['fontsize', ['fontsize']],
|
||||
['color', ['color']],
|
||||
['para', ['ul', 'ol', 'paragraph']],
|
||||
['height', ['height']]
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
// Close a ticket
|
||||
|
Reference in New Issue
Block a user