Commit fe96bcdd0613839b22939945347b246f2316e4d9
1 parent
76627175
Commit
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
frontend/views/layouts/main.php
| ... | ... | @@ -169,15 +169,15 @@ |
| 169 | 169 | 'items' => [ |
| 170 | 170 | [ |
| 171 | 171 | 'url' => [ '/projects' ], |
| 172 | - 'template' => '<a href="{url}" class="main-menu-icons-home"><span>' . count(\Yii::$app->user->identity->commentProjectsActive) . '</span></a>', | |
| 172 | + 'template' => '<a href="{url}" class="main-menu-icons-home">'.((!empty(\Yii::$app->user->identity->commentProjectsActive))?('<span>' . count(\Yii::$app->user->identity->commentProjectsActive) . '</span>'):('')).'</a>', | |
| 173 | 173 | ], |
| 174 | 174 | [ |
| 175 | 175 | 'url' => [ 'chat/list' ], |
| 176 | - 'template' => '<a href="{url}" class="main-menu-icons-edit"><span>' . \Yii::$app->user->identity->newMessagesCount . '</span></a>', | |
| 176 | + 'template' => '<a href="{url}" class="main-menu-icons-edit">'.((!empty(\Yii::$app->user->identity->newMessagesCount))?('<span>' . \Yii::$app->user->identity->newMessagesCount . '</span>'):('')).'</a>', | |
| 177 | 177 | ], |
| 178 | 178 | [ |
| 179 | 179 | 'url' => [ '/bookmarks' ], |
| 180 | - 'template' => "<a href='{url}' class='main-menu-icons-copy'><span>" . count(\Yii::$app->user->identity->bookmarks) . "</span></a>", | |
| 180 | + 'template' => '<a href="{url}" class="main-menu-icons-copy">'.((!empty(\Yii::$app->user->identity->bookmarks))?('<span>' . count(\Yii::$app->user->identity->bookmarks) . '</span>'):('')).'</a>', | |
| 181 | 181 | ], |
| 182 | 182 | ], |
| 183 | 183 | ]); | ... | ... |
frontend/views/site/registration.php