Пример #1
0
<?php

use yii\helpers\Url;
use yii\helpers\Html;
use app\helpers\ArrayHelper;
use app\components\GridView;
?>

<?php 
echo GridView::widget(['panel' => ['tableOptions' => ['id' => 'listJobs']], 'pjax' => true, 'dataProvider' => $dataProvider, 'toolbar' => [['content' => Html::a('<i class="glyphicon glyphicon-repeat"></i>', [''], ['data-pjax' => 0, 'class' => 'btn btn-default', 'title' => Yii::t('kvgrid', 'Reset Grid')])]], 'columns' => ['title', ['attribute' => 'annual_salary_from', 'value' => function ($model, $key, $index, $widget) {
    return Html::encode(ArrayHelper::getValue(\app\modules\job\models\JobSalary::getOptions(), ArrayHelper::getValue($model, 'annual_salary_from')) . ' to ' . ArrayHelper::getValue(\app\modules\job\models\JobSalary::getOptions(), ArrayHelper::getValue($model, 'annual_salary_to')));
}], ['attribute' => 'company_name', 'value' => function ($model, $key, $index, $widget) {
    return Html::encode($model->company_name);
}], ['attribute' => 'updated_time', 'value' => function ($model, $key, $index, $widget) {
    return Yii::$app->formatter->asDate($model->updated_time->sec);
}], ['class' => '\\kartik\\grid\\ActionColumn', 'template' => '{view}', 'buttons' => ['view' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', ['job-detail', 'id' => $model->_id], ['data-pjax' => '0', 'title' => Yii::t('yii', 'View')]);
}]]], 'responsive' => true, 'hover' => true]);
Пример #2
0
echo $form->field($model, 'code')->textInput(['placeholder' => Yii::t('job', 'Enter a name for your reference only')]);
echo $form->field($model, 'title')->textInput(['placeholder' => Yii::t('job', 'What type of position is this?')]);
echo $form->field($model, 'category_ids')->listBox(\app\modules\job\models\Job::getCategoryOptions(), ['multiple' => true]);
echo $form->field($model, 'country_id')->dropDownList(\app\modules\job\models\JobLocation::getOptions(), ['prompt' => Yii::t('job', '--- Select a location ---')]);
echo $form->field($model, 'city_name')->textInput();
?>

<div class="form-group field-job-annual_salary_from">
    <label for="job-annual_salary_from" class="control-label col-sm-3"><?php 
echo '<em class="required">*</em> ' . Yii::t('job', 'Annual Salary');
?>
</label>
    <div class="col-sm-9">
        <div class="row">
            <?php 
$annualSalary = \app\modules\job\models\JobSalary::getOptions();
?>
            <div class="col-xs-6">
                <?php 
echo Html::activeDropDownList($model, 'annual_salary_from', $annualSalary, ['prompt' => Yii::t('job', '--- From ---')]);
?>
            </div>
            <div class="col-xs-6">
                <?php 
echo Html::activeDropDownList($model, 'annual_salary_to', $annualSalary, ['prompt' => Yii::t('job', '--- To ---')]);
?>
            </div>
        </div>
    </div>
</div>
Пример #3
0
 /**
  * Finds the JobSalary model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $_id
  * @return JobSalary the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = JobSalary::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Пример #4
0
<?php

use yii\bootstrap\Html;
use app\components\DetailView;
use app\helpers\ArrayHelper;
use app\modules\job\models\Job;
?>

<!-- MAIN -->
<main id="main" class="main-container">
    <!-- SECTION 1 -->
    <div class="section section-1">
        <div class="container">
            <div class="row jobs-posted">
                <div class="section-title section-title-style-2">
                    <h2 class="title"> <?php 
echo Yii::t('job', "Job Informations");
?>
 </h2>
                </div>
                <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['code', ['attribute' => 'country_id', 'value' => ArrayHelper::getValue(\app\modules\job\models\JobLocation::getOptions(), ArrayHelper::getValue($model, 'country_id'))], ['attribute' => 'category_ids', 'value' => $model->getCategoryNames(), 'format' => 'raw'], 'city_name', ['attribute' => 'annual_salary_from', 'value' => ArrayHelper::getValue(\app\modules\job\models\JobSalary::getOptions(), ArrayHelper::getValue($model, 'annual_salary_from'))], ['attribute' => 'annual_salary_to', 'value' => ArrayHelper::getValue(\app\modules\job\models\JobSalary::getOptions(), ArrayHelper::getValue($model, 'annual_salary_to'))], ['attribute' => 'functions', 'value' => $model->getFunctionNames(), 'format' => 'raw'], ['attribute' => 'work_type', 'value' => ArrayHelper::getValue(app\modules\job\models\JobWorkType::getOptions(), ArrayHelper::getValue($model, 'work_type'))], ['attribute' => 'industry', 'value' => $model->getIndustryNames(), 'format' => 'raw'], 'company_name', 'company_description:html', 'description:html', 'seo_url', 'seo_title', 'seo_desc', ['attribute' => 'created_time', 'format' => ['datetime', 'php:m/d/Y H:i:s'], 'value' => $model->created_time->sec], ['attribute' => 'updated_time', 'format' => ['datetime', 'php:m/d/Y H:i:s'], 'value' => $model->updated_time->sec], ['attribute' => 'satus', 'value' => ArrayHelper::getValue(Job::getStatusOptions(), ArrayHelper::getValue($model, 'status'))], 'hits']]);
?>
            </div>
        </div>
    </div>
    <!-- # SECTION 1 -->
</main>
<!-- # MAIN -->
Пример #5
0
if (!empty($model->image)) {
    $imageConfig['pluginOptions']['initialPreview'] = [Html::img(LetHelper::getFileUploaded($model->image), ['class' => 'file-preview-image'])];
}
echo $form->field($model, 'image')->widget(FileInput::classname(), $imageConfig);
?>
                        <?php 
echo $form->field($jobModel, 'sex')->radioList($jobModel::getSexOptions());
?>
                        <?php 
echo $form->field($jobModel, 'birthday')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['startDate' => '01/01/1980', 'endDate' => '0d', 'autoclose' => true]]]);
?>
                        <?php 
echo $form->field($jobModel, 'seeker_nationality')->dropDownList(\app\modules\job\models\JobLocation::getOptions(), ['prompt' => '---']);
?>
                        <?php 
echo $form->field($jobModel, 'seeker_salary')->dropDownList(\app\modules\job\models\JobSalary::getOptions(), ['prompt' => 'In US Dollars']);
?>

                        <div class="form-group">
                            <div class="col-sm-9 col-sm-offset-3">
                                <?php 
echo Html::submitButton(Yii::t('account', 'Sign up'), ['class' => 'button button-primary']);
?>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!-- # SECTION 1 -->
Пример #6
0
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5><?php 
echo Yii::t('common', 'Information');
?>
</h5>
                </div>
                <div class="ibox-content">
                    <?php 
$form = ActiveForm::begin(['id' => 'formDefault', 'layout' => 'horizontal', 'options' => ['enctype' => 'multipart/form-data'], 'fieldConfig' => ['horizontalCssClasses' => ['label' => 'col-sm-2', 'wrapper' => 'col-sm-10', 'error' => 'help-block m-b-none', 'hint' => '']]]);
$tabs = [['label' => Yii::t('common', 'General information'), 'content' => $form->field($modelUser, 'display_name')->textInput() . $form->field($modelUser, 'email')->textInput() . $form->field($modelUser, 'password')->passwordInput() . $form->field($modelUser, 'phone')->textInput() . $form->field($modelUser, 'status')->widget(SwitchInput::classname(), ['containerOptions' => []]), 'active' => true]];
if ($modelUserJob->role == 'seeker') {
    $tabs[] = ['label' => Yii::t('common', 'Extra information'), 'content' => $form->field($modelUserJob, 'sex')->radioList($modelUserJob::getSexOptions()) . $form->field($modelUserJob, 'birthday')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['startDate' => '01/01/1980', 'endDate' => '0d', 'autoclose' => true]]]) . $form->field($modelUserJob, 'seeker_nationality')->dropDownList(\app\modules\job\models\JobLocation::getOptions(), ['prompt' => '---']) . $form->field($modelUserJob, 'seeker_salary')->dropDownList(\app\modules\job\models\JobSalary::getOptions(), ['prompt' => 'In US Dollars'])];
} else {
    $tabs[] = ['label' => Yii::t('common', 'Extra information'), 'content' => $form->field($modelUserJob, 'recruiter_type')->dropDownList(\app\modules\job\models\UserJob::getAgentTypeOptions()) . $form->field($modelUserJob, 'recruiter_company_name') . $form->field($modelUserJob, 'recruiter_position') . $form->field($modelUserJob, 'recruiter_office_location')->dropDownList(\app\modules\job\models\JobLocation::getOptions(), ['prompt' => '---']) . $form->field($modelUserJob, 'recruiter_city_name') . $form->field($modelUserJob, 'recruiter_website') . $form->field($modelUserJob, 'recruiter_jobs_industry')->listBox(\app\modules\job\models\JobIndustry::getOptions()) . $form->field($modelUserJob, 'recruiter_summary')];
}
$tabs[] = ['label' => Yii::t('common', 'VIP information'), 'content' => $form->field($modelUserJob, 'vip') . $form->field($modelUserJob, 'vip_from')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true]]]) . $form->field($modelUserJob, 'vip_to')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true]]])];
echo Html::hiddenInput('save_type', 'save');
echo yii\bootstrap\Tabs::widget(['items' => $tabs]);
ActiveForm::end();
?>




                    <?php 
/*
$form = ActiveForm::begin([