This repository has been archived by the owner on Mar 19, 2021. It is now read-only.
/
index.phtml
120 lines (100 loc) · 3.37 KB
/
index.phtml
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
119
<?php
/**
*
* bareos-webui - Bareos Web-Frontend
*
* @link https://github.com/bareos/bareos-webui for the canonical source repository
* @copyright Copyright (c) 2013-2015 Bareos GmbH & Co. KG (http://www.bareos.org/)
* @license GNU Affero General Public License (http://www.gnu.org/licenses/)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
$title = _('Clients');
$this->headTitle($title);
?>
<div class="row">
<div class="col-md-8">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><?php echo $this->translate('Clients'); ?></h3>
</div>
<div class="panel-body">
<table class="table table-hover" id="clients">
<thead class="bg-primary">
<th><?php echo $this->translate("Name"); ?></th>
<th><?php echo $this->translate("Filedaemon"); ?></th>
<th><?php echo $this->translate("Actions"); ?></th>
</thead>
</table>
</div>
</div>
</div>
</div>
<?php
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.functions.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.min.js');
echo $this->headLink()->prependStylesheet($this->basePath() . '/css/datatables.min.css');
?>
<script>
$(document).ready(function() {
var table= $('#clients').DataTable( {
"ajax": {
"url": "<?php echo $this->url('client', array('action' => 'getData'), null) . '?data=all'; ?>",
"dataSrc": ""
},
"columns" : [
{
"className": "client-name",
"orderable": true,
"data": "name"
},
{
"className": "client-uname",
"orderable": true,
"data": "uname"
},
{
"className": "actions",
"orderable": false,
"data": "name"
}
],
"paging": true,
"ordering": true,
"info": true,
"pagingType": "full_numbers",
"stateSave": true,
"order": [[0, 'asc']],
"columnDefs": [
{
"targets": 0,
"data": "name",
"render": function(data, type, full, meta) {
return '<a href="<?php echo $this->basePath() . '/client/details/'; ?>'+data+'">'+data+'</a>';
}
},
{
"targets": 2,
"render": function(data, type, full, meta) {
return '<a href="<?php echo $this->basePath() . '/restore/index?type=client&client='; ?>'+data+'"><button type="button" class="btn btn-default btn-xs" id="btn-1" data-toggle="tooltip" data-placement="top" title="Restore"><span class="glyphicon glyphicon-import"></span></button></a>';
}
}
]
} );
$('#clients tbody').on('mouseover', '#btn-1', function () {
$('[data-toggle="tooltip"]').tooltip();
})
} );
</script>