add_holidays
This commit is contained in:
66
backend/modules/holiday/views/holiday/index.php
Normal file
66
backend/modules/holiday/views/holiday/index.php
Normal file
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
use yii\data\ActiveDataProvider;
|
||||
use yii\helpers\Html;
|
||||
use yii\jui\DatePicker;
|
||||
use yii\web\View;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = 'Список отпусков';
|
||||
$this->params['breadcrumps'][] = $this->title;
|
||||
?>
|
||||
<div class="holiday-index">
|
||||
<p>
|
||||
<?= Html::a('Добавить', ['create'], ['class' => 'btn btn-success']) ?>
|
||||
</p>
|
||||
<?= \yii\grid\GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'filterModel' => $searchModel,
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
[
|
||||
'label' => 'ФИО',
|
||||
'value' => function($model)
|
||||
{
|
||||
return $model->users->fio;
|
||||
},
|
||||
'filter' => \kartik\select2\Select2::widget([
|
||||
'model' => $searchModel,
|
||||
'attribute' => 'card_id',
|
||||
'data' => \common\models\UserCard::getUserList(),
|
||||
'options' => ['placeholder' => 'Начните вводить...','class' => 'form-control'],
|
||||
'pluginOptions' => [
|
||||
'allowClear' => true
|
||||
],
|
||||
]),
|
||||
],
|
||||
[
|
||||
'attribute' => 'dt_start',
|
||||
'filter' => DatePicker::widget([
|
||||
'model' => $searchModel,
|
||||
'attribute' => 'dt_start',
|
||||
'language' => 'ru',
|
||||
'dateFormat' => 'dd-MM-yyyy',
|
||||
'options' => [
|
||||
'autocomplete' => 'off',
|
||||
],
|
||||
]),
|
||||
],
|
||||
[
|
||||
'attribute' => 'dt_end',
|
||||
'filter' => DatePicker::widget([
|
||||
'model' => $searchModel,
|
||||
'attribute' => 'dt_end',
|
||||
'language' => 'ru',
|
||||
'dateFormat' => 'dd-MM-yyyy',
|
||||
'options' => [
|
||||
'autocomplete' => 'off',
|
||||
],
|
||||
]),
|
||||
],
|
||||
['class' => 'yii\grid\ActionColumn'],
|
||||
],
|
||||
]);?>
|
||||
</div>
|
Reference in New Issue
Block a user