deleted.blade.php
5.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
@extends ('backend.layouts.app')
@section ('title', trans('labels.backend.access.users.management') . ' | ' . trans('labels.backend.access.users.deleted'))
@section('after-styles')
{{ Html::style("https://cdn.datatables.net/v/bs/dt-1.10.15/datatables.min.css") }}
@endsection
@section('page-header')
<h1>
{{ trans('labels.backend.access.users.management') }}
<small>{{ trans('labels.backend.access.users.deleted') }}</small>
</h1>
@endsection
@section('content')
<div class="box box-success">
<div class="box-header with-border">
<h3 class="box-title">{{ trans('labels.backend.access.users.deleted') }}</h3>
<div class="box-tools pull-right">
@include('backend.access.includes.partials.user-header-buttons')
</div><!--box-tools pull-right-->
</div><!-- /.box-header -->
<div class="box-body">
<div class="table-responsive">
<table id="users-table" class="table table-condensed table-hover">
<thead>
<tr>
<th>{{ trans('labels.backend.access.users.table.last_name') }}</th>
<th>{{ trans('labels.backend.access.users.table.first_name') }}</th>
<th>{{ trans('labels.backend.access.users.table.email') }}</th>
<th>{{ trans('labels.backend.access.users.table.confirmed') }}</th>
<th>{{ trans('labels.backend.access.users.table.roles') }}</th>
<th>{{ trans('labels.backend.access.users.table.created') }}</th>
<th>{{ trans('labels.backend.access.users.table.last_updated') }}</th>
<th>{{ trans('labels.general.actions') }}</th>
</tr>
</thead>
</table>
</div><!--table-responsive-->
</div><!-- /.box-body -->
</div><!--box-->
@endsection
@section('after-scripts')
{{ Html::script("https://cdn.datatables.net/v/bs/dt-1.10.15/datatables.min.js") }}
{{ Html::script("js/backend/plugin/datatables/dataTables-extend.js") }}
<script>
$(function() {
$('#users-table').DataTable({
dom: 'lfrtip',
processing: false,
serverSide: true,
autoWidth: false,
ajax: {
url: '{{ route("admin.access.user.get") }}',
type: 'post',
data: {status: false, trashed: true},
error: function (xhr, err) {
if (err === 'parsererror')
location.reload();
}
},
columns: [
{data: 'last_name', name: '{{config('access.users_table')}}.last_name'},
{data: 'first_name', name: '{{config('access.users_table')}}.first_name'},
{data: 'roles', name: '{{config('access.roles_table')}}.name', sortable: false},
{data: 'created_at', name: '{{config('access.users_table')}}.created_at'},
{data: 'updated_at', name: '{{config('access.users_table')}}.updated_at'},
{data: 'actions', name: 'actions', searchable: false, sortable: false}
],
order: [[0, "asc"]],
searchDelay: 500
});
$("body").on("click", "a[name='delete_user_perm']", function(e) {
e.preventDefault();
var linkURL = $(this).attr("href");
swal({
title: "{{ trans('strings.backend.general.are_you_sure') }}",
text: "{{ trans('strings.backend.access.users.delete_user_confirm') }}",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "{{ trans('strings.backend.general.continue') }}",
cancelButtonText: "{{ trans('buttons.general.cancel') }}",
closeOnConfirm: false
}, function(isConfirmed){
if (isConfirmed){
window.location.href = linkURL;
}
});
}).on("click", "a[name='restore_user']", function(e) {
e.preventDefault();
var linkURL = $(this).attr("href");
swal({
title: "{{ trans('strings.backend.general.are_you_sure') }}",
text: "{{ trans('strings.backend.access.users.restore_user_confirm') }}",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "{{ trans('strings.backend.general.continue') }}",
cancelButtonText: "{{ trans('buttons.general.cancel') }}",
closeOnConfirm: false
}, function(isConfirmed){
if (isConfirmed){
window.location.href = linkURL;
}
});
});
});
</script>
@endsection