update v1.0.5

This commit is contained in:
sujitprasad
2016-01-25 20:45:35 +05:30
parent 0b8ebb9c70
commit e7149e34e4
252 changed files with 9008 additions and 3152 deletions

View File

@@ -127,40 +127,41 @@ class="active"
<h4>{{Lang::get('lang.account_status_setting')}}</h4>
</div>
<div class="row">
<div class="col-xs-6">
<!-- Role -->
<div class="form-group {{ $errors->has('role') ? 'has-error' : '' }}">
<div class="col-xs-6">
<!-- acccount type -->
<div class="form-group {{ $errors->has('active') ? 'has-error' : '' }}">
{!! Form::label('role',Lang::get('lang.role')) !!}
{!! $errors->first('role', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('role','admin',true) !!}{{Lang::get('lang.admin')}}
</div>
<div class="col-xs-3">
{!! Form::radio('role','agent',null) !!}{{Lang::get('lang.agent')}}
{!! Form::label('active',Lang::get('lang.status')) !!}
{!! $errors->first('active', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('active','1',true) !!}{{Lang::get('lang.active')}}
</div>
<div class="col-xs-3">
{!! Form::radio('active','0',null) !!}{{Lang::get('lang.inactive')}}
</div>
</div>
</div>
</div>
<!-- account type -->
<div class="form-group {{ $errors->has('account_type') ? 'has-error' : '' }}">
{!! Form::label('account_type',Lang::get('lang.account_type')) !!}
{!! $errors->first('account_type', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('account_type','1',true) !!}{{Lang::get('lang.active')}}
</div>
<div class="col-xs-3">
{!! Form::radio('account_type','0',null) !!}{{Lang::get('lang.locked')}}
<!-- Role -->
<div class="form-group {{ $errors->has('role') ? 'has-error' : '' }}">
{!! Form::label('role',Lang::get('lang.role')) !!}
{!! $errors->first('role', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('role','admin',true) !!}{{Lang::get('lang.admin')}}
</div>
<div class="col-xs-3">
{!! Form::radio('role','agent',null) !!}{{Lang::get('lang.agent')}}
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-6">
</div>
</div>
@@ -170,7 +171,7 @@ class="active"
{!! Form::label('assign_group',Lang::get('lang.assigned_group')) !!}
{!! $errors->first('assign_group', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('assign_group',[''=>'Select a Group','Groups'=>$groups->lists('name','name')],null,['class' => 'form-control select']) !!}
{!!Form::select('assign_group',[''=>'Select a Group','Groups'=>$groups->lists('name','id')],null,['class' => 'form-control select']) !!}
</div>
@@ -179,7 +180,7 @@ class="active"
{!! Form::label('primary_dpt',Lang::get('lang.primary_department')) !!}
{!! $errors->first('primary_dpt', '<spam class="help-block">:message</spam>') !!}
{!! Form::select('primary_dpt', [''=>'Select a Department','Departments'=>$departments->lists('name','name')],null,['class' => 'form-control select']) !!}
{!! Form::select('primary_dpt', [''=>'Select a Department','Departments'=>$departments->lists('name','id')],null,['class' => 'form-control select']) !!}
</div>
@@ -188,7 +189,7 @@ class="active"
{!! Form::label('agent_tzone',Lang::get('lang.agent_time_zone')) !!}
{!! $errors->first('agent_tzone', '<spam class="help-block">:message</spam>') !!}
{!! Form::select('agent_tzone', [''=>'Select a Time Zone', 'Time Zones'=>$timezones->lists('name','name')],null,['class' => 'form-control select']) !!}
{!! Form::select('agent_tzone', [''=>'Select a Time Zone', 'Time Zones'=>$timezones->lists('name','id')],null,['class' => 'form-control select']) !!}
</div>
</div>

View File

@@ -132,6 +132,21 @@ class="active"
</div>
<div class="row">
<div class="col-xs-6">
<!-- acccount type -->
<div class="form-group {{ $errors->has('active') ? 'has-error' : '' }}">
{!! Form::label('active',Lang::get('lang.status')) !!}
{!! $errors->first('active', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('active','1',true) !!}{{Lang::get('lang.active')}}
</div>
<div class="col-xs-3">
{!! Form::radio('active','0',null) !!}{{Lang::get('lang.inactive')}}
</div>
</div>
</div>
<!-- role -->
<div class="form-group {{ $errors->has('role') ? 'has-error' : '' }}">
@@ -146,21 +161,7 @@ class="active"
</div>
</div>
</div>
<!-- acccount type -->
<div class="form-group {{ $errors->has('account_type') ? 'has-error' : '' }}">
{!! Form::label('account_type',Lang::get('lang.account_type')) !!}
{!! $errors->first('account_type', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('account_type','1',true) !!}{{Lang::get('lang.active')}}
</div>
<div class="col-xs-3">
{!! Form::radio('account_type','0',null) !!}{{Lang::get('lang.locked')}}
</div>
</div>
</div>
</div>
<!-- day light saving -->
{{-- <div class="col-xs-6"> --}}
@@ -210,21 +211,21 @@ class="active"
<div class="col-xs-4 form-group {{ $errors->has('assign_group') ? 'has-error' : '' }}">
{!! Form::label('assign_group',Lang::get('lang.assigned_group')) !!}
{!! $errors->first('assign_group', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('assign_group', [''=>'Select a Group','Groups'=>$groups->lists('name','name')],null,['class' => 'form-control select']) !!}
{!!Form::select('assign_group', [''=>'Select a Group','Groups'=>$groups->lists('name','id')],null,['class' => 'form-control select']) !!}
</div>
<!-- primary department -->
<div class="col-xs-4 form-group {{ $errors->has('primary_dpt') ? 'has-error' : '' }}">
{!! Form::label('primary_dpt',Lang::get('lang.primary_department')) !!}
{!! $errors->first('primary_dpt', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('primary_dpt', $departments->lists('name','name'),null,['class' => 'form-control select']) !!}
{!!Form::select('primary_dpt', $departments->lists('name','id'),null,['class' => 'form-control select']) !!}
</div>
<!-- agent timezone -->
<div class="col-xs-4 form-group {{ $errors->has('agent_tzone') ? 'has-error' : '' }}">
{!! Form::label('agent_tzone',Lang::get('lang.agent_time_zone')) !!}
{!! $errors->first('agent_tzone', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('agent_tzone', $timezones->lists('name','name'),null,['class' => 'form-control select']) !!}
{!!Form::select('agent_tzone', $timezones->lists('name','id'),null,['class' => 'form-control select']) !!}
</div>
</div>

View File

@@ -35,7 +35,7 @@ class="active"
<div class="box-header">
<h2 class="box-title">{!! Lang::get('lang.staffs') !!} </h2><a href="{{route('agents.create')}}" class="btn btn-primary pull-right">{{Lang::get('lang.create_agent')}}</a></div>
<div class="box-body table-responsive no-padding">
<div class="box-body table-responsive">
<?php
$user = App\User::where('role','!=','user')->orderBy('id', 'ASC')->paginate(20);
?>
@@ -59,7 +59,7 @@ class="active"
</div>
@endif
<!-- Agent table -->
<table class="table table-hover" style="overflow:hidden;">
<table class="table table-bordered dataTable" style="overflow:hidden;">
<tr>
<th width="100px">{{Lang::get('lang.name')}}</th>
<th width="100px">{{Lang::get('lang.user_name')}}</th>
@@ -86,24 +86,26 @@ class="active"
}
?>
<td>
@if($use->account_type=='1')
@if($use->active=='1')
<span style="color:green">{{'Active'}}</span>
@else
<span style="color:red">{{'Inactive'}}</span>
@endif
<td>{{$use->assign_group }}</td>
<td>{{$use->primary_dpt }}</td>
<?php
$group = App\Model\helpdesk\Agent\Groups::whereId($use->assign_group)->first();
$department = App\Model\helpdesk\Agent\Department::whereId($use->primary_dpt)->first();
?>
<td>{{ $group->name }}</td>
<td>{{ $department->name }}</td>
<td>{{ UTC::usertimezone($use->created_at) }}</td>
{{-- <td>{{$use->Lastlogin_at}}</td> --}}
<td>
{!! Form::open(['route'=>['agents.destroy', $use->id],'method'=>'DELETE']) !!}
<a href="{{route('agents.edit', $use->id)}}" class="btn btn-info btn-xs btn-flat"><i class="fa fa-edit" style="color:black;"> </i> {!! Lang::get('lang.edit') !!} </a>
<!-- To pop up a confirm Message -->
{!! Form::button(' <i class="fa fa-trash" style="color:black;"> </i> ' . Lang::get('lang.delete') ,
['type' => 'submit',
'class'=> 'btn btn-warning btn-xs btn-flat',
'onclick'=>'return confirm("Are you sure?")'])
!!}
{{-- {!! Form::button(' <i class="fa fa-trash" style="color:black;"> </i> ' . Lang::get('lang.delete') ,['type' => 'submit', 'class'=> 'btn btn-warning btn-xs btn-flat','onclick'=>'return confirm("Are you sure?")']) !!} --}}
{!! Form::close() !!}
</td>
</tr>
@@ -111,9 +113,7 @@ class="active"
@endforeach
</table>
</div>
<div class="box-footer"></div>
</div>
@section('FooterInclude')
@stop
@stop
<!-- /content -->

View File

@@ -76,7 +76,7 @@ class="active"
{!! Form::label('sla',Lang::get('lang.SLA_plan')) !!}
{!! $errors->first('sla', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('sla', ['SLA Plans'=>$slas->lists('grace_period','grace_period')],null,['class' => 'form-control select']) !!}
{!!Form::select('sla', ['SLA Plans'=>$slas->lists('grace_period','id')],null,['class' => 'form-control select']) !!}
</div>
<!-- manager -->
@@ -84,7 +84,7 @@ class="active"
{!! Form::label('manager',Lang::get('lang.manager')) !!}
{!! $errors->first('manager', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('manager',[''=>'Select a Manager','Managers'=>$user->lists('user_name','user_name')],null,['class' => 'form-control select']) !!}
{!!Form::select('manager',[''=>'Select a Manager','Managers'=>$user->lists('user_name','id')],null,['class' => 'form-control select']) !!}
</div>

View File

@@ -68,14 +68,13 @@ class="active"
</div>
</div>
<div class="row">
<!-- sla -->
<div class="col-xs-6 form-group {{ $errors->has('sla') ? 'has-error' : '' }}">
{!! Form::label('sla',Lang::get('lang.SLA_plan')) !!}
{!! $errors->first('sla', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('sla', ['SLA Plans'=>$slas->lists('grace_period','grace_period')],null,['class' => 'form-control select']) !!}
{!!Form::select('sla', ['SLA Plans'=>$slas->lists('grace_period','id')],null,['class' => 'form-control select']) !!}
</div>
<!-- manager -->
@@ -83,7 +82,7 @@ class="active"
{!! Form::label('manager',Lang::get('lang.manager')) !!}
{!! $errors->first('manager', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('manager',[''=>'Select a Manager','Managers'=>$user->lists('user_name','user_name')],null,['class' => 'form-control select']) !!}
{!!Form::select('manager',[null=>'Select a Manager','Managers'=>$user->lists('user_name','id')],null,['class' => 'form-control select']) !!}
</div>

View File

@@ -34,7 +34,7 @@ class="active"
<div class="box-header">
<h2 class="box-title">{!! Lang::get('lang.departments') !!}</h2><a href="{{route('departments.create')}}" class="btn btn-primary pull-right">{{Lang::get('lang.create_department')}}</a></div>
<div class="box-body table-responsive no-padding">
<div class="box-body table-responsive ">
<!-- check whether success or not -->
@@ -44,7 +44,7 @@ class="active"
<i class="fa fa-check-circle"></i>
<b>{!! Lang::get('lang.success') !!}</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
{!! Session::get('success') !!}
</div>
@endif
<!-- failure message -->
@@ -53,37 +53,78 @@ class="active"
<i class="fa fa-ban"></i>
<b>{!! Lang::get('lang.fails') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
{!! Session::get('fails') !!}
</div>
@endif
<!-- table -->
<table class="table table-hover" style="overflow:hidden;">
<table class="table table-bordered dataTable" style="overflow:hidden;">
<tr>
<tr>
<th>{{Lang::get('lang.name')}}</th>
<th>{{Lang::get('lang.type')}}</th>
<th>{{Lang::get('lang.sla_plan')}}</th>
<th>{{Lang::get('lang.department_manager')}}</th>
<th>{{Lang::get('lang.action')}}</th>
</tr>
<?php
$default_department = App\Model\helpdesk\Settings\System::where('id','=','1')->first();
$default_department = $default_department->department;
?>
@foreach($departments as $department)
<tr>
<td><a href="{{route('departments.edit', $department->id)}}"> {{$department -> name }}</a></td>
<td><a href="{{route('departments.edit', $department->id)}}"> {{$department -> name }}
@if($default_department == $department->id)
( Default )
<?php
$disable = 'disabled';
?>
@else
<?php
$disable = '';
?>
@endif
</a></td>
<td>
@if($department->type=='1')
<span style="color:green">{{'Public'}}</span>
@else
<span style="color:red">{{'Private'}}</span>
@endif
<td>{{$department->manager}}</td>
</td>
<?php
if($department->manager == 0) {
$manager ="";
} else {
$manager = App\User::whereId($department->manager)->first();
$manager = $manager->user_name;
}
if($department->sla == null){
$sla = "";
} else {
$sla = App\Model\helpdesk\Manage\sla_plan::whereId($department->sla)->first();
$sla = $sla->grace_period;
}
?>
<td>{{ $sla }}</td>
<td>{{ $manager }}</td>
<td>
{!! Form::open(['route'=>['departments.destroy', $department->id],'method'=>'DELETE']) !!}
<a href="{{route('departments.edit', $department->id)}}" class="btn btn-info btn-xs btn-flat"><i class="fa fa-edit" style="color:black;"> </i> Edit</a>
<!-- To pop up a confirm Message -->
{{-- @if($default_department == $department->id) --}}
{{-- @else --}}
<!-- To pop up a confirm Message -->
{!! Form::button('<i class="fa fa-trash" style="color:black;"> </i> Delete',
['type' => 'submit',
'class'=> 'btn btn-warning btn-xs btn-flat',
'class'=> 'btn btn-warning btn-xs btn-flat '.$disable,
'onclick'=>'return confirm("Are you sure?")'])
!!}
{{-- @endif --}}
{!! Form::close() !!}
</td>
</tr>

View File

@@ -35,7 +35,7 @@ class="active"
<div class="box-header">
<h2 class="box-title">{!! Lang::get('lang.groups') !!}</h2><a href="{{route('groups.create')}}" class="btn btn-primary pull-right">{{Lang::get('lang.create_group')}}</a></div>
<div class="box-body table-responsive no-padding">
<div class="box-body table-responsive">
<!-- check whether success or not -->
@@ -44,7 +44,7 @@ class="active"
<i class="fa fa-check-circle"></i>
<b>Success!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
{!! Session::get('success') !!}
</div>
@endif
<!-- failure message -->
@@ -53,11 +53,11 @@ class="active"
<i class="fa fa-ban"></i>
<b>Fail!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
{!! Session::get('fails') !!}
</div>
@endif
<!-- Table -->
<table class="table table-hover" style="overflow:hidden;">
<table class="table table-bordered dataTable" style="overflow:hidden;">
<tr>
<th>{{Lang::get('lang.group_name')}}</th>

View File

@@ -34,7 +34,7 @@ class="active"
<div class="box-header">
<h2 class="box-title">{{Lang::get('lang.teams')}}</h2><a href="{{route('teams.create')}}" class="btn btn-primary pull-right">{{Lang::get('lang.create_team')}}</a></div>
<div class="box-body table-responsive no-padding">
<div class="box-body table-responsive">
<!-- check whether success or not -->
@@ -56,7 +56,7 @@ class="active"
</div>
@endif
<table class="table table-hover" style="overflow:hidden;">
<table class="table table-bordered dataTable" style="overflow:hidden;">
<tr>
<th>{{Lang::get('lang.name')}}</th>
<th>{{Lang::get('lang.status')}}</th>
@@ -74,9 +74,16 @@ class="active"
<span style="color:red">{{'Inactive'}}</span>
@endif
<?php
if($team->team_lead == 0) {
$team_lead = "";
} else {
$users = App\User::whereId($team->team_lead)->first();
$team_lead = $users->first_name . " " . $users->last_name;
}
?>
<td>{{count($assign_team_agent->where('team_id',$team->id))}}</td>
<td>{{$team->team_lead}}</td>
<td>{{ $team_lead }}</td>
<td>
{!! Form::open(['route'=>['teams.destroy', $team->id],'method'=>'DELETE']) !!}
<!-- To pop up a confirm Message -->

View File

@@ -62,14 +62,14 @@ class="active"
<div class="box-body table-responsive"style="overflow:hidden;">
<div class="row">
<div class="col-md-6">
<div class="form-group {{ $errors->has('ban_status') ? 'has-error' : '' }}">
{!! Form::label('ban_status',Lang::get('lang.ban_status')) !!}
<div class="form-group {{ $errors->has('ban') ? 'has-error' : '' }}">
{!! Form::label('ban',Lang::get('lang.ban_status')) !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('ban_status',1) !!}{{Lang::get('lang.active')}}
{!! Form::radio('ban',1) !!}{{Lang::get('lang.active')}}
</div>
<div class="col-xs-3">
{!! Form::radio('ban_status',0) !!}{{Lang::get('lang.disabled')}}
{!! Form::radio('ban',0) !!}{{Lang::get('lang.disabled')}}
</div>
</div>
</div>

View File

@@ -42,8 +42,8 @@ class="active"
<div class="box-body table-responsive"style="overflow:hidden;">
<div class="row">
<div class="col-md-6">
<div class="form-group {{ $errors->has('ban_status') ? 'has-error' : '' }}">
{!! Form::label('ban_status',Lang::get('lang.ban_status')) !!}
<div class="form-group {{ $errors->has('ban') ? 'has-error' : '' }}">
{!! Form::label('ban',Lang::get('lang.ban_status')) !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('ban',1) !!}{{Lang::get('lang.active')}}

View File

@@ -34,7 +34,7 @@ class="active"
<div class="box-header">
<h2 class="box-title">{{Lang::get('lang.banlists')}}</h2><a href="{{route('banlist.create')}}" class="pull-right btn btn-primary">{{Lang::get('lang.ban_email')}}</a>
</div>
<div class="box-body table-responsive no-padding">
<div class="box-body table-responsive">
<!-- check whether success or not -->
@@ -56,9 +56,7 @@ class="active"
{{Session::get('fails')}}
</div>
@endif
<table class="table table-hover" style="overflow:hidden;">
<table class="table table-bordered dataTable" style="overflow:hidden;">
<tr>
<th width="100px">{{Lang::get('lang.email_address')}}</th>
<th width="100px">{{Lang::get('lang.last_updated')}}</th>
@@ -74,15 +72,7 @@ class="active"
<td> {!! UTC::usertimezone($ban->updated_at) !!} </td>
<!-- Deleting Fields -->
<td>
{!! Form::open(['route'=>['banlist.destroy', $ban->id],'method'=>'DELETE']) !!}
<a href="{{route('banlist.edit',$ban->id)}}" class="btn btn-info btn-xs btn-flat"><i class="fa fa-edit" style="color:black;"> </i> Edit</a>
<!-- To pop up a confirm Message -->
{!! Form::button('<i class="fa fa-trash" style="color:black;"> </i> Delete',
['type' => 'submit',
'class'=> 'btn btn-warning btn-xs btn-flat',
'onclick'=>'return confirm("Are you sure?")'])
!!}
{!! Form::close() !!}
</td>
@endforeach
</tr>

View File

@@ -84,20 +84,11 @@ class="active"
{!! Form::label('help_topic',Lang::get('lang.help_topic')) !!}
{!! $errors->first('help_topic', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('help_topic', [''=>'Select a Helptopic','Help Topics'=>$helps->lists('topic','topic')],null,['class' => 'form-control select']) !!}
{!!Form::select('help_topic', [''=>'Select a Helptopic','Help Topics'=>$helps->lists('topic','id')],null,['class' => 'form-control select']) !!}
</div>
</div>
<!-- Auto response -->
{{-- <div class="form-group"> --}}
{{-- {!! Form::label('',Lang::get('lang.auto_response')) !!} --}}
{{-- <div class="col-xs-1"> --}}
{{-- {!! Form::checkbox('auto_response',1,null,['class' => 'checkbox']) !!} --}}
{{-- </div> --}}
{{-- </div> --}}
<hr>
@@ -112,14 +103,6 @@ class="active"
</div>
<div class="row">
<!-- Username -->
<div class="col-xs-6 form-group {{ $errors->has('user_name') ? 'has-error' : '' }}">
{!! Form::label('user_name',Lang::get('lang.email_address')) !!}
{!! $errors->first('user_name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('user_name',null,['class' => 'form-control']) !!}
</div>
<!-- password -->
<div class="col-xs-6 form-group {{ $errors->has('password') ? 'has-error' : '' }}">
@@ -184,11 +167,7 @@ class="active"
{!! Form::label('mailbox_protocol',Lang::get('lang.mail_box_protocol')) !!}
{!! $errors->first('mailbox_protocol', '<spam class="help-block">:message</spam>') !!}
<select class="form-control" name="mailbox_protocol">
<option value="/imap/ssl">IMAP+SSL</option>
<option value="/imap/tls">IMAP+TLS</option>
<option value="/imap">IMAP</option>
</select>
{!!Form::select('mailbox_protocol',['Mailbox Protocols'=>$mailbox_protocols->lists('name','id')],null,['class' => 'form-control select']) !!}
</div>
<!-- imap config -->

View File

@@ -84,7 +84,7 @@ class="active"
{!! Form::label('help_topic',Lang::get('lang.help_topic')) !!}
{!! $errors->first('help_topic', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('help_topic', [''=>'Select a Helptopic','Help Topics'=>$helps->lists('topic','topic')],null,['class' => 'form-control select']) !!}
{!!Form::select('help_topic', [''=>'Select a Helptopic','Help Topics'=>$helps->lists('topic','id')],null,['class' => 'form-control select']) !!}
</div>
</div>
@@ -110,15 +110,6 @@ class="active"
<div class="row">
<!-- user name -->
<div class="col-xs-6 form-group {{ $errors->has('user_name') ? 'has-error' : '' }}">
{!! Form::label('user_name',Lang::get('lang.email_address')) !!}
{!! $errors->first('user_name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('user_name',null,['class' => 'form-control']) !!}
</div>
<!-- password -->
<div class="col-xs-6 form-group {{ $errors->has('password') ? 'has-error' : '' }}">
@@ -181,11 +172,7 @@ class="active"
{!! Form::label('mailbox_protocol',Lang::get('lang.mail_box_protocol')) !!}
{!! $errors->first('mailbox_protocol', '<spam class="help-block">:message</spam>') !!}
<select class="form-control" name="mailbox_protocol">
<option value="/imap/ssl" <?php if($emails->mailbox_protocol == '/imap/ssl'){ echo 'selected="selected"'; } ?>>IMAP+SSL</option>
<option value="/imap/tls" <?php if($emails->mailbox_protocol == '/imap/tls'){ echo 'selected="selected"'; } ?> >IMAP+TLS</option>
<option value="/imap" <?php if($emails->mailbox_protocol == '/imap'){ echo 'selected="selected"'; } ?> >IMAP</option>
</select>
{!!Form::select('mailbox_protocol',['Mailbox Protocols'=>$mailbox_protocols->lists('name','id')],null,['class' => 'form-control select']) !!}
</div>
<!-- imap config -->

View File

@@ -34,7 +34,7 @@ class="active"
<div class="box-header">
<h2 class="box-title">{!! Lang::get('lang.incoming_emails') !!}</h2><a href="{{route('emails.create')}}" class="btn btn-primary pull-right">{{Lang::get('lang.create_email')}}</a></div>
<div class="box-body table-responsive no-padding">
<div class="box-body table-responsive">
<!-- check whether success or not -->
@@ -56,7 +56,7 @@ class="active"
</div>
@endif
<!-- table -->
<table class="table table-hover" style="overflow:hidden;">
<table class="table table-bordered dataTable" style="overflow:hidden;">
<tr>
<th width="100px">{{Lang::get('lang.email')}}</th>
<th width="100px">{{Lang::get('lang.priority')}}</th>
@@ -70,8 +70,14 @@ class="active"
<td><a href="{{route('emails.edit', $email->id)}}"> {{$email -> email_address }}</a></td>
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id','=',$email->priority)->first(); ?>
<td>{{ ucfirst($priority->priority_desc) }}</td>
<?php $department = App\Model\helpdesk\Agent\Department::where('id','=',$email->department)->first(); ?>
<td>{{ $department->name }}</td>
@if($email->department !== null)
<?php $department = App\Model\helpdesk\Agent\Department::where('id','=',$email->department)->first();
$dept = $department->name; ?>
@elseif($email->department == null)
<?php $dept = ""; ?>
@endif
<td>{{ $dept }}</td>
<td>{{ UTC::usertimezone($email->created_at) }}</td>
<td>{{ UTC::usertimezone($email->updated_at) }}</td>
<td>

View File

@@ -56,7 +56,7 @@ class="active"
</div>
@endif
<table class="table table-hover" style="overflow:hidden;">
<table class="table table-bordered dataTable" style="overflow:hidden;">
<tr>
<th width="100px">{{Lang::get('lang.name')}}</th>
<th width="100px">{{Lang::get('lang.status')}}</th>

View File

@@ -57,7 +57,7 @@ class="active"
</thead>
<tbody>
<?php
$forms =App\Model\helpdesk\Form\Forms::all();
$forms = App\Model\helpdesk\Form\Forms::all();
?>
@foreach($forms as $form)

View File

@@ -94,7 +94,7 @@ class="active"
{!! Form::label('custom_form',Lang::get('lang.custom')) !!}
{!! $errors->first('custom_form', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('custom_form', [''=>'Select a Form','Custom Forms'=>$forms->lists('formname','name')],1,['class' => 'form-control']) !!}
{!!Form::select('custom_form', [''=>'Select a Form','Custom Forms'=>$forms->lists('formname','id')],1,['class' => 'form-control']) !!}
</div>
</div>
@@ -128,7 +128,7 @@ class="active"
{!! Form::label('sla_plan',Lang::get('lang.SLA_plan')) !!}
{!! $errors->first('sla_plan', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('sla_plan', [''=>'Select a SLA Plan','SLA Plans'=>$slas->lists('name','name')],1,['class' => 'form-control']) !!}
{!!Form::select('sla_plan', [''=>'Select a SLA Plan','SLA Plans'=>$slas->lists('name','id')],1,['class' => 'form-control']) !!}
</div>
</div>
@@ -139,7 +139,7 @@ class="active"
{!! Form::label('auto_assign',Lang::get('lang.auto_assign')) !!}
{!! $errors->first('auto_assign', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('auto_assign', [''=>'Select an Agent','Agents'=>$agents->lists('user_name','user_name')],null,['class' => 'form-control']) !!}
{!!Form::select('auto_assign', [''=>'Select an Agent','Agents'=>$agents->lists('user_name','id')],null,['class' => 'form-control']) !!}
</div>
</div>
</div>

View File

@@ -127,7 +127,7 @@ class="active"
{!! Form::label('auto_assign',Lang::get('lang.auto_assign')) !!}
{!! $errors->first('auto_assign', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('auto_assign', [''=>'Select an Agent','Agents'=>$agents->lists('user_name','user_name')],null,['class' => 'form-control']) !!}
{!!Form::select('auto_assign', [''=>'Select an Agent','Agents'=>$agents->lists('user_name','id')],null,['class' => 'form-control']) !!}
</div>
</div>
</div>

View File

@@ -32,7 +32,7 @@ class="active"
<div class="form-group">
<div class="box-header">
<h2 class="box-title">{{Lang::get('lang.help_topic')}}</h2><a href="{{route('helptopic.create')}}" class="btn btn-primary pull-right">{{Lang::get('lang.create_help_topic')}}</a></div>
<div class="box-body table-responsive no-padding">
<div class="box-body table-responsive">
<!-- check whether success or not -->
@@ -41,7 +41,7 @@ class="active"
<i class="fa fa-check-circle"></i>
<b>Success!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
{!! Session::get('success') !!}
</div>
@endif
<!-- failure message -->
@@ -50,11 +50,11 @@ class="active"
<i class="fa fa-ban"></i>
<b>Fail!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
{!! Session::get('fails') !!}
</div>
@endif
<table class="table table-hover" style="overflow:hidden;">
<table class="table table-bordered dataTable" style="overflow:hidden;">
<tr>
<th width="100px">{{Lang::get('lang.topic')}}</th>
@@ -65,12 +65,31 @@ class="active"
<th width="100px">{{Lang::get('lang.last_updated')}}</th>
<th width="100px">{{Lang::get('lang.action')}}</th>
</tr>
<?php
$default_helptopic = App\Model\helpdesk\Settings\Ticket::where('id','=','1')->first();
$default_helptopic = $default_helptopic->help_topic;
?>
<!-- Foreach @var$topics as @var topic -->
@foreach($topics as $topic)
<tr style="padding-bottom:-30px">
<!-- topic Name with Link to Edit page along Id -->
<td><a href="{{route('helptopic.edit',$topic->id)}}">{!! $topic->topic !!}</a></td>
<td><a href="{{route('helptopic.edit',$topic->id)}}">{!! $topic->topic !!}
@if($topic->id == $default_helptopic)
( Default )
<?php
$disable = 'disabled';
?>
@else
<?php
$disable = '';
?>
@endif
</a></td>
<!-- topic Status : if status==1 active -->
<td>
@@ -94,8 +113,13 @@ class="active"
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id','=',$topic->priority)->first(); ?>
<td>{!! $priority->priority_desc !!}</td>
<!-- Department -->
<?php $dept = App\Model\helpdesk\Agent\Department::where('id', '=', $topic->department)->first(); ?>
<td>{!! $dept->name !!}</td>
@if($topic->department != null)
<?php $dept = App\Model\helpdesk\Agent\Department::where('id', '=', $topic->department)->first();
$dept = $dept->name; ?>
@elseif($topic->department == null)
<?php $dept = ""; ?>
@endif
<td> {!! $dept !!} </td>
<!-- Last Updated -->
<td> {!! UTC::usertimezone($topic->updated_at) !!} </td>
<!-- Deleting Fields -->
@@ -105,12 +129,10 @@ class="active"
<!-- To pop up a confirm Message -->
{!! Form::button('<i class="fa fa-trash" style="color:black;"> </i> Delete',
['type' => 'submit',
'class'=> 'btn btn-warning btn-xs btn-flat',
'class'=> 'btn btn-warning btn-xs btn-flat '.$disable,
'onclick'=>'return confirm("Are you sure?")'])
!!}
</div>
{!! Form::close() !!}
</td>
@endforeach

View File

@@ -62,7 +62,7 @@ class="active"
{!! Form::label('grace_period',Lang::get('lang.grace_period')) !!}
{!! $errors->first('grace_period', '<spam class="help-block">:message</spam>') !!}
{!! Form::select('grace_period',['10'=>'10 Hours','15'=>'15 Hours','20'=>'20 hours','24'=>'One Day'],null,['class' => 'form-control']) !!}
{!! Form::select('grace_period',['6 Hours'=>'6 Hours', '12 Hours'=>'12 Hours', '18 Hours'=>'18 Hours', '24 Hours'=>'24 Hours', '36 Hours'=>'36 Hours', '48 Hours'=>'48 Hours'],null,['class' => 'form-control']) !!}
</div>
</div>

View File

@@ -62,7 +62,7 @@ class="active"
{!! Form::label('grace_period',Lang::get('lang.grace_period')) !!}
{!! $errors->first('grace_period', '<spam class="help-block">:message</spam>') !!}
{!! Form::select('grace_period',['10'=>'10 Hours','15'=>'15 Hours','20'=>'20 hours','24'=>'One Day'],null,['class' => 'form-control']) !!}
{!! Form::select('grace_period',['6 Hours'=>'6 Hours', '12 Hours'=>'12 Hours', '18 Hours'=>'18 Hours', '24 Hours'=>'24 Hours', '36 Hours'=>'36 Hours', '48 Hours'=>'48 Hours'],null,['class' => 'form-control']) !!}
</div>
</div>

View File

@@ -34,7 +34,7 @@ class="active"
<div class="box-header">
<h2 class="box-title">{{Lang::get('lang.SLA_plan')}}</h2><a href="{{route('sla.create')}}" class="btn btn-primary pull-right">{{Lang::get('lang.create_SLA')}}</a></div>
<div class="box-body table-responsive no-padding">
<div class="box-body table-responsive">
<!-- check whether success or not -->
@@ -43,7 +43,7 @@ class="active"
<i class="fa fa-check-circle"></i>
<b>Success!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
{!! Session::get('success') !!}
</div>
@endif
<!-- failure message -->
@@ -52,11 +52,11 @@ class="active"
<i class="fa fa-ban"></i>
<b>Fail!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
{!! Session::get('fails') !!}
</div>
@endif
<table class="table table-hover" style="overflow:hidden;">
<table class="table table-bordered dataTable" style="overflow:hidden;">
<tr>
<th width="100px">{{Lang::get('lang.name')}}</th>
@@ -66,12 +66,28 @@ class="active"
<th width="100px">{{Lang::get('lang.last_updated')}}</th>
<th width="100px">{{Lang::get('lang.action')}}</th>
</tr>
<?php
$default_sla = App\Model\helpdesk\Settings\Ticket::where('id','=','1')->first();
$default_sla = $default_sla->sla;
?>
<!-- Foreach @var$slas as @var sla -->
@foreach($slas as $sla)
<tr>
<!-- sla Name with Link to Edit page along Id -->
<td><a href="{{route('sla.edit',$sla->id)}}">{!! $sla->name !!}</a></td>
<td><a href="{{route('sla.edit',$sla->id)}}">{!! $sla->name !!}
@if($sla->id == $default_sla)
( Default )
<?php
$disable = 'disabled';
?>
@else
<?php
$disable = '';
?>
@endif
</a> </td>
<!-- sla Status : if status==1 active -->
<td>
@if($sla->status=='1')
@@ -93,19 +109,15 @@ class="active"
<!-- To pop up a confirm Message -->
{!! Form::button('<i class="fa fa-trash" style="color:black;"> </i> Delete',
['type' => 'submit',
'class'=> 'btn btn-warning btn-xs btn-flat',
'class'=> 'btn btn-warning btn-xs btn-flat '.$disable,
'onclick'=>'return confirm("Are you sure?")'])
!!}
{!! Form::close() !!}
</td>
@endforeach
</tr>
<!-- Set a link to Create Page -->
</table>
</div>

View File

@@ -328,7 +328,7 @@
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.themes') !!}</h3>
<h3 class="box-title">{!! Lang::get('lang.widgets') !!}</h3>
</div>
<!-- /.box-header -->
<div class="box-body">
@@ -338,66 +338,36 @@
<div class="col-md-2 col-sm-6">
<div class="settingiconblue">
<div class="settingdivblue">
<a href="{{ url('create-footer') }}"><span class="fa-stack fa-2x">
<a href="{{ url('widgets') }}"><span class="fa-stack fa-2x">
<i class="fa fa-list-alt fa-stack-1x"></i>
</span></a>
</div>
<center class="box-title" >{!! Lang::get('lang.footer') !!}</center>
<center class="box-title" >{!! Lang::get('lang.widgets') !!}</center>
</div>
</div>
<!--/.col-md-2-->
<!--/.col-md-2-->
<!--/.col-md-2-->
<!--/.col-md-2-->
<div class="col-md-2 col-sm-6">
<div class="settingiconblue">
<div class="settingdivblue">
<a href="{{ url('create-footer2') }}"><span class="fa-stack fa-2x">
<i class="fa fa-list-alt fa-stack-1x"></i>
<a href="{{ url('social-buttons') }}"><span class="fa-stack fa-2x">
<i class="fa fa-cubes fa-stack-1x"></i>
</span></a>
</div>
<center class="box-title" >{!! Lang::get('lang.footer2') !!}</center>
<center class="box-title" >{!! Lang::get('lang.widgets') !!}</center>
</div>
</div>
<!--/.col-md-2-->
<!--/.col-md-2-->
<!--/.col-md-2-->
<div class="col-md-2 col-sm-6">
<div class="settingiconblue">
<div class="settingdivblue">
<a href="{{ url('create-footer3') }}"><span class="fa-stack fa-2x">
<i class="fa fa-list-alt fa-stack-1x"></i>
</span></a>
</div>
<center class="box-title" >{!! Lang::get('lang.footer3') !!}</center>
</div>
</div>
<!--/.col-md-2-->
<!--/.col-md-2-->
<div class="col-md-2 col-sm-6">
<div class="settingiconblue">
<div class="settingdivblue">
<a href="{{ url('create-footer4') }}"><span class="fa-stack fa-2x">
<i class="fa fa-list-alt fa-stack-1x"></i>
</span></a>
</div>
<center class="box-title" >{!! Lang::get('lang.footer4') !!}</center>
</div>
</div>
<!--/.col-md-2-->
</div>
</div>
<!-- /.row -->
</div>
<!-- ./box-body -->
</div>
<div class="box">

View File

@@ -117,76 +117,11 @@ class="active"
<div class="form-group {{ $errors->has('time_zone') ? 'has-error' : '' }}">
{!! Form::label('time_zone',Lang::get('lang.timezone')) !!}
{!! $errors->first('time_zone', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('time_zone',[''=>'Select a Time Zone','Time Zones'=>$timezones->lists('name','name')],null,['class'=>'form-control']) !!}
{!!Form::select('time_zone',[''=>'Select a Time Zone','Time Zones'=>$timezones->lists('name','id')],null,['class'=>'form-control']) !!}
</div>
</div>
<!-- Default Page Size: Drop down: Manual -->
{{-- <div class="col-md-3"> --}}
{{-- <div class="form-group"> --}}
{{-- {!! Form::label('page_size',Lang::get('lang.pagesize')) !!} --}}
{{-- {!!Form::select('page_size', ['5','10','15'],null,['class'=>'form-control']) !!} --}}
{{-- </div> --}}
{{-- </div> --}}
<!-- Default Log Level: Drop down: Manual -->
{{-- <div class="col-md-3">
<div class="form-group">
{!! Form::label('log_level',Lang::get('lang.loglevel')) !!}
{!!Form::select('log_level', [''=>'Select a Log','Log Levels'=>$log->lists('level','level')],null,['class'=>'form-control']) !!}
</div>
</div> --}}
<!-- Purge Logs: Drop Down : Manual -->
{{-- <div class="col-md-3">
<div class="form-group">
{!! Form::label('purge_log',Lang::get('lang.purglog')) !!}</td></tr>
{!!Form::select('purge_log', ['5 months','10 months','15 months'],null,['class'=>'form-control']) !!}
</div>
</div> --}}
<!-- Default Name Formatting: Drop Down : Manual -->
{{-- <div class="col-md-3">
<div class="form-group">
{!! Form::label('name_format',Lang::get('lang.nameformat')) !!}
{!!Form::select('name_format', ['First Last','Last First'],null,['class'=>'form-control']) !!}
</div>
</div> --}}
<!-- Time Format: Required: text : eg - 14:07 AM -->
{{-- <div class="col-md-3"> --}}
{{-- <div class="form-group {{ $errors->has('time_farmat') ? 'has-error' : '' }}"> --}}
{{-- {!! Form::label('time_format',Lang::get('lang.timeformat')) !!} --}}
{{-- {!! $errors->first('time_format', '<spam class="help-block">:message</spam>') !!} --}}
{{-- {!! Form::select('time_format',[''=>'Select a Time Format','Time Format'=>$time->lists('format','format')],null,['class' => 'form-control']) !!} --}}
{{-- </div> --}}
{{-- </div> --}}
<!-- Date Format:text : Required : eg - 03/25/2015 -->
{{-- <div class="col-md-3"> --}}
{{-- <div class="form-group {{ $errors->has('date_format') ? 'has-error' : '' }}"> --}}
{{-- {!! Form::label('date_format',Lang::get('lang.dateformat')) !!} --}}
{{-- {!! $errors->first('date_format', '<spam class="help-block">:message</spam>') !!} --}}
{{-- {!! Form::select('date_format',[''=>'Select a Date Format','Date Formats'=>$date->lists('format','format')],null,['class' => 'form-control']) !!} --}}
{{-- </div> --}}
{{-- </div> --}}
<!-- Date and Time Format: text: required: eg - 03/25/2015 7:14 am -->
<div class="col-md-6">
@@ -194,35 +129,16 @@ class="active"
{!! Form::label('date_time_format',Lang::get('lang.date_time')) !!}
{!! $errors->first('date_time_format', '<spam class="help-block">:message</spam>') !!}
{!! Form::select('date_time_format',[''=>'Select a date Time Format','Date Time Formats'=>$date_time->lists('format','format')],null,['class' => 'form-control']) !!}
{!! Form::select('date_time_format',[''=>'Select a date Time Format','Date Time Formats'=>$date_time->lists('format','id')],null,['class' => 'form-control']) !!}
</div>
</div>
<!-- Day, Date and Time Format: text: Required :eg - Wed, Mar 25 2015 7:14am -->
{{-- <div class="col-md-3"> --}}
{{-- <div class="form-group {{ $errors->has('day_date_time') ? 'has-error' : '' }}"> --}}
{{-- {!! Form::label('day_date_time',Lang::get('lang.day_date_time')) !!} --}}
{{-- {!! $errors->first('day_date_time', '<spam class="help-block">:message</spam>') !!} --}}
{{-- {!! Form::text('day_date_time',$systems->day_date_time,['class' => 'form-control']) !!} --}}
{{-- </div> --}}
{{-- </div> --}}
</div>
<!-- Guest user page Content -->
<div class="row">
{{-- <div class="col-md-12"> --}}
{{-- <div class="form-group"> --}}
{{-- {!! Form::label('content',Lang::get('lang.content')) !!} --}}
{{-- {!! Form::textarea('content',null,['id'=>'content','class' => 'form-control','size' => '30x5']) !!} --}}
{{-- </div> --}}
{{-- </div> --}}
</div>

View File

@@ -0,0 +1,49 @@
@extends('themes.default1.admin.layout.admin')
@section('Themes')
class="active"
@stop
@section('theme-bar')
active
@stop
@section('footer')
class="active"
@stop
@section('content')
<div class="box box-primary">
<div class="box-header">
<h4 class="box-title">{!! Lang::get('lang.widgets') !!} </h4>
</div>
<!-- check whether success or not -->
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"></i>
<b>Success!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>Fail!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
<div class="box-footer">
{!! Datatable::table()
->addColumn(Lang::get('lang.name'),
Lang::get('lang.link'),
Lang::get('lang.action')) // these are the column headings to be shown
->setUrl('list-social-buttons') // this is the route where data will be retrieved
->render() !!}
</div>
</div>
@stop

View File

@@ -0,0 +1,50 @@
@extends('themes.default1.admin.layout.admin')
@section('Themes')
class="active"
@stop
@section('theme-bar')
active
@stop
@section('footer')
class="active"
@stop
@section('content')
<div class="box box-primary">
<div class="box-header">
<h4 class="box-title">{!! Lang::get('lang.widgets') !!} </h4>
</div>
<!-- check whether success or not -->
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"></i>
<b>Success!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>Fail!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
<div class="box-footer">
{!! Datatable::table()
->addColumn(Lang::get('lang.name'),
Lang::get('lang.title'),
Lang::get('lang.content'),
Lang::get('lang.action')) // these are the column headings to be shown
->setUrl('list-widget') // this is the route where data will be retrieved
->render() !!}
</div>
</div>
@stop

View File

@@ -13,9 +13,10 @@ class="active"
@stop
@section('content')
<div class="box box-info">
<link type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.7.14/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.line_chart') !!}</h3>
<div class="box-tools pull-right">
@@ -24,10 +25,17 @@ class="active"
</div>
</div>
<div class="box-body">
<div class="chart" >
<div id="legendDiv"></div>
<canvas class="chart-data" id="tickets-graph" width="1000" height="400"></canvas>
@if(Session::has('content'))
<div class="chart">
<div id="legendDiv1"></div>
<canvas class="chart-data" id="tickets-graph1" width="1000" height="400"></canvas>
</div>
@else
<div class="chart">
<div id="legendDiv"></div>
<canvas class="chart-data" id="tickets-graph" width="1000" height="400"></canvas>
</div>
@endif
</div><!-- /.box-body -->
</div><!-- /.box -->
<hr/>
@@ -37,9 +45,9 @@ class="active"
</div>
<div class="box-body">
<table class="table table-hover" style="overflow:hidden;">
<table class="table table-hover" style="overflow:hidden;">
<tr>
<tr>
<th>{!! Lang::get('lang.department') !!}</th>
<th>{!! Lang::get('lang.opened') !!}</th>
<th>{!! Lang::get('lang.resolved') !!}</th>
@@ -54,7 +62,6 @@ $open = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id)-
$resolve = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id)->where('status','=',2)->count();
$close = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id)->where('status','=',3)->count();
$delete = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id)->where('status','=',5)->count();
?>
<tr>
@@ -71,8 +78,8 @@ $delete = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id
</div>
</div>
<script src="{{asset("lb-faveo/plugins/chartjs/Chart.min.js")}}" type="text/javascript"></script>
<script type="text/javascript">
<script src="{{asset("lb-faveo/plugins/chartjs/Chart.min.js")}}" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
$.getJSON("agen", function (result) {
@@ -189,4 +196,26 @@ $delete = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id
</script>
<script type="text/javascript">
jQuery(document).ready(function() {
// Close a ticket
$('#close').on('click', function(e) {
$.ajax({
type: "GET",
url: "agen",
beforeSend: function() {
},
success: function(response) {
}
})
return false;
});
});
</script>
<script src="{{asset("lb-faveo/plugins/moment-develop/moment.js")}}" type="text/javascript"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.7.14/js/bootstrap-datetimepicker.min.js"></script>
@stop

View File

@@ -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)&nbsp;<i class="fa fa-users"></i>@endif
@if($attach > 0)&nbsp;<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();?>&nbsp;
</div>
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->

View File

@@ -41,111 +41,33 @@ 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)->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)&nbsp;<i class="fa fa-users"></i>@endif
@if($attach > 0)&nbsp;<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/assigned'))->render();?>&nbsp;
</div>
{!! 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.assigned.ticket'))
->setOrder(array(7=>'desc'))
->setClass('table table-hover table-bordered table-striped')
->render();!!}
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->

View File

@@ -12,7 +12,6 @@ active
class="active"
@stop
@section('content')
<?php
if(Auth::user()->role == 'agent') {
@@ -42,102 +41,35 @@ 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>
{{-- <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-blue btn-sm" name="submit" value="{!! Lang::get('lang.open') !!}">
</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 )
<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
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
$string = strip_tags($title->title);
// 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);
{!! 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.closed.ticket'))
->setOrder(array(7=>'desc'))
->setClass('table table-hover table-bordered table-striped')
->render();!!}
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)&nbsp;<i class="fa fa-users"></i>@endif
@if($attach > 0)&nbsp;<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>
@endforeach
</tbody>
</table><!-- /.table -->
<div class="pull-right">
<?php echo $tickets->setPath(url('/ticket/closed'))->render();?>&nbsp;
</div>
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->

View File

@@ -41,108 +41,38 @@ 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>
{{-- <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">
<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)->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)&nbsp;<i class="fa fa-users"></i>@endif
@if($attach > 0)&nbsp;<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/inbox'))->render();?>&nbsp;
</div>
<div class="mailbox-messages" id="refresh">
<!--datatable-->
{!! 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.inbox.ticket'))
->setOrder(array(7=>'desc'))
->setClass('table table-hover table-bordered table-striped')
->render();!!}
<!-- /.datatable -->
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->
</div><!-- /. box -->
<script>
$(function () {
//Enable check and uncheck all functionality
@@ -161,8 +91,6 @@ class="active"
});
});
$(function() {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
@@ -178,7 +106,6 @@ class="active"
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click').click(function() {
$('#refresh').load('inbox #refresh');
@@ -188,6 +115,5 @@ class="active"
});
});
</script>
@stop

View File

@@ -41,101 +41,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>
{{-- <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 )
<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);
// title
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
$string = strip_tags($title->title);
// check atatchments
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
$attach = count($attachments);
{!! 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.myticket.ticket'))
->setOrder(array(7=>'desc'))
->setClass('table table-hover table-bordered table-striped')
->render();!!}
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)->where('is_internal', '=', 0)->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)&nbsp;<i class="fa fa-users"></i>@endif
@if($attach > 0)&nbsp;<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>
@endforeach
</tbody>
</table><!-- /.table -->
<div class="pull-right">
<?php echo $tickets->setPath(url('/ticket/myticket'))->render();?>&nbsp;
</div>
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->

View File

@@ -48,124 +48,32 @@ 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
{!! 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.open.ticket'))
->setOrder(array(7=>'desc'))
->setClass('table table-hover table-bordered table-striped')
->render();!!}
// // title
$ticket_reply = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->where('is_internal', '=', 0)->max('id');
$ticket_reply1 = App\Model\helpdesk\Ticket\Ticket_Thread::where('id','=',$ticket_reply)->first();
$last_replier = App\User::where('id','=', $ticket_reply1->user_id)->first();
if($last_replier->role == 'agent') {
} else {
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
$string = strip_tags($title->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)&nbsp;<i class="fa fa-users"></i>@endif
@if($attach > 0)&nbsp;<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/open'))->render();?>&nbsp;
</div>
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->

View File

@@ -12,7 +12,7 @@ active
$user = App\User::where('id', '=', $tickets->user_id)->first();
$assignedto = App\User::where('id', '=', $tickets->assigned_to)->first();
$agent_group = Auth::user()->assign_group;
$group = App\Model\helpdesk\Agent\Groups::where('name', '=', $agent_group)->where('group_status', '=', '1')->first();
$group = App\Model\helpdesk\Agent\Groups::where('id', '=', $agent_group)->where('group_status', '=', '1')->first();
?>
@section('sidebar')
@@ -53,7 +53,7 @@ active
<?php
Event::fire(new \App\Events\TicketBoxHeader($user->id));
if ($group->can_edit_ticket == 1) {?>
if ($group->can_edit_ticket == 1) {?>
<button type="button" class="btn btn-default" id="Edit_Ticket" data-toggle="modal" data-target="#Edit"><i class="fa fa-edit" style="color:green;"> </i> {!! Lang::get('lang.edit') !!}</button>
<?php } ?>
@@ -62,7 +62,7 @@ active
<?php } ?>
@if($tickets->assigned_to == Auth::user()->id)
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#surrender"> <i class="fa fa-arrows-alt" style="color:red;"> </i> {!! Lang::get('lang.surrender') !!}</button>
<button type="button" id="surrender_button" class="btn btn-default" data-toggle="modal" data-target="#surrender"> <i class="fa fa-arrows-alt" style="color:red;"> </i> {!! Lang::get('lang.surrender') !!}</button>
@endif
<a href="{{url('ticket/print/'.$tickets->id)}}" target="_blank" class="btn btn-primary"><i class="fa fa-print" > </i> {!! Lang::get('lang.generate_pdf') !!}</a>
@@ -724,7 +724,7 @@ $data = $ConvDate[0];
<?php $sla_plans = App\Model\helpdesk\Manage\Sla_plan::all() ?>
<select class="form-control" name="sla_paln">
@foreach($sla_plans as $sla_plan)
<option value="{!! $sla_plan->id !!}">{!! $sla_plan->grace_period !!}</option>
<option value="{!! $sla_plan->id !!}" <?php if($SlaPlan->id == $sla_plan->id){ echo "selected"; } ?> >{!! $sla_plan->grace_period !!}</option>
@endforeach
</select>
<spam id="error-sla" style="display:none" class="help-block text-red">This is a required field</spam>
@@ -735,8 +735,8 @@ $data = $ConvDate[0];
<label>{!! Lang::get('lang.help_topic') !!}</label>
<?php $help_topics = App\Model\helpdesk\Manage\Help_topic::all() ?>
<select class="form-control" name="help_topic">
@foreach($help_topics as $help_topic)
<option value="{!! $help_topic->id !!}">{!! $help_topic->topic !!}</option>
@foreach($help_topics as $helptopic)
<option value="{!! $helptopic->id !!}" <?php if($help_topic->id == $helptopic->id){echo 'selected';} ?> >{!! $helptopic->topic !!}</option>
@endforeach
</select>
<spam id="error-help" style="display:none" class="help-block text-red">This is a required field</spam>
@@ -747,20 +747,23 @@ $data = $ConvDate[0];
<label>{!! Lang::get('lang.ticket_source') !!}</label>
<?php $ticket_sources = App\Model\helpdesk\Ticket\Ticket_source::all() ?>
<select class="form-control" name="ticket_source">
@foreach($ticket_sources as $ticket_source)
<option value="{!! $ticket_source->id !!}">{!! $ticket_source->value !!}</option>
@endforeach
@foreach($ticket_sources as $ticketsource)
<option value="{!! $ticketsource->id !!}" <?php if($tickets->source == $ticketsource->id){echo "selected"; } ?> >{!! $ticketsource->value !!}</option>
@endforeach
</select>
<spam id="error-source" style="display:none" class="help-block text-red">This is a required field</spam>
</div>
</div>
<?php
?>
<div class="col-md-6">
<div class="form-group">
<label>{!! Lang::get('lang.priority') !!}</label>
<?php $ticket_prioritys = App\Model\helpdesk\Ticket\Ticket_Priority::all() ?>
<select class="form-control" name="ticket_priority">
@foreach($ticket_prioritys as $ticket_priority)
<option value="{!! $ticket_priority->priority_id !!}">{!! $ticket_priority->priority_desc !!}</option>
<option value="{!! $ticket_priority->priority_id !!}" <?php if($tickets->priority_id == $ticket_priority->priority_id){echo "selected";} ?> >{!! $ticket_priority->priority_desc !!}</option>
@endforeach
</select>
<spam id="error-priority" style="display:none" class="help-block text-red">This is a required field</spam>
@@ -858,6 +861,7 @@ $data = $ConvDate[0];
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php if ($group->can_assign_ticket == 1) {?>
<!-- Ticket Assign Modal -->
<div class="modal fade" id="{{$tickets->id}}assign">
@@ -884,7 +888,7 @@ $data = $ConvDate[0];
<div id="assign_body">
<p>{!! Lang::get('lang.whome_do_you_want_to_assign_ticket') !!}?</p>
<select id="asssign" class="form-control" name="user">
<select id="asssign" class="form-control" name="assign_to">
<?php
$assign = App\User::where('role', '!=', 'user')->get();
$count_assign = count($assign);
@@ -893,12 +897,12 @@ $count_teams = count($teams);
?>
<optgroup label="Teams ( {!! $count_teams !!} )">
@foreach($teams as $team)
<option value="{{$team->id}}">{!! $team->name !!}</option>
<option value="team_{{$team->id}}">{!! $team->name !!}</option>
@endforeach
</optgroup>
<optgroup label="Agents ( {!! $count_assign !!} )">
@foreach($assign as $user)
<option value="{{$user->email}}">{{$user->first_name." ".$user->last_name}}</option>
<option value="user_{{$user->id}}">{{$user->first_name." ".$user->last_name}}</option>
@endforeach
</optgroup>
</select>
@@ -923,7 +927,7 @@ $count_teams = count($teams);
<h4 class="modal-title">{!! Lang::get('lang.surrender') !!}</h4>
</div>
<div class="modal-body">
<p>{!! Lang::get('are_you_sure_you_want_to_surrender_this_ticket') !!}?</p>
<p>{!! Lang::get('lang.are_you_sure_you_want_to_surrender_this_ticket') !!}?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis6">{!! Lang::get('lang.close') !!}</button>
@@ -1315,12 +1319,17 @@ $(document).ready(function () {
$("#assign_loader").show();
},
success: function(response) {
if(response === 1)
if(response == 1)
{
// $("#assign_body").show();
var message = "Success";
$('#message-success2').html(message);
setInterval(function(){$("#alert21").hide(); },4000);
// var message = "Success";
// $('#message-success1').html(message);
// setInterval(function(){$("#alert11").hide(); },4000);
var message = "Success!";
$("#alert11").show();
$('#message-success1').html(message);
setInterval(function(){$("#dismiss11").trigger("click"); },2000);
}
$("#assign_body").show();
$("#assign_loader").hide();
@@ -1442,17 +1451,18 @@ $(document).ready(function () {
{
// alert('ticket has been un assigned');
var message = "Success! You have Unassigned your ticket";
$("#alert21").show();
$('#message-success2').html(message);
setInterval(function(){$("#dismiss21").trigger("click"); },2000);
$("#alert11").show();
$('#message-success1').html(message);
setInterval(function(){$("#dismiss11").trigger("click"); },2000);
// $("#refresh1").load( "http://localhost/faveo/public/thread/{{$tickets->id}} #refresh1");
$('#surrender_button').hide();
}
else
{
var message = "Fail! For some reason your request failed";
$("#alert23").show();
$('#message-danger2').html(message);
setInterval(function(){$("#dismiss23").trigger("click"); },2000);
$("#alert13").show();
$('#message-danger1').html(message);
setInterval(function(){$("#dismiss13").trigger("click"); },2000);
// alert('fail');
// $( "#dismis4" ).trigger( "click" );
}

View File

@@ -43,103 +43,35 @@ 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-blue btn-sm" name="submit" value="{!! Lang::get('lang.open') !!}">
<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">
{!! 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.trash.ticket'))
->setOrder(array(7=>'desc'))
->setClass('table table-hover table-bordered table-striped')
->render();!!}
@foreach ($tickets 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
// collaborators
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
$collab = count($collaborators);
// title
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
$string = strip_tags($title->title);
// 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)&nbsp;<i class="fa fa-users"></i>@endif
@if($attach > 0)&nbsp;<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>
@endforeach
</tbody>
</table><!-- /.table -->
<div class="pull-right">
<?php echo $tickets->setPath(url('/trash'))->render();?>&nbsp;
</div>
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->

View File

@@ -16,10 +16,11 @@ class="active"
<?php
if(Auth::user()->role == 'agent') {
$dept = App\Model\helpdesk\Agent\Department::where('name','=',Auth::user()->primary_dpt)->first();
$tickets = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', 0)->where('dept_id','=',$dept->id)->where('status','1')->orderBy('id', 'DESC')->paginate(20);
$tickets = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', null)->where('dept_id','=',$dept->id)->where('status','1')->orderBy('id', 'DESC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', 0)->where('status','1')->orderBy('id', 'DESC')->paginate(20);
$tickets = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', null)->where('status','1')->orderBy('id', 'DESC')->paginate(20);
}
// dd($tickets);
?>
<!-- Main content -->
<div class="box box-info">
@@ -44,104 +45,35 @@ 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">
{!! 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.unassigned.ticket'))
->setOrder(array(7=>'desc'))
->setClass('table table-hover table-bordered table-striped')
->render();!!}
@foreach ($tickets 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
// collaborators
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
$collab = count($collaborators);
// title
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
$string = strip_tags($title->title);
// 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 class="text-red" href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
@if($collab > 0)&nbsp;<i class="fa fa-users"></i>@endif
@if($attach > 0)&nbsp;<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>
@endforeach
</tbody>
</table><!-- /.table -->
<div class="pull-right">
<?php echo $tickets->setPath(url('/unassigned'))->render();?>&nbsp;
</div>
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->

View File

@@ -45,8 +45,16 @@ class="active"
@else
<tr><th class="col-md-8"><h4><b>{!! Lang::get('lang.gender') !!}:</b></h4></th><td class="col-md-6"><h4>{{ 'Female' }}</h4></td></tr>
@endif
<tr><th class="col-md-8"><h4><b>{!! Lang::get('lang.department') !!}:</b></h4></th><td class="col-md-6"><h4>{{ $user->primary_dpt }}</h4></td></tr>
<tr><th class="col-md-8"><h4><b>{!! Lang::get('lang.group') !!}:</b></h4></th><td class="col-md-6"><h4>{{ $user->assign_group }}</h4></td></tr>
<?php
if($user->primary_dpt){
$dept = App\Model\helpdesk\Agent\Department::where('id','=',$user->primary_dpt)->first();
}
if($user->assign_group){
$grp = App\Model\helpdesk\Agent\Groups::where('id','=',$user->assign_group)->first();
}
?>
<tr><th class="col-md-8"><h4><b>{!! Lang::get('lang.department') !!}:</b></h4></th><td class="col-md-6"><h4>{{ $dept->name }}</h4></td></tr>
<tr><th class="col-md-8"><h4><b>{!! Lang::get('lang.group') !!}:</b></h4></th><td class="col-md-6"><h4>{{ $grp->name }}</h4></td></tr>
<tr><th class="col-md-8"><h4><b>{!! Lang::get('lang.company') !!}:</b></h4></th><td class="col-md-6"> <h4>{{ $user->company }}</h4></td></tr>
<tr><th class="col-md-8"><h4><b>{!! Lang::get('lang.time_zone') !!}:</b></h4></th><td class="col-md-6"><h4> {{ $user->agent_tzone }}</h4></td></tr>
<tr><th class="col-md-8"><h4><b>{!! Lang::get('lang.role') !!}:</b></h4></th><td class="col-md-6"> <h4>{{ $user->role }}</h4></td></tr>

View File

@@ -228,7 +228,7 @@ if (Auth::user()->role == 'admin') { ?>
<!-- /.sidebar -->
</aside>
<?php $agent_group = Auth::user()->assign_group;
$group = App\Model\helpdesk\Agent\Groups::where('name', '=', $agent_group)->where('group_status', '=', '1')->first();
$group = App\Model\helpdesk\Agent\Groups::where('id', '=', $agent_group)->where('group_status', '=', '1')->first();
// dd($group); ?>
<!-- Right side column. Contains the navbar and content of the page -->
<div class="content-wrapper">
@@ -288,6 +288,7 @@ $group = App\Model\helpdesk\Agent\Groups::where('name', '=', $agent_group)->wher
</footer>
</div><!-- ./wrapper -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.7.14/js/bootstrap-datetimepicker.min.js"></script>
<!-- Bootstrap 3.3.2 JS -->
<script src="{{asset("lb-faveo/downloads/bootstrap.min.js")}}" type="text/javascript"></script>
<!-- Slimscroll -->

View File

@@ -39,24 +39,14 @@
<li @yield('all-pages')><a href="{{url('page')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.allpages')}}</a></li>
</ul>
</li>
<li class="treeview @yield('widget')">
<a href="#">
<i class="fa fa-th"></i> <span>{{Lang::get('lang.widgets')}}</span>
<i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li @yield('side1')><a href="{{url('side1')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.sidewidget1')}}</a></li>
<li @yield('side2')><a href="{{url('side2')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.sidewidget2')}}</a></li>
<li @yield('social')><a href="{{url('social')}}"><i class="fa fa-circle-o"></i> {!! Lang::get('lang.social') !!}</a></li>
</ul>
</li>
<li @yield('comment')>
<li @yield('comment')>
<a href="{{url('comment')}}">
<i class="fa fa-comments-o"></i>
<span>{{Lang::get('lang.comments')}}</span>
</a>
</li>
<li @yield('settings')>
<li @yield('settings')>
<a href="{{url('kb/settings')}}">
<i class="fa fa-wrench"></i>
<span>{{Lang::get('lang.settings')}}</span>

View File

@@ -2,14 +2,12 @@
@section('breadcrumb')
<?php
$all = App\Model\kb\Relationship::where('article_id','=', $arti->id)->get();
/* from whole attribute pick the article_id */
$category_id = $all->lists('category_id');
?>
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here') !!}: </li>
<?php $category = App\Model\kb\Category::where('id', $category_id)->first(); ?>

View File

@@ -201,22 +201,22 @@
</div>
<!-- /.content-wrapper -->
<?php
$footer = App\Model\helpdesk\Theme\Footer::whereId('1')->first();
$footer2 = App\Model\helpdesk\Theme\Footer2::whereId('1')->first();
$footer3 = App\Model\helpdesk\Theme\Footer3::whereId('1')->first();
$footer4 = App\Model\helpdesk\Theme\Footer4::whereId('1')->first();
$footer1 = App\Model\helpdesk\Theme\Widgets::where('name','=','footer1')->first();
$footer2 = App\Model\helpdesk\Theme\Widgets::where('name','=','footer2')->first();
$footer3 = App\Model\helpdesk\Theme\Widgets::where('name','=','footer3')->first();
$footer4 = App\Model\helpdesk\Theme\Widgets::where('name','=','footer4')->first();
?>
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="container">
<div class="row col-md-12">
@if($footer->title == null)
@if($footer1->title == null)
@else
<div class="col-md-3">
<div class="widget-area">
<section id="section-about" class="section">
<h2 class="section-title h4 clearfix">{!!$footer->title!!}</h2>
<h2 class="section-title h4 clearfix">{!!$footer1->title!!}</h2>
<div class="textwidget">
<p>{!!$footer->footer!!}</p>
<p>{!!$footer1->value!!}</p>
</div>
</section><!-- #section-about -->
</div>
@@ -229,7 +229,7 @@ $footer4 = App\Model\helpdesk\Theme\Footer4::whereId('1')->first();
<section id="section-latest-news" class="section">
<h2 class="section-title h4 clearfix">{!!$footer2->title!!}</h2>
<div class="textwidget">
<p>{!!$footer2->footer!!}</p>
<p>{!! $footer2->value !!}</p>
</div>
</section><!-- #section-latest-news -->
</div>
@@ -242,7 +242,7 @@ $footer4 = App\Model\helpdesk\Theme\Footer4::whereId('1')->first();
<section id="section-newsletter" class="section">
<h2 class="section-title h4 clearfix">{!!$footer3->title!!}</h2>
<div class="textwidget">
<p>{!!$footer3->footer!!}</p>
<p>{!! $footer3->value !!}</p>
</div>
</section><!-- #section-newsletter -->
</div>
@@ -255,7 +255,7 @@ $footer4 = App\Model\helpdesk\Theme\Footer4::whereId('1')->first();
<section id="section-newsletter" class="section">
<h2 class="section-title h4 clearfix">{{$footer4->title}}</h2>
<div class="textwidget">
<p>{!!$footer4->footer!!}</p>
<p>{!! $footer4->value !!}</p>
</div>
</section>
</div>
@@ -269,42 +269,65 @@ $footer4 = App\Model\helpdesk\Theme\Footer4::whereId('1')->first();
<p class="text-muted">{!! Lang::get('lang.copyright') !!} &copy; {!! date('Y') !!} <a href="{!! $company->website !!}">{!! $company->company_name !!}</a>. {!! Lang::get('lang.all_rights_reserved') !!}. {!! Lang::get('lang.powered_by') !!} <a href="http://www.faveohelpdesk.com/" target="_blank">Faveo</a></p>
</div>
<div class="site-social text-right col-md-6">
<?php $social = App\Model\kb\Social::where('id', '1')->first(); ?>
<?php $socials = App\Model\helpdesk\Theme\Widgets::all(); ?>
<ul class="list-inline hidden-print">
@if($social->facebook)
<li><a href="{{$social->facebook}}" class="btn btn-social btn-facebook"><i class="fa fa-facebook fa-fw"></i></a></li>
@endif
@if($social->twitter)
<li><a href="{{$social->twitter}}" class="btn btn-social btn-twitter"><i class="fa fa-twitter fa-fw"></i></a></li>
@endif
@if($social->google)
<li><a href="{{$social->google}}" class="btn btn-social btn-google-plus"><i class="fa fa-google-plus fa-fw"></i></a></li>
@endif
@if($social->linkedin)
<li><a href="{{$social->linkedin}}" class="btn btn-social btn-linkedin"><i class="fa fa-linkedin fa-fw"></i></a></li>
@endif
@if($social->vimeo)
<li><a href="{{$social->vimeo}}" class="btn btn-social btn-vimeo"><i class="fa fa-vimeo-square fa-fw"></i></a></li>
@endif
@if($social->youtube)
<li><a href="{{$social->youtube}}" class="btn btn-social btn-youtube"><i class="fa fa-youtube-play fa-fw"></i></a></li>
@endif
@if($social->pinterest)
<li><a href="{{$social->pinterest}}" class="btn btn-social btn-pinterest"><i class="fa fa-pinterest fa-fw"></i></a></li>
@endif
@if($social->dribbble)
<li><a href="{{$social->dribbble}}" class="btn btn-social btn-dribbble"><i class="fa fa-dribbble fa-fw"></i></a></li>
@endif
@if($social->flickr)
<li><a href="{{$social->flickr}}" class="btn btn-social btn-flickr"><i class="fa fa-flickr fa-fw"></i></a></li>
@endif
@if($social->instagram)
<li><a href="{{$social->instagram}}" class="btn btn-social btn-instagram"><i class="fa fa-instagram fa-fw"></i></a></li>
@endif
@if($social->rss)
<li><a href="{{$social->rss}}" class="btn btn-social btn-rss"><i class="fa fa-rss fa-fw"></i></a></li>
@endif
@foreach($socials as $social)
@if($social->name == 'facebook')
@if($social->value)
<li><a href="{!! $social->value !!}" class="btn btn-social btn-facebook"><i class="fa fa-facebook fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "twitter")
@if($social->value)
<li><a href="{{ $social->value }}" class="btn btn-social btn-twitter"><i class="fa fa-twitter fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "google")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-google-plus"><i class="fa fa-google-plus fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "linkedin")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-linkedin"><i class="fa fa-linkedin fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "vimeo")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-vimeo"><i class="fa fa-vimeo-square fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "youtube")
@if($social->value)
<li><a href="{{$social->vlaue}}" class="btn btn-social btn-youtube"><i class="fa fa-youtube-play fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "pinterest")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-pinterest"><i class="fa fa-pinterest fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "dribbble")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-dribbble"><i class="fa fa-dribbble fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "flickr")
@if($social->value)
<li><a href="{{$social->value}}" class="btn btn-social btn-flickr"><i class="fa fa-flickr fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "instagram")
@if($social->value)
<li><a href="{{$social->value }}" class="btn btn-social btn-instagram"><i class="fa fa-instagram fa-fw"></i></a></li>
@endif
@endif
@if($social->name == "rss")
@if($social->value)
<li><a href="{{$social->rss}}" class="btn btn-social btn-rss"><i class="fa fa-rss fa-fw"></i></a></li>
@endif
@endif
@endforeach
</ul>
</div>
</div>