update v1.0.5
This commit is contained in:
@@ -49,114 +49,34 @@ class="active"
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
<div class="box-body">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"> <div id="count_refresh">{!! $tickets->count().'-'.$tickets->total(); !!}</div></h3>
|
||||
<!-- 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="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="{!! Lang::get('lang.delete') !!}">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>{!! Lang::get('lang.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.from') !!}</th>
|
||||
<th>{!! Lang::get('lang.last_replier') !!}</th>
|
||||
<th>{!! Lang::get('lang.assigned_to') !!}</th>
|
||||
<th>{!! Lang::get('lang.last_activity') !!}</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
|
||||
@foreach ($tickets as $ticket)
|
||||
<?php
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
{!! Datatable::table()
|
||||
->addColumn(
|
||||
"",
|
||||
Lang::get('lang.subject'),
|
||||
Lang::get('lang.ticket_id'),
|
||||
Lang::get('lang.priority'),
|
||||
Lang::get('lang.from'),
|
||||
Lang::get('lang.last_replier'),
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.answered.ticket'))
|
||||
->setOrder(array(7=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->render();!!}
|
||||
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
if($title)
|
||||
if($title == null){
|
||||
|
||||
} else {
|
||||
?>
|
||||
<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
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
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;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null)
|
||||
{
|
||||
$assigned = "Unassigned";
|
||||
}
|
||||
else
|
||||
{
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></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_desc}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
|
||||
</tr>
|
||||
<?php } ?>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/answered'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
|
Reference in New Issue
Block a user