<div class="wrapper wrapper-content animated fadeInRight"> <div class="row m-b-sm"> <div class="col-lg-12"> <div class="btn-group pull-right"> <?php echo Html::button(Yii::t('common', 'Save'), ['class' => 'btn btn-primary', 'onclick' => '$("#formDefault").submit();']); ?> </div> </div> </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' => '']]]); echo $form->field($model, 'status')->dropDownList(\app\modules\job\models\Job::getStatusOptions(), ['prompt' => Yii::t('job', '--- Select a Status ---')]); ActiveForm::end(); ?> </div> </div> </div> </div> </div>
<?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 -->
use app\helpers\ArrayHelper; use app\components\GridView; ?> <!-- MAIN --> <main id="main" class="main-container"> <!-- SECTION 1 --> <div class="section section-1"> <div class="container"> <div class="row jobs-posted"> <?php //Make custom heading $heading = Yii::t(Yii::$app->controller->module->id, 'Manage Jobs') . ': '; echo GridView::widget(['panel' => ['heading' => $heading, 'tableOptions' => ['id' => 'listDefault']], 'pjax' => true, 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'toolbar' => [['content' => Html::a('<i class="glyphicon glyphicon-plus"></i>', ['post-job'], ['data-pjax' => 0, 'class' => 'btn btn-success', 'title' => Yii::t('job', 'Post New Job')]) . ' ' . Html::a('<i class="glyphicon glyphicon-repeat"></i>', [''], ['data-pjax' => 0, 'class' => 'btn btn-default', 'title' => Yii::t('kvgrid', 'Reset Grid')])]], 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'code'], ['attribute' => 'title', 'label' => Yii::t('job', 'Position')], ['attribute' => 'company_name', 'label' => Yii::t('job', 'Company')], ['attribute' => 'status', 'value' => function ($model, $key, $index, $widget) { return ArrayHelper::getValue(\app\modules\job\models\Job::getStatusOptions(), ArrayHelper::getValue($model, 'status')); }, 'contentOptions' => ['style' => 'min-width: 150px;'], 'filterType' => GridView::FILTER_SELECT2, 'filter' => \app\modules\job\models\Job::getStatusOptions(true)], ['attribute' => 'created_time', 'label' => Yii::t('job', 'Posted'), 'filterType' => GridView::FILTER_DATE_RANGE, 'format' => 'raw', 'filterWidgetOptions' => ['pluginOptions' => ['format' => 'Y-m-d', 'separator' => ' to ', 'opens' => 'left'], 'presetDropdown' => true, 'hideInput' => true, 'convertFormat' => true], 'value' => function ($model, $key, $index, $widget) { return date('Y-m-d h:i:s', $model->created_time->sec); }], ['attribute' => 'updated_time', 'label' => Yii::t('job', 'Updated'), 'filterType' => GridView::FILTER_DATE_RANGE, 'format' => 'raw', 'filterWidgetOptions' => ['pluginOptions' => ['format' => 'Y-m-d', 'separator' => ' to ', 'opens' => 'left'], 'presetDropdown' => true, 'hideInput' => true, 'convertFormat' => true], 'value' => function ($model, $key, $index, $widget) { return date('Y-m-d h:i:s', $model->updated_time->sec); }], ['class' => '\\kartik\\grid\\ActionColumn', 'buttons' => ['view' => function ($url, $model) { return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', ['view-job', 'id' => $model->_id], ['data-pjax' => '0', 'title' => Yii::t('yii', 'View')]); }, 'update' => function ($url, $model) { return Html::a('<span class="glyphicon glyphicon-pencil"></span>', ['update-job', 'id' => $model->_id], ['data-pjax' => '0', 'title' => Yii::t('yii', 'Update')]); }, 'delete' => function ($url, $model) { return Html::a('<span class="glyphicon glyphicon-trash"></span>', ['delete-job', 'id' => $model->_id], ['data-pjax' => '0', 'title' => Yii::t('yii', 'Delete')]); }]]], 'responsive' => true, 'hover' => true]); ?> </div> </div> </div> <!-- # SECTION 1 -->