Commit baba04c20e534cb160e65b69d01d02eadbb6cb03
1 parent
83b0052c
test
Showing
3 changed files
with
202 additions
and
93 deletions
Show diff stats
common/modules/comment/models/Comment.php
| @@ -173,7 +173,7 @@ | @@ -173,7 +173,7 @@ | ||
| 173 | 'comment.model' => $model, | 173 | 'comment.model' => $model, |
| 174 | 'comment.model_id' => $model_id, | 174 | 'comment.model_id' => $model_id, |
| 175 | 'comment.status' => 1, | 175 | 'comment.status' => 1, |
| 176 | - ]); | 176 | + ])->with('rating'); |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | public function postComment() | 179 | public function postComment() |
| @@ -310,7 +310,7 @@ | @@ -310,7 +310,7 @@ | ||
| 310 | 'model' => $this->className(), | 310 | 'model' => $this->className(), |
| 311 | ]) | 311 | ]) |
| 312 | ->one(); | 312 | ->one(); |
| 313 | - if(!$rating instanceof \common\modules\comment\models\Rating) { | 313 | + if(!$rating instanceof \common\modules\comment\models\Rating && !$this->isNewRecord) { |
| 314 | $rating = new \common\modules\comment\models\Rating([ | 314 | $rating = new \common\modules\comment\models\Rating([ |
| 315 | 'model' => $this->className(), | 315 | 'model' => $this->className(), |
| 316 | 'model_id' => $this->comment_id, | 316 | 'model_id' => $this->comment_id, |
frontend/views/layouts/company.php
| 1 | <?php | 1 | <?php |
| 2 | + /** | ||
| 3 | + * @var string $content | ||
| 4 | + * @var View $this | ||
| 5 | + */ | ||
| 2 | 6 | ||
| 3 | -use yii\helpers\Html; | ||
| 4 | -use yii\widgets\Breadcrumbs; | ||
| 5 | -use yii\widgets\Menu; | 7 | + use common\models\User; |
| 8 | + use yii\helpers\Html; | ||
| 9 | + use yii\web\View; | ||
| 10 | + use yii\widgets\Menu; | ||
| 6 | 11 | ||
| 7 | - | ||
| 8 | -/* @var $content string */ | ||
| 9 | -$this->beginContent('@app/views/layouts/main.php'); | 12 | + $this->beginContent('@app/views/layouts/main.php'); |
| 10 | ?> | 13 | ?> |
| 11 | 14 | ||
| 12 | <div class="section-box content"> | 15 | <div class="section-box content"> |
| 13 | - <div class="section-box-14" style="background: url(<?= $this->params['company']->userInfo->poster;?>) 50% no-repeat ;"> | 16 | + <div class="section-box-14" style="background: url(<?= $this->params[ 'company' ]->userInfo->poster; ?>) 50% no-repeat ;"> |
| 14 | <div class="box-wr"> | 17 | <div class="box-wr"> |
| 15 | <div class="box-all"> | 18 | <div class="box-all"> |
| 16 | <div class="performance-vacancy-call-back"> | 19 | <div class="performance-vacancy-call-back"> |
| 17 | - <div class="performance-vacancy-call-back-title">Оставьте заявку<br />и мы вам перезвоним</div> | 20 | + <div class="performance-vacancy-call-back-title">Оставьте заявку<br/>и мы вам перезвоним |
| 21 | + </div> | ||
| 18 | <form class="callback" action=""> | 22 | <form class="callback" action=""> |
| 19 | 23 | ||
| 20 | <div class="input-blocks-wrapper"> | 24 | <div class="input-blocks-wrapper"> |
| @@ -24,7 +28,7 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -24,7 +28,7 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
| 24 | 28 | ||
| 25 | <div class="input-blocks-wrapper"> | 29 | <div class="input-blocks-wrapper"> |
| 26 | <label for="callbac_phone">Телефон</label> | 30 | <label for="callbac_phone">Телефон</label> |
| 27 | - <input id="callbac_phone" type="text"/> | 31 | + <input id="callbac_phone" type="text"/> |
| 28 | </div> | 32 | </div> |
| 29 | 33 | ||
| 30 | <input id="callbac_submit" type="submit" value="Перезвонить мне"/> | 34 | <input id="callbac_submit" type="submit" value="Перезвонить мне"/> |
| @@ -40,38 +44,59 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -40,38 +44,59 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
| 40 | <div class="box-all"> | 44 | <div class="box-all"> |
| 41 | <?php | 45 | <?php |
| 42 | echo Menu::widget([ | 46 | echo Menu::widget([ |
| 43 | - 'options' => [ | 47 | + 'options' => [ |
| 44 | 'class' => 'menu-content', | 48 | 'class' => 'menu-content', |
| 45 | ], | 49 | ], |
| 46 | 'activeCssClass' => 'active-menu-content', | 50 | 'activeCssClass' => 'active-menu-content', |
| 47 | - 'items' => [ | 51 | + 'items' => [ |
| 48 | [ | 52 | [ |
| 49 | 'label' => 'Общее', | 53 | 'label' => 'Общее', |
| 50 | - 'url' => ['company/common', 'company_id'=>$this->params['company']->id], | 54 | + 'url' => [ |
| 55 | + 'company/common', | ||
| 56 | + 'company_id' => $this->params[ 'company' ]->id, | ||
| 57 | + ], | ||
| 51 | ], | 58 | ], |
| 52 | [ | 59 | [ |
| 53 | 'label' => 'Выполненные работы', | 60 | 'label' => 'Выполненные работы', |
| 54 | - 'url' => ['company/portfolio', 'company_id'=>$this->params['company']->id], | 61 | + 'url' => [ |
| 62 | + 'company/portfolio', | ||
| 63 | + 'company_id' => $this->params[ 'company' ]->id, | ||
| 64 | + ], | ||
| 55 | ], | 65 | ], |
| 56 | [ | 66 | [ |
| 57 | 'label' => 'Команда', | 67 | 'label' => 'Команда', |
| 58 | - 'url' => ['company/team', 'company_id'=>$this->params['company']->id], | 68 | + 'url' => [ |
| 69 | + 'company/team', | ||
| 70 | + 'company_id' => $this->params[ 'company' ]->id, | ||
| 71 | + ], | ||
| 59 | ], | 72 | ], |
| 60 | [ | 73 | [ |
| 61 | 'label' => 'Вакансии', | 74 | 'label' => 'Вакансии', |
| 62 | - 'url' => ['company/vacancy-list', 'company_id'=>$this->params['company']->id], | 75 | + 'url' => [ |
| 76 | + 'company/vacancy-list', | ||
| 77 | + 'company_id' => $this->params[ 'company' ]->id, | ||
| 78 | + ], | ||
| 63 | ], | 79 | ], |
| 64 | [ | 80 | [ |
| 65 | 'label' => 'Блог', | 81 | 'label' => 'Блог', |
| 66 | - 'url' => ['company/blog-list', 'company_id'=>$this->params['company']->id], | 82 | + 'url' => [ |
| 83 | + 'company/blog-list', | ||
| 84 | + 'company_id' => $this->params[ 'company' ]->id, | ||
| 85 | + ], | ||
| 67 | ], | 86 | ], |
| 68 | [ | 87 | [ |
| 69 | 'label' => 'Отзывы', | 88 | 'label' => 'Отзывы', |
| 70 | - 'url' => ['company/review', 'company_id'=>$this->params['company']->id], | 89 | + 'url' => [ |
| 90 | + 'company/review', | ||
| 91 | + 'company_id' => $this->params[ 'company' ]->id, | ||
| 92 | + ], | ||
| 71 | ], | 93 | ], |
| 72 | [ | 94 | [ |
| 73 | 'label' => 'Галерея', | 95 | 'label' => 'Галерея', |
| 74 | - 'url' => ['company/gallery', 'company_id'=>$this->params['company']->id], | 96 | + 'url' => [ |
| 97 | + 'company/gallery', | ||
| 98 | + 'company_id' => $this->params[ 'company' ]->id, | ||
| 99 | + ], | ||
| 75 | ], | 100 | ], |
| 76 | ], | 101 | ], |
| 77 | ]); | 102 | ]); |
| @@ -93,7 +118,8 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -93,7 +118,8 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
| 93 | <div class="sidebar-droped-wr style"> | 118 | <div class="sidebar-droped-wr style"> |
| 94 | <ul> | 119 | <ul> |
| 95 | <li><a href="#">Заказчик</a></li> | 120 | <li><a href="#">Заказчик</a></li> |
| 96 | - <li style="display: none"><a href="#">Испонитель</a></li> | 121 | + <li style="display: none"> |
| 122 | + <a href="#">Испонитель</a></li> | ||
| 97 | </ul> | 123 | </ul> |
| 98 | </div> | 124 | </div> |
| 99 | </li> | 125 | </li> |
| @@ -102,45 +128,71 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -102,45 +128,71 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
| 102 | <div class="performance-vacancy-sidebar-stars style"> | 128 | <div class="performance-vacancy-sidebar-stars style"> |
| 103 | <div class="rating"> | 129 | <div class="rating"> |
| 104 | <!--оценка--> | 130 | <!--оценка--> |
| 105 | - <input type="hidden" class="val" value="5"/> | 131 | + <input type="hidden" class="val" value="<?= $this->params[ 'company' ]->userInfo->rating ?>"/> |
| 106 | <!--количество голосов--> | 132 | <!--количество голосов--> |
| 107 | - <input type="hidden" class="votes" value="12"/> | 133 | + <input type="hidden" class="votes" value="1"/> |
| 108 | </div> | 134 | </div> |
| 109 | </div> | 135 | </div> |
| 110 | - <div class="performance-vacancy-sidebar-comm style">30 отзывов</div> | 136 | + <div class="performance-vacancy-sidebar-comm style"><?= count($this->params[ 'company' ]->comments) ?> отзывов</div> |
| 111 | <a href="#" class="performance-vacancy-sidebar-write style">написать отзыв</a> | 137 | <a href="#" class="performance-vacancy-sidebar-write style">написать отзыв</a> |
| 112 | </div> | 138 | </div> |
| 113 | - <div class="performer-vacancy-sidebar-img style"><?= Html::img($this->params['company']->userInfo->image);?></div> | 139 | + <div class="performer-vacancy-sidebar-img style"><?= Html::img($this->params[ 'company' ]->userInfo->image); ?></div> |
| 114 | <div class="performer-vacancy-sidebar-all style"> | 140 | <div class="performer-vacancy-sidebar-all style"> |
| 115 | <div class="performer-vacancy-sidebar-soc style"> | 141 | <div class="performer-vacancy-sidebar-soc style"> |
| 116 | <ul> | 142 | <ul> |
| 117 | <li> | 143 | <li> |
| 118 | - <?= Html::a(Html::img('/images/ico-fb.png'),[$this->params['company']->userInfo->social_fb],['target'=>'_blank'])?> | 144 | + <?= Html::a(Html::img('/images/ico-fb.png'), [ $this->params[ 'company' ]->userInfo->social_fb ], [ 'target' => '_blank' ]) ?> |
| 119 | </li> | 145 | </li> |
| 120 | <li> | 146 | <li> |
| 121 | - <?= Html::a(Html::img('/images/ico-tw.png'),[$this->params['company']->userInfo->social_t],['target'=>'_blank'])?> | 147 | + <?= Html::a(Html::img('/images/ico-tw.png'), [ $this->params[ 'company' ]->userInfo->social_t ], [ 'target' => '_blank' ]) ?> |
| 122 | </li> | 148 | </li> |
| 123 | <li> | 149 | <li> |
| 124 | - <?= Html::a(Html::img('/images/ico-in.png'),[$this->params['company']->userInfo->social_in],['target'=>'_blank'])?> | 150 | + <?= Html::a(Html::img('/images/ico-in.png'), [ $this->params[ 'company' ]->userInfo->social_in ], [ 'target' => '_blank' ]) ?> |
| 125 | </li> | 151 | </li> |
| 126 | <li> | 152 | <li> |
| 127 | - <?= Html::a(Html::img('/images/ico-vk.png'),[$this->params['company']->userInfo->social_vk],['target'=>'_blank'])?> | 153 | + <?= Html::a(Html::img('/images/ico-vk.png'), [ $this->params[ 'company' ]->userInfo->social_vk ], [ 'target' => '_blank' ]) ?> |
| 128 | </li> | 154 | </li> |
| 129 | </ul> | 155 | </ul> |
| 130 | </div> | 156 | </div> |
| 131 | <div class="performer-vacancy-sidebar-views style"> | 157 | <div class="performer-vacancy-sidebar-views style"> |
| 132 | <ul class="style"> | 158 | <ul class="style"> |
| 133 | - <li><img src="/images/sidebar-ico/ico-1.png" alt=""/><div class="sidebarvievstxt"><?= $this->params['company']->userInfo->view_count;?> просмотра</div></li> | ||
| 134 | - <li><img src="/images/sidebar-ico/ico-2.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">На сайте: </span><?= $this->params['company']->liveTime?></div></li> | ||
| 135 | - <li><img src="/images/sidebar-ico/ico-3.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Последний визит: <br /></span><?= $this->params['company']->userInfo->lastVisit?></div></li> | ||
| 136 | - <li><img src="/images/sidebar-ico/ico-5.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Сотрудники:<br /></span><?= $this->params['company']->companyInfo->staff?></div></li> | ||
| 137 | - <?php foreach($this->params['company']->phones as $phone ):?> | ||
| 138 | - <li><img src="/images/sidebar-ico/ico-6.png" alt=""/><div class="sidebarvievstxt"><span class="sidebarvievs-phone"><?= $phone['phone'] ?></span></div></li> | ||
| 139 | - <?php endforeach;?> | ||
| 140 | - <?php foreach($this->params['company']->site as $site ):?> | ||
| 141 | - <li><img src="/images/sidebar-ico/ico-7.png" alt=""/><div class="sidebarvievstxt"><a target="_blank" href="<?= $site['site']?>">Сайт</a></div></li> | ||
| 142 | - <?php endforeach;?> | ||
| 143 | - <li><img src="/images/sidebar-ico/ico-8.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Адрес:<br /></span><?= $this->params['company']->address?></div></li> | 159 | + <li><img src="/images/sidebar-ico/ico-1.png" alt=""/> |
| 160 | + <div class="sidebarvievstxt"><?= $this->params[ 'company' ]->userInfo->view_count; ?> просмотра</div> | ||
| 161 | + </li> | ||
| 162 | + <li><img src="/images/sidebar-ico/ico-2.png" alt=""/> | ||
| 163 | + <div class="sidebarvievstxt"> | ||
| 164 | + <span class="sidebar-views-txt">На сайте: </span><?= $this->params[ 'company' ]->liveTime ?> | ||
| 165 | + </div> | ||
| 166 | + </li> | ||
| 167 | + <li><img src="/images/sidebar-ico/ico-3.png" alt=""/> | ||
| 168 | + <div class="sidebarvievstxt"> | ||
| 169 | + <span class="sidebar-views-txt">Последний визит: <br/></span><?= $this->params[ 'company' ]->userInfo->lastVisit ?> | ||
| 170 | + </div> | ||
| 171 | + </li> | ||
| 172 | + <li><img src="/images/sidebar-ico/ico-5.png" alt=""/> | ||
| 173 | + <div class="sidebarvievstxt"> | ||
| 174 | + <span class="sidebar-views-txt">Сотрудники:<br/></span><?= $this->params[ 'company' ]->companyInfo->staff ?> | ||
| 175 | + </div> | ||
| 176 | + </li> | ||
| 177 | + <?php foreach($this->params[ 'company' ]->phones as $phone): ?> | ||
| 178 | + <li><img src="/images/sidebar-ico/ico-6.png" alt=""/> | ||
| 179 | + <div class="sidebarvievstxt"> | ||
| 180 | + <span class="sidebarvievs-phone"><?= $phone[ 'phone' ] ?></span> | ||
| 181 | + </div> | ||
| 182 | + </li> | ||
| 183 | + <?php endforeach; ?> | ||
| 184 | + <?php foreach($this->params[ 'company' ]->site as $site): ?> | ||
| 185 | + <li><img src="/images/sidebar-ico/ico-7.png" alt=""/> | ||
| 186 | + <div class="sidebarvievstxt"> | ||
| 187 | + <a target="_blank" href="<?= $site[ 'site' ] ?>">Сайт</a> | ||
| 188 | + </div> | ||
| 189 | + </li> | ||
| 190 | + <?php endforeach; ?> | ||
| 191 | + <li><img src="/images/sidebar-ico/ico-8.png" alt=""/> | ||
| 192 | + <div class="sidebarvievstxt"> | ||
| 193 | + <span class="sidebar-views-txt">Адрес:<br/></span><?= $this->params[ 'company' ]->address ?> | ||
| 194 | + </div> | ||
| 195 | + </li> | ||
| 144 | </ul> | 196 | </ul> |
| 145 | </div> | 197 | </div> |
| 146 | </div> | 198 | </div> |
| @@ -154,26 +206,26 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -154,26 +206,26 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
| 154 | </div> | 206 | </div> |
| 155 | <?php | 207 | <?php |
| 156 | /*====Blocks created in view====*/ | 208 | /*====Blocks created in view====*/ |
| 157 | - if(isset($this->blocks['our_objects'])) { | ||
| 158 | - echo $this->blocks['our_objects']; | 209 | + if(isset( $this->blocks[ 'our_objects' ] )) { |
| 210 | + echo $this->blocks[ 'our_objects' ]; | ||
| 159 | } | 211 | } |
| 160 | - if(isset($this->blocks['blog'])) { | ||
| 161 | - echo $this->blocks['blog']; | 212 | + if(isset( $this->blocks[ 'blog' ] )) { |
| 213 | + echo $this->blocks[ 'blog' ]; | ||
| 162 | } | 214 | } |
| 163 | - if(isset($this->blocks['team'])) { | ||
| 164 | - echo $this->blocks['team']; | 215 | + if(isset( $this->blocks[ 'team' ] )) { |
| 216 | + echo $this->blocks[ 'team' ]; | ||
| 165 | } | 217 | } |
| 166 | - if(isset($this->blocks['review'])) { | ||
| 167 | - echo $this->blocks['review']; | 218 | + if(isset( $this->blocks[ 'review' ] )) { |
| 219 | + echo $this->blocks[ 'review' ]; | ||
| 168 | } | 220 | } |
| 169 | /*====End of blocks created in view====*/ | 221 | /*====End of blocks created in view====*/ |
| 170 | ?> | 222 | ?> |
| 171 | </div> | 223 | </div> |
| 172 | <script> | 224 | <script> |
| 173 | - $('div.rating').rating({ | ||
| 174 | - fx: 'full', | ||
| 175 | - readOnly: 'true', | ||
| 176 | - url: 'rating.php' | ||
| 177 | - }); | 225 | + $('div.rating').rating( |
| 226 | + { | ||
| 227 | + fx : 'full', readOnly : 'true', url : 'rating.php' | ||
| 228 | + } | ||
| 229 | + ); | ||
| 178 | </script> | 230 | </script> |
| 179 | <?php $this->endContent() ?> | 231 | <?php $this->endContent() ?> |
| 180 | \ No newline at end of file | 232 | \ No newline at end of file |
frontend/views/layouts/performer.php
| 1 | <?php | 1 | <?php |
| 2 | + /** | ||
| 3 | + * @var string $content | ||
| 4 | + * @var View $this | ||
| 5 | + */ | ||
| 2 | 6 | ||
| 3 | -use common\models\User; | ||
| 4 | -use yii\helpers\ArrayHelper; | ||
| 5 | -use yii\helpers\Html; | ||
| 6 | -use yii\helpers\Url; | ||
| 7 | -use yii\widgets\Menu; | ||
| 8 | - | ||
| 9 | -\frontend\assets\AppAsset::register($this); | ||
| 10 | -/* @var $content string */ | ||
| 11 | -$this->beginContent('@app/views/layouts/main.php'); | 7 | + use common\models\User; |
| 8 | + use yii\helpers\ArrayHelper; | ||
| 9 | + use yii\helpers\Html; | ||
| 10 | + use yii\helpers\Url; | ||
| 11 | + use yii\web\View; | ||
| 12 | + use yii\widgets\Menu; | ||
| 12 | 13 | ||
| 14 | + \frontend\assets\AppAsset::register($this); | ||
| 15 | + $this->beginContent('@app/views/layouts/main.php'); | ||
| 13 | 16 | ||
| 14 | ?> | 17 | ?> |
| 15 | <div class="section-box content"> | 18 | <div class="section-box content"> |
| 16 | - <div class="section-box-16" style="background: url('<?= $this->params['user']->userInfo->poster;?>') 50% no-repeat"> | 19 | + <div class="section-box-16" style="background: url('<?= $this->params[ 'user' ]->userInfo->poster; ?>') 50% no-repeat"> |
| 17 | <div class="box-wr"> | 20 | <div class="box-wr"> |
| 18 | <div class="box-all"> | 21 | <div class="box-all"> |
| 19 | <div class="blog-buttons-wr style"> | 22 | <div class="blog-buttons-wr style"> |
| 20 | <a class="blog-buttons-offer" href="#">Предложить<br>проект</a> | 23 | <a class="blog-buttons-offer" href="#">Предложить<br>проект</a> |
| 21 | - <?= Html::a('Предложить проект', Url::toRoute(['chat/message', 'user_id' => $this->params['user']->id]), ['class'=> 'blog-buttons-write'])?> | 24 | + <?= Html::a('Предложить проект', Url::toRoute([ |
| 25 | + 'chat/message', | ||
| 26 | + 'user_id' => $this->params[ 'user' ]->id, | ||
| 27 | + ]), [ 'class' => 'blog-buttons-write' ]) ?> | ||
| 22 | <a class="blog-buttons-add-favorite" href="#">Добавить<br>в закладки</a> | 28 | <a class="blog-buttons-add-favorite" href="#">Добавить<br>в закладки</a> |
| 23 | </div> | 29 | </div> |
| 24 | </div> | 30 | </div> |
| @@ -36,27 +42,45 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -36,27 +42,45 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
| 36 | 'items' => [ | 42 | 'items' => [ |
| 37 | [ | 43 | [ |
| 38 | 'label' => 'Общее', | 44 | 'label' => 'Общее', |
| 39 | - 'url' => ['performer/common', 'performer_id'=>$this->params['user']->id], | 45 | + 'url' => [ |
| 46 | + 'performer/common', | ||
| 47 | + 'performer_id' => $this->params[ 'user' ]->id, | ||
| 48 | + ], | ||
| 40 | ], | 49 | ], |
| 41 | [ | 50 | [ |
| 42 | 'label' => 'Портфолио', | 51 | 'label' => 'Портфолио', |
| 43 | - 'url' => ['performer/portfolio', 'performer_id'=>$this->params['user']->id], | 52 | + 'url' => [ |
| 53 | + 'performer/portfolio', | ||
| 54 | + 'performer_id' => $this->params[ 'user' ]->id, | ||
| 55 | + ], | ||
| 44 | ], | 56 | ], |
| 45 | [ | 57 | [ |
| 46 | 'label' => 'Блог', | 58 | 'label' => 'Блог', |
| 47 | - 'url' => ['performer/blog-list', 'performer_id'=>$this->params['user']->id], | 59 | + 'url' => [ |
| 60 | + 'performer/blog-list', | ||
| 61 | + 'performer_id' => $this->params[ 'user' ]->id, | ||
| 62 | + ], | ||
| 48 | ], | 63 | ], |
| 49 | [ | 64 | [ |
| 50 | 'label' => 'Отзывы', | 65 | 'label' => 'Отзывы', |
| 51 | - 'url' => ['performer/review', 'performer_id'=>$this->params['user']->id], | 66 | + 'url' => [ |
| 67 | + 'performer/review', | ||
| 68 | + 'performer_id' => $this->params[ 'user' ]->id, | ||
| 69 | + ], | ||
| 52 | ], | 70 | ], |
| 53 | [ | 71 | [ |
| 54 | 'label' => 'Места работы', | 72 | 'label' => 'Места работы', |
| 55 | - 'url' => ['performer/workplace', 'performer_id'=>$this->params['user']->id], | 73 | + 'url' => [ |
| 74 | + 'performer/workplace', | ||
| 75 | + 'performer_id' => $this->params[ 'user' ]->id, | ||
| 76 | + ], | ||
| 56 | ], | 77 | ], |
| 57 | [ | 78 | [ |
| 58 | 'label' => 'Галерея', | 79 | 'label' => 'Галерея', |
| 59 | - 'url' => ['performer/gallery', 'performer_id'=>$this->params['user']->id], | 80 | + 'url' => [ |
| 81 | + 'performer/gallery', | ||
| 82 | + 'performer_id' => $this->params[ 'user' ]->id, | ||
| 83 | + ], | ||
| 60 | ], | 84 | ], |
| 61 | ], | 85 | ], |
| 62 | ]); | 86 | ]); |
| @@ -78,7 +102,8 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -78,7 +102,8 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
| 78 | <div class="sidebar-droped-wr style"> | 102 | <div class="sidebar-droped-wr style"> |
| 79 | <ul> | 103 | <ul> |
| 80 | <li><a href="#">Заказчик</a></li> | 104 | <li><a href="#">Заказчик</a></li> |
| 81 | - <li style="display: none"><a href="#">Испонитель</a></li> | 105 | + <li style="display: none"> |
| 106 | + <a href="#">Испонитель</a></li> | ||
| 82 | </ul> | 107 | </ul> |
| 83 | </div> | 108 | </div> |
| 84 | </li> | 109 | </li> |
| @@ -87,45 +112,77 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -87,45 +112,77 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
| 87 | <div class="performance-vacancy-sidebar-stars style"> | 112 | <div class="performance-vacancy-sidebar-stars style"> |
| 88 | <div class="rating"> | 113 | <div class="rating"> |
| 89 | <!--оценка--> | 114 | <!--оценка--> |
| 90 | - <input type="hidden" class="val" value="5"/> | 115 | + <input type="hidden" class="val" value="<?= $this->params['user']->userInfo->rating ?>"/> |
| 91 | <!--количество голосов--> | 116 | <!--количество голосов--> |
| 92 | - <input type="hidden" class="votes" value="12"/> | 117 | + <input type="hidden" class="votes" value="1"/> |
| 93 | </div> | 118 | </div> |
| 94 | </div> | 119 | </div> |
| 95 | - <div class="performance-vacancy-sidebar-comm style">30 отзывов</div> | 120 | + <div class="performance-vacancy-sidebar-comm style"><?= count($this->params['user']->comments) ?> отзывов</div> |
| 96 | <a href="#" class="performance-vacancy-sidebar-write style">написать отзыв</a> | 121 | <a href="#" class="performance-vacancy-sidebar-write style">написать отзыв</a> |
| 97 | </div> | 122 | </div> |
| 98 | <div class="performer-vacancy-sidebar-img style"> | 123 | <div class="performer-vacancy-sidebar-img style"> |
| 99 | - <?= Html::img($this->params['user']->userInfo->image);?> | 124 | + <?= Html::img($this->params[ 'user' ]->userInfo->image); ?> |
| 100 | </div> | 125 | </div> |
| 101 | <div class="performer-vacancy-sidebar-all style"> | 126 | <div class="performer-vacancy-sidebar-all style"> |
| 102 | <div class="performer-vacancy-sidebar-soc style"> | 127 | <div class="performer-vacancy-sidebar-soc style"> |
| 103 | <ul> | 128 | <ul> |
| 104 | <li> | 129 | <li> |
| 105 | - <?= Html::a(Html::img('/images/ico-fb.png'),"{$this->params['user']->userInfo->social_fb}",['target'=>'_blank'])?> | 130 | + <?= Html::a(Html::img('/images/ico-fb.png'), "{$this->params['user']->userInfo->social_fb}", [ 'target' => '_blank' ]) ?> |
| 106 | </li> | 131 | </li> |
| 107 | <li> | 132 | <li> |
| 108 | - <?= Html::a(Html::img('/images/ico-tw.png'),"{$this->params['user']->userInfo->social_t}", ['target'=>'_blank'])?> | 133 | + <?= Html::a(Html::img('/images/ico-tw.png'), "{$this->params['user']->userInfo->social_t}", [ 'target' => '_blank' ]) ?> |
| 109 | </li> | 134 | </li> |
| 110 | <li> | 135 | <li> |
| 111 | - <?= Html::a(Html::img('/images/ico-in.png'),"{$this->params['user']->userInfo->social_in}",['target'=>'_blank'])?> | 136 | + <?= Html::a(Html::img('/images/ico-in.png'), "{$this->params['user']->userInfo->social_in}", [ 'target' => '_blank' ]) ?> |
| 112 | </li> | 137 | </li> |
| 113 | <li> | 138 | <li> |
| 114 | - <?= Html::a(Html::img('/images/ico-vk.png'),"{$this->params['user']->userInfo->social_vk}",['target'=>'_blank'])?> | 139 | + <?= Html::a(Html::img('/images/ico-vk.png'), "{$this->params['user']->userInfo->social_vk}", [ 'target' => '_blank' ]) ?> |
| 115 | </li> | 140 | </li> |
| 116 | </ul> | 141 | </ul> |
| 117 | </div> | 142 | </div> |
| 118 | <div class="performer-vacancy-sidebar-views style"> | 143 | <div class="performer-vacancy-sidebar-views style"> |
| 119 | <ul class="style"> | 144 | <ul class="style"> |
| 120 | - <li><img src="/images/sidebar-ico/ico-1.png" alt=""/><div class="sidebarvievstxt"><?= $this->params['user']->userInfo->view_count?> просмотра</div></li> | ||
| 121 | - <li><img src="/images/sidebar-ico/ico-9.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Статус: </span><?= $this->params['user']->userInfo->busyText?></div></li> | ||
| 122 | - <li><img src="/images/sidebar-ico/ico-2.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">На сайте: </span><?= $this->params['user']->liveTime?></div></li> | ||
| 123 | - <li><img src="/images/sidebar-ico/ico-3.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Последний визит:<br /></span><?= $this->params['user']->userInfo->lastVisit?></div></li> | ||
| 124 | - <li><img src="/images/sidebar-ico/ico-10.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Трудовой стаж:<br /></span><?= $this->params['user']->userInfo->experience?></div></li> | ||
| 125 | - <li><img src="/images/sidebar-ico/ico-11.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Звание в МФП:<br /></span><?= $this->params['user']->userInfo->rank?></div></li> | ||
| 126 | - <li><img src="/images/sidebar-ico/ico-12.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Стоимость работ:<br /></span><?= $this->params['user']->userInfo->salary?></div></li> | ||
| 127 | - <li><img src="/images/sidebar-ico/ico-13.png" alt=""/><div class="sidebarvievstxt"><?= implode(', ',ArrayHelper::getColumn($this->params['user']->payments,'name'))?></div></li> | ||
| 128 | - <li><img src="/images/sidebar-ico/ico-14.png" alt=""/><div class="sidebarvievstxt"><span class="sidebar-views-txt">Текущее место работы:<br /></span><?= isset($this->params['user']->currentJob) ?$this->params['user']->currentJob->name : ""?></div></li> | 145 | + <li><img src="/images/sidebar-ico/ico-1.png" alt=""/> |
| 146 | + <div class="sidebarvievstxt"><?= $this->params[ 'user' ]->userInfo->view_count ?> просмотра</div> | ||
| 147 | + </li> | ||
| 148 | + <li><img src="/images/sidebar-ico/ico-9.png" alt=""/> | ||
| 149 | + <div class="sidebarvievstxt"> | ||
| 150 | + <span class="sidebar-views-txt">Статус: </span><?= $this->params[ 'user' ]->userInfo->busyText ?> | ||
| 151 | + </div> | ||
| 152 | + </li> | ||
| 153 | + <li><img src="/images/sidebar-ico/ico-2.png" alt=""/> | ||
| 154 | + <div class="sidebarvievstxt"> | ||
| 155 | + <span class="sidebar-views-txt">На сайте: </span><?= $this->params[ 'user' ]->liveTime ?> | ||
| 156 | + </div> | ||
| 157 | + </li> | ||
| 158 | + <li><img src="/images/sidebar-ico/ico-3.png" alt=""/> | ||
| 159 | + <div class="sidebarvievstxt"> | ||
| 160 | + <span class="sidebar-views-txt">Последний визит:<br/></span><?= $this->params[ 'user' ]->userInfo->lastVisit ?> | ||
| 161 | + </div> | ||
| 162 | + </li> | ||
| 163 | + <li><img src="/images/sidebar-ico/ico-10.png" alt=""/> | ||
| 164 | + <div class="sidebarvievstxt"> | ||
| 165 | + <span class="sidebar-views-txt">Трудовой стаж:<br/></span><?= $this->params[ 'user' ]->userInfo->experience ?> | ||
| 166 | + </div> | ||
| 167 | + </li> | ||
| 168 | + <li><img src="/images/sidebar-ico/ico-11.png" alt=""/> | ||
| 169 | + <div class="sidebarvievstxt"> | ||
| 170 | + <span class="sidebar-views-txt">Звание в МФП:<br/></span><?= $this->params[ 'user' ]->userInfo->rank ?> | ||
| 171 | + </div> | ||
| 172 | + </li> | ||
| 173 | + <li><img src="/images/sidebar-ico/ico-12.png" alt=""/> | ||
| 174 | + <div class="sidebarvievstxt"> | ||
| 175 | + <span class="sidebar-views-txt">Стоимость работ:<br/></span><?= $this->params[ 'user' ]->userInfo->salary ?> | ||
| 176 | + </div> | ||
| 177 | + </li> | ||
| 178 | + <li><img src="/images/sidebar-ico/ico-13.png" alt=""/> | ||
| 179 | + <div class="sidebarvievstxt"><?= implode(', ', ArrayHelper::getColumn($this->params[ 'user' ]->payments, 'name')) ?></div> | ||
| 180 | + </li> | ||
| 181 | + <li><img src="/images/sidebar-ico/ico-14.png" alt=""/> | ||
| 182 | + <div class="sidebarvievstxt"> | ||
| 183 | + <span class="sidebar-views-txt">Текущее место работы:<br/></span><?= isset( $this->params[ 'user' ]->currentJob ) ? $this->params[ 'user' ]->currentJob->name : "" ?> | ||
| 184 | + </div> | ||
| 185 | + </li> | ||
| 129 | 186 | ||
| 130 | </ul> | 187 | </ul> |
| 131 | </div> | 188 | </div> |
| @@ -142,11 +199,11 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -142,11 +199,11 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
| 142 | 199 | ||
| 143 | </div> | 200 | </div> |
| 144 | <script> | 201 | <script> |
| 145 | - $('div.rating').rating({ | ||
| 146 | - fx: 'full', | ||
| 147 | - readOnly: 'true', | ||
| 148 | - url: 'rating.php' | ||
| 149 | - }); | 202 | + $('div.rating').rating( |
| 203 | + { | ||
| 204 | + fx : 'full', readOnly : 'true', url : 'rating.php' | ||
| 205 | + } | ||
| 206 | + ); | ||
| 150 | </script> | 207 | </script> |
| 151 | 208 | ||
| 152 | <?php $this->endContent() ?> | 209 | <?php $this->endContent() ?> |
| 153 | \ No newline at end of file | 210 | \ No newline at end of file |