update v 1.0.7.5
This commit is contained in:
		| @@ -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 !!}  </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>  | ||||
|                 </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  </div></th>  | ||||
|     <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 !!}  </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 } ?> | ||||
|             <!--    <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  </div></th>  | ||||
|                 <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">×</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">×</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">×</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']) !!} | ||||
|     {!! 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 | ||||
| @@ -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  </div></th>  | ||||
|     <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  </div></th>  | ||||
|                 <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">×</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">×</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 | ||||
|  | ||||
|                  | ||||
|                      | ||||
|                  | ||||
|  | ||||
|                 | ||||
| @@ -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">×</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">×</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">×</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(); | ||||
| }); | ||||
|  | ||||
|   | ||||
| @@ -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 | ||||
|  | ||||
|                  | ||||
|                      | ||||
|                  | ||||
|  | ||||
|                 | ||||
| @@ -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 | ||||
| @@ -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(); ?>  | ||||
|                     </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(); ?>  | ||||
|                     </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();?>  | ||||
|             </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();?>  | ||||
|             </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 | ||||
| @@ -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">×</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">×</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">×</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">×</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">×</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 | ||||
| @@ -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">×</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 !!}  </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>  | ||||
|                 </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 !!}  </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 } ?> | ||||
|                     <!--    <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">×</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 = $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 | ||||
		Reference in New Issue
	
	Block a user
	 Sujit Prasad
					Sujit Prasad