From 93a7a3c100973b96e33d83cc91bb37432b5b1054 Mon Sep 17 00:00:00 2001 From: Yarik Date: Tue, 17 May 2016 16:43:38 +0300 Subject: [PATCH] test --- common/models/TenderSearch.php | 20 ++++++++++++++------ common/modules/comment/widgets/views/_project_comment_view.php | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------- common/modules/comment/widgets/views/_review_comment_view.php | 15 ++++++++++----- common/modules/comment/widgets/views/form-comment-review.php | 15 +++++++++++++-- common/modules/comment/widgets/views/form-comment.php | 15 ++++++++++----- common/modules/comment/widgets/views/project_comment_view.php | 16 +++++++++++----- frontend/controllers/SearchController.php | 27 +++++++++++++++++++++++++++ frontend/views/chat/message.php | 16 +++++++++++----- frontend/views/company/_company_common_review.php | 12 +++++++++--- frontend/views/company/_company_team_review.php | 12 +++++++++--- frontend/views/company/portfolio-view.php | 8 +++++++- frontend/views/layouts/company.php | 26 +++++++++++++++++--------- frontend/views/layouts/gallery-company.php | 28 ++++++++++++++++++---------- frontend/views/layouts/gallery.php | 86 +++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------- frontend/views/layouts/main.php | 9 ++++++--- frontend/views/layouts/performer.php | 18 +++++++++++++----- frontend/views/performer/common.php | 22 ++++++++++++++-------- frontend/views/performer/portfolio-view.php | 24 ++++++++++++++++++------ frontend/views/search/_customer_list_view.php | 48 +++++++++++++++++++++++++++--------------------- frontend/views/search/_performer_list_view.php | 19 ++++++++++++++----- frontend/views/search/project.php | 16 ++++++++++++---- frontend/views/tender/view.php | 370 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ frontend/web/css/style.css | 13 +++++++++++-- frontend/web/js/artbox.maps.js | 1 - 24 files changed, 589 insertions(+), 389 deletions(-) diff --git a/common/models/TenderSearch.php b/common/models/TenderSearch.php index a5a1f67..4e08e75 100644 --- a/common/models/TenderSearch.php +++ b/common/models/TenderSearch.php @@ -26,6 +26,8 @@ public $payment; + public $info; + /** * @inheritdoc */ @@ -44,6 +46,7 @@ [ 'city', 'payment', + 'info', ], 'safe', ], @@ -87,13 +90,13 @@ public function attributeLabels() { return [ - 'specialization' => Yii::t('app', 'specialization'), + 'specialization' => Yii::t('app', 'specialization'), 'budget_currency' => Yii::t('app', 'budget_currency'), - 'contractual' => Yii::t('app', 'contractual'), - 'city' => Yii::t('app', 'city'), - 'payment' => Yii::t('app', 'payment'), - 'budget_from' => Yii::t('app', 'budget_from'), - 'budget_to' => Yii::t('app', 'budget_to'), + 'contractual' => Yii::t('app', 'contractual'), + 'city' => Yii::t('app', 'city'), + 'payment' => Yii::t('app', 'payment'), + 'budget_from' => Yii::t('app', 'budget_from'), + 'budget_to' => Yii::t('app', 'budget_to'), ]; } @@ -196,6 +199,11 @@ 'project_payment.payment_id' => $this->payment, 'city' => $this->city, ]) + ->andFilterWhere([ + 'like', + 'LOWER(project.name)', + mb_strtolower($this->info), + ]) ->andWhere([ 'project_payment.payment_id' => $this->payment, ]); diff --git a/common/modules/comment/widgets/views/_project_comment_view.php b/common/modules/comment/widgets/views/_project_comment_view.php index 42edb06..b22cc8b 100644 --- a/common/modules/comment/widgets/views/_project_comment_view.php +++ b/common/modules/comment/widgets/views/_project_comment_view.php @@ -17,11 +17,11 @@
userInfo->image)) { - echo Html::img($user->userInfo->image); - } else { - echo Html::img('/images/avatar-bg.png'); - } + if(!empty( $user->userInfo->image )) { + echo Html::img($user->userInfo->image); + } else { + echo Html::img('/images/avatar-bg.png'); + } ?>
@@ -69,7 +69,9 @@
- link, [ 'class' => 'tender-see-profile style', 'target' => '_blank' ]) ?> + link, [ 'class' => 'tender-see-profile style', + 'target' => '_blank', + ]) ?>
@@ -87,9 +89,15 @@
name ?>
'rating_review_comment', - 'value' => $user->userInfo->rating, - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] + 'name' => 'rating_review_comment', + 'value' => $user->userInfo->rating, + 'pluginOptions' => [ + 'displayOnly' => true, + 'size' => 'xxs', + 'min' => 0, + 'max' => 10, + 'stars' => 10, + ], ]); ?> comments) . ' отзывов', $user->getLink('review'), [ 'class' => 'link-to-comm' ]) ?> @@ -104,8 +112,8 @@
  • name, $file->dir, [ - 'class' => 'download-link-file', - 'download' => 'download' + 'class' => 'download-link-file', + 'download' => 'download', ]) ?> dir, [ 'class' => 'download-link', @@ -122,68 +130,68 @@ link, [ 'class' => 'get-list-new' ]) ?> status == $model::STATUS_ANONYMOUS) { - echo Html::tag('div', 'Анонимное предложение', [ 'class' => 'project_status' ]); - } - if(\Yii::$app->user->getId() == $model->owner->user_id) { - ?> -
    -

    - state) { - case 1: - echo 'Предложение не рассмотрено'; - break; - case 2: - echo 'Исполнитель поставлен на рассмотрение'; - break; - case 3: - echo 'Исполнитель назначен исполнителем'; - break; - case 4: - echo 'Вы отказали данному исполнителю'; - break; - case 5: - echo 'Исполнитель отказался от данного предложения'; - break; - } - ?> -

    -
    - state != $model::STATE_TRASH) { + if($model->status == $model::STATUS_ANONYMOUS) { + echo Html::tag('div', 'Анонимное предложение', [ 'class' => 'project_status' ]); + } + if(\Yii::$app->user->getId() == $model->owner->user_id) { ?> -
    - Отметить как: -

    -
    +
    +

    $model->owner->project_id, - 'data-comment-id' => $model->comment_id, - 'class' => 'artbox_project_make_new'.(($model->state == $model::STATE_NEW)?' active':''), - ]); - echo Html::a('кандидат', [ '#' ], [ - 'data-project-id' => $model->owner->project_id, - 'data-comment-id' => $model->comment_id, - 'class' => 'artbox_project_make_candidate'.(($model->state == $model::STATE_CANDIDATE)?' active':''), - ]); - echo Html::a('исполнитель', [ '#' ], [ - 'data-project-id' => $model->owner->project_id, - 'data-comment-id' => $model->comment_id, - 'class' => 'artbox_project_make_performer'.(($model->state == $model::STATE_PERFORMER)?' active':''), - ]); - echo Html::a('отказать', [ '#' ], [ - 'data-project-id' => $model->owner->project_id, - 'data-comment-id' => $model->comment_id, - 'class' => 'artbox_project_make_deny'.(($model->state == $model::STATE_DENY)?' active':''), - ]); + switch($model->state) { + case 1: + echo 'Предложение не рассмотрено'; + break; + case 2: + echo 'Исполнитель поставлен на рассмотрение'; + break; + case 3: + echo 'Исполнитель назначен исполнителем'; + break; + case 4: + echo 'Вы отказали данному исполнителю'; + break; + case 5: + echo 'Исполнитель отказался от данного предложения'; + break; + } ?> -

    +

    state != $model::STATE_TRASH) { + ?> +
    + Отметить как: +

    +
    + $model->owner->project_id, + 'data-comment-id' => $model->comment_id, + 'class' => 'artbox_project_make_new' . ( ( $model->state == $model::STATE_NEW ) ? ' active' : '' ), + ]); + echo Html::a('кандидат', [ '#' ], [ + 'data-project-id' => $model->owner->project_id, + 'data-comment-id' => $model->comment_id, + 'class' => 'artbox_project_make_candidate' . ( ( $model->state == $model::STATE_CANDIDATE ) ? ' active' : '' ), + ]); + echo Html::a('исполнитель', [ '#' ], [ + 'data-project-id' => $model->owner->project_id, + 'data-comment-id' => $model->comment_id, + 'class' => 'artbox_project_make_performer' . ( ( $model->state == $model::STATE_PERFORMER ) ? ' active' : '' ), + ]); + echo Html::a('отказать', [ '#' ], [ + 'data-project-id' => $model->owner->project_id, + 'data-comment-id' => $model->comment_id, + 'class' => 'artbox_project_make_deny' . ( ( $model->state == $model::STATE_DENY ) ? ' active' : '' ), + ]); + ?> +
    +
    +
    diff --git a/common/modules/comment/widgets/views/_review_comment_view.php b/common/modules/comment/widgets/views/_review_comment_view.php index 1fdd831..2bfaea3 100644 --- a/common/modules/comment/widgets/views/_review_comment_view.php +++ b/common/modules/comment/widgets/views/_review_comment_view.php @@ -15,7 +15,7 @@ * @var User $user */ $user = $model->user; - $model->buildButtons(['delete']); + $model->buildButtons([ 'delete' ]); ?>
    getAuthor(' (Гость)') ?> @@ -31,9 +31,14 @@ rating )) { echo StarRating::widget([ - 'name' => 'rating_review_comment', - 'value' => $model->rating->value, - 'pluginOptions' => ['displayOnly' => true] + 'name' => 'rating_review_comment', + 'value' => $model->rating->value, + 'pluginOptions' => [ + 'displayOnly' => true, + 'min' => 0, + 'max' => 10, + 'stars' => 10, + ], ]); } ?> @@ -43,7 +48,7 @@
    buttons[ 'delete' ] )) { - echo Html::a(($model->user_id != NULL && $model->user_id == \Yii::$app->user->id)?'Удалить':'Пожаловаться ', $model->buttons[ 'delete' ], [ 'class' => CommentWidget::$baseClass[ 'comment_delete' ] ]); + echo Html::a(( $model->user_id != NULL && $model->user_id == \Yii::$app->user->id ) ? 'Удалить' : 'Пожаловаться ', $model->buttons[ 'delete' ], [ 'class' => CommentWidget::$baseClass[ 'comment_delete' ] ]); } if(!empty( $model->buttons[ 'update' ] )) { echo Html::a('Редактировать', $model->buttons[ 'update' ], [ 'class' => CommentWidget::$baseClass[ 'comment_update' ] ]); diff --git a/common/modules/comment/widgets/views/form-comment-review.php b/common/modules/comment/widgets/views/form-comment-review.php index 28c0bbd..edb80a6 100644 --- a/common/modules/comment/widgets/views/form-comment-review.php +++ b/common/modules/comment/widgets/views/form-comment-review.php @@ -11,6 +11,7 @@ use yii\web\View; use yii\widgets\ActiveForm; use yii\helpers\Html; + ?> field(( !empty( $model->rating ) ? $model->rating : $rating ), 'value') ->label(false) - ->widget(StarRating::className(), ['pluginOptions' => ['size'=>'xxs', 'step' => 1, 'value' => 2, 'showCaption' => false]]); + ->widget(StarRating::className(), [ + 'pluginOptions' => [ + 'size' => 'xxs', + 'step' => 1, + 'value' => 2, + 'showCaption' => false, + 'stars' => 10, + 'min' => 0, + 'max' => 10, + ], + ]); if($model->scenario == $model::SCENARIO_GUEST) { echo $form->field($model, 'user_name', [ 'options' => [ @@ -56,7 +67,7 @@ if(!empty( $model->comment_pid )) { echo Html::tag('div', Html::activeHiddenInput($model, 'comment_pid') . Html::tag('p', $model->parent->author, [ 'class' => 'artbox_comment_reply_author' ]), [ 'class' => CommentWidget::$baseClass[ 'reply_block' ] ]); } else { - echo Html::tag('div', '', [ 'class' => CommentWidget::$baseClass[ 'reply_block' ].' test_class' ]); + echo Html::tag('div', '', [ 'class' => CommentWidget::$baseClass[ 'reply_block' ] . ' test_class' ]); } echo $form->field($model, 'text', [ 'options' => [ diff --git a/common/modules/comment/widgets/views/form-comment.php b/common/modules/comment/widgets/views/form-comment.php index 816f803..47f4322 100644 --- a/common/modules/comment/widgets/views/form-comment.php +++ b/common/modules/comment/widgets/views/form-comment.php @@ -19,11 +19,16 @@ if($rating) { echo $form->field(( !empty( $model->rating ) ? $model->rating : $rating ), 'value') ->label(false) - ->widget(StarRating::className(), [ 'pluginOptions' => [ 'size' => 'xxs', - 'step' => 1, - 'value' => 2, - 'showCaption' => false, - ], + ->widget(StarRating::className(), [ + 'pluginOptions' => [ + 'size' => 'xxs', + 'step' => 1, + 'value' => 2, + 'showCaption' => false, + 'min' => 0, + 'max' => 10, + 'stars' => 10, + ], ]); } diff --git a/common/modules/comment/widgets/views/project_comment_view.php b/common/modules/comment/widgets/views/project_comment_view.php index 4c930d8..15e4d23 100644 --- a/common/modules/comment/widgets/views/project_comment_view.php +++ b/common/modules/comment/widgets/views/project_comment_view.php @@ -19,7 +19,7 @@ ->with('userInfo') ->one(); } - $model->buildButtons(['delete']); + $model->buildButtons([ 'delete' ]); ?>
    @@ -49,9 +49,15 @@ hasRating()) { echo StarRating::widget([ - 'name' => 'rating_project_comment', - 'value' => $rating->value, - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] + 'name' => 'rating_project_comment', + 'value' => $rating->value, + 'pluginOptions' => [ + 'displayOnly' => true, + 'size' => 'xxs', + 'min' => 0, + 'max' => 10, + 'stars' => 10, + ], ]); } ?> @@ -69,7 +75,7 @@
    buttons[ 'delete' ] )) { - echo Html::a(($model->user_id != NULL && $model->user_id == \Yii::$app->user->id)?'Удалить':'Пожаловаться ', $model->buttons[ 'delete' ], [ 'class' => CommentWidget::$baseClass[ 'comment_delete' ] ]); + echo Html::a(( $model->user_id != NULL && $model->user_id == \Yii::$app->user->id ) ? 'Удалить' : 'Пожаловаться ', $model->buttons[ 'delete' ], [ 'class' => CommentWidget::$baseClass[ 'comment_delete' ] ]); } if(!empty( $model->buttons[ 'update' ] )) { echo Html::a('Редактировать', $model->buttons[ 'update' ], [ 'class' => CommentWidget::$baseClass[ 'comment_update' ] ]); diff --git a/frontend/controllers/SearchController.php b/frontend/controllers/SearchController.php index 8a58e08..42c08b5 100755 --- a/frontend/controllers/SearchController.php +++ b/frontend/controllers/SearchController.php @@ -11,6 +11,7 @@ use frontend\models\SearchVacancyForm; use Yii; use frontend\models\Options; use frontend\models\OptionValues; +use yii\base\InvalidParamException; use yii\data\ActiveDataProvider; use yii\data\Pagination; use yii\web\Controller; @@ -42,6 +43,32 @@ use frontend\models\Option; ]; } + public function actionCommon($action) + { + $query = \Yii::$app->request->get('query'); + $actions = [ + 1 => 'project', + 2 => 'performer', + 3 => 'customer' + ]; + if(!array_key_exists($action, $actions)) { + return $this->redirect(['/', 'query' => $query]); + } else { + switch($action) { + case 1: + return $this->redirect(['search/'.$actions[$action], 'TenderSearch[info]' => $query]); + break; + case 2: + return $this->redirect(['search/'.$actions[$action], 'SearchPerformerForm[search]' => $query]); + break; + case 3: + return $this->redirect(['search/'.$actions[$action], 'CustomerSearch[info]' => $query]); + break; + } + } + return false; + } + public function actionProject() { $model = new TenderSearch(); diff --git a/frontend/views/chat/message.php b/frontend/views/chat/message.php index 0f52439..59d2f4b 100755 --- a/frontend/views/chat/message.php +++ b/frontend/views/chat/message.php @@ -26,9 +26,15 @@
    'rating_messange', - 'value' => $chat->interlocutor->userInfo->rating, - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] + 'name' => 'rating_messange', + 'value' => $chat->interlocutor->userInfo->rating, + 'pluginOptions' => [ + 'displayOnly' => true, + 'size' => 'xxs', + 'min' => 0, + 'max' => 10, + 'stars' => 10, + ], ]); ?>
    @@ -47,7 +53,7 @@
    $chat->interlocutor->isBookmarked?'artbox_bookmark_remove_performer':'artbox_bookmark_add_performer', + 'class' => $chat->interlocutor->isBookmarked ? 'artbox_bookmark_remove_performer' : 'artbox_bookmark_add_performer', 'data' => [ 'id' => $chat->interlocutor->id ], ]); ?> @@ -147,7 +153,7 @@
    'post', + 'method' => 'post', 'options' => [ 'enctype' => 'multipart/form-data' ], ]); ?> diff --git a/frontend/views/company/_company_common_review.php b/frontend/views/company/_company_common_review.php index 4cabfda..75f33e5 100644 --- a/frontend/views/company/_company_common_review.php +++ b/frontend/views/company/_company_common_review.php @@ -9,9 +9,15 @@ rating )) { echo StarRating::widget([ - 'name' => 'rating_company_review', - 'value' => $model->rating->value, - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] + 'name' => 'rating_company_review', + 'value' => $model->rating->value, + 'pluginOptions' => [ + 'displayOnly' => true, + 'size' => 'xxs', + 'min' => 0, + 'max' => 10, + 'stars' => 10, + ], ]); } ?> diff --git a/frontend/views/company/_company_team_review.php b/frontend/views/company/_company_team_review.php index 5e3a341..52284cc 100644 --- a/frontend/views/company/_company_team_review.php +++ b/frontend/views/company/_company_team_review.php @@ -14,9 +14,15 @@ rating )) { echo StarRating::widget([ - 'name' => 'rating_company_team', - 'value' => $model->rating->value, - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] + 'name' => 'rating_company_team', + 'value' => $model->rating->value, + 'pluginOptions' => [ + 'displayOnly' => true, + 'size' => 'xxs', + 'min' => 0, + 'max' => 10, + 'stars' => 10, + ], ]); } ?> diff --git a/frontend/views/company/portfolio-view.php b/frontend/views/company/portfolio-view.php index c16a0e8..2c82dae 100644 --- a/frontend/views/company/portfolio-view.php +++ b/frontend/views/company/portfolio-view.php @@ -78,6 +78,9 @@ 'pluginOptions' => [ 'displayOnly' => true, 'size' => 'xxs', + 'min' => 0, + 'max' => 10, + 'stars' => 10, ], ]); ?> @@ -248,7 +251,10 @@ { $('.new-portf-slider #demo5').scrollbox( { - direction : 'h', distance : 210, autoPlay : false, onMouseOverPause : false + direction : 'h', + distance : 210, + autoPlay : false, + onMouseOverPause : false } ); $('#demo5-backward').click( diff --git a/frontend/views/layouts/company.php b/frontend/views/layouts/company.php index da6a2dd..c533cec 100755 --- a/frontend/views/layouts/company.php +++ b/frontend/views/layouts/company.php @@ -196,9 +196,15 @@
    'rating_company', - 'value' => $this->params[ 'company' ]->userInfo->rating, - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] + 'name' => 'rating_company', + 'value' => $this->params[ 'company' ]->userInfo->rating, + 'pluginOptions' => [ + 'displayOnly' => true, + 'size' => 'xxs', + 'min' => 0, + 'max' => 10, + 'stars' => 10, + ], ]); ?>
    @@ -244,11 +250,11 @@
    Сотрудники:
    params[ 'company' ]->companyInfo->staff)) { - echo $this->params[ 'company' ]->companyInfo->staff; - } else { - echo 0; - } + if(!empty( $this->params[ 'company' ]->companyInfo->staff )) { + echo $this->params[ 'company' ]->companyInfo->staff; + } else { + echo 0; + } ?>
  • @@ -294,7 +300,9 @@ diff --git a/frontend/views/layouts/gallery-company.php b/frontend/views/layouts/gallery-company.php index d0987b6..fee91a9 100755 --- a/frontend/views/layouts/gallery-company.php +++ b/frontend/views/layouts/gallery-company.php @@ -80,22 +80,22 @@ ], ], [ - 'label' => 'Выполненные работы', - 'url' => [ + 'label' => 'Выполненные работы', + 'url' => [ 'company/portfolio', 'company_id' => $this->params[ 'company' ]->id, 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, ], - 'visible' => ( empty( $this->params[ 'type' ] ) || $this->params['type'] == 'implementer' ) ? true : false, + 'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false, ], [ - 'label' => 'Заказанные работы', - 'url' => [ + 'label' => 'Заказанные работы', + 'url' => [ 'company/projects', 'company_id' => $this->params[ 'company' ]->id, 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, ], - 'visible' => ( !empty( $this->params[ 'type' ] ) && $this->params['type'] == 'customer' ) ? true : false, + 'visible' => ( !empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer' ) ? true : false, ], [ 'label' => 'Команда', @@ -193,9 +193,15 @@
    'rating_company', - 'value' => $this->params[ 'company' ]->userInfo->rating, - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] + 'name' => 'rating_company', + 'value' => $this->params[ 'company' ]->userInfo->rating, + 'pluginOptions' => [ + 'displayOnly' => true, + 'size' => 'xxs', + 'min' => 0, + 'max' => 10, + 'stars' => 10, + ], ]); ?>
    @@ -229,7 +235,9 @@ diff --git a/frontend/views/layouts/gallery.php b/frontend/views/layouts/gallery.php index 19180fd..3fe888f 100755 --- a/frontend/views/layouts/gallery.php +++ b/frontend/views/layouts/gallery.php @@ -2,16 +2,16 @@ use kartik\rating\StarRating; use yii\helpers\Html; -use yii\helpers\Url; -use yii\widgets\Breadcrumbs; -use yii\widgets\Menu; + use yii\helpers\Url; + use yii\widgets\Breadcrumbs; + use yii\widgets\Menu; -\frontend\assets\AppAsset::register($this); -/* @var $content string */ -$this->beginContent('@app/views/layouts/main.php'); + \frontend\assets\AppAsset::register($this); + /* @var $content string */ + $this->beginContent('@app/views/layouts/main.php'); ?>
    -
    +
    @@ -64,7 +64,7 @@ $this->beginContent('@app/views/layouts/main.php'); 'url' => [ 'performer/common', 'performer_id' => $this->params[ 'user' ]->id, - 'type' => (!empty($this->params['type']))?$this->params['type']:null, + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, ], ], [ @@ -72,7 +72,7 @@ $this->beginContent('@app/views/layouts/main.php'); 'url' => [ 'performer/portfolio', 'performer_id' => $this->params[ 'user' ]->id, - 'type' => (!empty($this->params['type']))?$this->params['type']:null, + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, ], ], [ @@ -80,7 +80,7 @@ $this->beginContent('@app/views/layouts/main.php'); 'url' => [ 'performer/projects', 'performer_id' => $this->params[ 'user' ]->id, - 'type' => (!empty($this->params['type']))?$this->params['type']:null, + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, ], ], [ @@ -88,7 +88,7 @@ $this->beginContent('@app/views/layouts/main.php'); 'url' => [ 'performer/blog-list', 'performer_id' => $this->params[ 'user' ]->id, - 'type' => (!empty($this->params['type']))?$this->params['type']:null, + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, ], ], [ @@ -96,7 +96,7 @@ $this->beginContent('@app/views/layouts/main.php'); 'url' => [ 'performer/review', 'performer_id' => $this->params[ 'user' ]->id, - 'type' => (!empty($this->params['type']))?$this->params['type']:null, + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, ], ], [ @@ -104,7 +104,7 @@ $this->beginContent('@app/views/layouts/main.php'); 'url' => [ 'performer/workplace', 'performer_id' => $this->params[ 'user' ]->id, - 'type' => (!empty($this->params['type']))?$this->params['type']:null, + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, ], ], [ @@ -112,7 +112,7 @@ $this->beginContent('@app/views/layouts/main.php'); 'url' => [ 'performer/gallery', 'performer_id' => $this->params[ 'user' ]->id, - 'type' => (!empty($this->params['type']))?$this->params['type']:null, + 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, ], ], ], @@ -127,40 +127,40 @@ $this->beginContent('@app/views/layouts/main.php'); endContent() ?> \ No newline at end of file diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index 2f57c7a..023f632 100755 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -4,6 +4,7 @@ /* @var $content string */ use yii\helpers\Html; + use yii\helpers\Url; use yii\widgets\Menu; use frontend\assets\AppAsset; @@ -140,9 +141,9 @@
    -
    - - + + +
    @@ -334,6 +335,7 @@ diff --git a/frontend/views/layouts/performer.php b/frontend/views/layouts/performer.php index 6ece564..3975b94 100755 --- a/frontend/views/layouts/performer.php +++ b/frontend/views/layouts/performer.php @@ -178,9 +178,15 @@
    'rating_company', - 'value' => $this->params[ 'user' ]->userInfo->rating, - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] + 'name' => 'rating_company', + 'value' => $this->params[ 'user' ]->userInfo->rating, + 'pluginOptions' => [ + 'displayOnly' => true, + 'size' => 'xxs', + 'min' => 0, + 'max' => 10, + 'stars' => 10, + ], ]); ?>
    @@ -260,7 +266,7 @@ Стоимость работ:
    params[ 'user' ]->userInfo->salary )) { - echo 'от '.$this->params[ 'user' ]->userInfo->salary . ' ' . $this->params[ 'user' ]->userInfo->currency->label.' за час'; + echo 'от ' . $this->params[ 'user' ]->userInfo->salary . ' ' . $this->params[ 'user' ]->userInfo->currency->label . ' за час'; } else { echo 'Не указано'; } @@ -308,7 +314,9 @@ diff --git a/frontend/views/performer/common.php b/frontend/views/performer/common.php index 82022bb..875eb2e 100755 --- a/frontend/views/performer/common.php +++ b/frontend/views/performer/common.php @@ -10,7 +10,7 @@ * @var array $developments * @var array $educations * @var array $courses - * @var int[] $geography + * @var int[] $geography */ $this->params[ 'user' ] = $user; @@ -23,10 +23,10 @@ if(!$first) { $geographyString .= ', '; } - $geographyString .= $city . ' ('.$count.')'; + $geographyString .= $city . ' (' . $count . ')'; $first = 0; } - unset($first); + unset( $first ); ?>
    comments[ $i ]->rating )) { - echo StarRating::widget([ - 'name' => 'rating_common', - 'value' => $user->comments[ $i ]->rating->value, - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] - ]); + echo StarRating::widget([ + 'name' => 'rating_common', + 'value' => $user->comments[ $i ]->rating->value, + 'pluginOptions' => [ + 'displayOnly' => true, + 'size' => 'xxs', + 'min' => 0, + 'max' => 10, + 'stars' => 10, + ], + ]); } ?>
    Мнение от: comments[ $i ]->getAuthor(' (Гость)') ?>
    diff --git a/frontend/views/performer/portfolio-view.php b/frontend/views/performer/portfolio-view.php index cbaf234..65f656b 100644 --- a/frontend/views/performer/portfolio-view.php +++ b/frontend/views/performer/portfolio-view.php @@ -80,6 +80,9 @@ 'pluginOptions' => [ 'displayOnly' => true, 'size' => 'xxs', + 'min' => 0, + 'max' => 10, + 'stars' => 10, ], ]); ?> @@ -120,7 +123,9 @@ ShowGallery($portfolio->gallery->photo) as $one_photo) { ?> -
  • +
  • + +
  • @@ -171,8 +176,11 @@

    Участники проекта:

    getPortfolioUsers()->where(['status' => 1])->with('gallery')->all() as $portfolioUser) { - if(!empty($portfolioUser->gallery)) { + foreach($portfolio->getPortfolioUsers() + ->where([ 'status' => 1 ]) + ->with('gallery') + ->all() as $portfolioUser) { + if(!empty( $portfolioUser->gallery )) { $gallery = $portfolio->ShowGallery($portfolioUser->gallery->photo); } ?> @@ -253,7 +261,10 @@ { $('.new-portf-slider #demo5').scrollbox( { - direction : 'h', distance : 230, autoPlay : false, onMouseOverPause : false + direction : 'h', + distance : 230, + autoPlay : false, + onMouseOverPause : false } ); $('#demo5-backward').click( @@ -270,8 +281,9 @@ ); var widthSlider = $('.new-portf-slider ul li').length $('.new-portf-slider ul').css({width : ((widthSlider * 230) - 20)}) - if (widthSlider<=3) { - $('#demo5-forward, #demo5-backward').css({display:'none'}) + if(widthSlider <= 3) + { + $('#demo5-forward, #demo5-backward').css({display : 'none'}) } } ); diff --git a/frontend/views/search/_customer_list_view.php b/frontend/views/search/_customer_list_view.php index a9938ee..bc22d2c 100644 --- a/frontend/views/search/_customer_list_view.php +++ b/frontend/views/search/_customer_list_view.php @@ -31,27 +31,33 @@
    - userInfo->rating) { - echo StarRating::widget([ - 'name' => 'rating_customer', - 'value' => $rating, - 'pluginOptions' => [ - 'displayOnly' => true, - 'size' => 'xxs', - ], - ]); - } else { - echo StarRating::widget([ - 'name' => 'rating_customer', - 'value' => 0, - 'pluginOptions' => [ - 'displayOnly' => true, - 'size' => 'xxs', - ], - ]); - } - ?> + userInfo->rating) { + echo StarRating::widget([ + 'name' => 'rating_customer', + 'value' => $rating, + 'pluginOptions' => [ + 'displayOnly' => true, + 'size' => 'xxs', + 'min' => 0, + 'max' => 10, + 'stars' => 10, + ], + ]); + } else { + echo StarRating::widget([ + 'name' => 'rating_customer', + 'value' => 0, + 'pluginOptions' => [ + 'displayOnly' => true, + 'size' => 'xxs', + 'min' => 0, + 'max' => 10, + 'stars' => 10, + ], + ]); + } + ?>
    comments) ?> отзывов diff --git a/frontend/views/search/_performer_list_view.php b/frontend/views/search/_performer_list_view.php index 3999d72..4aa2f17 100644 --- a/frontend/views/search/_performer_list_view.php +++ b/frontend/views/search/_performer_list_view.php @@ -16,7 +16,7 @@ ->limit(4) ->all(), 'cover'); ?> 'small-img-search gallery-box-min' ]); @@ -61,9 +61,15 @@
    'rating_performer', - 'value' => $model->userInfo->rating, - 'pluginOptions' => ['displayOnly' => true, 'size' => 'xxs'] + 'name' => 'rating_performer', + 'value' => $model->userInfo->rating, + 'pluginOptions' => [ + 'displayOnly' => true, + 'size' => 'xxs', + 'min' => 0, + 'max' => 10, + 'stars' => 10, + ], ]); ?>
    @@ -111,7 +117,10 @@ 'data-id' => $model->id, ]); } - echo Html::a(Yii::t('app', 'Offer project'), ['#'], ['class' => 'get-project', 'data' => ['performer-id' => $model->id]]); + echo Html::a(Yii::t('app', 'Offer project'), [ '#' ], [ + 'class' => 'get-project', + 'data' => [ 'performer-id' => $model->id ], + ]); } ?>
    diff --git a/frontend/views/search/project.php b/frontend/views/search/project.php index 0e03ed1..8c56afa 100755 --- a/frontend/views/search/project.php +++ b/frontend/views/search/project.php @@ -30,6 +30,11 @@ 'options' => [ 'class' => 'search-work-form' ], 'action' => [ '' ], ]); + echo $form->field($model, 'info', [ 'options' => [ 'class' => 'info-search-input' ] ]) + ->label('Поиск') + ->textInput([ 'class' => 'form-control', + 'placeholder' => 'Текст для поиска', + ]); echo $form->field($model, 'specialization') ->dropDownList($specialization, [ 'prompt' => 'Любая' ]); @@ -111,7 +116,9 @@
    - +
    @@ -296,6 +303,7 @@
    @@ -391,8 +399,8 @@
    -
    - + ?>
    + +
    diff --git a/frontend/views/tender/view.php b/frontend/views/tender/view.php index 72f855c..9205f25 100755 --- a/frontend/views/tender/view.php +++ b/frontend/views/tender/view.php @@ -67,6 +67,9 @@ 'pluginOptions' => [ 'displayOnly' => true, 'size' => 'xxs', + 'min' => 0, + 'max' => 10, + 'stars' => 10, ], ]); ?> @@ -209,13 +212,18 @@ { var start_position = new google.maps.LatLng('56', '30'); var settings = { - zoom : 7, scrollwheel : false, center : start_position, + zoom : 7, + scrollwheel : false, + center : start_position, mapTypeControl : false, mapTypeControlOptions : {style : google.maps.MapTypeControlStyle.DROPDOWN_MENU}, navigationControl : false, navigationControlOptions : {style : google.maps.NavigationControlStyle.SMALL}, - scaleControl : false, streetViewControl : false, rotateControl : false, - zoomControl : true, mapTypeId : google.maps.MapTypeId.ROADMAP + scaleControl : false, + streetViewControl : false, + rotateControl : false, + zoomControl : true, + mapTypeId : google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), settings); @@ -225,8 +233,10 @@ var marker = new google.maps.Marker( { - position : new google.maps.LatLng('56', '35.3'), map : map, - title : 'Marker Title2', icon : image1 + position : new google.maps.LatLng('56', '35.3'), + map : map, + title : 'Marker Title2', + icon : image1 } ); @@ -247,69 +257,69 @@
    -
    - -
    -
    -
    -
    - $this, - 'model' => $model::className(), - 'model_id' => $model->project_id, - 'comment_class' => \common\modules\comment\models\CommentProject::className(), - 'class_options' => [ - 'scenario' => is_int(\Yii::$app->user->getId()) ? \common\modules\comment\models\Comment::SCENARIO_USER : \common\modules\comment\models\Comment::SCENARIO_GUEST, - 'user_id' => \Yii::$app->user->getId(), - 'guestComment' => false, - 'status' => \common\modules\comment\models\CommentProject::STATUS_ACTIVE, - ], - 'list_options' => [ - 'view' => 'list-project-comment', - 'class' => 'section box tender-offer-proj-wr', - ], - 'form_options' => [ - 'view' => 'form-project-comment', - 'tag' => 'div', - 'class' => 'artbox_comment_form section-box tender-add-answer', - ], - 'options' => [ - 'tag' => false, - ], - ]); - Pjax::end(); - ?> +
    + +
    +
    +
    +
    + $this, + 'model' => $model::className(), + 'model_id' => $model->project_id, + 'comment_class' => \common\modules\comment\models\CommentProject::className(), + 'class_options' => [ + 'scenario' => is_int(\Yii::$app->user->getId()) ? \common\modules\comment\models\Comment::SCENARIO_USER : \common\modules\comment\models\Comment::SCENARIO_GUEST, + 'user_id' => \Yii::$app->user->getId(), + 'guestComment' => false, + 'status' => \common\modules\comment\models\CommentProject::STATUS_ACTIVE, + ], + 'list_options' => [ + 'view' => 'list-project-comment', + 'class' => 'section box tender-offer-proj-wr', + ], + 'form_options' => [ + 'view' => 'form-project-comment', + 'tag' => 'div', + 'class' => 'artbox_comment_form section-box tender-add-answer', + ], + 'options' => [ + 'tag' => false, + ], + ]); + Pjax::end(); + ?> +
    -
    -
    -
    -
    - $this, - 'model' => $model->className(), - 'model_id' => $model->project_id, - 'comment_class' => \common\modules\comment\models\CommentProjectAnswer::className(), - 'class_options' => [ - 'scenario' => is_int(\Yii::$app->user->getId()) ? \common\modules\comment\models\Comment::SCENARIO_USER : \common\modules\comment\models\Comment::SCENARIO_GUEST, - 'user_id' => \Yii::$app->user->getId(), - 'guestComment' => false, - 'status' => \common\modules\comment\models\Comment::STATUS_ACTIVE, - ], - 'provider_options' => [ - 'pagination' => [ - 'pageSize' => 2, +
    +
    +
    + $this, + 'model' => $model->className(), + 'model_id' => $model->project_id, + 'comment_class' => \common\modules\comment\models\CommentProjectAnswer::className(), + 'class_options' => [ + 'scenario' => is_int(\Yii::$app->user->getId()) ? \common\modules\comment\models\Comment::SCENARIO_USER : \common\modules\comment\models\Comment::SCENARIO_GUEST, + 'user_id' => \Yii::$app->user->getId(), + 'guestComment' => false, + 'status' => \common\modules\comment\models\Comment::STATUS_ACTIVE, + ], + 'provider_options' => [ + 'pagination' => [ + 'pageSize' => 2, + ], ], - ], - 'success_options' => [ - 'tag' => 'div', -// 'content' => 'Вопрос успешно создан и появится как только будет получен ответ', - 'content' => function(){ - return ""; - }, - 'class' => 'test-class-success', - ], - 'list_options' => [ - 'view' => 'list-comment-question', - ], - 'form_options' => [ - 'view' => 'form-comment-answer', - 'tag' => 'span', - 'class' => ( ( $model->user_id == \Yii::$app->user->id ) ? 'hidden' : '' ), - ], - 'options' => [ - 'class' => 'proektant-comments-wr fix_te style', - ], - ]); - Pjax::end(); - ?> + }, + 'class' => 'test-class-success', + ], + 'list_options' => [ + 'view' => 'list-comment-question', + ], + 'form_options' => [ + 'view' => 'form-comment-answer', + 'tag' => 'span', + 'class' => ( ( $model->user_id == \Yii::$app->user->id ) ? 'hidden' : '' ), + ], + 'options' => [ + 'class' => 'proektant-comments-wr fix_te style', + ], + ]); + Pjax::end(); + ?> +
    -
    -
    - - \ No newline at end of file + ) + + \ No newline at end of file diff --git a/frontend/web/css/style.css b/frontend/web/css/style.css index 01cdd5a..0e2b957 100755 --- a/frontend/web/css/style.css +++ b/frontend/web/css/style.css @@ -2917,7 +2917,7 @@ input[type=file]::-webkit-file-upload-button { .company-performer-comments-bl .rating { padding-left: 0; margin-left: -4px; - width: 130px; + width: 2000px; overflow: hidden } @@ -3516,6 +3516,15 @@ input[type=file]::-webkit-file-upload-button { font-weight: 700; margin-bottom: 5px; } +.search-work-form .info-search-input .form-control { + height: 29px; + color: #636363; + background: #fff; + border: 1px solid #dcdcdc; + box-sizing: border-box; + padding-left: 8px; + margin-bottom: 8px; +} .search-work-form select { border: 1px solid #dcdcdc; @@ -12275,7 +12284,7 @@ li.active-menu-admin:hover a .ico_num { } .search_perform-stars-wr .rating-container { - width: 90px; + width: 180px; float: left; height: 34px; box-sizing: border-box; diff --git a/frontend/web/js/artbox.maps.js b/frontend/web/js/artbox.maps.js index 073ca61..7374de7 100644 --- a/frontend/web/js/artbox.maps.js +++ b/frontend/web/js/artbox.maps.js @@ -67,7 +67,6 @@ $( ); function showMarkers(variable, elements) { - console.log(elements); var position = { lat : undefined, lng : undefined -- libgit2 0.21.4