Skip to content

Commit 1ed537a

Browse files
committed
Fixed template code to avoid php notice messages
1 parent c723095 commit 1ed537a

File tree

7 files changed

+15
-8
lines changed

7 files changed

+15
-8
lines changed

admin/template/admin/role.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ if(isset($this->capabilities) && is_array($this->capabilities)) {
123123
@capability [data-v-capability-value] = $value
124124
@capability [data-v-capability-value]|name = <?php echo "capabilities[$value]";?>
125125
@capability [data-v-capability-value]|addNewAttribute = <?php
126-
if (in_array($value, $this->role['permissions']['capabilities'])) echo 'checked';
126+
if (isset($this->role['permissions']['capabilities']) && in_array($value, $this->role['permissions']['capabilities'])) echo 'checked';
127127
?>
128128
129129
@capability|after = <?php

admin/template/components/notifications.tpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ $count = $notificationComponent['count'] ?? 0;
3434
?>
3535
3636
37-
@notifications [data-v-group-notification-count]|addClass = <?php echo $notification['badge'];?>
38-
@notifications [data-v-group-icon]|class = <?php echo $notification['icon'];?>
37+
@notifications [data-v-group-notification-count]|addClass = $notification['badge']
38+
@notifications [data-v-group-icon]|class = $notification['icon']
3939
4040
4141
@notifications [data-v-group-notification]|after = <?php

admin/template/filters.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if (isset($this->filter[$text])) echo $this->filter[$text];
3636
foreach($options as $key => $option){?>
3737
3838
@option|value = $key
39-
@option = <?php echo ucfirst($option);?>
39+
@option = <?php echo Vvveb\humanReadable($option);?>
4040
4141
@option|after = <?php
4242
}}?>

admin/template/localization/currency.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import(crud.tpl, {"type":"currency"})
22

3-
[data-v-currency] select[data-v-currency-*] option|addNewAttribute = <?php if (isset($this->currency) && $this->currency['status'] == '@@__value__@@') echo 'selected';?>
3+
[data-v-currency] select[data-v-currency-*] option|addNewAttribute = <?php if (isset($this->currency) && isset($this->currency['status']) == '@@__value__@@') echo 'selected';?>
44

55

66
[data-v-currency] [data-v-image]|data-v-image = $this->currency['image_url']

admin/template/settings/sites.tpl

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import(common.tpl)
22
import(pagination.tpl)
33

4+
[data-v-sites]|before = <?php
5+
$count = $this->count;
6+
?>
7+
48
@site = [data-v-sites] [data-v-site]
59
@site|deleteAllButFirstChild
610

711
@site|before = <?php
12+
813
if(isset($this->sitesList) && is_array($this->sitesList)) {
914
//$pagination = $this->sites[$_sites_idx]['pagination'];
1015
foreach ($this->sitesList as $index => $site) {?>
@@ -21,4 +26,4 @@ if(isset($this->sitesList) && is_array($this->sitesList)) {
2126
2227
@site|after = <?php
2328
}
24-
}?>
29+
}?>

app/template/components/language.tpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ $language['language'] = empty($language['language']) ? $_default : $language['la
2626
2727
@language [data-v-language-name] = $lang['name']
2828
@language [data-v-language-img]|src = $lang['img']
29-
@language [data-v-language-url]|href = <?php echo $lang['url'];?>
29+
@language [data-v-language-url]|href = $lang['url']
3030
31-
@language button|formaction = <?php echo $lang['url'];?>
31+
@language button|formaction =$lang['url']
3232
3333
@language [data-v-language-code]|value = $lang['code']
3434
@language a[data-v-language-code]|href = $lang['code']

app/template/product/product.tpl

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import(common.tpl)
22

33
head > title = $this->product['name']
4+
head > meta[name="keywords"]|content = $this->product['meta_keywords']
5+
head > meta[name="description"]|content = $this->product['meta_description']
46

57
//body|append = <?php var_dump($this->product);?>

0 commit comments

Comments
 (0)