diff --git a/backend/modules/card/views/user-card/_additional.php b/backend/modules/card/views/user-card/_additional.php deleted file mode 100644 index 4b53d2d..0000000 --- a/backend/modules/card/views/user-card/_additional.php +++ /dev/null @@ -1 +0,0 @@ -skill->name; ?> diff --git a/backend/modules/card/views/user-card/index.php b/backend/modules/card/views/user-card/index.php index bca1464..f1465f9 100755 --- a/backend/modules/card/views/user-card/index.php +++ b/backend/modules/card/views/user-card/index.php @@ -61,14 +61,13 @@ $this->params['breadcrumbs'][] = $this->title; 'label' => 'Навыки', 'format' => 'raw', 'value' => function($model){ - $dataProvider = new \yii\data\ActiveDataProvider([ - 'query' => $model->getSkillValues(), - ]); - return ListView::widget([ - 'dataProvider' => $dataProvider, - 'itemView' => '_additional', - 'layout' => "{items}", - ]); + $str = ''; + foreach ($model->skillValues as $item) + { + $str .= $item->skill->name . ', '; + } + $str = substr( $str, 0, -2); + return $str; }, 'filter' => kartik\select2\Select2::widget([ 'attribute' => 'skills', diff --git a/backend/modules/project/models/ProjectSearch.php b/backend/modules/project/models/ProjectSearch.php index 8fe9ab2..65d9c3a 100755 --- a/backend/modules/project/models/ProjectSearch.php +++ b/backend/modules/project/models/ProjectSearch.php @@ -2,7 +2,6 @@ namespace backend\modules\project\models; -use common\classes\Debug; use Yii; use yii\base\Model; use yii\data\ActiveDataProvider; @@ -19,7 +18,7 @@ class ProjectSearch extends Project public function rules() { return [ - [['id'], 'integer'], + [['id','status'], 'integer'], [['name', 'description', 'created_at', 'updated_at'], 'safe'], ]; } @@ -61,6 +60,7 @@ class ProjectSearch extends Project // grid filtering conditions $query->andFilterWhere([ 'id' => $this->id, + 'status' => $this->status, 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, ]); diff --git a/backend/views/layouts/left.php b/backend/views/layouts/left.php index 8a001ed..38f07e9 100755 --- a/backend/views/layouts/left.php +++ b/backend/views/layouts/left.php @@ -6,6 +6,11 @@ foreach($userStatuses as $key => $status){ $menuItems[] = ['label' => $status, 'icon' => 'user', 'url' => ['/card/user-card?UserCardSearch[status]=' . $key]]; } + $projectStatuses = \common\models\Status::getStatusesArray(\common\models\UseStatus::USE_PROJECT); + $projectItems = [['label' => 'Все', 'icon' => 'files-o', 'url' => ['/project/project']]]; + foreach($projectStatuses as $key => $status){ + $projectItems[] = ['label' => $status, 'icon' => 'user', 'url' => ['/project/project?ProjectSearch[status]=' . $key]]; + } ?> 'Профили', 'icon' => 'users', 'url' => '#', 'items' => $menuItems, ], - ['label' => 'Проекты', 'icon' => 'files-o', 'url' => ['/project/project']], + [ 'label' => 'Проекты', 'icon' => 'files-o', 'url' => ['#'], + 'items' => $projectItems, + ], ['label' => 'Компании', 'icon' => 'files-o', 'url' => ['/company/company']], [ 'label' => 'Hh.ru', 'icon' => 'user-circle', 'url' => '#',