-
Notifications
You must be signed in to change notification settings - Fork 1
/
client_contacts_navigation.pdt
35 lines (33 loc) · 1.3 KB
/
client_contacts_navigation.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
<div class="list-group">
<?php
$navigation = [
'contacts/' => [
'name' => 'ClientContacts.navigation.nav_contacts',
'active' => false,
'icon' => 'fas fa-list'
],
'contacts/add/' => [
'name' => 'ClientContacts.navigation.nav_contacts_add',
'active' => false,
'icon' => 'fas fa-plus-square'
],
'' => [
'name' => 'ClientContacts.navigation.nav_return',
'active' => false,
'icon' => 'fas fa-arrow-left'
]
];
foreach ($navigation as $link => $value) {
$link = $this->Html->safe((isset($link) ? $link : ''));
$prefix = !str_contains($link, '://') ? (isset($this->base_uri) ? $this->Html->safe($this->base_uri) : null) : '';
?>
<a href="<?php echo $prefix . $link;?>" class="list-group-item list-group-item-action <?php echo ($value['active'] ? 'active' : '');?>">
<i class="<?php (print (isset($value['icon']) ? $this->Html->safe($value['icon']) : null));?> fa-fw"></i>
<?php
$this->_($value['name'] ?? null);
?>
</a>
<?php
}
?>
</div>