This repository has been archived by the owner on Mar 19, 2021. It is now read-only.
/
index.phtml
102 lines (80 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
<?php
$title = 'Clients';
$this->headTitle($title);
if($order_by == 'ClientId')
$url_order = $order == 'ASC' ? 'DESC' : 'ASC';
elseif($order_by == 'Name')
$url_order = $order == 'ASC' ? 'DESC' : 'ASC';
elseif($order_by == 'Uname')
$url_order = $order == 'ASC' ? 'DESC' : 'ASC';
?>
<h3 class="text-muted"><?php echo $title; ?></h3>
<hr />
<p>
Clients per page:
<a href="<?php echo $this->url('client', array('order_by' => $this->order_by, 'order' => $this->order, 'limit' => '10', null, null, true)); ?>">10</a> |
<a href="<?php echo $this->url('client', array('order_by' => $this->order_by, 'order' => $this->order, 'limit' => '25', null, null, true)); ?>">25</a> |
<a href="<?php echo $this->url('client', array('order_by' => $this->order_by, 'order' => $this->order, 'limit' => '50', null, null, true)); ?>">50</a> |
<a href="<?php echo $this->url('client', array('order_by' => $this->order_by, 'order' => $this->order, 'limit' => '100', null, null, true)); ?>">100</a>
</p>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-body">
<table class="table table-striped table-hover" style="font-size: 9pt;">
<tr>
<th><a href="<?php echo $this->url('client', array('order_by' => 'ClientId', 'order' => $url_order, 'limit' => $this->limit)); ?>"><?php echo $this->translate("Client"); ?></a></th>
<th><a href="<?php echo $this->url('client', array('order_by' => 'Name', 'order' => $url_order, 'limit' => $this->limit)); ?>"><?php echo $this->translate("Name"); ?></a></th>
<th><a href="<?php echo $this->url('client', array('order_by' => 'Uname', 'order' => $url_order, 'limit' => $this->limit)); ?>"><?php echo $this->translate("Version"); ?></a></th>
<th>Autoprune</th>
<th>Fileretention</th>
<th>Jobretention</th>
<th>Action</th>
</tr>
<?php foreach($this->paginator as $client) : ?>
<tr>
<td><a href="<?php echo $this->url('client', array('action'=>'details', 'id' => $client->clientid)); ?>"><?php echo $this->escapeHtml($client->clientid); ?></a></td>
<td><a href="<?php echo $this->url('client', array('action'=>'details', 'id' => $client->clientid)); ?>"><?php echo $this->escapeHtml($client->name); ?></a></td>
<td><?php echo $this->escapeHtml($client->uname); ?></td>
<td><?php echo $this->escapeHtml($client->autoprune); ?></td>
<td><?php echo $this->printRetention($client->fileretention) . " days"; ?></td>
<td><?php echo $this->printRetention($client->jobretention) . " days"; ?></td>
<td>
<div class="btn-group">
<button type="button" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-cog"></span></button>
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="
<?php
echo $this->url(
'restore',
array('action' => 'index'),
array('query' => array(
'type' => 1,
'client' => $client->name,
'restoreclient' => $client->name
)
));
?>
"><span class="glyphicon glyphicon-import"></span> Restore most recent backup</a></li>
</ul>
</div>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
<?php
echo $this->paginationControl(
$this->paginator,
'Elastic',
array('partial/paginator.phtml', 'Client'),
array('route' => 'client')
);
?>
</div>
</div>