Commit 2ad81a2857f74c228b987b84047298ab85cb1e02
1 parent
c9142cf7
login link
Showing
1 changed file
with
8 additions
and
1 deletions
 
Show diff stats
frontend/views/layouts/main.php
| ... | ... | @@ -15,6 +15,13 @@ use frontend\widgets\Seo; | 
| 15 | 15 | use yii\widgets\Breadcrumbs; | 
| 16 | 16 | |
| 17 | 17 | AppAsset::register ($this); | 
| 18 | +$this->registerJs(" | |
| 19 | + $('.seo-span').replaceWith ( | |
| 20 | + function (){ | |
| 21 | + return'<a href=\"'+$(this).data('link')+'\" title=\"'+$(this).text()+'\" rel=\"nofollow\">'+$(this).html()+'</a>'; | |
| 22 | + } | |
| 23 | + ); | |
| 24 | +", View::POS_READY); | |
| 18 | 25 | $this->registerJs (" | 
| 19 | 26 | $('.phone .more').bind('click',function(){ | 
| 20 | 27 | $('.phone .more_block').toggle(); | 
| ... | ... | @@ -161,7 +168,7 @@ $this->registerJs(" | 
| 161 | 168 | </div> | 
| 162 | 169 | <div class="fr"> | 
| 163 | 170 | <?php if (Yii::$app->user->isGuest): ?> | 
| 164 | - <a href="<?= Url::to (['login/index']) ?>" id='login'><span>Личный кабинет</span></a> | |
| 171 | + <span class="seo-span" data-link="<?= Url::to (['login/index']) ?>" id='login'><span>Личный кабинет</span></span> | |
| 165 | 172 | <?php else: ?> | 
| 166 | 173 | <a href="<?= Url::to (['iam/index']) ?>"><?= Text::getShort (Yii::$app->user->identity->username, 20) ?></a> | 
| 167 | 174 | <a href="<?= Url::to (['login/logout']) ?>" class='logout'>Выход</a> | ... | ... | 
