-
Notifications
You must be signed in to change notification settings - Fork 0
/
client_services_serviceinfo.pdt
82 lines (80 loc) · 4.74 KB
/
client_services_serviceinfo.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
<?php
if ((isset($service->cancellation_reason) ? $service->cancellation_reason : null)) {
?>
<div class="alert alert-danger mb-2">
<p><?php $this->_('ClientServices.serviceinfo.cancellation_reason', false, $service->cancellation_reason);?></p>
</div>
<?php
}
if ((isset($content) ? $content : null)) {
echo $content;
} else {
?>
<div class="alert alert-info mb-2">
<p><?php $this->_('ClientServices.serviceinfo.no_results');?></p>
</div>
<?php
}
// List add-on services
if (($num_services = count((isset($services) ? $services : []))) > 0) {
?>
<h4><?php $this->_('ClientServices.index.heading_addons');?></h4>
<div class="table-responsive">
<table class="table table-curved table-striped table-hover">
<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 class="expand service_info">
<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);
$period = ($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));
$renewal_price = $this->CurrencyFormat->format((isset($services[$i]->renewal_price) ? $services[$i]->renewal_price : null), (isset($services[$i]->override_currency) ? $services[$i]->override_currency : (isset($services[$i]->package_pricing->currency) ? $services[$i]->package_pricing->currency : null)));
$this->_('ClientServices.index.recurring_term', false, $this->Html->safe($term), $this->Html->safe($period), $this->Html->safe($renewal_price));
}
?>
</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>
<tr class="expand_details" id="services_<?php (print (isset($services[$i]->id) ? $this->Html->safe($services[$i]->id) : null));?>">
<td colspan="5" class="subtable">
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
}
?>