예제 #1
0
 /**
  * Display a list of active talents
  *
  * @param UserRepository $userRepository
  * @return $this
  */
 public function index(UserRepository $userRepository)
 {
     $talents = $userRepository->findActiveTalents(Input::get('tag'), Input::get('describes'), Input::get('location'), null, 12, Input::get('professions'));
     $describes = Skill::lists('name', 'id')->all();
     $professions = Profession::lists('name', 'id')->all();
     return view('talent.index')->with('talents', $talents)->with('describes', $describes)->with('professions', $professions);
 }
예제 #2
0
 /**
  * Show the form for creating a user profile.
  *
  * @return $this
  */
 public function edit()
 {
     $describes = Skill::orderBy('name')->lists('name', 'id')->all();
     // We want other to be at the bottom
     $other = array_search('Other', $describes);
     unset($describes[$other]);
     $describes[$other] = 'Other';
     $skills = Tag::orderBy('name')->lists('name', 'id')->all();
     $professions = Profession::orderBy('name')->lists('name', 'id')->all();
     $professions[] = 'Other';
     return view('profile.edit')->with('user', Auth::user())->with('describes', $describes)->with('skills', $skills)->with('route', Route::currentRouteName())->with('professions', $professions);
 }
예제 #3
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Profession::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'rec_status_id' => $this->rec_status_id, 'user_id' => $this->user_id, 'dc' => $this->dc]);
     $query->andFilterWhere(['like', 'name', $this->name])->andFilterWhere(['like', 'note', $this->note]);
     return $dataProvider;
 }
예제 #4
0
파일: index.php 프로젝트: slavam/placement
    <h1><?php 
//echo Html::encode($this->title)
?>
</h1>
    <?php 
//echo $this->render('_search', ['model' => $searchModel]);
?>

    <p class='pull-left'>
        <?php 
echo \yii\helpers\Html::a('<span class="glyphicon glyphicon-plus"></span> ' . Yii::t('app', 'Create new'), ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <div class="clearfix"></div>
    
    <?php 
\yii\widgets\Pjax::begin();
?>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'person_id' => ['attribute' => 'person_id', 'value' => 'person.fullname', 'filter' => ArrayHelper::map(\app\models\Person::find()->active()->orderBy('lname')->all(), 'id', 'lname')], 'professionNames' => ['attribute' => 'resumeProfessions', 'value' => 'professionNames', 'filter' => ArrayHelper::map(\app\models\Profession::find()->active()->orderBy('name')->all(), 'id', 'name')], 'salary', ['class' => 'yii\\grid\\ActionColumn', 'contentOptions' => ['style' => 'white-space: nowrap;']]], 'tableOptions' => ['class' => 'table table-striped table-hover']]);
?>

    <?php 
\yii\widgets\Pjax::end();
?>


</div>
예제 #5
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProfession()
 {
     return $this->hasOne(Profession::className(), ['id' => 'profession_id']);
 }
예제 #6
0
 /**
  * Finds the Profession model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Profession the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Profession::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
예제 #7
0
            'create' => false,
//            'plugins' => ['remove_button'],
            'valueField' => 'id',
            'labelField' => 'fullName',
            'searchField' => ['fullName'],
        ],
    ])->hint('');
    */
?>

<?php 
//echo $form->field($model, 'professions')->dropDownList(ArrayHelper::map(\app\models\Profession::find()->active()->all(), 'id', 'name'), ['prompt' => '', 'multiple' => true])
?>

<?php 
echo $form->field($model, 'professions')->widget(\dosamigos\selectize\SelectizeDropDownList::className(), ['items' => ArrayHelper::map(\app\models\Profession::find()->active()->all(), 'id', 'name'), 'options' => ['multiple' => true, 'class' => 'form-control'], 'clientOptions' => ['persist' => false, 'maxItems' => null, 'create' => false, 'plugins' => ['remove_button'], 'valueField' => 'id', 'labelField' => 'name', 'searchField' => ['name']]])->hint('Use commas to separate tags');
?>

<?php 
echo $form->field($model, 'salary')->textInput(['maxlength' => true]);
?>

<?php 
echo $form->field($model, 'note')->textarea(['rows' => 6]);
?>

<?php 
echo $form->field($model, 'resume_status_id')->dropDownList(ArrayHelper::map(\app\models\ResumeStatus::find()->active()->all(), 'id', 'name'), ['prompt' => '']);
?>

<?php 
예제 #8
0
파일: _form.php 프로젝트: slavam/placement
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\models\Vacancy */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="vacancy-form">

    <?php 
$form = ActiveForm::begin(['options' => ['class' => 'form-horizontal'], 'fieldConfig' => ['template' => "{label}\n<div class=\"col-lg-4\">{input}</div>\n<div class=\"col-lg-6\">{error}</div>", 'labelOptions' => ['class' => 'col-lg-2 control-label']]]);
?>

    <?php 
echo $form->field($model, 'profession_id', ['inputOptions' => ['autofocus' => 'autofocus', 'class' => 'form-control']])->dropDownList(ArrayHelper::map(\app\models\Profession::find()->active()->all(), 'id', 'name'), ['prompt' => '']);
?>

    <?php 
echo $form->field($model, 'salary')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'note')->textarea(['rows' => 6]);
?>

    <?php 
echo $form->field($model, 'firm_id')->dropDownList(ArrayHelper::map(\app\models\Firm::find()->active()->orderBy('name asc')->all(), 'id', 'name'), ['prompt' => '']);
?>

    <?php 
예제 #9
0
파일: Resume.php 프로젝트: slavam/placement
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProfessions()
 {
     return $this->hasMany(Profession::className(), ['id' => 'profession_id'])->viaTable(ResumeProfession::tableName(), ['resume_id' => 'id']);
 }
예제 #10
0
파일: User.php 프로젝트: slavam/placement
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProfessions()
 {
     return $this->hasMany(Profession::className(), ['user_id' => 'id']);
 }
예제 #11
0
  ]);*/
?>

    <?php 
echo $form->field($model, 'firm')->widget(\dosamigos\selectize\SelectizeDropDownList::className(), ['items' => \yii\helpers\ArrayHelper::map(\app\models\Experience::find()->select(['firm'])->active()->distinct()->orderBy('firm asc')->asArray()->all(), 'firm', 'firm'), 'options' => ['multiple' => false, 'class' => 'form-control', 'prompt' => ''], 'clientOptions' => ['selectOnTab' => true, 'openOnFocus' => false, 'persist' => false, 'maxItems' => 1, 'create' => true, 'valueField' => 'firm', 'labelField' => 'firm', 'searchField' => ['firm']]]);
?>


    <?php 
//echo $form->field($model, 'profession_id')->textInput()
?>
    <?php 
//echo $form->field($model, 'profession_id',['inputOptions' => ['class' => 'form-control']])->dropDownList(ArrayHelper::map(\app\models\Profession::find()->active()->all(), 'id', 'name'), ['prompt' => ''])
?>
    <?php 
echo $form->field($model, 'profession_id')->widget(\dosamigos\selectize\SelectizeDropDownList::className(), ['items' => ArrayHelper::map(\app\models\Profession::find()->active()->all(), 'id', 'name'), 'options' => ['multiple' => false, 'class' => 'form-control', 'prompt' => ''], 'clientOptions' => ['openOnFocus' => false, 'persist' => false, 'maxItems' => 1, 'create' => false, 'valueField' => 'id', 'labelField' => 'name', 'searchField' => ['name']]]);
?>

    <?php 
//echo= $form->field($model, 'city_id')->textInput()
?>

    <?php 
echo $form->field($model, 'date_start')->widget(\dosamigos\datepicker\DatePicker::className(), ['language' => 'ru', 'options' => ['class' => 'form-control', 'autocomplete' => 'off'], 'clientOptions' => ['forceParse' => true, 'todayBtn' => true, 'clearBtn' => true, 'autoclose' => true, 'todayHighlight' => true, 'format' => 'dd.mm.yyyy']]);
?>

    <?php 
echo $form->field($model, 'date_end')->widget(\dosamigos\datepicker\DatePicker::className(), ['language' => 'ru', 'options' => ['class' => 'form-control', 'autocomplete' => 'off'], 'clientOptions' => ['forceParse' => true, 'todayBtn' => true, 'clearBtn' => true, 'autoclose' => true, 'todayHighlight' => true, 'format' => 'dd.mm.yyyy']]);
?>

    <?php 
예제 #12
0
파일: index.php 프로젝트: slavam/placement
    <h1><?php 
//echo Html::encode($this->title)
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p class='pull-left'>
        <?php 
echo \yii\helpers\Html::a('<span class="glyphicon glyphicon-plus"></span> ' . Yii::t('app', 'Create new'), ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <div class="clearfix"></div>


    <?php 
\yii\widgets\Pjax::begin();
?>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'resume_id', 'profession_id' => ['attribute' => 'profession_id', 'value' => 'profession.name', 'filter' => ArrayHelper::map(\app\models\Profession::find()->active()->all(), 'id', 'name')], 'note:ntext', ['class' => 'yii\\grid\\ActionColumn']], 'tableOptions' => ['class' => 'table table-striped table-hover']]);
?>

    <?php 
\yii\widgets\Pjax::end();
?>

</div>