/home/mip/mip/app/Modules/Client/Views/reports/audittrail/view.blade.php
@extends('Client::reports-layout')
@section('page-body')
<!-- Content Header (Page header) -->
<!-- Main content -->
<section class="content">
<div class="box box-primary">
<div class="box-body">
<form method="get" action="{{route(config('modules.client').'.audittrail.excel')}}">
@can('export', $permissions)
@foreach(Input::all() as $input => $value)
<input type="hidden" name="{{$input}}" value="{{$value}}">
@endforeach
<span class="pull-right">
<button class="btn btn-danger btn-flat" type="button" onclick="window.close();"><i class="fa fa-times"></i> Close</button>
<button class="btn btn-success btn-flat" type="submit"><i class="fa fa-file-excel-o"></i> Export To Excel</button>
</span>
@endcan
<h4><b>Audit Trail Report List by {{$type}}</b></h4>
<span>From {{$date}}</span>
</form>
</div>
</div>
<div class="box box-default">
<div class="box-body">
<table class="table table-bordered table-striped table-hover data" id="logs-table" width="100%">
<thead>
<tr>
<th>#</th>
<th>Date</th>
<th>Module</th>
<th>Action</th>
<th>Name</th>
<th>Email</th>
<th>IP Address</th>
</tr>
</thead>
</table>
</div>
</div>
</section>
@stop
@section('page-js')
<script type="text/javascript">
$(function() {
var subjectTable = $('#logs-table').DataTable({
processing: true,
serverSide: true,
pagingType: "input",
iDisplayLength: 25,
filter: false,
ajax: {
url: 'get-user-report-data ',
method: 'POST',
"data": function(d){
d.report_type = "{{Input::get('report_type')}}";
d.user_id = "{{Input::get('user_id')}}";
d.start_date = "{{Input::get('start_date')}}";
d.end_date = "{{Input::get('end_date')}}";
}
},
columns: [
{
width:'10px', searchable: false, orderable: false,
render: function (data, type, row, meta) {
return meta.row + meta.settings._iDisplayStart + 1;
}
},
{ data: 'created_at', name: 'created_at', sortable: true, searchable: false},
{ data: 'module', name: 'module', sortable: false, searchable: false, visible: '<?php echo $visibleUser?>'},
{ data: 'action', name: 'action', sortable: false, searchable: false, visible: '<?php echo $visibleUser?>'},
{ data: 'user', name: 'user', sortable: false, searchable: false},
{ data: 'username', name: 'username', sortable: false, searchable: false, visible: '<?php echo $visibleLogin?>'},
{ data: 'ipaddress', name: 'ipaddress', sortable: false, searchable: false, visible: '<?php echo $visibleLogin?>'},
],
"order": [[1, "desc"]],
});
});
</script>
@stop