-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclient_services_addons.pdt
84 lines (79 loc) · 4.83 KB
/
client_services_addons.pdt
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
<div class="col-md-3">
<?php echo (isset($tabs) ? $tabs : null);?>
</div>
<div class="col-md-9">
<?php echo (isset($message) ? $message : null);?>
<?php
$this->WidgetClient->clear();
if ((isset($client_can_create_addons) ? $client_can_create_addons : null)) {
$link_buttons = [
['name' => $this->_('ClientServices.addons.create_addon', true), 'attributes' => ['href' => $this->Html->safe($this->base_uri . 'services/addaddon/' . (isset($service->id) ? $service->id : null) . '/')]]
];
$this->WidgetClient->setLinkButtons($link_buttons);
}
$this->WidgetClient->create($this->_('ClientServices.addons.boxtitle_addons', true, (isset($package->name) ? $package->name : null), (isset($service->name) ? $service->name : null)), ['id' => 'client_addons'], (isset($render_section) ? $render_section : null));
$this->WidgetClient->startBody();
if ((isset($services) ? $services : false) && (($num_services = count($services)) > 0)) {
?>
<div class="table-responsive">
<table class="table table-curved table-striped" id="addons">
<thead>
<tr>
<th><?php $this->_('ClientServices.index.heading_package');?></th>
<th><?php $this->_('ClientServices.index.heading_label');?></th>
<th><?php $this->_('ClientServices.index.heading_term');?></th>
<th><?php $this->_('ClientServices.index.heading_status');?></th>
<th><?php $this->_('ClientServices.index.heading_options');?></th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $i < $num_services; $i++) {
$service_status = (isset($services[$i]->status) ? $services[$i]->status : null);
?>
<tr>
<td><?php (print (isset($services[$i]->package->name) ? $this->Html->safe($services[$i]->package->name) : null));?></td>
<td><?php (print (isset($services[$i]->name) ? $this->Html->safe($services[$i]->name) : null));?></td>
<td>
<?php
if ((isset($services[$i]->package_pricing->period) ? $services[$i]->package_pricing->period : null) == 'onetime') {
(print (isset($periods[$services[$i]->package_pricing->period]) ? $this->Html->safe($periods[$services[$i]->package_pricing->period]) : null));
} else {
$term = (isset($services[$i]->package_pricing->term) ? $this->Html->safe($services[$i]->package_pricing->term) : null);
echo $this->Html->safe($this->Html->concat(' ', $term, ($term == 1 ? (isset($periods[$services[$i]->package_pricing->period]) ? $periods[$services[$i]->package_pricing->period] : null) : (isset($periods[$services[$i]->package_pricing->period . '_plural']) ? $periods[$services[$i]->package_pricing->period . '_plural'] : null))));
}
?>
</td>
<td><?php echo (isset($statuses[$service_status]) ? $this->Html->safe($statuses[$service_status]) : null);?></td>
<td>
<?php
if ($services[$i]->status != 'canceled') {
?>
<div class="btn-group">
<a href="<?php echo $this->base_uri . 'services/manage/' . (isset($services[$i]->id) ? $this->Html->safe($services[$i]->id) : null) . '/';?>" class="btn btn-sm btn-light">
<i class="fas fa-cog fa-fw"></i> <?php $this->_('ClientServices.index.option_manage');?>
</a>
</div>
<?php
}
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
} else {
?>
<div class="alert alert-info">
<p><?php $this->_('ClientServices.addons.no_results');?></p>
</div>
<?php
}
$this->WidgetClient->endBody();
$this->WidgetClient->end();
?>
</div>