update v1.0.3.3

This commit is contained in:
sujitprasad
2015-12-22 14:09:23 +05:30
parent 2bc3db252e
commit 696e0390fe
8590 changed files with 3456 additions and 818 deletions

View File

@@ -0,0 +1,56 @@
@extends('themes.default1.agent.layout.agent')
@section('Tools')
class="active"
@stop
@section('tools-bar')
active
@stop
@section('tools')
class="active"
@stop
<!-- content -->
@section('content')
<!-- open a form -->
{!! Form::open(['route'=>'canned.store','method' => 'patch']) !!}
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">{!! Lang::get('lang.create') !!} </h3>
<div class="pull-right">{!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</div>
</div>
<div class="box-body">
<div class="row">
<!-- username -->
<div class="col-xs-6 form-group {{ $errors->has('title') ? 'has-error' : '' }}">
{!! Form::label('title',Lang::get('lang.title')) !!}
{!! $errors->first('title', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('title',null,['class' => 'form-control']) !!}
</div>
<!-- firstname -->
<div class="col-xs-12 form-group {{ $errors->has('message') ? 'has-error' : '' }}">
{!! Form::label('message',Lang::get('lang.message')) !!}
{!! $errors->first('message', '<spam class="help-block">:message</spam>') !!}
{!! Form::textarea('message',null,['class' => 'form-control']) !!}
</div>
</div>
</div>
<script>
$(function () {
//Add text editor
$("textarea").wysihtml5();
});
</script>
@stop

View File

@@ -0,0 +1,56 @@
@extends('themes.default1.agent.layout.agent')
@section('Tools')
class="active"
@stop
@section('tools-bar')
active
@stop
@section('tools')
class="active"
@stop
<!-- content -->
@section('content')
<!-- open a form -->
{!! Form::model($canned, ['url' => 'canned/update/'.$canned->id,'method' => 'PATCH'] )!!}
<!-- <section class="content"> -->
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">{!! Lang::get('lang.edit') !!}</h3>{!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}
</div>
<div class="box-body">
<div class="row">
<!-- username -->
<div class="col-xs-6 form-group {{ $errors->has('title') ? 'has-error' : '' }}">
{!! Form::label('title',Lang::get('lang.title')) !!}
{!! $errors->first('title', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('title',null,['class' => 'form-control']) !!}
</div>
<!-- firstname -->
<div class="col-xs-12 form-group {{ $errors->has('message') ? 'has-error' : '' }}">
{!! Form::label('message',Lang::get('lang.message')) !!}
{!! $errors->first('message', '<spam class="help-block">:message</spam>') !!}
{!! Form::textarea('message',null,['class' => 'form-control']) !!}
</div>
</div>
<script>
$(function () {
//Add text editor
$("textarea").wysihtml5();
});
</script>
@stop

View File

@@ -0,0 +1,106 @@
@extends('themes.default1.agent.layout.agent')
@section('Tools')
class="active"
@stop
@section('tools-bar')
active
@stop
@section('tools')
class="active"
@stop
<!-- content -->
@section('content')
<div class="box box-primary">
<div class="box-header with-border">
<h2 class="box-title">{!! Lang::get('lang.canned_response') !!}</h2><a href="{{route('canned.create')}}" class="btn btn-primary pull-right">{!! Lang::get('lang.create_canned_response') !!}</a></div>
<div class="box-body table-responsive">
<?php
$Canneds = App\Model\helpdesk\Agent_panel\Canned::where('user_id', '=', Auth::user()->id)->paginate(20);
?>
<!-- check whether success or not -->
{{-- Success message --}}
@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
<!-- Agent table -->
<table class="table table-bordered table-hover" id="example1" >
<tr>
<th width="100px">{{Lang::get('lang.name')}}</th>
<th width="100px">{{Lang::get('lang.action')}}</th>
</tr>
@foreach($Canneds as $Canned)
<tr>
<td>{{$Canned->title }}</td>
<td>
{!! Form::open(['route'=>['canned.destroy', $Canned->id],'method'=>'DELETE']) !!}
<a data-toggle="modal" data-target="#view{!! $Canned->id !!}" href="#" class="btn btn-info btn-xs btn-flat">{!! Lang::get('lang.view') !!}</a>
<a href="{!! URL::route('canned.edit',$Canned->id) !!}" class="btn btn-primary btn-xs btn-flat">{!! Lang::get('lang.edit') !!}</a>
{!! 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>
<!-- Surrender Modal -->
<div class="modal fade" id="view{!! $Canned->id !!}">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">{!! Lang::get('lang.surrender') !!}</h4>
</div>
<div class="modal-body">
<p><pre>{!! $Canned->message !!}</pre></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>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
@endforeach
</table>
</div>
</div>
<script>
$(function () {
$("#example1").DataTable();
$('#example2').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": true
});
});
</script>
@stop
<!-- /content -->

View File

@@ -0,0 +1,30 @@
@extends('themes.default1.agent.layout.agent')
@section('Tools')
class="active"
@stop
@section('tools-bar')
active
@stop
@section('tools')
class="active"
@stop
<!-- content -->
@section('content')
<!-- <section class="content"> -->
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">hi</h3>
</div>
<div class="box-body">
<pre>hello</pre>
</div>
@stop
<!-- /content -->

View File

@@ -0,0 +1,192 @@
@extends('themes.default1.agent.layout.agent')
@section('Dashboard')
class="active"
@stop
@section('dashboard-bar')
active
@stop
@section('dashboard')
class="active"
@stop
@section('content')
<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">
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
<button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</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>
</div>
</div><!-- /.box-body -->
</div><!-- /.box -->
<hr/>
<div class="box">
<div class="box-header">
<h1>{!! Lang::get('lang.statistics') !!}</h1>
</div>
<div class="box-body">
<table class="table table-hover" style="overflow:hidden;">
<tr>
<th>{!! Lang::get('lang.department') !!}</th>
<th>{!! Lang::get('lang.opened') !!}</th>
<th>{!! Lang::get('lang.resolved') !!}</th>
<th>{!! Lang::get('lang.closed') !!}</th>
<th>{!! Lang::get('lang.deleted') !!}</th>
</tr>
<?php $departments = App\Model\helpdesk\Agent\Department::all(); ?>
@foreach($departments as $department)
<?php
$open = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id)->where('status','=',1)->count();
$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>
<td>{!! $department->name !!}</td>
<td>{!! $open !!}</td>
<td>{!! $resolve !!}</td>
<td>{!! $close !!}</td>
<td>{!! $delete !!}</td>
</tr>
@endforeach
</table>
</div>
</div>
<script src="{{asset("lb-faveo/plugins/chartjs/Chart.min.js")}}" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
$.getJSON("agen", function (result) {
var labels=[], open=[], closed=[], reopened=[];
//,data2=[],data3=[],data4=[];
for (var i = 0; i < result.length; i++) {
// $var12 = result[i].day;
// labels.push($var12);
labels.push(result[i].date);
open.push(result[i].open);
closed.push(result[i].closed);
reopened.push(result[i].reopened);
// data4.push(result[i].open);
}
var buyerData = {
labels : labels,
datasets : [
{
label : "Total Tickets" ,
fillColor : "rgba(240, 127, 110, 0.3)",
strokeColor : "#f56954",
pointColor : "#A62121",
pointStrokeColor : "#E60073",
pointHighlightFill : "#FF4DC3",
pointHighlightStroke : "rgba(151,187,205,1)",
data : open
}
,{
label : "Open Tickets" ,
fillColor : "rgba(255, 102, 204, 0.4)",
strokeColor : "#f56954",
pointColor : "#FF66CC",
pointStrokeColor : "#fff",
pointHighlightFill : "#FF4DC3",
pointHighlightStroke : "rgba(151,187,205,1)",
data : closed
}
,{
label : "Closed Tickets",
fillColor : "rgba(151,187,205,0.2)",
strokeColor : "rgba(151,187,205,1)",
pointColor : "rgba(151,187,205,1)",
pointStrokeColor : "#0000CC",
pointHighlightFill : "#0000E6",
pointHighlightStroke : "rgba(151,187,205,1)",
data : reopened
}
// ,{
// label : "Reopened Tickets",
// fillColor : "rgba(102,255,51,0.2)",
// strokeColor : "rgba(151,187,205,1)",
// pointColor : "rgba(46,184,0,1)",
// pointStrokeColor : "#fff",
// pointHighlightFill : "#fff",
// pointHighlightStroke : "rgba(151,187,205,1)",
// data : data3
// }
]
};
var myLineChart = new Chart(document.getElementById("tickets-graph").getContext("2d")).Line(buyerData, {
showScale: true,
//Boolean - Whether grid lines are shown across the chart
scaleShowGridLines: false,
//String - Colour of the grid lines
scaleGridLineColor: "rgba(0,0,0,.05)",
//Number - Width of the grid lines
scaleGridLineWidth: 1,
//Boolean - Whether to show horizontal lines (except X axis)
scaleShowHorizontalLines: true,
//Boolean - Whether to show vertical lines (except Y axis)
scaleShowVerticalLines: true,
//Boolean - Whether the line is curved between points
bezierCurve: false,
//Number - Tension of the bezier curve between points
bezierCurveTension: 0.3,
//Boolean - Whether to show a dot for each point
pointDot: true,
//Number - Radius of each point dot in pixels
pointDotRadius: 4,
//Number - Pixel width of point dot stroke
pointDotStrokeWidth: 1,
//Number - amount extra to add to the radius to cater for hit detection outside the drawn point
pointHitDetectionRadius: 20,
//Boolean - Whether to show a stroke for datasets
datasetStroke: true,
//Number - Pixel width of dataset stroke
datasetStrokeWidth: 1,
//Boolean - Whether to fill the dataset with a color
datasetFill: true,
//String - A legend template
//Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
maintainAspectRatio: false,
//Boolean - whether to make the chart responsive to window resizing
responsive: true,
legendTemplate : '<ul style="list-style-type: square;">'
+'<% for (var i=0; i<datasets.length; i++) { %>'
+'<li style="color: <%=datasets[i].pointColor%>;">'
+'<span style=\"background-color:<%=datasets[i].pointColor%>\"></span>'
+'<% if (datasets[i].label) { %><%= datasets[i].label %><% } %>'
+'</li>'
+'<% } %>'
+'</ul>'
});
document.getElementById("legendDiv").innerHTML = myLineChart.generateLegend();
});
});
</script>
@stop

View File

@@ -0,0 +1,235 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('inbox')
class="active"
@stop
@section('content')
<?php
$dept = App\Model\helpdesk\Agent\Department::where('name','=',$id)->first();
if(Auth::user()->role == 'agent') {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','2')->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','2')->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Inbox </h3> <small>{!! $tickets->total() !!} tickets</small>
</div><!-- /.box-header -->
@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-body no-padding ">
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
<div class="mailbox-controls">
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"> {!! $tickets->count().'-'.$tickets->total(); !!}</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="Delete">
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="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>Loading...</b></p>
<!-- table -->
<table class="table table-hover table-striped">
<thead>
<th>
</th>
<th>Subject</th>
<th>Ticket ID</th>
<th>Priority</th>
<th>From</th>
<th>Last Replier</th>
<th>Assigned To</th>
<th>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><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->
</div><!-- /. box -->
<script>
$(function () {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
});
});
$(function() {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click').click(function() {
$('#refresh').load('open #refresh');
$("#show").show();
});
});
// check box get data
// jQuery(function($) {
// $("form input[id='check_all']").click(function() { // triggred check
// var inputs = $("form input[type='checkbox']"); // get the checkbox
// for(var i = 0; i < inputs.length; i++) { // count input tag in the form
// var type = inputs[i].getAttribute("type"); // get the type attribute
// if(type == "checkbox") {
// if(this.checked) {
// inputs[i].checked = true; // checked
// } else {
// inputs[i].checked = false; // unchecked
// }
// }
// }
// });
// $("form input[id='submit']").click(function() { // triggred submit
// var count_checked = $("[name='data[]']:checked").length; // count the checked
// if(count_checked == 0) {
// alert("Please select a product(s) to delete.");
// return false;
// }
// if(count_checked == 1) {
// return confirm("Are you sure you want to delete these product?");
// } else {
// return confirm("Are you sure you want to delete these products?");
// }
// });
// }); // jquery end
</script>
@stop

View File

@@ -0,0 +1,235 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('inbox')
class="active"
@stop
@section('content')
<?php
$dept = App\Model\helpdesk\Agent\Department::where('name','=',$id)->first();
if(Auth::user()->role == 'agent') {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','1')->where('assigned_to','>', 0)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','1')->where('assigned_to','>', 0)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Inbox </h3> <small>{!! $tickets->total() !!} tickets</small>
</div><!-- /.box-header -->
@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-body no-padding ">
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
<div class="mailbox-controls">
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"> {!! $tickets->count().'-'.$tickets->total(); !!}</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="Delete">
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="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>Loading...</b></p>
<!-- table -->
<table class="table table-hover table-striped">
<thead>
<th>
</th>
<th>Subject</th>
<th>Ticket ID</th>
<th>Priority</th>
<th>From</th>
<th>Last Replier</th>
<th>Assigned To</th>
<th>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><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->
</div><!-- /. box -->
<script>
$(function () {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
});
});
$(function() {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click').click(function() {
$('#refresh').load('open #refresh');
$("#show").show();
});
});
// check box get data
// jQuery(function($) {
// $("form input[id='check_all']").click(function() { // triggred check
// var inputs = $("form input[type='checkbox']"); // get the checkbox
// for(var i = 0; i < inputs.length; i++) { // count input tag in the form
// var type = inputs[i].getAttribute("type"); // get the type attribute
// if(type == "checkbox") {
// if(this.checked) {
// inputs[i].checked = true; // checked
// } else {
// inputs[i].checked = false; // unchecked
// }
// }
// }
// });
// $("form input[id='submit']").click(function() { // triggred submit
// var count_checked = $("[name='data[]']:checked").length; // count the checked
// if(count_checked == 0) {
// alert("Please select a product(s) to delete.");
// return false;
// }
// if(count_checked == 1) {
// return confirm("Are you sure you want to delete these product?");
// } else {
// return confirm("Are you sure you want to delete these products?");
// }
// });
// }); // jquery end
</script>
@stop

View File

@@ -0,0 +1,234 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('inbox')
class="active"
@stop
@section('content')
<?php
$dept = App\Model\helpdesk\Agent\Department::where('name','=',$id)->first();
if(Auth::user()->role == 'agent') {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','1')->where('assigned_to','=', 0)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','1')->where('assigned_to','=', 0)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Inbox </h3> <small>{!! $tickets->total() !!} tickets</small>
</div><!-- /.box-header -->
@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-body no-padding ">
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
<div class="mailbox-controls">
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"> {!! $tickets->count().'-'.$tickets->total(); !!}</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="Delete">
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="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>Loading...</b></p>
<!-- table -->
<table class="table table-hover table-striped">
<thead>
<th>
</th>
<th>Subject</th>
<th>Ticket ID</th>
<th>Priority</th>
<th>From</th>
<th>Last Replier</th>
<th>Assigned To</th>
<th>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><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->
</div><!-- /. box -->
<script>
$(function () {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
});
});
$(function() {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click').click(function() {
$('#refresh').load('open #refresh');
$("#show").show();
});
});
// check box get data
// jQuery(function($) {
// $("form input[id='check_all']").click(function() { // triggred check
// var inputs = $("form input[type='checkbox']"); // get the checkbox
// for(var i = 0; i < inputs.length; i++) { // count input tag in the form
// var type = inputs[i].getAttribute("type"); // get the type attribute
// if(type == "checkbox") {
// if(this.checked) {
// inputs[i].checked = true; // checked
// } else {
// inputs[i].checked = false; // unchecked
// }
// }
// }
// });
// $("form input[id='submit']").click(function() { // triggred submit
// var count_checked = $("[name='data[]']:checked").length; // count the checked
// if(count_checked == 0) {
// alert("Please select a product(s) to delete.");
// return false;
// }
// if(count_checked == 1) {
// return confirm("Are you sure you want to delete these product?");
// } else {
// return confirm("Are you sure you want to delete these products?");
// }
// });
// }); // jquery end
</script>
@stop

View File

@@ -0,0 +1,98 @@
@extends('themes.default1.agent.layout.agent')
@section('Users')
class="active"
@stop
@section('user-bar')
active
@stop
@section('organizations')
class="active"
@stop
@section('HeadInclude')
@stop
<!-- header -->
@section('PageHeader')
@stop
<!-- /header -->
<!-- breadcrumbs -->
@section('breadcrumbs')
<ol class="breadcrumb">
</ol>
@stop
<!-- /breadcrumbs -->
<!-- content -->
@section('content')
<!-- open a form -->
{!! Form::open(['action'=>'Agent\helpdesk\OrganizationController@store','method'=>'post']) !!}
<div class="box box-primary">
<div class="content-header">
<h4>{{Lang::get('lang.create')}} {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
</div>
<div class="box-body">
<!-- name : text : Required -->
<div class="row">
<div class="col-xs-4 form-group {{ $errors->has('name') ? 'has-error' : '' }}">
{!! Form::label('name',Lang::get('lang.name')) !!}
{!! $errors->first('name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('name',null,['class' => 'form-control']) !!}
</div>
<!-- phone : Text : -->
<div class="col-xs-4 form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
{!! Form::label('phone',Lang::get('lang.phone')) !!}
{!! $errors->first('phone', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('phone',null,['class' => 'form-control']) !!}
</div>
<!-- website : Text : -->
<div class="col-xs-4 form-group {{ $errors->has('website') ? 'has-error' : '' }}">
{!! Form::label('website',Lang::get('lang.website')) !!}
{!! $errors->first('website', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('website',null,['class' => 'form-control']) !!}
</div>
</div>
<!-- Internal Notes : Textarea -->
<div class="row">
<div class="col-xs-6 form-group">
{!! Form::label('address',Lang::get('lang.address')) !!}
{!! Form::textarea('address',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-6 form-group">
{!! Form::label('internal_notes',Lang::get('lang.internal_notes')) !!}
{!! Form::textarea('internal_notes',null,['class' => 'form-control']) !!}
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$("textarea").wysihtml5();
});
</script>
@section('FooterInclude')
@stop
@stop
<!-- /content -->
@stop
@section('FooterInclude')
@stop
<!-- /content -->

View File

@@ -0,0 +1,91 @@
@extends('themes.default1.agent.layout.agent')
@section('Users')
class="active"
@stop
@section('user-bar')
active
@stop
@section('organizations')
class="active"
@stop
@section('HeadInclude')
@stop
<!-- header -->
@section('PageHeader')
@stop
<!-- /header -->
<!-- breadcrumbs -->
@section('breadcrumbs')
<ol class="breadcrumb">
</ol>
@stop
<!-- /breadcrumbs -->
<!-- content -->
@section('content')
<!-- open a form -->
{!! Form::model($orgs,['url'=>'organizations/'.$orgs->id,'method'=>'PATCH']) !!}
<div class="box box-primary">
<div class="content-header">
<h4>{{Lang::get('lang.edit')}} {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
</div>
<div class="box-body">
<!-- name : text : Required -->
<div class="row">
<div class="col-xs-4 form-group {{ $errors->has('name') ? 'has-error' : '' }}">
{!! Form::label('name',Lang::get('lang.name')) !!}
{!! $errors->first('name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('name',null,['class' => 'form-control']) !!}
</div>
<!-- phone : Text : -->
<div class="col-xs-4 form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
{!! Form::label('phone',Lang::get('lang.phone')) !!}
{!! $errors->first('phone', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('phone',null,['class' => 'form-control']) !!}
</div>
<!--website : Text : -->
<div class="col-xs-4 form-group {{ $errors->has('website') ? 'has-error' : '' }}">
{!! Form::label('website',Lang::get('lang.website')) !!}
{!! $errors->first('website', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('website',null,['class' => 'form-control']) !!}
</div>
</div>
<!-- Internal Notes : Textarea -->
<div class="row">
<div class="col-xs-6 form-group">
{!! Form::label('address',Lang::get('lang.address')) !!}
{!! Form::textarea('address',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-6 form-group">
{!! Form::label('internal_notes',Lang::get('lang.internal_notes')) !!}
{!! Form::textarea('internal_notes',null,['class' => 'form-control']) !!}
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$("textarea").wysihtml5();
});
</script>
@section('FooterInclude')
@stop
@stop
<!-- /content -->
@stop
@section('FooterInclude')
@stop
<!-- /content -->

View File

@@ -0,0 +1,69 @@
@extends('themes.default1.agent.layout.agent')
@section('Users')
class="active"
@stop
@section('user-bar')
active
@stop
@section('organizations')
class="active"
@stop
<!-- content -->
@section('content')
<div class="box box-primary">
<div class="box-header">
<h2 class="box-title">{{Lang::get('lang.organization')}}</h2><a href="{{route('organizations.create')}}" class="btn btn-primary pull-right">{{Lang::get('lang.create_organization')}}</a></div>
<div class="box-body table-responsive">
<!-- 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
<?php
$orgs = App\Model\helpdesk\Agent_panel\Organization::orderBy('id', 'ASC')->paginate(20);
?>
<table class="table table-hover" style="overflow:hidden;">
<div class="row">
{!! Datatable::table()
->addColumn(Lang::get('lang.name'),
Lang::get('lang.website'),
Lang::get('lang.phone'),
Lang::get('lang.action')) // these are the column headings to be shown
->setUrl(route('org.list')) // this is the route where data will be retrieved
->render() !!}
</div>
</table>
</div>
</div>
@section('FooterInclude')
@stop
@stop
<!-- /content -->
@stop
@section('FooterInclude')
@stop
<!-- /content -->

View File

@@ -0,0 +1,226 @@
@extends('themes.default1.agent.layout.agent')
@section('Users')
class="active"
@stop
@section('user-bar')
active
@stop
@section('organizations')
class="active"
@stop
@section('HeadInclude')
@stop
<!-- header -->
@section('PageHeader')
{{-- <div><h1 style="margin-top:-10px;margin-bottom:-10px;">Organization Profile</h1></div>
<a href="{{route('organizations.edit', $orgs->id)}}" class="btn btn-info btn-xs btn-flat"><i class="fa fa-edit" style="color:black;"> </i> Edit</a>
--}}
<div class="box-header" style="margin-top:-15px;margin-bottom:-15px;"><h3 class="box-title">{!! Lang::get('lang.organization_profile') !!}</h3><a href="{{route('organizations.edit', $orgs->id)}}" class="btn btn-info btn-sm btn-flat pull-right"><i class="fa fa-edit" style="color:black;"> </i> {!! Lang::get('lang.edit') !!}</a></div>
@stop
<!-- /header -->
<!-- breadcrumbs -->
@section('breadcrumbs')
<ol class="breadcrumb">
</ol>
@stop
<!-- /breadcrumbs -->
<!-- content -->
@section('content')
<div class="row">
<?php $org_hd = App\Model\helpdesk\Agent_panel\Organization::where('id','=',$orgs->id)->first(); ?>
<div id="alert-success" class="alert alert-success alert-dismissable" style="display:none;">
<i class="fa fa-check-circle"> </i> <b> Success <span id="get-success"></span></b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
</div>
<div class="col-md-4">
<div class="box box-widget widget-user">
<!-- Add the bg color to the header using any of the bg-* classes -->
<div class="widget-user-header bg-aqua">
<h3 class="widget-user-username">{{$orgs->name}}</h3>
<h5 class="widget-user-desc">{!! $orgs->website !!}</h5>
</div>
<div class="box-footer no-padding">
<ul class="nav nav-stacked">
@if($orgs->phone)<li><a>
<b>{!! Lang::get('lang.phone') !!}</b>
<span class="pull-right"> {{$orgs->phone}}</span></a></li>@endif
@if($orgs->address)<li><a>
<b>{!! Lang::get('lang.address') !!}</b>
<br/> <center>{!! $orgs->address !!}</center></a></li>@endif
@if($orgs->internal_notes)<li><a>
<b>{!! Lang::get('lang.internal_notes') !!}</b>
<br/> <center>{!! $orgs->internal_notes !!}</center></a></li>@endif
</ul>
<button data-toggle="modal" data-target="#assign_head" id="button_select" class="btn btn-primary btn-flat btn-block">{!! Lang::get('lang.select_department_manager') !!}</button>
</div>
</div>
<div id="refresh">
@if($org_hd->head > 0)
<?php $users = App\User::where('id','=',$org_hd->head)->first(); ?>
<div class="box box-widget widget-user-2">
<!-- Add the bg color to the header using any of the bg-* classes -->
<div class="widget-user-header bg-yellow">
<div class="widget-user-image">
<img class="img-circle" src="{{ Gravatar::src( $users->email) }}" alt="User Avatar">
</div><!-- /.widget-user-image -->
<h3 class="widget-user-username">{!! $users->user_name !!}</h3>
<h5 class="widget-user-desc">{!! Lang::get('lang.organization-s_head') !!}</h5>
</div>
<div class="box-footer no-padding">
<ul class="nav nav-stacked">
<li><a href="#">{!! Lang::get('lang.e-mail') !!} <span class="pull-right">{!! $users->email !!}</span></a></li>
<li><a href="#">{!! Lang::get('lang.phone') !!} <span class="pull-right">{!! $users->phone_number !!}</span></a></li>
</ul>
</div>
</div>
@endif
</div>
</div>
<div class="col-md-8">
<div class="box box-primary">
<?php
$user_orgs = App\Model\helpdesk\Agent_panel\User_org::where('org_id','=',$orgs->id)->paginate(5);
?>
<div class="box-header">
<h3 class="box-title">{!! Lang::get('lang.users_of') !!} {{$orgs->name}}</h3>
<div class="pull-right" style="margin-top:-25px;margin-bottom:-25px;">
<?php echo $user_orgs->setPath('../organizations/'.$orgs->id)->render(); ?>
</div>
</div>
<hr style="margin-top:0px;margin:bottom:0px;">
<div class="box-body">
<table class="table table-hover table-bordered">
<tbody><tr>
<th>{!! Lang::get('lang.name') !!}</th>
<th>{!! Lang::get('lang.email') !!}</th>
<th>{!! Lang::get('lang.phone') !!}</th>
<th>{!! Lang::get('lang.status') !!}</th>
<th>{!! Lang::get('lang.ban') !!}</th>
</tr>
@foreach($user_orgs as $user_org)
<?php
$user_detail = App\User::where('id','=',$user_org->user_id)->first();
?>
<tr>
<td>{!! $user_detail->user_name !!}</td>
<td>{!! $user_detail->email !!}</td>
<td>{!! $user_detail->phone_number !!}</td>
@if($user_detail->active == 1)
<td><span class="label label-success">{!! Lang::get('lang.active') !!}</span></td>
@elseif($user_detail->active == 0)
<td><span class="label label-warning">{!! Lang::get('lang.inactive') !!}</span></td>
@endif
<td>{!! $user_detail->ban !!}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="box-footer">
</div>
</div>
</div>
</div>
<!-- Organisation Assign Modal -->
<div class="modal fade" id="assign_head">
<div class="modal-dialog">
<div class="modal-content">
{!! Form::model($orgs->id, ['id'=>'org_head','method' => 'PATCH'] )!!}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" id="dismiss" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">{!! Lang::get('lang.assign') !!}</h4>
</div>
<div id="assign_alert" class="alert alert-success alert-dismissable" style="display:none;">
<button id="assign_dismiss" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-check"></i>Alert!</h4>
<div id="message-success1"></div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-4">
</div>
<div class="col-md-6" id="assign_loader" style="display:none;">
<img src="{{asset("lb-faveo/dist/img/gifloader.gif")}}"><br/><br/><br/>
</div>
</div>
<div id="assign_body">
<p>{!! Lang::get('lang.please_select_an_user') !!}</p>
<select id="user" class="form-control" name="user">
<?php
$org_heads = App\Model\helpdesk\Agent_panel\User_org::where('org_id','=',$orgs->id)->get();
?>
<optgroup label="Select Organizations">
@foreach($org_heads as $org_head)
<?php $user_org_heads = App\User::where('id','=',$org_head->user_id)->first(); ?>
<option value="{{$user_org_heads->id}}">{!! $user_org_heads->user_name !!}</option>
@endforeach
</optgroup>
</select>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis4">{!! Lang::get('lang.close') !!}</button>
<button type="submit" class="btn btn-success pull-right" id="submt2">{!! Lang::get('lang.assign') !!}</button>
</div>
{!! Form::close()!!}
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script type="text/javascript">
// Assign a ticket
jQuery(document).ready(function($) {
// create org
$('#org_head').on('submit', function() {
$.ajax({
type: "POST",
url: "../head-org/{!! $orgs->id !!}",
dataType: "html",
data: $(this).serialize(),
beforeSend: function() {
$("#assign_body").hide();
$("#assign_loader").show();
},
success: function(response) {
$("#assign_loader").hide();
$("#assign_body").show();
if (response == 1) {
message = "Organization head added Successfully."
$("#dismiss").trigger("click");
$("#refresh").load("../organizations/{!! $orgs->id !!} #refresh");
// $("#refresh2").load("../thread/1 #refresh2");
// $("#show").show();
$("#alert-success").show();
$('#get-success').html(message);
setInterval(function(){$("#alert-success").hide(); },4000);
}
}
})
return false;
});
});
</script>
@stop
<!-- /content -->

View File

@@ -0,0 +1,213 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('answered')
class="active"
@stop
@section('content')
<?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('status', '=', 1)->where('isanswered', '=', 1)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 1)->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.answered') !!} </h3> <small id="title_refresh">{!! $tickets->total() !!} {!! Lang::get('lang.tickets') !!}</small>
<div class="box-tools pull-right">
<div class="has-feedback">
</div>
</div>
</div><!-- /.box-header -->
@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-body no-padding ">
{!! 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">
<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();
$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 -->
</div><!-- /. box -->
<script>
$(function () {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
});
});
$(function() {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click').click(function() {
$('#refresh').load('answered #refresh');
$('#title_refresh').load('answered #title_refresh');
$('#count_refresh').load('answered #count_refresh');
$("#show").show();
});
});
</script>
@stop

View File

@@ -0,0 +1,235 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('assigned')
class="active"
@stop
@section('content')
<?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('status', '=', 1)->where('assigned_to', '>', 0)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('assigned_to', '>', 0)->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title"> {!! Lang::get('lang.assigned') !!} </h3> <small id="title_refresh"> {!! $tickets->total() !!} {!! Lang::get('lang.tickets') !!}</small>
</div><!-- /.box-header -->
@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-body no-padding ">
{!! 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">
<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>
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->
</div><!-- /. box -->
<script>
$(function () {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
});
});
$(function() {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click').click(function() {
$('#refresh').load('assigned #refresh');
$('#title_refresh').load('assigned #title_refresh');
$('#count_refresh').load('assigned #count_refresh');
$("#show").show();
});
});
// check box get data
// jQuery(function($) {
// $("form input[id='check_all']").click(function() { // triggred check
// var inputs = $("form input[type='checkbox']"); // get the checkbox
// for(var i = 0; i < inputs.length; i++) { // count input tag in the form
// var type = inputs[i].getAttribute("type"); // get the type attribute
// if(type == "checkbox") {
// if(this.checked) {
// inputs[i].checked = true; // checked
// } else {
// inputs[i].checked = false; // unchecked
// }
// }
// }
// });
// $("form input[id='submit']").click(function() { // triggred submit
// var count_checked = $("[name='data[]']:checked").length; // count the checked
// if(count_checked == 0) {
// alert("Please select a product(s) to delete.");
// return false;
// }
// if(count_checked == 1) {
// return confirm("Are you sure you want to delete these product?");
// } else {
// return confirm("Are you sure you want to delete these products?");
// }
// });
// }); // jquery end
</script>
@stop

View File

@@ -0,0 +1,192 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('closed')
class="active"
@stop
@section('content')
<?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('status', '>', 1)->where('dept_id','=',$dept->id)->where('status', '<', 4)->orderBy('id', 'DESC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '>', 1)->where('status', '<', 4)->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title"> {!! Lang::get('lang.closed') !!} </h3> <small id="title_refresh">{!! $tickets->total() !!} {!! Lang::get('lang.tickets') !!}</small>
</div><!-- /.box-header -->
@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-body no-padding ">
{!! 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-blue btn-sm" name="submit" value="{!! Lang::get('lang.open') !!}">
</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 )
<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);
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 -->
</div><!-- /. box -->
<script>
$(function () {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
});
});
$(function() {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click').click(function() {
$('#refresh').load('closed #refresh');
$('#title_refresh').load('closed #title_refresh');
$('#count_refresh').load('closed #count_refresh');
$("#show").show();
});
});
</script>
@stop

View File

@@ -0,0 +1,193 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('inbox')
class="active"
@stop
@section('content')
<?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('status', '=', 1)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.inbox') !!} </h3> <small id="title_refresh">{!! $tickets->total() !!} {!! Lang::get('lang.tickets') !!}</small>
</div><!-- /.box-header -->
@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-body no-padding ">
{!! 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">
<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><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->
</div><!-- /. box -->
<script>
$(function () {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
});
});
$(function() {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click').click(function() {
$('#refresh').load('inbox #refresh');
$('#title_refresh').load('inbox #title_refresh');
$('#count_refresh').load('inbox #count_refresh');
$("#show").show();
});
});
</script>
@stop

View File

@@ -0,0 +1,190 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('myticket')
class="active"
@stop
@section('content')
<?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('status', '=', 1)->where('assigned_to', '=', Auth::user()->id)->orderBy('id', 'ASC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('assigned_to', '=', Auth::user()->id)->orderBy('id', 'ASC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.my_tickets') !!}</h3> <small id="title_refresh">{!! $tickets->total() !!} {!! Lang::get('lang.tickets') !!}</small>
</div><!-- /.box-header -->
@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-body no-padding ">
{!! 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">
<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);
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 -->
</div><!-- /. box -->
<script>
$(function () {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
});
});
$(function() {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click').click(function() {
$('#refresh').load('myticket #refresh');
$('#title_refresh').load('myticket #title_refresh');
$('#count_refresh').load('myticket #count_refresh');
$("#show").show();
});
});
</script>
@stop

View File

@@ -0,0 +1,218 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('newticket')
class="active"
@stop
@section('content')
<!-- Main content -->
{!! Form::open(['route'=>'post.newticket','method'=>'post']) !!}
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.create_ticket') !!}</h3>
<!-- <div class="box-tools pull-right">
<div class="has-feedback">
<input type="text" class="form-control input-sm" placeholder="Search Mail"/>
<span class="glyphicon glyphicon-search form-control-feedback"></span>
</div>
</div> --><!-- /.box-tools -->
</div><!-- /.box-header -->
<div class="box-body">
<!-- user detail -->
@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="form-group">
<h4><b>{!! Lang::get('lang.user_details') !!}:<b></h4>
{{-- <div class="row"> --}}
{{-- <div class="col-md-6"> --}}
{{-- <div class="has-feedback"> --}}
{{-- <input type="text" class="form-control input-ls" placeholder="Search Users"/> --}}
{{-- <span class="glyphicon glyphicon-search form-control-feedback"></span> --}}
{{-- </div> --}}
{{-- <input type="text" name="email" id="" class="form-control" placeholder="Search User"> --}}
{{-- </div> --}}
{{-- </div> --}}
<br/>
<div class="row">
<div class="col-md-4">
<!-- email -->
<div class="form-group">
<label>{!! Lang::get('lang.email') !!}:</label>
<input type="text" name="email" id="" class="form-control">
{!! $errors->first('email', '<spam class="help-block text-red">:message</spam>') !!}
</div>
</div>
<div class="col-md-4">
<!-- full name -->
<div class="form-group">
<label>{!! Lang::get('lang.full_name') !!}:</label>
<input type="text" name="fullname" id="" class="form-control">
{!! $errors->first('fullname', '<spam class="help-block text-red">:message</spam>') !!}
</div>
</div>
<div class="col-md-4">
<!-- phone -->
<div class="form-group">
<label>{!! Lang::get('lang.phone') !!}:</label>
<input type="number" name="phone" id="" class="form-control">
{!! $errors->first('phone', '<spam class="help-block text-red">:message</spam>') !!}
</div>
</div>
<!-- <div class="form-group">
<div class="col-md-2">
<label>Ticket Notice:</label>
</div>
<div class="col-md-6">
<input type="checkbox" name="notice" id=""> Send alert to User
</div>
</div> -->
</div>
</div>
<!-- ticket options -->
<div class="form-group">
<h4><b>{!! Lang::get('lang.ticket_option') !!}<b></h4>
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label>{!! Lang::get('lang.help_topic') !!}:</label>
<!-- helptopic -->
<select class="form-control" name="helptopic">
<!-- <option>--select--</option> -->
<?php $helptopic = App\Model\helpdesk\Manage\Help_topic::all();?>
@foreach($helptopic as $topic)
<option value="{!! $topic->id !!}">{!! $topic->topic !!}</option>
@endforeach
</select>
{!! $errors->first('helptopic', '<spam class="help-block text-red">:message</spam>') !!}
</div>
</div>
<div class="col-md-3">
<!-- sla plan -->
<div class="form-group">
<label>{!! Lang::get('lang.sla_plan') !!}:</label>
<select class="form-control" name="sla">
<!-- <option>--select--</option> -->
<?php $sla_plan = App\Model\helpdesk\Manage\Sla_plan::all();?>
@foreach($sla_plan as $sla)
<option value="{!! $sla->id !!}">{!! $sla->grace_period !!}</option>
@endforeach
</select>
{!! $errors->first('sla', '<spam class="help-block text-red">:message</spam>') !!}
</div>
</div>
<div class="col-md-3">
<!-- due date -->
<div class="form-group">
<label>{!! Lang::get('lang.due_date') !!}:</label>
<input type="text" class="form-control" name="duedate" id="datemask">
</div>
</div>
<div class="col-md-3">
<!-- assign to -->
<div class="form-group">
<label>{!! Lang::get('lang.assign_to') !!}:</label>
<select class="form-control" name="assignto">
<!-- <option>--select--</option> -->
<?php $agents = App\User::where('role','!=','user')->get();?>
<option value="">--- select ---</option>
@foreach($agents as $agent)
<option value="{!! $agent->id !!}">
{!! $agent->first_name !!} {!! $agent->last_name !!}
</option>
@endforeach
</select>
</div>
</div>
</div>
</div>
<!-- ticket details -->
<div class="form-group">
<h4><b>{!! Lang::get('lang.ticket_detail') !!}<b></h4>
<!-- subject -->
<div class="form-group">
<div class="row">
<div class="col-md-1">
<label>{!! Lang::get('lang.subject') !!}:</label>
</div>
<div class="col-md-4">
<input type="text" name="subject" class="form-control">
{!! $errors->first('subject', '<spam class="help-block text-red">:message</spam>') !!}
</div>
</div>
</div>
<div class="form-group">
<!-- details -->
<div class="row">
<div class="col-md-1">
<label>{!! Lang::get('lang.detail') !!}:</label>
</div>
<div class="col-md-9">
<textarea class="form-control" id="body" name="body" style="width:100%; height:100px;"></textarea>
{!! $errors->first('body', '<spam class="help-block text-red">:message</spam>') !!}
</div>
</div>
</div>
<div class="form-group">
<!-- priority -->
<div class="row">
<div class="col-md-1">
<label>{!! Lang::get('lang.priority') !!}:</label>
</div>
<div class="col-md-3">
<select class="form-control" name="priority">
<!-- <option>--select--</option> -->
<?php $Priority = App\Model\helpdesk\Ticket\Ticket_Priority::all();?>
@foreach($Priority as $priority)
<option value="{{$priority->priority_id}}">{!! $priority->priority_desc !!}</option>
@endforeach
</select>
{!! $errors->first('priority', '<spam class="help-block text-red">:message</spam>') !!}
</div>
</div>
</div>
</div>
<div class="box-footer">
<div class="form-group">
<div class="row">
<div class="col-md-1">
</div>
<div class="col-md-3">
<input type="submit" value="{!! Lang::get('lang.create_ticket') !!}" class="btn btn-primary">
</div>
</div>
</div>
</div>
</div><!-- /. box -->
{!! Form::close() !!}
<script type="text/javascript">
$(function() {
$('#datemask').datepicker({changeMonth: true, changeYear: true}).mask('99/99/9999');
});
</script>
@stop

View File

@@ -0,0 +1,221 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('open')
class="active"
@stop
@section('content')
<?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('status', '=', 1)->where('isanswered', '=', 0)->where('assigned_to', '=', 0)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 0)->where('assigned_to', '=', 0)->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.open') !!} </h3> <small id="title_refresh">{!! $tickets->total() !!} {!! Lang::get('lang.tickets') !!}</small>
<div class="box-tools pull-right">
<div class="has-feedback">
</div>
</div>
</div><!-- /.box-header -->
@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-body no-padding ">
{!! 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">
<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
$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 -->
</div><!-- /. box -->
<script>
$(function () {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
});
});
$(function() {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click').click(function() {
$('#refresh').load('open #refresh');
$('#title_refresh').load('open #title_refresh');
$('#count_refresh').load('open #count_refresh');
$("#show").show();
});
});
</script>
@stop

View File

@@ -0,0 +1,201 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('overdue')
class="active"
@stop
@section('content')
<?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('status', '=', 1)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Overdue </h3> <small>{!! $tickets->total() !!} tickets</small>
</div><!-- /.box-header -->
@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-body no-padding ">
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
<div class="mailbox-controls">
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"> {!! $tickets->count().'-'.$tickets->total(); !!}</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="Delete">
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="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>Subject</th>
<th>Ticket ID</th>
<th>Priority</th>
<th>From</th>
<th>Last Replier</th>
<th>Assigned To</th>
<th>Last Activity</th>
</thead>
<tbody id="hello">
@foreach ($tickets as $ticket )
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php }
$sla = $ticket->sla;
$SlaPlan = App\Model\helpdesk\Manage\Sla_plan::where('id', '=', $sla)->first();
$time = $ticket->created_at;
$time = date_create($time);
date_add($time, date_interval_create_from_date_string($SlaPlan->grace_period));
echo date_format($time, 'd/m/Y H:i:s');
?> >
<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('/ticket/overdue'))->render();?>&nbsp;
</div>
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->
</div><!-- /. box -->
<script>
$(function () {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
});
});
$(function() {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click').click(function() {
$('#refresh').load('open #refresh');
$("#show").show();
});
});
</script>
@stop

View File

@@ -0,0 +1,211 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<!-- <link href="{{asset("downloads/bootstrap.min.css")}}" rel="stylesheet" type="text/css" /> -->
<link href="{{asset("lb-faveo/dist/css/AdminLTE.min.css")}}" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>
<div class="logo"><b>Faveo</b>HELPDESK</div><hr>
</h2>
<h4>{{$thread->title}}</h4><br/>
<?php $ticket_source = App\Model\helpdesk\Ticket\Ticket_source::where('id','=',$tickets->source)->first();
$ticket_source = $ticket_source->value;
$user = App\User::where('id', '=', $tickets->user_id)->first(); ?>
<?php $response = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->get(); ?>
@foreach($response as $last)
<?php $ResponseDate = $last->created_at; ?>
@endforeach
<?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id', '=', $tickets->status)->first(); ?>
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first(); ?>
<?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); ?>
<?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); ?>
<?php $dept = App\Model\helpdesk\Agent\Department::where('id','=',$help_topic->department)->first(); ?>
<table class="table">
<tr><th></th><th></th></tr>
<tr><td><b>Status:</b></td> <td>{{$status->state}}</td></tr>
<tr><td><b>Priority:</b></td> <td>{{$priority->priority}}</td></tr>
<tr><td><b>Department:</b></td> <td>{{$dept->name}}</td></tr>
<tr><td><b>Email:</b></td> <td>{{$user->email}}</td></tr>
<tr><td><b>Phone:</b></td> <td>{{$user->mobile}}</td></tr>
<tr><td><b>Source:</b></td> <td>{{$ticket_source}}</td></tr>
<tr><td><b>Help Topic:</b></td> <td>{{$help_topic->topic}}</td></tr>
</table>
<?php $conversations = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->get(); ?>
@foreach($conversations as $conversation)
<br/><hr>
<span class="time-label">
<?php
$role = App\User::where('id','=',$conversation->user_id)->first();
?>
<?php if($conversation->is_internal) { ?>
<i class="fa fa-tag bg-purple" title="Posted by System"></i>
<?php }else{ if ($role->role == 'agent' || $role->role == 'admin') { ?>
<i class="fa fa-mail-reply-all bg-yellow" title="Posted by Support Team"></i>
<?php } elseif ($role->role == 'user') { ?>
<i class="fa fa-user bg-aqua" title="Posted by Customer"></i>
<?php } else { ?>
<i class="fa fa-mail-reply-all bg-purple" title="Posted by System"></i>
<?php } }
$attachment = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->first();
if($attachment == null ) {
$body = $conversation->body;
}
else {
// dd($attachment->file);
// print $attachment->file;
// header("Content-type: image/jpeg");
// echo "<img src='".base64_decode($attachment->file)."' style='width:128px;height:128px'/> ";
$body = $conversation->body;
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->orderBy('id', 'DESC')->get();
// $i = 0;
foreach($attachments as $attachment)
{
// $i++;
if($attachment->type == 'pdf')
{
// echo "hello";
}elseif($attachment->type == 'docx')
{
// echo "hello";
}
else
{
$image = @imagecreatefromstring($attachment->file);
ob_start();
imagejpeg($image, null, 80);
$data = ob_get_contents();
ob_end_clean();
$var = '<img width="20px" src="data:image/jpg;base64,' . base64_encode($data) . '" />';
// echo $var;
// echo $attachment->name;
// $body = explode($attachment->name, $body);
$body = str_replace($attachment->name, "data:image/jpg;base64," . base64_encode($data), $body);
$string = $body;
$start = "<head>";
$end = "</head>";
if(strpos($string,$start) == false || strpos($string,$start) == false)
{
}
else
{
$ini = strpos($string,$start);
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
$parsed = substr($string,$ini,$len);
$body2 = $parsed;
$body = str_replace($body2 ," " ,$body);
}
}
}
// echo $body;
// $body = explode($attachment->file, $body);
// $body = $body[0];
}
?>
<?php
$string = $body;
$start = "<head>";
$end = "</head>";
if(strpos($string,$start) == false || strpos($string,$start) == false)
{
}
else
{
$ini = strpos($string,$start);
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
$parsed = substr($string,$ini,$len);
$body2 = $parsed;
$body = str_replace($body2 ," " ,$body);
}
?>
<div class="timeline-item">
<span id="date" class="time" style="color:#fff;"><i class="fa fa-clock-o"> </i> {{date_format($conversation->created_at, 'd/m/Y H:i:s')}}</span>
<h3 class="timeline-header" style="background-color:<?php
if($conversation->is_internal)
{
$color = '#046380';
echo $color;
}
else
{
if ($role->role == 'agent' || $role->role == 'admin')
{
$color = '#FFD34E';
echo $color;
} elseif ($role->role == 'user')
{
$color = '#00A388';
echo $color;
} else
{
$color = '#046380';
echo $color;
}
}
?>;
">
<a href="#" style="color:#fff;"><?php if($role->role == "user") {echo $role->user_name; } else { echo $role->first_name . " " . $role->last_name; } ?> </a><strong>Date:</strong> {!! $thread->created_at !!}<br/></h3>
<div class="timeline-body" style="padding-left:30px;">
{!! $body !!}
</div>
<div class="timeline-footer" >
<?php
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->get();
$i = 0;
foreach($attachments as $attachment) {
if($attachment->poster == 'ATTACHMENT') {
$i++;
}
}
if($i>0)
{
echo "<hr style='height:1px;color:#2D3244;background-color:#2D3244;''><h4 class='box-title'><b>".$i." </b> Attachments</h4>";
}
?>
<ul class='mailbox-attachments clearfix'>
<?php
foreach($attachments as $attachment)
{
if($attachment->poster == 'ATTACHMENT')
{
if($attachment->type == 'jpg'||$attachment->type == 'JPG'||$attachment->type == 'jpeg'||$attachment->type == 'JPEG'||$attachment->type == 'png'||$attachment->type == 'PNG'||$attachment->type == 'gif'||$attachment->type == 'GIF')
{
$image = @imagecreatefromstring($attachment->file);
ob_start();
imagejpeg($image, null, 80);
$data = ob_get_contents();
ob_end_clean();
$var = '<a href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank"><img style="max-width:200px;max-height:150px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
echo '<li><span class="mailbox-attachment-icon has-img">'.$var.'</span></li>';
}
else
{
$var = '<a href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank">'.$attachment->name.'</a>';
echo '<li>'.$var.'</li>';
}
}
}
?>
</ul>
</div>
</div>
@endforeach
</body>
</html>

View File

@@ -0,0 +1,38 @@
<script src="{{asset("lb-faveo/plugins/iCheck/icheck.min.js")}}" type="text/javascript"></script>
<script src="js/jquery.maskedinput.min.js" type="text/javascript"></script>
<script>
$(function () {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
});
});
$(function() {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
});
</script>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,191 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('trash')
class="active"
@stop
@section('content')
<?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('status', '=', 5)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 5)->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-warning">
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.trash') !!} </h3> <small id="title_refresh">{!! $tickets->total() !!} {!! Lang::get('lang.tickets') !!}</small>
</div><!-- /.box-header -->
@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-body no-padding ">
{!! 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">
<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);
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 -->
</div><!-- /. box -->
<script>
$(function () {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
});
});
$(function() {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click').click(function() {
$('#refresh').load('trash #refresh');
$('#title_refresh').load('trash #title_refresh');
$('#count_refresh').load('trash #count_refresh');
$("#show").show();
});
});
</script>
@stop

View File

@@ -0,0 +1,198 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('unassigned')
class="active"
@stop
@section('content')
<?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);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', 0)->where('status','1')->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-info">
<div class="box-header with-border">
<?php $counted = count(App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', 0)->get());?>
<h3 class="box-title">{!! Lang::get('lang.unassigned') !!} </h3> <small id="title_refresh"> {!! $tickets->total() !!} {!! Lang::get('lang.tickets') !!}</small>
</div><!-- /.box-header -->
@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-body no-padding ">
{!! 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">
<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);
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 -->
</div><!-- /. box -->
<script>
$(function () {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
});
});
$(function() {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click').click(function() {
$('#refresh').load('unassigned #refresh');
$('#title_refresh').load('unassigned #title_refresh');
$('#count_refresh').load('unassigned #count_refresh');
$("#show").show();
});
});
</script>
@stop

View File

@@ -0,0 +1,144 @@
@extends('themes.default1.agent.layout.agent')
@section('Users')
class="active"
@stop
@section('user-bar')
active
@stop
@section('user')
class="active"
@stop
@section('HeadInclude')
@stop
<!-- header -->
@section('PageHeader')
@stop
<!-- /header -->
<!-- breadcrumbs -->
@section('breadcrumbs')
<ol class="breadcrumb">
</ol>
@stop
<!-- /breadcrumbs -->
<!-- content -->
@section('content')
<!-- open a form -->
{!! Form::open(['action'=>'Agent\helpdesk\UserController@store','method'=>'post']) !!}
<div class="box box-primary">
<div class="content-header">
<h4>{!! Lang::get('lang.create') !!} {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
</div>
<div class="box-body">
<!-- Email Address : Email : Required -->
<div class="row">
<div class="col-xs-4 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::label('email',Lang::get('lang.email')) !!}
{!! $errors->first('email', '<spam class="help-block">:message</spam>') !!}
{!! Form::email('email',null,['class' => 'form-control']) !!}
</div>
<!-- Full Name : Text : Required-->
<div class="col-xs-4 form-group {{ $errors->has('full_name') ? 'has-error' : '' }}">
{!! Form::label('full_name',Lang::get('lang.full_name')) !!}
{!! $errors->first('full_name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('full_name',null,['class' => 'form-control']) !!}
</div>
<!-- mobile Number : Text : -->
<div class="col-md-4 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
{!! Form::label('mobile',Lang::get('lang.mobile')) !!}
{!! $errors->first('mobile', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-1 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
<label for="ext">{!! Lang::get('lang.ext') !!}</label>
{!! $errors->first('ext', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('ext',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-5 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
<label for="phone_number">{!! Lang::get('lang.phone') !!}</label>
{!! $errors->first('phone_number', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-4 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-12">
{!! Form::radio('active','1',true) !!}{{Lang::get('lang.active')}}
</div>
<div class="col-xs-12">
{!! Form::radio('active','0') !!}{{Lang::get('lang.inactive')}}
</div>
</div>
</div>
</div>
<!-- Internal Notes : Textarea -->
<div class="form-group">
{!! Form::label('internal_note',Lang::get('lang.internal_notes')) !!}
{!! Form::textarea('internal_note',null,['class' => 'form-control']) !!}
</div>
</div>
</div>
<script>
$(function () {
$("textarea").wysihtml5();
});
</script>
@section('FooterInclude')
@stop
@stop
<!-- /content -->
@stop
@section('FooterInclude')
@stop
<!-- /content -->

View File

@@ -0,0 +1,149 @@
@extends('themes.default1.agent.layout.agent')
@section('Users')
class="active"
@stop
@section('user-bar')
active
@stop
@section('user')
class="active"
@stop
<!-- /breadcrumbs -->
<!-- content -->
@section('content')
<!-- open a form -->
{!! Form::model($users,['url'=>'user/'.$users->id,'method'=>'PATCH']) !!}
<div class="box box-primary">
<div class="content-header">
<h4>{{Lang::get('lang.edit')}} {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
</div>
<div class="box-body">
<!-- Email Address : Email : Required -->
<div class="row">
<div class="col-md-4 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::label('email',Lang::get('lang.email')) !!}
{!! $errors->first('email', '<spam class="help-block">:message</spam>') !!}
{!! Form::email('email',null,['disabled'=>'disabled', 'class' => 'form-control']) !!}
</div>
<!-- Full Name : Text : Required-->
<div class="col-md-4 form-group {{ $errors->has('user_name') ? 'has-error' : '' }}">
{!! Form::label('user_name',Lang::get('lang.full_name')) !!}
{!! $errors->first('user_name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('user_name',null,['class' => 'form-control']) !!}
</div>
<!-- mobile Number : Text : -->
<div class="col-md-4 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
{!! Form::label('mobile',Lang::get('lang.mobile')) !!}
{!! $errors->first('mobile', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-1 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
<label for="ext">{!! Lang::get('lang.ext') !!}</label>
{!! $errors->first('ext', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('ext',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-5 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
<label for="phone_number">{!! Lang::get('lang.phone') !!}</label>
{!! $errors->first('phone_number', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-3 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-12">
{!! Form::radio('active','1',true) !!}{{Lang::get('lang.active')}}
</div>
<div class="col-xs-12">
{!! Form::radio('active','0') !!}{{Lang::get('lang.inactive')}}
</div>
</div>
</div>
<div class="col-xs-3 form-group {{ $errors->has('ban') ? 'has-error' : '' }}">
{!! Form::label('ban',Lang::get('lang.ban')) !!}
{!! $errors->first('ban', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-12">
{!! Form::radio('ban','1',true) !!}{{Lang::get('lang.enable')}}
</div>
<div class="col-xs-12">
{!! Form::radio('ban','0') !!}{{Lang::get('lang.disable')}}
</div>
</div>
</div>
</div>
<!-- Internal Notes : Textarea -->
<div class="form-group">
{!! Form::label('internal_note',Lang::get('lang.internal_notes')) !!}
{!! Form::textarea('internal_note',null,['class' => 'form-control']) !!}
</div>
</div>
</div>
<script>
$(function () {
$("textarea").wysihtml5();
});
</script>
@section('FooterInclude')
@stop
@stop
<!-- /content -->
@stop
@section('FooterInclude')
@stop
<!-- /content -->

View File

@@ -0,0 +1,88 @@
@extends('themes.default1.agent.layout.agent')
@section('Users')
class="active"
@stop
@section('user-bar')
active
@stop
@section('user')
class="active"
@stop
@section('HeadInclude')
@stop
<!-- header -->
@section('PageHeader')
@stop
<!-- /header -->
<!-- breadcrumbs -->
@section('breadcrumbs')
<ol class="breadcrumb">
</ol>
@stop
<!-- /breadcrumbs -->
<!-- content -->
@section('content')
<!-- open a form -->
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">{{Lang::get('lang.user')}}</h3><a href="{{route('user.create')}}" class="btn btn-primary pull-right">{{Lang::get('lang.create_user')}}</a></div>
<div class="box-body table-responsive">
<!-- 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
<?php
$users = App\User::where('role','=','user')->orderBy('id', 'ASC')->paginate(20);
?>
<table class="table table-hover" style="overflow:hidden;">
{!! Datatable::table()
->addColumn(Lang::get('lang.name'),
Lang::get('lang.email'),
Lang::get('lang.phone'),
Lang::get('lang.status'),
Lang::get('lang.last_login'),
Lang::get('lang.action')) // these are the column headings to be shown
->setUrl(route('user.list')) // this is the route where data will be retrieved
->render() !!}
</table>
</div>
</div>
@section('FooterInclude')
@stop
@stop
<!-- /content -->
@stop
@section('FooterInclude')
@stop
<!-- /content -->

View File

@@ -0,0 +1,212 @@
@extends('themes.default1.agent.layout.agent')
@section('Dashboard')
class="active"
@stop
@section('dashboard-bar')
active
@stop
@section('profile')
class="active"
@stop
@section('content')
<div class="row">
<div class="col-md-6">
{!! Form::model($user,['url'=>'agent-profile', 'method' => 'PATCH','files'=>true]) !!}
<div class="box box-primary">
<div class="content-header">
<h4>{!! Lang::get('lang.profile') !!} {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
</div>
<div class="box-body">
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-ban"></i>
<b>Success</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- fail 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
<!-- first name -->
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
{!! Form::label('first_name',Lang::get('lang.first_name')) !!}
{!! $errors->first('first_name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('first_name',null,['class' => 'form-control']) !!}
</div>
<!-- last name -->
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
{!! Form::label('last_name',Lang::get('lang.last_name')) !!}
{!! $errors->first('last_name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('last_name',null,['class' => 'form-control']) !!}
</div>
<!-- gender -->
<div class="form-group">
{!! Form::label('gender',Lang::get('lang.gender')) !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('gender','1',true) !!}{{Lang::get('lang.male')}}
</div>
<div class="col-xs-3">
{!! Form::radio('gender','0') !!}{{Lang::get('lang.female')}}
</div>
</div>
</div>
<div class="form-group">
<!-- email address -->
{!! Form::label('email',Lang::get('lang.email_address')) !!}
<div>
{{$user->email}}
</div>
</div>
<div class="form-group {{ $errors->has('company') ? 'has-error' : '' }}">
<!-- company -->
{!! Form::label('company',Lang::get('lang.company')) !!}
{!! $errors->first('company', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('company',null,['class' => 'form-control']) !!}
</div>
<div class="row">
<!-- phone extension -->
<div class="col-xs-3 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
{!! Form::label('ext',Lang::get('lang.ext')) !!}
{!! $errors->first('ext', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('ext',null,['class' => 'form-control']) !!}
</div>
<!-- phone number -->
<div class="col-xs-9 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
{!! Form::label('phone_number',Lang::get('lang.phone')) !!}
{!! $errors->first('phone_number', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
</div>
</div>
<!-- mobile -->
<div class="form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
{!! Form::label('mobile',Lang::get('lang.mobile_number')) !!}
{!! $errors->first('mobile', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('agent_sign') ? 'has-error' : '' }}">
{!! Form::label('agent_sign',Lang::get('lang.agent_sign')) !!}
{!! $errors->first('agent_sign', '<spam class="help-block">:message</spam>') !!}
{!! Form::textarea('agent_sign',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('profile_pic') ? 'has-error' : '' }}">
<!-- profile pic -->
<div type="file" class="btn btn-default btn-file" style="color:orange">
<i class="fa fa-user"> </i>
{!! Form::label('profile_pic',Lang::get('lang.profile_pic')) !!}
{!! $errors->first('profile_pic', '<spam class="help-block">:message</spam>') !!}
{!! Form::file('profile_pic',['class' => 'form-file']) !!}
</div>
</div>
{!! Form::token() !!}
{!! Form::close() !!}
</div>
</div>
</div>
<div class="col-md-6">
{!! Form::model($user,['url'=>'agent-profile-password/'.$user->id , 'method' => 'PATCH']) !!}
<div class="box box-primary">
<div class="content-header">
<h4>{!! Lang::get('lang.change_password') !!} {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
</div>
<div class="box-body">
@if(Session::has('success1'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-ban"></i>
<b>Success</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success1')}}
</div>
@endif
<!-- fail message -->
@if(Session::has('fails1'))
<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('fails1')}}
</div>
@endif
<!-- old password -->
<div class="form-group has-feedback {{ $errors->has('old_password') ? 'has-error' : '' }}">
{!! Form::label('old_password',Lang::get('lang.old_password')) !!}
{!! Form::password('old_password',['placeholder'=>Lang::get('lang.old_password'),'class' => 'form-control']) !!}
{!! $errors->first('old_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<!-- new password -->
<div class="form-group has-feedback {{ $errors->has('new_password') ? 'has-error' : '' }}">
{!! Form::label('new_password',Lang::get('lang.new_password')) !!}
{!! Form::password('new_password',['placeholder'=>Lang::get('lang.new_password'),'class' => 'form-control']) !!}
{!! $errors->first('new_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<!-- confirm password -->
<div class="form-group has-feedback {{ $errors->has('confirm_password') ? 'has-error' : '' }}">
{!! Form::label('confirm_password',Lang::get('lang.confirm_password')) !!}
{!! Form::password('confirm_password',['placeholder'=>Lang::get('lang.confirm_password'),'class' => 'form-control']) !!}
{!! $errors->first('confirm_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
</div>
</div>
</div>
</div>
{!! Form::close() !!}
<script>
$(function () {
$("textarea").wysihtml5();
});
</script>
@stop

View File

@@ -0,0 +1,75 @@
@extends('themes.default1.agent.layout.agent')
@section('content')
@section('Dashboard')
class="active"
@stop
@section('dashboard-bar')
active
@stop
@section('profile')
class="active"
@stop
@section('profileimg')
@if(Auth::user() && Auth::user()->profile_pic)
<img src="{{asset('lb-faveo/profilepic')}}{{'/'}}{{Auth::user()->profile_pic}}" class="img-circle" alt="User Image" />
@else
@if(Auth::user())
<img src="{{ Gravatar::src(Auth::user()->email,200) }}" class="img-circle" alt="User Image">
@endif
@endif
@stop
<section class="content">
<div class="row">
{{-- style="background-image:url({{ URL::asset('/dist/img/boxed-bg.jpg')}}); color:#DBDBDB;" --}}
<div class="col-md-12 box box-primary">
<div class="col-md-6">
{{-- <div class="box box-success"> --}}
{{-- <section class="content"> --}}
{{-- <div class=" box-header"> --}}
<h3><b>{!! Lang::get('lang.user_information') !!}</b>&nbsp;&nbsp;<a href="{{URL::route('agent-profile-edit')}}"><i class="fa fa-fw fa-edit"> </i></a></h3>
{{-- </div> --}}
<div class="box-body">
<table class="row">
@if($user->gender == 1)
<tr><th class="col-md-8"><h4><b>{!! Lang::get('lang.gender') !!}:<b></h4></th><td class="col-md-6"><h4>{{ 'Male' }}</h4></td></tr>
@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>
<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>
</table>
</div>
{{-- </section> --}}
{{-- </div> --}}
</div>
<div class="col-md-6">
{{-- <div class="box box-primary"> --}}
{{-- <section class="content"> --}}
<h3><b>{!! Lang::get('lang.contact_information') !!}</b></h3>
<div class="box-body">
<table>
<tr><th class="col-md-8"><h4><b>{!! Lang::get('lang.email') !!}:</b></h4> </th> <td class="col-md-6"><h4> {{ $user->email }}</h4> </td></tr>
<tr><th class="col-md-8"><h4><b>{!! Lang::get('lang.phone_number') !!}:</b></h4> </th> <td class="col-md-6"><h4> {{ $user->ext }}{{ $user->phone_number }}</h4> </td></tr>
<tr><th class="col-md-8"><h4><b>{!! Lang::get('lang.mobile') !!}:</b></h4></th><td class="col-md-6"><h4> {{ $user->mobile }}</h4></td></tr>
</table>
</div>
{{-- </section> --}}
</div>
{{-- </div> --}}
</div>
</div>
</section>
@stop

View File

@@ -0,0 +1,755 @@
@extends('themes.default1.agent.layout.agent')
@section('Users')
class="active"
@stop
@section('user-bar')
active
@stop
@section('user')
class="active"
@stop
@section('HeadInclude')
@stop
<!-- header -->
@section('PageHeader')
<div class="box-header" style="margin-top:-15px;margin-bottom:-15px;"><h3 class="box-title">{!! Lang::get('lang.user_profile') !!}</h3><a href="{{route('user.edit', $users->id)}}" class="btn btn-info btn-sm btn-flat pull-right"><i class="fa fa-edit" style="color:black;"> </i> {!! Lang::get('lang.edit') !!}</a></div>
@stop
<!-- /header -->
<!-- breadcrumbs -->
@section('breadcrumbs')
@stop
<!-- /breadcrumbs -->
<!-- content -->
@section('content')
{{-- style="display:none" --}}
<!-- success message -->
<div id="alert-success" class="alert alert-success alert-dismissable" style="display:none;">
<i class="fa fa-check-circle"> </i> <b> Success <span id="get-success"></span></b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
</div>
<div class="row">
<div class="col-md-3">
<div class="box box-primary">
<div class="box-header">
</div>
<div class="box-body ">
<div>
<center>
<img src="{{ Gravatar::src($users -> email) }}" class="img-circle" alt="User Image" style="border:3px solid #CBCBDA;padding:3px;">
@if($users->first_name || $users->last_name)
<h3 class="">{{$users->first_name}} {{$users->last_name}}</h3>
@else
<h3 class="">{{$users->user_name}}</h3>
@endif
</center>
</div>
</div>
<div class="box-footer">
<b>{{Lang::get('lang.email')}}</b>
<a class="pull-right">
{{$users->email }}
</a>
</div>
<div class="box-footer">
<div id="refresh-org">
<?php
$user_org = App\Model\helpdesk\Agent_panel\User_org::where('user_id','=', $users->id)->first();
?>
@if($user_org == null)
<b>{!! Lang::get('lang.organization') !!}</b>
<a href="" class="pull-right" data-toggle="modal" data-target="#assign"><i class="fa fa-hand-o-right" style="color:orange;"> </i> {!! Lang::get('lang.assign') !!} </a>
<a href="" data-toggle="modal" data-target="#create_org" class="pull-right"> {{Lang::get('lang.create')}} <b style="color:#000"> / </b>&nbsp; </a>
@else
<?php $org_id = $user_org->org_id;
$organization = App\Model\helpdesk\Agent_panel\Organization::where('id','=',$org_id)->first(); ?>
<b>{!! Lang::get('lang.organization') !!}</b>
<a href="{!! URL::route('organizations.show',$organization->id) !!}" class="pull-right">{!! $organization->name !!}</a>
@endif
</div>
</div>
<div class="box-footer">
<b>{{Lang::get('lang.status')}}</b>
<a class="pull-right">
@if($users->active == '1')
<span style="color:green;">{!! Lang::get('lang.active') !!}</span>
@else
<span style="color:red;">{!! Lang::get('lang.inactive') !!}</span>
@endif
</a>
</div>
@if($users->phone_number)
<div class="box-footer">
<b>{{Lang::get('lang.phone')}}</b>
<a class="pull-right">{{$users->phone_number}}</a>
</div>
@endif
@if($users->internal_note)
<div class="box-footer">
<b>{{Lang::get('lang.internal_notes')}}</b>
<br/>
{!! $users->internal_note !!}
</div>
@endif
</div>
</div>
<div class="col-md-9">
{{-- detals table starts --}}
<?php $user = App\User::where('id',$users->id)->first(); ?>
<?php $open = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->get());
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','2')->get());
$deleted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->get()); ?>
<div class="row">
<div class="col-md-12">
<!-- Custom Tabs -->
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab_1" data-toggle="tab">{!! Lang::get('lang.open_tickets') !!} ({{$open}})</a></li>
<li><a href="#tab_2" data-toggle="tab">{!! Lang::get('lang.closed_tickets') !!} ({{$counted}})</a></li>
<li><a href="#tab_3" data-toggle="tab">{!! Lang::get('lang.deleted_tickets') !!} ({{$deleted}})</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab_1">
{{-- open tab --}}
<?php $open = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->get()); ?>
@if(Session::has('success'))
<div id="success-alert" class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"> </i> <b> Success </b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"> </i> <b> Alert! </b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
<div class="box-body no-padding ">
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
<div class="mailbox-controls">
<!-- Check all button -->
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
<a class="btn btn-default btn-sm" id="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 class="pull-right">
<?php
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->get());
if ($counted < 20) {
echo $counted . "/" . $counted;
} else {
echo "20/" . $counted;
}
?>
</div>
</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>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">
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->orderBy('id', 'DESC')->paginate(20);?>
@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}}</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/open'))->render();?>&nbsp;
</div>
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
{{-- end deleted tickets --}}
</div>
</div><!-- /.tab-pane -->
<div class="tab-pane" id="tab_2">
{{-- open tab --}}
<?php $closed = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', 2)->get()); ?>
@if(Session::has('success'))
<div id="success-alert" class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"> </i> <b> Success </b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"> </i> <b> Alert! </b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
<div class="box-body no-padding">
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
<div class="mailbox-controls">
<!-- Check all button -->
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
<a class="btn btn-default btn-sm" id="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 class="pull-right">
<?php
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','2')->get());
if ($counted < 20) {
echo $counted . "/" . $counted;
} else {
echo "20/" . $counted;
}
?>
</div>
</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>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">
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','2')->orderBy('id', 'DESC')->paginate(20);?>
@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}}</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/open'))->render();?>&nbsp;
</div>
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
{{-- end deleted tickets --}}
</div>
</div>
<div class="tab-pane" id="tab_3">
{{-- open tab --}}
<?php $deleted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->get()); ?>
@if(Session::has('success'))
<div id="success-alert" class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"> </i> <b> Success </b>
<button type="button" id="close-alert" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"> </i> <b> Alert! </b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
<div class="box-body no-padding ">
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
<div class="mailbox-controls">
<!-- Check all button -->
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
<a class="btn btn-default btn-sm" id="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 class="pull-right">
<?php
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->get());
if ($counted < 20) {
echo $counted . "/" . $counted;
} else {
echo "20/" . $counted;
}
?>
</div>
</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>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">
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->orderBy('id', 'DESC')->paginate(20);?>
@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}}</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/open'))->render();?>&nbsp;
</div>
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.tab-pane -->
</div><!-- /.tab-content -->
</div><!-- nav-tabs-custom -->
</div><!-- /.col -->
</div> <!-- /.row -->
</div>
</div>
<!-- END CUSTOM TABS -->
{{-- MODAL POPUPS --}}
<div class="modal fade" id="create_org">
<div class="modal-dialog" style="width:84%;height:70%;">
<div class="modal-content">
{!! Form::model($users->id, ['id'=>'form','method' => 'PATCH'] )!!}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidd en="true">&times;</span></button>
<h4 class="modal-title">{!! Lang::get('lang.create_organization') !!}</h4>
</div>
<div class="modal-body">
<!-- failure message -->
<div class="alert alert-danger alert-dismissable" id="alert-danger" style="display:none;">
<i class="fa fa-ban"> </i> <b> Alert! <span id="get-danger"></span> </b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
</div>
<div class="row" id="hide">
<div class="col-md-4">
<div class="form-group">
<label>{!! Lang::get('lang.name') !!}</label>
<input type="text" name="name" class="form-control">
<spam id="error-name" style="display:none;position:fixed" class="call-out text-red">This is a required field</spam>
<spam id="error-name1" style="display:none;position:fixed" class="call-out text-red">! Allready Taken</spam>
<br/>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>{!! Lang::get('lang.phone') !!}</label>
<input type="number" name="phone" class="form-control">
<br/>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>{!! Lang::get('lang.website') !!}</label>
<input type="url" name="website" placeholder="https://www.example.com" class="form-control">
<spam id="error-website" style="display:none" class="help-block text-red">! Allready Taken</spam>
<br/>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>{!! Lang::get('lang.address') !!}</label>
<textarea name="address" class="form-control"></textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>{!! Lang::get('lang.internal_notes') !!}</label>
<textarea name="internal" class="form-control"></textarea>
</div>
</div>
</div>
<div id="show2" style="display:none;">
<div class="row row-md-12">
<div class="col-xs-5">
</div>
<div class="col-xs-2">
<img src="{{asset("lb-faveo/dist/img/gifloader.gif")}}">
</div>
<div class="col-xs-5">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis">{!! Lang::get('lang.close') !!}</button>
<input type="submit" class="btn btn-primary pull-right" value="{!! Lang::get('lang.update') !!}">
</div>
{!! Form::close() !!}
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script type="text/javascript">
jQuery(document).ready(function($) {
// create org
$('#form').on('submit', function() {
$.ajax({
type: "POST",
url: "../user-org/{{$users->id}}",
dataType: "html",
data: $(this).serialize(),
beforeSend: function() {
$("#hide").hide();
$("#show2").show();
},
success: function(response) {
$("#show2").hide();
$("#hide").show();
if (response == 0) {
message = "Organization added successfully."
$("#dismis").trigger("click");
$("#refresh-org").load("../user/{{ $users->id }} #refresh-org");
// $("#refresh2").load("../thread/{{$users->id}} #refresh2");
// $("#show").show();
$("#alert-success").show();
$('#get-success').html(message);
setInterval(function(){$("#alert-success").hide(); },4000);
} else {
message = response;
$("#alert-danger").show();
$('#get-danger').html(message);
}
}
})
return false;
});
});
</script>
<!-- Organisation Assign Modal -->
<div class="modal fade" id="assign">
<div class="modal-dialog">
<div class="modal-content">
{!! Form::model($users->id, ['id'=>'org_assign','method' => 'PATCH'] )!!}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" id="dismiss" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">{!! Lang::get('lang.assign') !!}</h4>
</div>
<div id="assign_alert" class="alert alert-success alert-dismissable" style="display:none;">
<button id="assign_dismiss" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-check"></i>Alert!</h4>
<div id="message-success1"></div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-4">
</div>
<div class="col-md-6" id="assign_loader" style="display:none;">
<img src="{{asset("lb-faveo/dist/img/gifloader.gif")}}"><br/><br/><br/>
</div>
</div>
<div id="assign_body">
<p>{!! Lang::get('lang.please_select_an_organization') !!}</p>
<select id="org" class="form-control" name="org">
<?php
$orgs = App\Model\helpdesk\Agent_panel\Organization::all();
?>
<optgroup label="Select Organizations">
@foreach($orgs as $org)
<option value="{{$org->id}}">{!! $org->name !!}</option>
@endforeach
</optgroup>
</select>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis4">{!! Lang::get('lang.close') !!}</button>
<button type="submit" class="btn btn-success pull-right" id="submt2">{!! Lang::get('lang.assign') !!}</button>
</div>
{!! Form::close()!!}
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script type="text/javascript">
// Assign a ticket
jQuery(document).ready(function($) {
// create org
$('#org_assign').on('submit', function() {
$.ajax({
type: "POST",
url: "../user-org-assign/{{$users->id}}",
dataType: "html",
data: $(this).serialize(),
beforeSend: function() {
$("#hide").hide();
$("#show2").show();
},
success: function(response) {
$("#show2").hide();
$("#hide").show();
if (response == 1) {
message = "Organization added successfully."
$("#dismiss").trigger("click");
$("#refresh-org").load("../user/{{ $users->id }} #refresh-org");
// $("#refresh2").load("../thread/{{$users->id}} #refresh2");
// $("#show").show();
$("#alert-success").show();
$('#get-success').html(message);
setInterval(function(){$("#alert-success").hide(); },4000);
}
}
})
return false;
});
});
</script>
<script type="text/javascript">
$(function () {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
});
});
$(function() {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
});
$(document).ready(function() { /// Wait till page is loaded
$('#click').click(function() {
$('#refresh').load('open #refresh');
$("#show").show();
});
});
</script>
@stop
<!-- /content -->

View File

@@ -0,0 +1,187 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('article')
active
@stop
@section('add-article')
class="active"
@stop
@section('content')
{!! Form::open(array('action' => 'Agent\kb\ArticleController@store' , 'method' => 'post') )!!}
<div class="row">
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"></i>
<b>Success</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>Fail!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
@if(!$category)
<div class="alert alert-warning alert-dismissable">
<i class="fa fa-info"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{!! Lang::get('lang.create_a_category') !!}
</div>
@endif
<div class="box-body">
<div class="col-md-9">
<div class="box box-primary">
<div class="box-header">
<h4 class="box-title">{!! Lang::get('lang.addarticle') !!}</h4>
</div>
<div class="box-body">
<div class="row">
<div class="col-md-6 form-group {{ $errors->has('name') ? 'has-error' : '' }}" >
{!! Form::label('name',Lang::get('lang.name')) !!}
{!! $errors->first('name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('name',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-6 form-group {{ $errors->has('slug') ? 'has-error' : '' }}" >
{!! Form::label('slug',Lang::get('lang.slug')) !!}
{!! $errors->first('slug', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('slug',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="form-group {{ $errors->has('description') ? 'has-error' : '' }}">
{!! Form::label('description',Lang::get('lang.description')) !!}
{!! $errors->first('description', '<spam class="help-block">:message</spam>') !!}
<div class="form-group" style="background-color:white">
{!! Form::textarea('description',null,['class' => 'form-control color','size' => '128x20','id'=>'myNicEditor','placeholder'=>Lang::get('lang.enter_the_description')]) !!}
</div>
</div>
</div>
</div>
</div>
<ul style="list-style-type:none;">
<li>
<div class="col-md-3">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">{{Lang::get('lang.publish')}}</h3>
</div>
<div class="box-body">
<div class="form-group {{ $errors->has('type') ? 'has-error' : '' }}">
{!! Form::label('type',Lang::get('lang.status')) !!}
{!! $errors->first('type', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-4">
{!! Form::radio('type','1',true) !!}{{Lang::get('lang.published')}}
</div>
<div class="col-xs-3">
{!! Form::radio('type','0',null) !!}{{Lang::get('lang.draft')}}
</div>
</div>
</div>
<div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">
{!! Form::label('status',Lang::get('lang.visibility')) !!}
{!! $errors->first('status', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('status','1',true) !!}{{Lang::get('lang.public')}}
</div>
<div class="row">
<div class="col-xs-3">
{!! Form::radio('status','0',null) !!}{{Lang::get('lang.private')}}
</div>
</div>
</div>
</div>
</div>
<div class="box-footer" style="background-color:#f5f5f5;">
<div style="margin-left:140px;">
{!! Form::submit(Lang::get('lang.publish'),['class'=>'btn btn-primary'])!!}
</div>
</div>
</li>
<li>
<div class="col-md-3">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">{{Lang::get('lang.category')}}</h3>
</div>
<div class="box-body" style="height:190px; overflow-y:auto;">
<div class="form-group {{ $errors->has('category_id') ? 'has-error' : '' }}">
{{-- {!! Form::label('category_id','Category') !!} --}}
{!! $errors->first('category_id', '<spam class="help-block">:message</spam>') !!}
@while (list($key, $val) = each($category))
<div class="row">
<div class="form-group">
<div class="col-md-1">
<input type="radio" name="category_id[]" value="<?php echo $val;?>">
</div>
<div class="col-md-10">
<?php echo $key;?>
</div>
</div>
</div>
@endwhile
</div>
</div>
{!! Form::close() !!}
<div class="box-footer" style="background-color:#f5f5f5;">
<span class="btn btn-info btn-sm" data-toggle="modal" data-target="#j">{{Lang::get('lang.addcategory')}}</span>
<div class="modal" id="j">
<div class="modal-dialog">
<div class="modal-content">
{!! Form::open(['method'=>'post','action'=>'Agent\kb\CategoryController@store']) !!}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">{{Lang::get('lang.addcategory')}}</h4>
</div>
<div class="modal-body">
@include('themes.default1.agent.kb.category.form')
</div>
<div class="modal-footer">
<div class="form-group">
{!! Form::submit('Add')!!}
</div>
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button>
</div>
{!! Form::close() !!}
</div>
</div>
</div>
</div>
</div>
</div>
</li>
</ul>
<script type="text/javascript">
$(function () {
$("textarea").wysihtml5();
});
</script>
{{-- {!! Form::close() !!} --}}
@stop

View File

@@ -0,0 +1,177 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('article')
active
@stop
@section('all-article')
class="active"
@stop
@section('content')
{!! Form::model($article,['url' => 'article/'.$article->id , 'method' => 'PATCH'] )!!}
<div class="row">
<div class="box-body" >
@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="col-md-9">
<div class="box box-primary box-body">
<div class="row">
<div class="col-md-6 form-group {{ $errors->has('name') ? 'has-error' : '' }}" >
{!! Form::label('name',Lang::get('lang.name')) !!}
{!! $errors->first('name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('name',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-6 form-group {{ $errors->has('slug') ? 'has-error' : '' }}" >
{!! Form::label('slug',Lang::get('lang.slug')) !!}
{!! $errors->first('slug', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('slug',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="form-group {{ $errors->has('description') ? 'has-error' : '' }}">
{!! Form::label('description',Lang::get('lang.description')) !!}
{!! $errors->first('description', '<spam class="help-block">:message</spam>') !!}
<div class="form-group" style="background-color:white">
{!! Form::textarea('description',null,['class' => 'form-control','size' => '128x20','id'=>'myNicEditor','placeholder'=>'Enter the description']) !!}
</div>
</div>
</div>
</div>
</div>
<ul style="list-style-type:none;">
<li>
<div class="col-md-3">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">{{Lang::get('lang.publish')}}</h3>
</div>
<div class="box-body">
<div class="form-group {{ $errors->has('type') ? 'has-error' : '' }}">
{!! Form::label('type',Lang::get('lang.status')) !!}
{!! $errors->first('type', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-4">
{!! Form::radio('type','1',true) !!}{{Lang::get('lang.published')}}
</div>
<div class="col-xs-3">
{!! Form::radio('type','0',null) !!}{{Lang::get('lang.draft')}}
</div>
</div>
</div>
<div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">
{!! Form::label('status',Lang::get('lang.visibility')) !!}
{!! $errors->first('status', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('status','1',true) !!}{{Lang::get('lang.public')}}
</div>
<div class="row">
<div class="col-xs-3">
{!! Form::radio('status','0',null) !!}{{Lang::get('lang.private')}}
</div>
</div>
</div>
</div>
</div>
{!! Form::close() !!}
<div class="box-footer" style="background-color:#f5f5f5;">
<div style="margin-left:140px;">
{!! Form::submit(Lang::get('lang.publish'),['class'=>'btn btn-block btn-primary btn-sm'])!!}
</div>
</div>
</li>
<li>
<div class="col-md-3">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">{{Lang::get('lang.category')}}</h3>
</div>
<div class="box-body" style="height:190px; overflow-y:auto;">
<div class="form-group {{ $errors->has('category_id') ? 'has-error' : '' }}">
{{-- {!! Form::label('category_id','Category') !!} --}}
{!! $errors->first('category_id', '<spam class="help-block">:message</spam>') !!}
@while (list($key, $val) = each($category))
<div class="row">
<div class="form-group">
<div class="col-md-1">
<input type="radio" name="category_id[]" value="<?php echo $val;?>" <?php if (in_array($val, $assign)) {
echo ('checked');
}
?> ></div>
<div class="col-md-10">
<?php echo $key;?>
</div>
</div>
</div>
@endwhile
</div>
</div>
<div class="box-footer" style="background-color:#f5f5f5;">
<span class="btn btn-info btn-sm" data-toggle="modal" data-target="#j">{!! Lang::get('lang.addcategory') !!}</span>
<div class="modal" id="j">
<div class="modal-dialog">
<div class="modal-content">
{!! Form::open(['method'=>'post','action'=>'Agent\kb\CategoryController@store']) !!}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">{{Lang::get('lang.addcategory')}}</h4>
</div>
<div class="modal-body">
@include('themes.default1.agent.kb.category.form')
</div>
<div class="modal-footer">
<div class="form-group">
{!! Form::submit(Lang::get('lang.add'))!!}
</div>
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">{!! Lang::get('lang.close') !!}</button>
</div>
{!! Form::close() !!}
</div>
</div>
</div>
</div>
</div>
</div>
</li>
</ul>
<script type="text/javascript">
$(function () {
$("textarea").wysihtml5();
});
</script>
{{-- {!! Form::close() !!} --}}
@stop
<!-- /content -->

View File

@@ -0,0 +1,24 @@
<?php
//Check if we are getting the image
if (isset($_FILES['image'])) {
//Get the image array of details
$img = $_FILES['image'];
//The new path of the uploaded image, rand is just used for the sake of it
$path = "upload/" . rand() . $img["name"];
//Move the file to our new path
move_uploaded_file($img['tmp_name'], $path);
//Get image info, reuiqred to biuld the JSON object
$data = getimagesize($path);
//The direct link to the uploaded image, this might varyu depending on your script location
$link = "http://$_SERVER[HTTP_HOST]" . "/codex/" . $path;
//Here we are constructing the JSON Object
$res = array("upload" => array(
"links" => array("original" => $link),
"image" => array("width" => $data[0],
"height" => $data[1],
),
));
//echo out the response :)
echo json_encode($res);
}
?>

View File

@@ -0,0 +1,47 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('article')
active
@stop
@section('all-article')
class="active"
@stop
@section('content')
<div class="box box-primary">
<div class="box-header">
<h2 class="box-title">{{Lang::get('lang.articles')}}</h2>
</div>
<div class="box-body table-responsive">
<!-- 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="col-xs-12">
<div class="row">
{!! Datatable::table()
->addColumn(Lang::get('lang.name'),
Lang::get('lang.create'),
Lang::get('lang.action')) // these are the column headings to be shown
->setUrl(route('api.article')) // this is the route where data will be retrieved
->render() !!}
</div>
</div>
</div>
</div>
@stop

View File

@@ -0,0 +1,235 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Faveo | KB</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<!-- Bootstrap 3.3.4 -->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<!-- Font Awesome Icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<!-- Ionicons -->
<link href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" type="text/css" />
<!-- jvectormap -->
<link href="plugins/jvectormap/jquery-jvectormap-1.2.2.css" rel="stylesheet" type="text/css" />
<!-- Theme style -->
<link href="dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link href="dist/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" />
<link href="{{asset('dist/css/bootstrap.css')}}" rel="stylesheet">
<link href="{{asset('dist/css/dataTables.bootstrap.css')}}" rel="stylesheet">
<!-- Data tables CDN -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script type="text/javascript" src="{{asset('dist/js/jquery-1.11.1.min.js')}}"></script>
<script type="text/javascript" src="//cdn.datatables.net/1.10.0/js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/plug-ins/505bef35b56/integration/bootstrap/3/dataTables.bootstrap.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="skin-blue">
<div class="wrapper" id="RefreshAssign">
<header class="main-header">
<?php $settings = App\Model\Settings::where('id', '=', '1')->first();?>
<img src="{{asset('Img/icon/faveokb.jpg')}}" class="logo" alt="Knowledge Base"/>
{{-- <a href="../../index2.html" class="logo"><b>Faveo</b> Knowledge</a> --}}
<!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="tabs tabs-horizontal nav navbar-nav">
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
@if(Auth::user()->profile_pic==NULL)
<img src="{{asset('dist/img/avatar.png')}}" class="user-image" alt="User Image"/>
@else
<img src="{{asset('dist')}}{{'/'}}{{Auth::user()->profile_pic}}" class="user-image" alt="User Image"/>
@endif
<span class="hidden-xs">{{Auth::user()->name}}</span>
</a>
<ul class="dropdown-menu">
<!-- User image -->
<li class="user-header">
@if(Auth::user()->profile_pic==NULL)
<img src="{{asset('dist/img/avatar.png')}}" class="img-circle" alt="User Image"/>
@else
<img src="{{asset('dist')}}{{'/'}}{{Auth::user()->profile_pic}}" class="img-circle" alt="User Image" />
@endif
<p>
{{Auth::user()->name}}
</p>
</li>
<!-- Menu Body -->
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="{{url('profile')}}" class="btn btn-default btn-flat">Profile</a>
</div>
<div class="pull-right">
<a href="{{ url('/auth/logout') }}" class="btn btn-default btn-flat">Sign out</a>
</div>
</li>
</ul>
</li>
</ul>
<!-- <form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" id="navbar-search-input" placeholder="Search">
</div>
</form> -->
</div><!-- /.navbar-collapse -->
</nav>
</header>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel -->
<!-- search form -->
<!-- /.search form -->
<!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
<li class="treeview @yield('category')">
<a href="#">
<i class="fa fa-list-ul"></i> <span>Category</span>
<i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li @yield('add-category')><a href="{{url('category/create')}}"><i class="fa fa-circle-o"></i>Add Category</a></li>
<li @yield('all-category')><a href="{{url('category')}}"><i class="fa fa-circle-o"></i> All Category</a></li>
</ul>
</li>
<li class="treeview @yield('article')">
<a href="#">
<i class="fa fa-edit"></i> <span>Article</span>
<i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li @yield('add-article')><a href="{{url('article/create')}}"><i class="fa fa-circle-o"></i>Add Article</a></li>
<li @yield('all-article')><a href="{{url('article')}}"><i class="fa fa-circle-o"></i> All Article</a></li>
</ul>
</li>
<li class="treeview @yield('pages')">
<a href="#">
<i class="fa fa-file-text"></i> <span>Pages</span>
<i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li @yield('add-pages')><a href="{{url('page/create')}}"><i class="fa fa-circle-o"></i>Add Pages</a></li>
<li @yield('all-pages')><a href="{{url('page')}}"><i class="fa fa-circle-o"></i> All Pages</a></li>
</ul>
</li>
<li class="treeview @yield('widget')">
<a href="#">
<i class="fa fa-th"></i> <span>Widgets</span>
<i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li @yield('footer1')><a href="{{url('create-footer')}}"><i class="fa fa-circle-o"></i>Footer 1</a></li>
<li @yield('footer2')><a href="{{url('create-footer2')}}"><i class="fa fa-circle-o"></i> Footer 2</a></li>
<li @yield('footer3')><a href="{{url('create-footer3')}}"><i class="fa fa-circle-o"></i> Footer 3</a></li>
<li @yield('footer4')><a href="{{url('create-footer4')}}"><i class="fa fa-circle-o"></i> Footer 4</a></li>
<li @yield('side1')><a href="{{url('side1')}}"><i class="fa fa-circle-o"></i>Side Widget 1</a></li>
<li @yield('side2')><a href="{{url('side2')}}"><i class="fa fa-circle-o"></i>Side Widget 2</a></li>
<li @yield('social')><a href="{{url('social')}}"><i class="fa fa-circle-o"></i>Social</a></li>
</ul>
</li>
<li @yield('comment')>
<a href="{{url('comment')}}">
<i class="fa fa-comments-o"></i>
<span>Comments</span>
</a>
</li>
<li @yield('settings')>
<a href="{{url('settings')}}">
<i class="fa fa-wrench"></i>
<span>Settings</span>
</a>
</li>
</ul>
</section>
<!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<!-- Content Header (Page header) -->
<div class="tab-content" style="background-color: white; border-top:1px solid #F0F0F0;">
<div class="collapse navbar-collapse" id="navbar-collapse">
<div class="tabs-content">
</div>
</div>
</div>
<!-- Main content -->
<section class="content">
<!-- Info boxes -->
@yield('content')
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
<footer class="main-footer">
<div class="pull-right hidden-xs">
<b>Version</b> {{$settings->version}}
</div>
<strong>Copyright &copy; {{date("Y")}} <a href="{{$settings->website}}"> {{$settings->company_name}}</a>. Powered By <a href="http://www.faveohelpdesk.com">Faveo</a>.</strong>
</footer>
<!-- Control Sidebar -->
</div><!-- ./wrapper -->
<!-- jQuery 2.1.4 -->
<script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.2 JS -->
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<!-- FastClick -->
<script src='plugins/fastclick/fastclick.min.js'></script>
<!-- AdminLTE App -->
<script src="dist/js/app.min.js" type="text/javascript"></script>
<!-- Sparkline -->
<script src="plugins/sparkline/jquery.sparkline.min.js" type="text/javascript"></script>
<!-- jvectormap -->
<script src="plugins/jvectormap/jquery-jvectormap-1.2.2.min.js" type="text/javascript"></script>
<script src="plugins/jvectormap/jquery-jvectormap-world-mill-en.js" type="text/javascript"></script>
<!-- SlimScroll 1.3.0 -->
<script src="plugins/slimScroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<!-- ChartJS 1.0.1 -->
<script src="plugins/chartjs/Chart.min.js" type="text/javascript"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="dist/js/pages/dashboard2.js" type="text/javascript"></script>
<!-- AdminLTE for demo purposes -->
<script src="dist/js/demo.js" type="text/javascript"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.1/js/bootstrap.min.js"></script>
<script src="{{asset('dist/js/blogs.js')}}"></script>
</body>
</html>

View File

@@ -0,0 +1,133 @@
@extends('themes.default1.layouts.master')
@section('head')
<!-- DATA TABLES -->
<link href="{{asset("lb-faveo/plugins/datatables/dataTables.bootstrap.css")}}" rel="stylesheet" type="text/css" />
@stop
@section('header')
<h1>Home</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
<li class="active">Dashboard</li>
</ol>
@stop
@section('content')
<section class="content">
<div class="row">
<div class="col-xs-12">
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Failed.
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<p>{{Session::get('success')}}</p>
</div>
@endif
<!-- -->
<div class="box">
<div class="box-header">
<h3 class="box-title">Song List</h3>
</div><!-- /.box-header -->
<div class="box-body">
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>ID</th>
<th>Title</th>
<th>Slug</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach($songs as $song)
<tr>
<td>{!! $song->id !!}</td>
<td>{!! $song->title !!}</td>
<td>{!! $song->slug !!}</td>
<td>{!! link_to_route('songs.show','Show',[$song->slug],['id'=>'show','class'=>'btn btn-primary btn-sm']) !!}
<button class="btn btn-info btn-sm" data-toggle="modal" data-target="#{{$song->slug}}">Modal Edit</button>
<div class="modal fade" id="{{$song->slug}}">
<div class="modal-dialog">
<div class="modal-content">
{!! Form::model($song,['route'=>['songs.update', $song->slug],'method'=>'PATCH']) !!}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">Edit Song</h4>
</div>
<div class="modal-body">
@include('themes.default1.admin.songs.form')
</div>
<div class="modal-footer">
<div class="form-group">
{!! Form::submit('Update Song',['class'=>'btn btn-primary'])!!}
</div>
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button>
</div>
{!! Form::close() !!}
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<button class="btn btn-danger btn-sm" data-toggle="modal" data-target="#{{$song->slug}}delete">Modal Delete</button>
<div class="modal fade" id="{{$song->slug}}delete">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">Delete</h4>
</div>
<div class="modal-body">
<p>Are you sure you want to Delete ?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button>
{!! link_to_route('songs.delete','Delete',[$song->slug],['id'=>'delete','class'=>'btn btn-danger btn-sm']) !!}
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th>ID</th>
<th>Title</th>
<th>Slug</th>
<th>Action</th>
</tr>
</tfoot>
</table>
</div><!-- /.box-body -->
</div>
<!-- -->
</div>
</div>
</section>
@stop
@section('footer')
<script src="{{asset("lb-faveo/plugins/datatables/jquery.dataTables.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/plugins/datatables/dataTables.bootstrap.js")}}" type="text/javascript"></script>
<!-- page script -->
<script type="text/javascript">
$(function() {
$("#example1").dataTable();
$('#example2').dataTable({
"bPaginate": true,
"bLengthChange": false,
"bFilter": false,
"bSort": true,
"bInfo": true,
"bAutoWidth": false
});
});
</script>
@stop

View File

@@ -0,0 +1,60 @@
@extends('themes.default1.article.layout')
@section('content')
<link href="{{asset('dist/css/bootstrap.css')}}" rel="stylesheet">
<link href="{{asset('dist/css/dataTables.bootstrap.css')}}" rel="stylesheet">
<!-- Data tables CDN -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script type="text/javascript" src="{{asset('dist/js/jquery-1.11.1.min.js')}}"></script>
<script type="text/javascript" src="//cdn.datatables.net/1.10.0/js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/plug-ins/505bef35b56/integration/bootstrap/3/dataTables.bootstrap.js"></script>
</head>
<body style="font-family: 'Segoe UI'">
<div class="box box-primary">
<div class="box-header">
<h2 class="box-title">Articles</h2></div>
<div class="box-body table-responsive no-padding">
<!-- check whether success or not -->
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
<table id="allBlogs" class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.1/js/bootstrap.min.js"></script>
<script src="{{asset('dist/js/blogs.js')}}"></script>
</body>
@stop

View File

@@ -0,0 +1,103 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('category')
active
@stop
@section('add-category')
class="active"
@stop
<script type="text/javascript" src="{{asset('lb-faveo/dist/js/nicEdit.js')}}"></script>
@section('content')
{!! Form::open(array('action' => 'Agent\kb\CategoryController@store' , 'method' => 'post') )!!}
<div class="box box-primary">
<div class="box-header">
<h4 class="box-title">{!! Lang::get('lang.addcategory') !!}</h4> {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}
</div>
<div class="box-body">
@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="row">
<div class="col-xs-3 form-group {{ $errors->has('name') ? 'has-error' : '' }}">
{!! Form::label('name',Lang::get('lang.name')) !!}
{!! $errors->first('name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('name',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-3 form-group {{ $errors->has('slug') ? 'has-error' : '' }}">
{!! Form::label('slug',Lang::get('lang.slug')) !!}
{!! $errors->first('slug', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('slug',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-3 form-group {{ $errors->has('parent') ? 'has-error' : '' }}">
{!! Form::label('parent',Lang::get('lang.parent')) !!}
{!! $errors->first('parent', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('parent',[''=>'Select a Group','Categorys'=>$category->lists('name','name')],null,['class' => 'form-control select']) !!}
</div>
<div class="col-xs-3 form-group {{ $errors->has('status') ? 'has-error' : '' }}">
{!! Form::label('status',Lang::get('lang.status')) !!}
{!! $errors->first('status', '<spam class="help-block">:message</spam>') !!}
<br/>
{!! Form::radio('status','1',true) !!} {{Lang::get('lang.active')}}
{!! Form::radio('status','0',null) !!} {{Lang::get('lang.inactive')}}
</div>
<div class="col-md-12 form-group {{ $errors->has('description') ? 'has-error' : '' }}">
{!! Form::label('description',Lang::get('lang.description')) !!}
{!! $errors->first('description', '<spam class="help-block">:message</spam>') !!}
{!! Form::textarea('description',null,['class' => 'form-control','id'=>'description','placeholder'=>Lang::get('lang.enter_the_description') ]) !!}
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$("textarea").wysihtml5();
});
</script>
@stop
@section('FooterInclude')
@stop
<!-- /content -->

View File

@@ -0,0 +1,106 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('category')
active
@stop
<script type="text/javascript" src="{{asset('dist/js/EditnicEdit.js')}}"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
@section('content')
{!! Form::model($category,['url' => 'category/'.$category->id , 'method' => 'PATCH'] )!!}
<div class="box box-primary">
<div class="content-header">
<h4>{!! Lang::get('lang.edit') !!} {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
</div>
<div class="box-body">
@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="row">
<div class="col-xs-3 form-group {{ $errors->has('name') ? 'has-error' : '' }}">
{!! Form::label('name',Lang::get('lang.name')) !!}
{!! $errors->first('name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('name',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-3 form-group {{ $errors->has('slug') ? 'has-error' : '' }}">
{!! Form::label('slug',Lang::get('lang.slug')) !!}
{!! $errors->first('slug', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('slug',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-3 form-group {{ $errors->has('parent') ? 'has-error' : '' }}">
{!! Form::label('parent',Lang::get('lang.parent')) !!}
{!! $errors->first('parent', '<spam class="help-block">:message</spam>') !!}
{!!Form::select('parent',[''=>'Select a Group','Categorys'=>$category->lists('name','name')],null,['class' => 'form-control select']) !!}
</div>
<div class="col-xs-3 form-group {{ $errors->has('status') ? 'has-error' : '' }}">
{!! Form::label('status',Lang::get('lang.status')) !!}
{!! $errors->first('status', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('status','1',true) !!}{{Lang::get('lang.active')}}
</div>
<div class="col-xs-3">
{!! Form::radio('status','0',null) !!}{{Lang::get('lang.inactive')}}
</div>
</div>
</div>
<div class="col-md-12 form-group {{ $errors->has('description') ? 'has-error' : '' }}">
{!! Form::label('description',Lang::get('lang.description')) !!}
{!! $errors->first('description', '<spam class="help-block">:message</spam>') !!}
{!! Form::textarea('description',null,['class' => 'form-control','size' => '128x10','id'=>'description','placeholder'=>'Enter the description']) !!}
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$("textarea").wysihtml5();
});
</script>
@stop
@section('FooterInclude')
@stop
<!-- /content -->

View File

@@ -0,0 +1,55 @@
<div class="box-body" >
@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="row">
<div class="col-xs-4 form-group {{ $errors->has('name') ? 'has-error' : '' }}">
{!! Form::label('name',Lang::get('lang.name')) !!}
{!! $errors->first('name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('name',null,['class' => 'form-control']) !!}
</div>
{{-- --}}
<div class="col-xs-4 form-group {{ $errors->has('status') ? 'has-error' : '' }}">
{!! Form::label('status',Lang::get('lang.status')) !!}
{!! $errors->first('status', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('status','1',true) !!}{!! Lang::get('lang.active') !!}
</div>
<div class="col-xs-3">
{!! Form::radio('status','0',null) !!}{!! Lang::get('lang.inactive') !!}
</div>
</div>
</div>
</div>
<div class="form-group {{ $errors->has('description') ? 'has-error' : '' }}">
{!! Form::label('description',Lang::get('lang.description')) !!}
{!! $errors->first('description', '<spam class="help-block">:message</spam>') !!}
{!! Form::textarea('description',null,['class' => 'form-control','size' => '50x10','id'=>'myNicEditor','placeholder'=>Lang::get('lang.enter_the_description')]) !!}
</div>
</div>

View File

@@ -0,0 +1,45 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('category')
active
@stop
@section('all-category')
class="active"
@stop
@section('content')
<div class="box box-primary">
<div class="box-header">
<h2 class="box-title">{{Lang::get('lang.category')}}</h2></div>
<div class="box-body">
<!-- 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="row">
<div class="col-sm-12">
{!! Datatable::table()
->addColumn(Lang::get('lang.name'),
Lang::get('lang.create'),
Lang::get('lang.action')) // these are the column headings to be shown
->setUrl(route('api.category')) // this is the route where data will be retrieved
->render() !!}
</div>
</div>
</div>
</div>
@stop

View File

@@ -0,0 +1,116 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('pages')
active
@stop
@section('add-pages')
class="active"
@stop
@section('content')
{!! Form::open(array('action' => 'Agent\kb\PageController@store' , 'method' => 'post') )!!}
<div class="box-body">
<div class="row">
<div class="col-md-9">
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">{!! Lang::get('lang.addpages') !!}</h3>
</div>
<div class="box-body">
<div class="row">
<div class="col-md-6 form-group {{ $errors->has('name') ? 'has-error' : '' }}">
{!! Form::label('name',Lang::get('lang.name')) !!}
{!! $errors->first('name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('name',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-6 form-group {{ $errors->has('slug') ? 'has-error' : '' }}">
{!! Form::label('slug',Lang::get('lang.slug')) !!}
{!! $errors->first('slug', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('slug',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="form-group {{ $errors->has('description') ? 'has-error' : '' }}">
{!! Form::label('description',Lang::get('lang.description')) !!}
{!! $errors->first('description', '<spam class="help-block">:message</spam>') !!}
<div class="form-group" style="background-color:white">
{!! Form::textarea('description',null,['class' => 'form-control color','size' => '110x15','id'=>'myNicEditor','placeholder'=>Lang::get('lang.enter_the_description')]) !!}
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">{{Lang::get('lang.publish')}}</h3>
</div>
<div class="box-body">
<div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">
{!! Form::label('status',Lang::get('lang.status')) !!}
{!! $errors->first('status', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-4">
{!! Form::radio('status','1',true) !!}{{Lang::get('lang.published')}}
</div>
<div class="col-xs-3">
{!! Form::radio('status','0',null) !!}{{Lang::get('lang.draft')}}
</div>
</div>
</div>
<div class="form-group {{ $errors->has('visibility') ? 'has-error' : '' }}">
{!! Form::label('visibility',Lang::get('lang.visibility')) !!}
{!! $errors->first('visibility', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('visibility','1',true) !!}{{Lang::get('lang.public')}}
</div>
<div class="row">
<div class="col-xs-3">
{!! Form::radio('visibility','0',null) !!}{{Lang::get('lang.private')}}
</div>
</div>
</div>
</div>
</div>
<div class="box-footer" style="background-color:#f5f5f5;">
<div style="margin-left:140px;">
{!! Form::submit(Lang::get('lang.publish'),['class'=>'btn btn-primary'])!!}
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$("textarea").wysihtml5();
});
</script>
@stop
<!-- /content -->

View File

@@ -0,0 +1,112 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('pages')
active
@stop
@section('all-pages')
class="active"
@stop
@section('content')
{!! Form::model($page,['url' => 'page/'.$page->slug, 'method' => 'PATCH','files'=>true]) !!}
<!-- <div class="form-group {{ $errors->has('company_name') ? 'has-error' : '' }}"> -->
<!-- table -->
<div class="box-body">
<div class="row">
<div class="col-md-9">
<div class="row">
<div class="col-md-6 form-group {{ $errors->has('name') ? 'has-error' : '' }}">
{!! Form::label('name',Lang::get('lang.name')) !!}
{!! $errors->first('name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('name',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-6 form-group {{ $errors->has('slug') ? 'has-error' : '' }}">
{!! Form::label('slug',Lang::get('lang.slug')) !!}
{!! $errors->first('slug', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('slug',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="form-group {{ $errors->has('description') ? 'has-error' : '' }}">
{!! Form::label('description',Lang::get('lang.description')) !!}
{!! $errors->first('description', '<spam class="help-block">:message</spam>') !!}
<div class="form-group" style="background-color:white">
{!! Form::textarea('description',null,['class' => 'form-control color','size' => '110x15','id'=>'myNicEditor','placeholder'=>'Enter the description']) !!}
</div>
</div>
</div>
<div class="col-md-3">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">{{Lang::get('lang.publish')}}</h3>
</div>
<div class="box-body">
<div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">
{!! Form::label('status',Lang::get('lang.status')) !!}
{!! $errors->first('status', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-4">
{!! Form::radio('status',1,true) !!}{{Lang::get('lang.published')}}
</div>
<div class="col-xs-3">
{!! Form::radio('status',0,null) !!}{{Lang::get('lang.draft')}}
</div>
</div>
</div>
<div class="form-group {{ $errors->has('visibility') ? 'has-error' : '' }}">
{!! Form::label('visibility',Lang::get('lang.visibility')) !!}
{!! $errors->first('visibility', '<spam class="help-block">:message</spam>') !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('visibility','1',true) !!}{{Lang::get('lang.public')}}
</div>
<div class="row">
<div class="col-xs-3">
{!! Form::radio('visibility','0',null) !!}{{Lang::get('lang.private')}}
</div>
</div>
</div>
</div>
</div>
<div class="box-footer" style="background-color:#f5f5f5;">
<div style="margin-left:140px;">
{!! Form::submit(Lang::get('lang.publish'),['class'=>'btn btn-primary'])!!}
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$("textarea").wysihtml5();
});
</script>
@stop
<!-- /content -->

View File

@@ -0,0 +1,45 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('pages')
active
@stop
@section('all-pages')
class="active"
@stop
@section('content')
<div class="box box-primary">
<div class="box-header">
<h2 class="box-title">{{Lang::get('lang.pages')}}</h2></div>
<div class="box-body ">
<!-- 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="row">
<div class="col-sm-12">
{!! Datatable::table()
->addColumn(Lang::get('lang.name'),
Lang::get('lang.created'),
Lang::get('lang.action')) // these are the column headings to be shown
->setUrl(route('api.page')) // this is the route where data will be retrieved
->render() !!}
</div>
</div>
</div>
</div>
@stop

View File

@@ -0,0 +1,46 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('comment')
class="active"
@stop
@section('content')
<div class="box box-primary">
<div class="box-header">
<h2 class="box-title">{{Lang::get('lang.comments')}}</h2></div>
<div class="box-body">
<!-- 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="row">
<div class="col-sm-12">
{!! Datatable::table()
->addColumn(Lang::get('lang.name'),
Lang::get('lang.email'),
Lang::get('lang.website'),
Lang::get('lang.comment'),
Lang::get('lang.status'),
Lang::get('lang.created'),
Lang::get('lang.action')) // these are the column headings to be shown
->setUrl(route('api.comment')) // this is the route where data will be retrieved
->render() !!}
</div>
</div>
</div>
</div>
@stop

View File

@@ -0,0 +1,80 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('content')
<!-- open a form -->
{!! Form::model($faq,['url' => 'post-create-faq/'.$faq->id, 'method' => 'PATCH','files'=>true]) !!}
<!-- <div class="form-group {{ $errors->has('company_name') ? 'has-error' : '' }}"> -->
<!-- table -->
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<div class="content-header">
<div>
<h4>Faqs {!! Form::submit('save',['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
</div>
</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
<!-- Name text form Required -->
<div class="box-body table-responsive"style="overflow:hidden;">
<div class="row">
<div class="col-md-10 form-group {{ $errors->has('faq') ? 'has-error' : '' }}">
{!! Form::label('faq','Description') !!}
{!! $errors->first('faq', '<spam class="help-block">:message</spam>') !!}
{!! Form::textarea('faq',null,['class' => 'form-control','size' => '30x5','id'=>'faq']) !!}
</div>
<script language="JavaScript" type="text/javascript">
CKEDITOR.replace( 'faq',
{
filebrowserUploadUrl : '/uploader/upload.php',
});
CKEDITOR.replace( 'faq', { toolbar : 'MyToolbar' } );
</script>
</div>
</div>
</div></div>
<script type="text/javascript">
$(function () {
$("textarea").wysihtml5();
});
</script>
@stop
</div><!-- /.box -->
@stop
<!-- /content -->
@stop

View File

@@ -0,0 +1,199 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('content')
<div class="row">
<div class="col-md-6">
{!! Form::model($user,['url'=>'post-profile' , 'method' => 'PATCH','files'=>true]) !!}
<div class="box box-primary">
<div class="content-header">
<h4>Profile {!! Form::submit('Save',['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
</div>
<div class="box-body">
@if(Session::has('success1'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-ban"></i>
<b>Success</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success1')}}
</div>
@endif
<!-- fail message -->
@if(Session::has('fails1'))
<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('fails1')}}
</div>
@endif
<div class="row">
<div class="form-group col-md-6 {{ $errors->has('firstname') ? 'has-error' : '' }}">
{!! Form::label('firstname',Lang::get('lang.firstname')) !!}
{!! $errors->first('firstname', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('firstname',null,['class' => 'form-control']) !!}
</div>
<div class="form-group col-md-6 {{ $errors->has('lastname') ? 'has-error' : '' }}">
{!! Form::label('lastname',Lang::get('lang.lastname')) !!}
{!! $errors->first('lastname', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('lastname',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
{!! Form::label('gender',Lang::get('lang.gender')) !!}
<div class="row">
<div class="col-xs-6">
{!! Form::radio('gender','1',true) !!}{{Lang::get('lang.male')}}
</div>
<div class="col-xs-6">
{!! Form::radio('gender','0') !!}{{Lang::get('lang.female')}}
</div>
</div>
</div>
<div class="col-md-6 form-group">
{!! Form::label('timezone',Lang::get('lang.timezone')) !!}
{!!Form::select('timezone',$time->lists('location','name') ,null,['class' => 'form-control select']) !!}
</div>
</div>
<div class="form-group">
{!! Form::label('email',Lang::get('lang.email')) !!}
<div>
{{$user->email}}
</div>
</div>
<div class="form-group {{ $errors->has('company') ? 'has-error' : '' }}">
{!! Form::label('company',Lang::get('lang.company')) !!}
{!! $errors->first('company', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('company',null,['class' => 'form-control']) !!}
</div>
<div class="row">
<div class="col-xs-3 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
{!! Form::label('ext',Lang::get('lang.ext')) !!}
{!! $errors->first('ext', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('ext',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-9 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
{!! Form::label('phone_number',Lang::get('lang.phone')) !!}
{!! $errors->first('phone_number', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
{!! Form::label('mobile',Lang::get('lang.mobile')) !!}
{!! $errors->first('mobile', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('profile_pic') ? 'has-error' : '' }}">
<div class="btn btn-default btn-file">
{!! Form::label('profile_pic',Lang::get('lang.profilepicture')) !!}
{!! $errors->first('profile_pic', '<spam class="help-block">:message</spam>') !!}
{!! Form::file('profile_pic') !!}
</div>
</div>
{!! Form::token() !!}
{!! Form::close() !!}
</div>
</div>
</div>
<div class="col-md-6">
{!! Form::model($user,['url'=>'post-profile-password/'.$user->id, 'method' => 'PATCH']) !!}
<div class="box box-primary">
<div class="content-header">
<h4>Change Password {!! Form::submit('Save',['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
</div>
<div class="box-body">
@if(Session::has('success2'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Success.
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success2')}}
</div>
@endif
<!-- fail message -->
@if(Session::has('fails2'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Failed.
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails2')}}
</div>
@endif
<div class="form-group has-feedback {{ $errors->has('old_password') ? 'has-error' : '' }}">
{!! Form::label('old_password',Lang::get('lang.oldpassword')) !!}
{!! Form::password('old_password',['placeholder'=>'Password','class' => 'form-control']) !!}
{!! $errors->first('old_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="form-group has-feedback {{ $errors->has('new_password') ? 'has-error' : '' }}">
{!! Form::label('new_password',Lang::get('lang.newpassword')) !!}
{!! Form::password('new_password',['placeholder'=>'New Password','class' => 'form-control']) !!}
{!! $errors->first('new_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="form-group has-feedback {{ $errors->has('confirm_password') ? 'has-error' : '' }}">
{!! Form::label('confirm_password',Lang::get('lang.confirmpassword')) !!}
{!! Form::password('confirm_password',['placeholder'=>'Confirm Password','class' => 'form-control']) !!}
{!! $errors->first('confirm_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
</div>
</div>
</div>
</div>
{!! Form::close() !!}
@stop

View File

@@ -0,0 +1,63 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('settings')
class="active"
@stop
@section('content')
<!-- open a form -->
{!! Form::model($settings,['url' => 'postsettings/'.$settings->id, 'method' => 'PATCH','files'=>true]) !!}
<div class="box-header" style="margin:-5px;margin-top:-25px;">
<h3 class="box-title">{{Lang::get('lang.settings')}}</h3> {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}
</div>
<!-- Custom Tabs -->
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab_1" data-toggle="tab">{{Lang::get('lang.system')}}</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab_1">
{{-- For Form --}}
<!-- 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
<!-- Name text form Required -->
<div class="row">
<div class="col-md-3 form-group">
{!! Form::label('pagination',Lang::get('lang.numberofelementstodisplay')) !!}
{!! $errors->first('pagination', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('pagination',$settings->pagination,['class' => 'form-control']) !!}
</div>
</div>
</div><!-- /.tab-pane -->
</div><!-- /.tab-pane -->
</div><!-- /.tab-content -->
</div><!-- nav-tabs-custom -->
<script type="text/javascript">
$(function () {
$("textarea").wysihtml5();
});
</script>
@stop
<!-- /content -->

View File

@@ -0,0 +1,80 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('widget')
active
@stop
@section('side1')
class="active"
@stop
<script type="text/javascript" src="{{asset('dist/js/SetnicEdit.js')}}"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
@section('content')
{!! Form::model($side,['url' => 'side1/'.$side->id, 'method' => 'PATCH','files'=>true]) !!}
<!-- <div class="form-group {{ $errors->has('company_name') ? 'has-error' : '' }}"> -->
<!-- table -->
<div class="box box-primary">
@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-header">
<h3 class="box-title">{{Lang::get('lang.sidewidget1')}}</h3> {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}
</div>
<div class="box-body">
<div class="row">
<div class="col-md-10">
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
{!! Form::label('title',Lang::get('lang.title')) !!}
{!! $errors->first('title', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('title',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('content') ? 'has-error' : '' }}">
{!! Form::label('content',Lang::get('lang.content')) !!}
{!! $errors->first('content', '<spam class="help-block">:message</spam>') !!}
{!! Form::textarea('content',null,['class' => 'form-control','size' => '128x10','id'=>'footer','placeholder'=>Lang::get('lang.enter_the_description')]) !!}
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$("textarea").wysihtml5();
});
</script>
@stop
@section('FooterInclude')
@stop
<!-- /content -->

View File

@@ -0,0 +1,79 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('widget')
active
@stop
@section('side2')
class="active"
@stop
<script type="text/javascript" src="{{asset('dist/js/SetnicEdit.js')}}"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
@section('content')
{!! Form::model($side,['url' => 'side2/'.$side->id, 'method' => 'PATCH','files'=>true]) !!}
<!-- <div class="form-group {{ $errors->has('company_name') ? 'has-error' : '' }}"> -->
<!-- table -->
<div class="box box-primary">
@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-header">
<h3 class="box-title">{{Lang::get('lang.sidewidget2')}}</h3> {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}
</div>
<div class="box-body">
<div class="row">
<div class="col-md-10">
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
{!! Form::label('title',Lang::get('lang.title')) !!}
{!! $errors->first('title', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('title',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('content') ? 'has-error' : '' }}">
{!! Form::label('content',Lang::get('lang.content')) !!}
{!! $errors->first('content', '<spam class="help-block">:message</spam>') !!}
{!! Form::textarea('content',null,['class' => 'form-control','size' => '128x10','id'=>'footer','placeholder'=>Lang::get('lang.enter_the_description')]) !!}
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$("textarea").wysihtml5();
});
</script>
@stop
@section('FooterInclude')
@stop
<!-- /content -->

View File

@@ -0,0 +1,192 @@
@extends('themes.default1.agent.layout.agent')
@extends('themes.default1.agent.layout.sidebar')
@section('widget')
active
@stop
@section('social')
class="active"
@stop
@section('content')
<!-- open a form -->
{!! Form::model($social,['url' => 'postsocial', 'method' => 'PATCH','files'=>true]) !!}
<!-- <div class="form-group {{ $errors->has('company_name') ? 'has-error' : '' }}"> -->
<!-- table -->
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">{{Lang::get('lang.social')}}</h3> {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}
</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
<!-- Name text form Required -->
<div class="box-body table-responsive"style="overflow:hidden;">
<div class="row">
<div class=" col-xs-4 form-group {{ $errors->has('google') ? 'has-error' : '' }}">
{!! Form::label('google','google') !!}
{!! $errors->first('google', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('google',null,['class' => 'form-control']) !!}
</div>
<div class=" col-xs-4 form-group {{ $errors->has('twitter') ? 'has-error' : '' }}">
{!! Form::label('twitter','twitter') !!}
{!! $errors->first('twitter', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('twitter',null,['class' => 'form-control']) !!}
</div>
<div class=" col-xs-4 form-group {{ $errors->has('facebook') ? 'has-error' : '' }}">
{!! Form::label('facebook','facebook') !!}
{!! $errors->first('facebook', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('facebook',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="row">
<div class=" col-xs-4 form-group {{ $errors->has('linkedin') ? 'has-error' : '' }}">
{!! Form::label('linkedin','linkedin') !!}
{!! $errors->first('linkedin', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('linkedin',null,['class' => 'form-control']) !!}
</div>
<div class=" col-xs-4 form-group {{ $errors->has('stumble') ? 'has-error' : '' }}">
{!! Form::label('stumble','stumble') !!}
{!! $errors->first('stumble', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('stumble',null,['class' => 'form-control']) !!}
</div>
<div class=" col-xs-4 form-group {{ $errors->has('deviantart') ? 'has-error' : '' }}">
{!! Form::label('deviantart','deviantart') !!}
{!! $errors->first('deviantart', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('deviantart',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="row">
<div class=" col-xs-4 form-group {{ $errors->has('flickr') ? 'has-error' : '' }}">
{!! Form::label('flickr','flickr') !!}
{!! $errors->first('flickr', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('flickr',null,['class' => 'form-control']) !!}
</div>
<div class=" col-xs-4 form-group {{ $errors->has('skype') ? 'has-error' : '' }}">
{!! Form::label('skype','skype') !!}
{!! $errors->first('skype', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('skype',null,['class' => 'form-control']) !!}
</div>
<div class=" col-xs-4 form-group {{ $errors->has('rss') ? 'has-error' : '' }}">
{!! Form::label('rss','rss') !!}
{!! $errors->first('rss', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('rss',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="row">
<div class=" col-xs-4 form-group {{ $errors->has('youtube') ? 'has-error' : '' }}">
{!! Form::label('youtube','youtube') !!}
{!! $errors->first('youtube', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('youtube',null,['class' => 'form-control']) !!}
</div>
<div class=" col-xs-4 form-group {{ $errors->has('vimeo') ? 'has-error' : '' }}">
{!! Form::label('vimeo','vimeo') !!}
{!! $errors->first('vimeo', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('vimeo',null,['class' => 'form-control']) !!}
</div>
<div class=" col-xs-4 form-group {{ $errors->has('pinterest') ? 'has-error' : '' }}">
{!! Form::label('pinterest','pinterest') !!}
{!! $errors->first('pinterest', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('pinterest',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="row">
<div class=" col-xs-6 form-group {{ $errors->has('dribbble') ? 'has-error' : '' }}">
{!! Form::label('dribbble','dribbble') !!}
{!! $errors->first('dribbble', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('dribbble',null,['class' => 'form-control']) !!}
</div>
<div class=" col-xs-6 form-group {{ $errors->has('instagram') ? 'has-error' : '' }}">
{!! Form::label('instagram','instagram') !!}
{!! $errors->first('instagram', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('instagram',null,['class' => 'form-control']) !!}
</div>
</div>
</div>
</div>
</div></div>
@stop
</div><!-- /.box -->
@section('FooterInclude')
@stop
@stop
<!-- /content -->
@stop

View File

@@ -0,0 +1,375 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" ng-app="myApp">
<title>Faveo | HELP DESK</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<meta name="_token" content="{!! csrf_token() !!}"/>
<!-- Bootstrap 3.3.2 -->
<link href="{{asset("lb-faveo/downloads/bootstrap.min.css")}}" rel="stylesheet" type="text/css" />
<!-- Font Awesome Icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<!-- Ionicons -->
<link href="{{asset("lb-faveo/downloads/ionicons.min.css")}}" rel="stylesheet" type="text/css" />
<!-- fullCalendar 2.2.5-->
<link href="{{asset("lb-faveo/plugins/fullcalendar/fullcalendar.min.css")}}" rel="stylesheet" type="text/css" />
<link href="{{asset("lb-faveo/plugins/fullcalendar/fullcalendar.print.css")}}" rel="stylesheet" type="text/css" media='print' />
<!-- Theme style -->
<link href="{{asset("lb-faveo/dist/css/AdminLTE.css")}}" rel="stylesheet" type="text/css" />
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link href="{{asset("lb-faveo/dist/css/skins/_all-skins.min.css")}}" rel="stylesheet" type="text/css" />
<!-- iCheck -->
<link href="{{asset("lb-faveo/plugins/iCheck/flat/blue.css")}}" rel="stylesheet" type="text/css" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<link rel="stylesheet" href="{{asset("lb-faveo/dist/css/tabby.css")}}" type="text/css">
<link href="{{asset("lb-faveo/downloads/jquerysctipttop.css")}}" rel="stylesheet" type="text/css">
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<link rel="stylesheet" href="{{asset("lb-faveo/dist/css/editor.css")}}" type="text/css">
<link href="{{asset("lb-faveo/plugins/filebrowser/plugin.js")}}" rel="stylesheet" type="text/css" />
{{-- jquery ui css --}}
<link type="text/css" href="{{asset("lb-faveo/downloads/jquery.ui.css")}}" rel="stylesheet">
<link type="text/css" href="{{asset("lb-faveo/plugins/datatables/dataTables.bootstrap.css")}}" rel="stylesheet">
<link href="{{asset("lb-faveo/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css")}}" rel="stylesheet" type="text/css" />
<!-- <link type="text/css" href="http://code.jquery.com/ui/1.9.1/themes/redmond/jquery-ui.css" rel="stylesheet"> -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
@yield('HeadInclude')
</head>
<body class="skin-yellow skin-green fixed">
<div class="wrapper">
<header class="main-header">
<a href="" class="logo"><b>Faveo </b>HELPDESK</a>
<?php
$company = App\Model\helpdesk\Settings\Company::where('id', '=', '1')->first();
if ($company != null) {
}
?>
<!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="tabs tabs-horizontal nav navbar-nav navbar-left">
<li @yield('Dashboard')><a data-target="#tabA" href="#">{!! Lang::get('lang.dashboard') !!}</a></li>
<li @yield('Users')><a data-target="#tabB" href="#">{!! Lang::get('lang.users') !!}</a></li>
<li @yield('Tickets')><a data-target="#tabC" href="#">{!! Lang::get('lang.tickets') !!}</a></li>
<li @yield('Tools')><a data-target="#tabD" href="#">{!! Lang::get('lang.tools') !!}</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
@if(Auth::user()->role == 'admin')
<li><a href="{{url('agents')}}">{!! Lang::get('lang.admin_panel') !!}</a></li>
@endif
<!-- User Account: style can be found in dropdown.less -->
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
@if(Auth::user())
@if(Auth::user()->profile_pic)
<img src="{{asset('lb-faveo/profilepic')}}{{'/'}}{{Auth::user()->profile_pic}}"class="user-image" alt="User Image"/>
@else
<img src="{{ Gravatar::src(Auth::user()->email) }}" class="user-image" alt="User Image">
@endif
<span class="hidden-xs">{{Auth::user()->first_name." ".Auth::user()->last_name}}</span>
@endif
</a>
<ul class="dropdown-menu">
<!-- User image -->
<li class="user-header" style="background-color:#343F44;">
@if(Auth::user()->profile_pic)
<img src="{{asset('lb-faveo/profilepic')}}{{'/'}}{{Auth::user()->profile_pic}}" class="img-circle" alt="User Image" />
@else
<img src="{{ Gravatar::src(Auth::user()->email) }}" class="img-circle" alt="User Image">
@endif
<p>
{{Auth::user()->first_name." ".Auth::user()->last_name}} - {{Auth::user()->role}}
<small></small>
</p>
</li>
<!-- Menu Footer-->
<li class="user-footer" style="background-color:#1a2226;">
<div class="pull-left">
<a href="{{URL::route('profile')}}" class="btn btn-info btn-sm"><b>{!! Lang::get('lang.profile') !!}</b></a>
</div>
<div class="pull-right">
<a href="{{url('auth/logout')}}" class="btn btn-danger btn-sm"><b>{!! Lang::get('lang.sign_out') !!}</b></a>
</div>
</li>
</ul>
</li>
</nav>
</header>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<div class="user-panel">
@if (trim($__env->yieldContent('profileimg')))
<h1>@yield('profileimg')</h1>
@else
<div class = "row">
<div class="col-xs-3"></div>
<div class="col-xs-2" style="width:50%;">
<a href="{!! url('profile') !!}">
@if(Auth::user() && Auth::user()->profile_pic)
<img src="{{asset('lb-faveo/profilepic')}}{{'/'}}{{Auth::user()->profile_pic}}" class="img-circle" alt="User Image" />
@else
<img src="{{ Gravatar::src(Auth::user()->email) }}" class="img-circle" alt="User Image">
@endif
</a>
</div>
</div>
@endif
<div class="info" style="text-align:center;">
@if(Auth::user())
<p>{{Auth::user()->first_name." ".Auth::user()->last_name}}</p>
@endif
@if(Auth::user() && Auth::user()->active==1)
<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
@else
<a href="#"><i class="fa fa-circle"></i> Offline</a>
@endif
</div>
</div>
<!-- search form -->
{{-- <form action="#" method="get" class="sidebar-form"> --}}
{{-- <div class="input-group"> --}}
{{-- <input type="text" name="q" class="form-control" placeholder="Search..."/> --}}
{{-- <span class="input-group-btn"> --}}
{{-- <button type='submit' name='seach' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button> --}}
{{-- </span> --}}
{{-- </div> --}}
{{-- </form> --}}
<!-- /.search form -->
<!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
@yield('sidebar')
<li class="header">{!! Lang::get('lang.Tickets') !!}</li>
<?php
$inbox = App\Model\helpdesk\Ticket\Tickets::all();
$myticket = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', Auth::user()->id)->where('status','1')->get();
$unassigned = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '0')->where('status','1')->get();
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','1')->get();
$i = count($tickets);
?>
<li @yield('inbox')>
<a href="{{ url('/ticket/inbox') }}" id="load-inbox">
<i class="fa fa-envelope"></i> <span>{!! Lang::get('lang.inbox') !!}</span> <small class="label pull-right bg-green"><?php echo $i;?></small> </a>
</li>
<li @yield('myticket')>
<a href="{{url('ticket/myticket')}}">
<i class="fa fa-user"></i> <span>{!! Lang::get('lang.my_tickets') !!} </span>
<small class="label pull-right bg-green">{{count($myticket) }}</small>
</a>
</li>
<li @yield('unassigned')>
<a href="{{url('unassigned')}}">
<i class="fa fa-th"></i> <span>{!! Lang::get('lang.unassigned') !!}</span>
<small class="label pull-right bg-green">{{count($unassigned)}}</small>
</a>
</li>
<li @yield('trash')>
<a href="{{url('trash')}}">
<i class="fa fa-trash-o"></i> <span>{!! Lang::get('lang.trash') !!}</span>
<?php $deleted = App\Model\helpdesk\Ticket\Tickets::where('status', '5')->get();?>
<small class="label pull-right bg-green">{{count($deleted)}}</small>
</a>
</li>
<li class="header">{!! Lang::get('lang.Departments') !!}</li>
<?php
$depts = App\Model\helpdesk\Agent\Department::all();
foreach ($depts as $dept) {
$open = App\Model\helpdesk\Ticket\Tickets::where('status','=','1')->where('assigned_to','=', 0)->where('dept_id','=',$dept->id)->get();
$open = count($open);
$underprocess = App\Model\helpdesk\Ticket\Tickets::where('status','=','1')->where('assigned_to','>', 0)->where('dept_id','=',$dept->id)->get();
$underprocess = count($underprocess);
$closed = App\Model\helpdesk\Ticket\Tickets::where('status','=','2')->where('dept_id','=',$dept->id)->get();
$closed = count($closed);
// $underprocess = 0;
// foreach ($inbox as $ticket4) {
// if ($ticket4->assigned_to == null) {
// } else {
// $underprocess++;
// }
// }
if (Auth::user()->role == 'admin') { ?>
<li class="treeview">
<a href="#">
<i class="fa fa-folder-open"></i> <span>{!! $dept->name !!}</span> <i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li><a href="{!! url::route('dept.open.ticket',$dept->name) !!}"><i class="fa fa-circle-o"></i>{!! Lang::get('lang.open') !!}<small class="label pull-right bg-green">{!! $open !!}</small></a></li>
<li><a href="{!! url::route('dept.inprogress.ticket',$dept->name) !!}"><i class="fa fa-circle-o"></i>{!! Lang::get('lang.inprogress') !!}<small class="label pull-right bg-green">{!! $underprocess !!}</small></a></li>
<li><a href="{!! url::route('dept.closed.ticket',$dept->name) !!}"><i class="fa fa-circle-o"></i>{!! Lang::get('lang.closed') !!}<small class="label pull-right bg-green">{!! $closed !!}</small></a></li>
</ul>
</li>
<?php } if (Auth::user()->role == 'agent' && Auth::user()->primary_dpt == $dept->name) { ?>
<li class="treeview">
<a href="#">
<i class="fa fa-folder-open"></i> <span>{!! $dept->name !!}</span> <i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li><a href="{!! url::route('dept.open.ticket',$dept->name) !!}"><i class="fa fa-circle-o"></i>{!! Lang::get('lang.open') !!}<small class="label pull-right bg-green">{!! $open !!}</small></a></li>
<li><a href="{!! url::route('dept.inprogress.ticket',$dept->name) !!}"><i class="fa fa-circle-o"></i>{!! Lang::get('lang.inprogress') !!}<small class="label pull-right bg-green">{!! $underprocess !!}</small></a></li>
<li><a href="{!! url::route('dept.closed.ticket',$dept->name) !!}"><i class="fa fa-circle-o"></i>{!! Lang::get('lang.closed') !!}<small class="label pull-right bg-green">{!! $closed !!}</small></a></li>
</ul>
</li>
<?php } } ?>
</ul>
</section>
<!-- /.sidebar -->
</aside>
<?php $agent_group = Auth::user()->assign_group;
$group = App\Model\helpdesk\Agent\Groups::where('name', '=', $agent_group)->where('group_status', '=', '1')->first();
// dd($group); ?>
<!-- Right side column. Contains the navbar and content of the page -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="tab-content" style="background-color: white;padding: 0 20px 0 20px">
<div class="collapse navbar-collapse" id="navbar-collapse">
<div class="tabs-content">
<div class="tabs-pane @yield('dashboard-bar')" id="tabA">
<ul class="nav navbar-nav">
<li id="bar" @yield('dashboard') ><a href="{{url('dashboard')}}">{!! Lang::get('lang.dashboard') !!}</a></li>
<li id="bar" @yield('profile') ><a href="{{url('profile')}}">{!! Lang::get('lang.profile') !!}</a></li>
</ul>
</div>
<div class="tabs-pane @yield('user-bar')" id="tabB">
<ul class="nav navbar-nav">
<li id="bar" @yield('user')><a href="{{ url('user') }}" >{!! Lang::get('lang.user_directory') !!}</a></li></a></li>
<li id="bar" @yield('organizations')><a href="{{ url('organizations') }}" >{!! Lang::get('lang.organizations') !!}</a></li></a></li>
</ul>
</div>
<div class="tabs-pane @yield('ticket-bar')" id="tabC">
<ul class="nav navbar-nav">
<li id="bar" @yield('open')><a href="{{ url('/ticket/open') }}" >{!! Lang::get('lang.open') !!}</a></li>
<li id="bar" @yield('answered')><a href="{{ url('/ticket/answered') }}" >{!! Lang::get('lang.answered') !!}</a></li>
<li id="bar" @yield('myticket')><a href="{{ url('/ticket/myticket') }}" >{!! Lang::get('lang.my_tickets') !!}</a></li>
{{-- <li id="bar" @yield('ticket')><a href="{{ url('ticket') }}" >Ticket</a></li> --}}
{{-- <li id="bar" @yield('overdue')><a href="{{ url('/ticket/overdue') }}" >Overdue</a></li> --}}
<li id="bar" @yield('assigned')><a href="{{ url('/ticket/assigned') }}" >{!! Lang::get('lang.assigned') !!}</a></li>
<li id="bar" @yield('closed')><a href="{{ url('/ticket/closed') }}" >{!! Lang::get('lang.closed') !!}</a></li>
<?php if ($group->can_create_ticket == 1) {?>
<li id="bar" @yield('newticket')><a href="{{ url('/newticket') }}" >{!! Lang::get('lang.create_ticket') !!}</a></li>
<?php } ?>
</ul>
</div>
<div class="tabs-pane @yield('tools-bar')" id="tabD">
<ul class="nav navbar-nav">
<li id="bar" @yield('tools')><a href="{{ url('/canned/list') }}" >{!! Lang::get('lang.canned_response') !!}</a></li>
<li id="bar" @yield('kb')><a href="{{ url('/comment') }}" >{!! Lang::get('lang.knowledge_base') !!}</a></li>
</ul>
</div>
</div>
</div>
</div>
<section class="content-header">
@yield('PageHeader')
@yield('breadcrumbs')
</section>
<!-- Main content -->
<section class="content">
@yield('content')
</section><!-- /.content -->
</div>
<footer class="main-footer">
<div class="pull-right hidden-xs">
<b>Version</b> {!! Config::get('app.version') !!}
</div>
<strong>{!! Lang::get('lang.copyright') !!} &copy; {!! date('Y') !!} <a href="{!! $company->website !!}">{!! $company->company_name !!}</a>.</strong> {!! Lang::get('lang.all_rights_reserved') !!}. {!! Lang::get('lang.powered_by') !!} <a href="http://www.faveohelpdesk.com/">Faveo</a>
</footer>
</div><!-- ./wrapper -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Bootstrap 3.3.2 JS -->
<script src="{{asset("lb-faveo/downloads/bootstrap.min.js")}}" type="text/javascript"></script>
<!-- Slimscroll -->
<script src="{{asset("lb-faveo/plugins/slimScroll/jquery.slimscroll.min.js")}}" type="text/javascript"></script>
<!-- FastClick -->
<script src="{{asset("lb-faveo/plugins/fastclick/fastclick.min.js")}}"></script>
<!-- AdminLTE App -->
<script src="{{asset("lb-faveo/dist/js/app.min.js")}}" type="text/javascript"></script>
<!-- AdminLTE for demo purposes -->
{{-- // <script src="{{asset("dist/js/demo.js")}}" type="text/javascript"></script> --}}
<!-- iCheck -->
<script src="{{asset("lb-faveo/plugins/iCheck/icheck.min.js")}}" type="text/javascript"></script>
{{-- maskinput --}}
<script src="js/jquery.maskedinput.min.js" type="text/javascript"></script>
{{-- jquery ui --}}
<script src="{{asset("lb-faveo/downloads/jquery.ui.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/plugins/datatables/dataTables.bootstrap.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/plugins/datatables/jquery.dataTables.js")}}" type="text/javascript"></script>
<!-- Page Script -->
<script>
$(function() {
// Enable iCheck plugin for checkboxes
// iCheck for checkbox and radio inputs
// $('input[type="checkbox"]').iCheck({
// checkboxClass: 'icheckbox_flat-blue',
// radioClass: 'iradio_flat-blue'
// });
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
}
$(this).data("clicks", !clicks);
});
//Handle starring for glyphicon and font awesome
$(".mailbox-star").click(function(e) {
e.preventDefault();
//detect type
var $this = $(this).find("a > i");
var glyph = $this.hasClass("glyphicon");
var fa = $this.hasClass("fa");
//Switch states
if (glyph) {
$this.toggleClass("glyphicon-star");
$this.toggleClass("glyphicon-star-empty");
}
if (fa) {
$this.toggleClass("fa-star");
$this.toggleClass("fa-star-o");
}
});
});
</script>
<script type="text/javascript">
// $(document).ready(function() {
// $("#content").Editor();
// });
// </script>
<!-- // <script src="../plugins/jQuery/jQuery-2.1.3.min.js"></script> -->
<script src="{{asset("lb-faveo/dist/js/tabby.js")}}"></script>
<!-- // <script src="{{asset("dist/js/editor.js")}}"></script> -->
<!-- CK Editor -->
<!-- // <script src="{{asset("//cdn.ckeditor.com/4.4.3/standard/ckeditor.js")}}"></script> -->
<script src="{{asset("lb-faveo/downloads/CKEditor.js")}}"></script>
<script src="{{asset("lb-faveo/plugins/filebrowser/plugin.js")}}"></script>
<script src="{{asset("lb-faveo/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js")}}" type="text/javascript"></script>
<script>
// $(function () {
// //Add text editor
// $("textarea").wysihtml5();
// });
</script>
<script type="text/javascript">
$.ajaxSetup({
headers: { 'X-CSRF-Token' : $('meta[name=_token]').attr('content') }
});
</script>
@yield('FooterInclude')
</body>
</html>

View File

@@ -0,0 +1,272 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Faveo Knowledge Base</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<!-- Bootstrap 3.3.2 -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<!-- Font Awesome Icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<!-- Ionicons -->
<link href="http://code.ionicframework.com/ionicons/2.0.0/css/ionicons.min.css" rel="stylesheet" type="text/css" />
<!-- fullCalendar 2.2.5-->
<link href="{{asset("lb-faveo/plugins/fullcalendar/fullcalendar.min.css")}}" rel="stylesheet" type="text/css" />
<link href="{{asset("lb-faveo/plugins/fullcalendar/fullcalendar.print.css")}}" rel="stylesheet" type="text/css" media='print' />
<!-- Theme style -->
<link href="{{asset("lb-faveo/dist/css/AdminLTE.min.css")}}" rel="stylesheet" type="text/css" />
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link href="{{asset("lb-faveo/dist/css/skins/_all-skins.min.css")}}" rel="stylesheet" type="text/css" />
<!-- iCheck -->
<link href="{{asset("lb-faveo/plugins/iCheck/flat/blue.css")}}" rel="stylesheet" type="text/css" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<link rel="stylesheet" href="{{asset("lb-faveo/dist/css/tabby.css")}}" type="text/css">
<link href="http://www.jqueryscript.net/css/jquerysctipttop.css" rel="stylesheet" type="text/css">
<link type="text/css" href="http://code.jquery.com/ui/1.9.1/themes/redmond/jquery-ui.css" rel="stylesheet">
<link href="http://www.jqueryscript.net/css/jquerysctipttop.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="//cdn.datatables.net/1.10.0/js/jquery.dataTables.js"></script>
<link href="{{asset("lb-faveo/plugins/filebrowser/plugin.js")}}" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="{{asset('lb-faveo/dist/js/nicEdit.js')}}"></script>
@yield('HeadInclude')
</head>
<body class="skin-blue">
<div class="wrapper" id="RefreshAssign">
<header class="main-header">
<?php $settings = App\Model\kb\Settings::where('id', '=', '1')->first();?>
@if($settings->logo)
<a href=""><img src="{{asset('lb-faveo/Img/icon/'.$settings->logo)}}" class="logo" alt="KNOWLEDGE BASE"/></a>
@else
<a href="" class="logo">KNOWLEDGE BASE</a>
@endif
<!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="tabs tabs-horizontal nav navbar-nav">
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
@if(Auth::user())
@if(Auth::user()->profile_pic)
<img src="{{asset('lb-faveo/dist/img')}}{{'/'}}{{Auth::user()->profile_pic}}" class="user-image" alt="User Image"/>
@else
<img src="{{ Gravatar::src(Auth::user()->email) }}" class="user-image" alt="User Image">
@endif
@endif
<span class="hidden-xs">{!! Auth::user()->firstname." ".Auth::user()->lastname !!}</span>
</a>
<ul class="dropdown-menu">
<!-- User image -->
<li class="user-header">
@if(Auth::user())
@if(Auth::user()->profile_pic)
<img src="{{asset('lb-faveo/dist/img')}}{{'/'}}{{Auth::user()->profile_pic}}" class="img-circle" alt="User Image"/>
@else
<img src="{{ Gravatar::src(Auth::user()->email) }}" class="img-circle" alt="User Image">
@endif
@endif
<p>
<span class="hidden-xs">{!! Auth::user()->firstname." ".Auth::user()->lastname !!}</span>
</p>
</li>
<!-- Menu Body -->
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="{{url('profile')}}" class="btn btn-default btn-flat">{{Lang::get('lang.profile')}}</a>
</div>
<div class="pull-right">
<a href="{{ url('/auth/logout') }}" class="btn btn-default btn-flat">{{Lang::get('lang.signout')}}</a>
</div>
</li>
</ul>
</li>
</ul>
<!-- <form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" id="navbar-search-input" placeholder="Search">
</div>
</form> -->
</div><!-- /.navbar-collapse -->
</nav>
</header>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel -->
<!-- search form -->
<!-- /.search form -->
<!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
<div class="user-panel">
<div class="pull-left image">
@if(Auth::user() && Auth::user()->profile_pic)
<img src="{{asset('lb-faveo/dist/img')}}{{'/'}}{{Auth::user()->profile_pic}}" class="img-circle" alt="User Image" />
@else
<img src="{{ Gravatar::src(Auth::user()->email) }}" class="img-circle" alt="User Image">
@endif
</div>
<div class="pull-left info">
@if(Auth::user())
<p>{!! Auth::user()->firstname !!}{!! " ". Auth::user()->lastname !!}</p>
@endif
@if(Auth::user() && Auth::user()->active==1)
<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
@else
<a href="#"><i class="fa fa-circle"></i> Offline</a>
@endif
</div>
</div>
<li class="treeview @yield('category')">
<a href="#">
<i class="fa fa-list-ul"></i> <span>{{Lang::get('lang.category')}}</span>
<i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li @yield('add-category')><a href="{{url('category/create')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.addcategory')}}</a></li>
<li @yield('all-category')><a href="{{url('category')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.allcategory')}}</a></li>
</ul>
</li>
<li class="treeview @yield('article')">
<a href="#">
<i class="fa fa-edit"></i> <span>{{Lang::get('lang.article')}}</span>
<i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li @yield('add-article')><a href="{{url('article/create')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.addarticle')}}</a></li>
<li @yield('all-article')><a href="{{url('article')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.allarticle')}}</a></li>
</ul>
</li>
<li class="treeview @yield('pages')">
<a href="#">
<i class="fa fa-file-text"></i> <span>{{Lang::get('lang.pages')}}</span>
<i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li @yield('add-pages')><a href="{{url('page/create')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.addpages')}}</a></li>
<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('footer1')><a href="{{url('create-footer')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.footer1')}}</a></li>
<li @yield('footer2')><a href="{{url('create-footer2')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.footer2')}}</a></li>
<li @yield('footer3')><a href="{{url('create-footer3')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.footer3')}}</a></li>
<li @yield('footer4')><a href="{{url('create-footer4')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.footer4')}}</a></li>
<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> Social</a></li>
</ul>
</li>
<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')>
<a href="{{url('settings')}}">
<i class="fa fa-wrench"></i>
<span>{{Lang::get('lang.settings')}}</span>
</a>
</li>
</ul>
</section>
<!-- /.sidebar -->
</aside>
<!-- Right side column. Contains the navbar and content of the page -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="tab-content" style="background-color: white; border-top:1px solid #F0F0F0;">
<div class="collapse navbar-collapse" id="navbar-collapse">
<div class="tabs-content">
</div>
</div>
</div>
<section class="content-header">
@yield('PageHeader')
@yield('breadcrumbs')
</section>
<!-- Main content -->
<section class="content">
@yield('content')
</section><!-- /.content -->
<!-- /.content-wrapper -->
</div>
<footer class="main-footer">
<div class="pull-right hidden-xs">
<b>Version</b> {{$settings->version}}
</div>
<strong>Copyright &copy; {{date("Y")}} <a href="{{$settings->website}}"> {{$settings->company_name}}</a>. Powered By <a href="http://www.faveohelpdesk.com">Faveo</a>.</strong>
</footer>
</div><!-- ./wrapper -->
<!-- jQuery 2.1.3 -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Bootstrap 3.3.2 JS -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" type="text/javascript"></script>
<script type="text/javascript" src="//cdn.datatables.net/1.10.0/js/jquery.dataTables.js"></script>
<!-- Slimscroll -->
<script src="{{asset("lb-faveo/plugins/slimScroll/jquery.slimscroll.min.js")}}" type="text/javascript"></script>
<!-- FastClick -->
<script src='{{asset("lb-faveo/plugins/fastclick/fastclick.min.js")}}'></script>
<!-- AdminLTE App -->
<script src="{{asset("lb-faveo/dist/js/app.min.js")}}" type="text/javascript"></script>
<!-- iCheck -->
<script src="{{asset("lb-faveo/plugins/iCheck/icheck.min.js")}}" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery.maskedinput.min.js"></script>
<script src="{{asset("lb-faveo/plugins/filebrowser/plugin.js")}}"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="{{asset('lb-faveo/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js')}}" type="text/javascript"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
@yield('FooterInclude')
</body>
</html>

View File

@@ -0,0 +1,68 @@
@section('Tools')
class="active"
@stop
@section('tools-bar')
active
@stop
@section('kb')
class="active"
@stop
@section('sidebar')
<li class="header">KNOWLEDGE BASE</li>
<li class="treeview @yield('category')">
<a href="#">
<i class="fa fa-list-ul"></i> <span>{{Lang::get('lang.category')}}</span>
<i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li @yield('add-category')><a href="{{url('category/create')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.addcategory')}}</a></li>
<li @yield('all-category')><a href="{{url('category')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.allcategory')}}</a></li>
</ul>
</li>
<li class="treeview @yield('article')">
<a href="#">
<i class="fa fa-edit"></i> <span>{{Lang::get('lang.article')}}</span>
<i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li @yield('add-article')><a href="{{url('article/create')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.addarticle')}}</a></li>
<li @yield('all-article')><a href="{{url('article')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.allarticle')}}</a></li>
</ul>
</li>
<li class="treeview @yield('pages')">
<a href="#">
<i class="fa fa-file-text"></i> <span>{{Lang::get('lang.pages')}}</span>
<i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li @yield('add-pages')><a href="{{url('page/create')}}"><i class="fa fa-circle-o"></i> {{Lang::get('lang.addpages')}}</a></li>
<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')>
<a href="{{url('comment')}}">
<i class="fa fa-comments-o"></i>
<span>{{Lang::get('lang.comments')}}</span>
</a>
</li>
<li @yield('settings')>
<a href="{{url('settings')}}">
<i class="fa fa-wrench"></i>
<span>{{Lang::get('lang.settings')}}</span>
</a>
</li>
@stop