-
Notifications
You must be signed in to change notification settings - Fork 0
/
client_services_serviceinfo.pdt
81 lines (79 loc) · 4.03 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
<?php
if ($this->Html->ifSet($service->cancellation_reason)) {
?>
<div class="alert alert-danger mb-2">
<p><?php $this->_('ClientServices.serviceinfo.cancellation_reason', false, $service->cancellation_reason);?></p>
</div>
<?php
}
if ($this->Html->ifSet($content)) {
echo $content;
} else {
?>
<div class="alert alert-info">
<p><?php $this->_('ClientServices.serviceinfo.no_results');?></p>
</div>
<?php
}
// List add-on services
if (($num_services = count($this->Html->ifSet($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++) {
?>
<tr class="expand service_info">
<td><?php $this->Html->_($services[$i]->package->name);?></td>
<td><?php $this->Html->_($services[$i]->name);?></td>
<td>
<?php
if ($this->Html->ifSet($services[$i]->package_pricing->period) == 'onetime') {
$this->Html->_($periods[$services[$i]->package_pricing->period]);
} else {
$term = $this->Html->_($services[$i]->package_pricing->term, true);
$period = ($term == 1 ? $this->Html->ifSet($periods[$services[$i]->package_pricing->period]) : $this->Html->ifSet($periods[$services[$i]->package_pricing->period . '_plural']));
$renewal_price = $this->CurrencyFormat->format($this->Html->ifSet($services[$i]->renewal_price), $this->Html->ifSet($services[$i]->override_currency, $this->Html->ifSet($services[$i]->package_pricing->currency)));
$this->_('ClientServices.index.recurring_term', false, $this->Html->safe($term), $this->Html->safe($period), $this->Html->safe($renewal_price));
}
?>
</td>
<td><?php $this->Html->_($statuses[$this->Html->ifSet($services[$i]->status)]);?></td>
<td>
<?php
if ($services[$i]->status != 'canceled') {
?>
<div class="btn-group">
<a href="<?php echo $this->base_uri . 'services/manage/' . $this->Html->_($services[$i]->id, true) . '/';?>" 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 $this->Html->_($services[$i]->id);?>">
<td colspan="5" class="subtable">
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
}
?>