Merge pull request #8 from apuc/change_profile

Change profile
This commit is contained in:
kavalar 2019-07-03 18:30:54 +03:00 committed by GitHub
commit 288173d233
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 12 deletions

View File

@ -1 +0,0 @@
<?= $model->skill->name; ?>

View File

@ -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',

View File

@ -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,
]);

View File

@ -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]];
}
?>
<?= dmstr\widgets\Menu::widget(
@ -25,7 +30,9 @@
'label' => 'Профили', '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' => '#',