@@ -30,40 +30,29 @@ |
||
| 30 | 30 | |
| 31 | 31 | <p><?= Yii::t('site', 'We are glad to represent you demo of our Yii2 web application. It has:'); ?></p> |
| 32 | 32 | <ul> |
| 33 | - <li><?= Yii::t('site', 'role-based access control, that gives possibility to limit users activity;');?></li> |
|
| 33 | + <li><?= Yii::t('site', 'role-based access control, that gives possibility to limit users activity;'); ?></li> |
|
| 34 | 34 | <li><?= $user->isGuest ? |
| 35 | - Html::a(Yii::t('site', 'registration of new users with email confirmation'), [Url::to('/registration')]) : |
|
| 36 | - Yii::t('site', 'registration of new users with email confirmation'); ?>;</li> |
|
| 35 | + Html::a(Yii::t('site', 'registration of new users with email confirmation'), [Url::to('/registration')]) : Yii::t('site', 'registration of new users with email confirmation'); ?>;</li> |
|
| 37 | 36 | <li><?= $user->isGuest ? |
| 38 | - Html::a(Yii::t('site', 'password recovery (with email)'), [Url::to('/recovery')]) : |
|
| 39 | - Yii::t('site', 'password recovery (with email)'); ?>;</li> |
|
| 37 | + Html::a(Yii::t('site', 'password recovery (with email)'), [Url::to('/recovery')]) : Yii::t('site', 'password recovery (with email)'); ?>;</li> |
|
| 40 | 38 | <li><?= $user->isGuest ? |
| 41 | - Html::a(Yii::t('site', 'users login ("Remember me" during a week)'), [Url::to('/login')]) : |
|
| 42 | - Yii::t('site', 'users login ("Remember me" during a week)'); ?>;</li> |
|
| 39 | + Html::a(Yii::t('site', 'users login ("Remember me" during a week)'), [Url::to('/login')]) : Yii::t('site', 'users login ("Remember me" during a week)'); ?>;</li> |
|
| 43 | 40 | <li><?= $user->isGuest ? |
| 44 | - Html::a(Yii::t('site', 'users login with social network account (Facebook, Google, Twitter)'), [Url::to('/login')]) : |
|
| 45 | - Yii::t('site', 'users login with social network account (Facebook, Google, Twitter)'); ?>;</li> |
|
| 41 | + Html::a(Yii::t('site', 'users login with social network account (Facebook, Google, Twitter)'), [Url::to('/login')]) : Yii::t('site', 'users login with social network account (Facebook, Google, Twitter)'); ?>;</li> |
|
| 46 | 42 | <li><?= $user->can(User::ROLE_ADMIN) ? |
| 47 | - Html::a(Yii::t('site', 'users management (changing user role and status)'), [Url::to('//user/management')]) : |
|
| 48 | - Yii::t('site', 'users management (changing user role and status)'); ?>;</li> |
|
| 43 | + Html::a(Yii::t('site', 'users management (changing user role and status)'), [Url::to('//user/management')]) : Yii::t('site', 'users management (changing user role and status)'); ?>;</li> |
|
| 49 | 44 | <li><?= $user->can(User::ROLE_ADMIN) ? |
| 50 | - Html::a(Yii::t('site', 'mail templates management (modifying templates)'), [Url::to('/mail-template')]) : |
|
| 51 | - Yii::t('site', 'mail templates management (modifying templates)'); ?>;</li> |
|
| 45 | + Html::a(Yii::t('site', 'mail templates management (modifying templates)'), [Url::to('/mail-template')]) : Yii::t('site', 'mail templates management (modifying templates)'); ?>;</li> |
|
| 52 | 46 | <li><?= $user->can(User::ROLE_ADMIN) ? |
| 53 | - Html::a(Yii::t('site', 'static pages management (modifying content)'), [Url::to('/static-pages')]) : |
|
| 54 | - Yii::t('site', 'static pages management (modifying content)'); ?>;</li> |
|
| 47 | + Html::a(Yii::t('site', 'static pages management (modifying content)'), [Url::to('/static-pages')]) : Yii::t('site', 'static pages management (modifying content)'); ?>;</li> |
|
| 55 | 48 | <li><?= $user->can(User::ROLE_ADMIN) ? |
| 56 | - Html::a(Yii::t('site', 'options management (changing value)'), [Url::to('/options')]) : |
|
| 57 | - Yii::t('site', 'options management (changing value)'); ?>;</li> |
|
| 49 | + Html::a(Yii::t('site', 'options management (changing value)'), [Url::to('/options')]) : Yii::t('site', 'options management (changing value)'); ?>;</li> |
|
| 58 | 50 | <li><?= $user->can(User::ROLE_ADMIN) ? |
| 59 | - Html::a(Yii::t('site', 'feedbacks management (changing status of message)'), [Url::to('/feedback')]) : |
|
| 60 | - Yii::t('site', 'feedbacks management (changing status of message)'); ?>;</li> |
|
| 51 | + Html::a(Yii::t('site', 'feedbacks management (changing status of message)'), [Url::to('/feedback')]) : Yii::t('site', 'feedbacks management (changing status of message)'); ?>;</li> |
|
| 61 | 52 | <li><?= $user->can(User::ROLE_ADMIN) ? |
| 62 | - Yii::t('site', 'contact page for sending message to admin') : |
|
| 63 | - Html::a(Yii::t('site', 'contact page for sending message to admin'), [Url::to('/contact')]); ?>;</li> |
|
| 53 | + Yii::t('site', 'contact page for sending message to admin') : Html::a(Yii::t('site', 'contact page for sending message to admin'), [Url::to('/contact')]); ?>;</li> |
|
| 64 | 54 | <li><?= $user->isGuest ? |
| 65 | - Yii::t('site', 'users profiles (with ability of editing information)') : |
|
| 66 | - Html::a(Yii::t('site', 'users profiles (with ability of editing information)'), |
|
| 55 | + Yii::t('site', 'users profiles (with ability of editing information)') : Html::a(Yii::t('site', 'users profiles (with ability of editing information)'), |
|
| 67 | 56 | [Url::to('/user/default/profile')]); ?>.</li> |
| 68 | 57 | </ul> |
| 69 | 58 | |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | protected function initDefaultButtons() |
| 14 | 14 | { |
| 15 | 15 | if (!isset($this->buttons['view'])) { |
| 16 | - $this->buttons['view'] = function ($url, $model, $key) { |
|
| 16 | + $this->buttons['view'] = function($url, $model, $key) { |
|
| 17 | 17 | $options = array_merge([ |
| 18 | 18 | 'title' => Yii::t('yii', 'View'), |
| 19 | 19 | 'aria-label' => Yii::t('yii', 'View'), |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | }; |
| 25 | 25 | } |
| 26 | 26 | if (!isset($this->buttons['update'])) { |
| 27 | - $this->buttons['update'] = function ($url, $model, $key) { |
|
| 27 | + $this->buttons['update'] = function($url, $model, $key) { |
|
| 28 | 28 | $options = array_merge([ |
| 29 | 29 | 'title' => Yii::t('yii', 'Update'), |
| 30 | 30 | 'aria-label' => Yii::t('yii', 'Update'), |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | }; |
| 36 | 36 | } |
| 37 | 37 | if (!isset($this->buttons['delete'])) { |
| 38 | - $this->buttons['delete'] = function ($url, $model, $key) { |
|
| 38 | + $this->buttons['delete'] = function($url, $model, $key) { |
|
| 39 | 39 | $options = array_merge([ |
| 40 | 40 | 'title' => Yii::t('yii', 'Delete'), |
| 41 | 41 | 'aria-label' => Yii::t('yii', 'Delete'), |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | |
| 19 | 19 | |
| 20 | 20 | <div class="form-group"> |
| 21 | - <?= Html::submitButton(Yii::t('option', 'Update'), ['class' => 'btn btn-success' ]) ?> |
|
| 21 | + <?= Html::submitButton(Yii::t('option', 'Update'), ['class' => 'btn btn-success']) ?> |
|
| 22 | 22 | <?= Html::a(Yii::t('option', 'Cancel'), [Url::to('index')], ['class' => 'btn btn-default']); ?> |
| 23 | 23 | </div> |
| 24 | 24 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | 'email:email', |
| 28 | 28 | [ |
| 29 | 29 | 'attribute' => 'message', |
| 30 | - 'value' => function ($model) { |
|
| 30 | + 'value' => function($model) { |
|
| 31 | 31 | return StringHelper::truncate($model->message, 150); |
| 32 | 32 | }, |
| 33 | 33 | ], |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | ], |
| 44 | 44 | ['prompt' => Yii::t('feedback', 'All'), 'class' => 'form-control'] |
| 45 | 45 | ), |
| 46 | - 'content' => function ($model) { |
|
| 46 | + 'content' => function($model) { |
|
| 47 | 47 | $label = Feedback::STATUS_ANSWERED === $model->status ? 'success' : 'danger'; |
| 48 | 48 | return "<span class='visible-md-block visible-xs-block |
| 49 | 49 | visible-sm-block visible-lg-block label label-{$label}'>{$model->status}</span>"; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | 'clientOptions' => ['format' => 'yyyy-mm-d'] |
| 68 | 68 | ]), |
| 69 | 69 | 'format' => 'html', |
| 70 | - 'content' => function ($model) { |
|
| 70 | + 'content' => function($model) { |
|
| 71 | 71 | return Yii::$app->formatter->asDatetime($model->updated_at); |
| 72 | 72 | }, |
| 73 | 73 | ], |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | 'contentOptions' => ['style' => 'text-align: center'], |
| 78 | 78 | 'template' => '{view} {answered} ', |
| 79 | 79 | 'buttons' => [ |
| 80 | - 'answered' => function ($url, $model) { |
|
| 80 | + 'answered' => function($url, $model) { |
|
| 81 | 81 | return Feedback::STATUS_NEW === $model->status ? |
| 82 | 82 | Html::beginForm( |
| 83 | 83 | ['/feedback/management/update?id=' . $model->id], |
@@ -94,8 +94,7 @@ discard block |
||
| 94 | 94 | 'class' => 'btn btn-info', |
| 95 | 95 | ] |
| 96 | 96 | ) |
| 97 | - . Html::endForm() : |
|
| 98 | - Html::a( |
|
| 97 | + . Html::endForm() : Html::a( |
|
| 99 | 98 | '<span class="glyphicon glyphicon-comment text-muted"></span>', |
| 100 | 99 | '#', |
| 101 | 100 | [ |