/var/www/vhosts/nabawater/backend/views/ingredient
NameSizeModeActions
create.php5210644editdlrm
index.php57150644editdlrm
update.php5200644editdlrm
_form.php28240644editdlrm
Edit: /var/www/vhosts/nabawater/backend/views/ingredient/index.php (5715B)
title = yii::t('backend','Ingredient Management'); ?>

title ?> '.' '. Yii::t('backend', 'Create'), ['create'], ['class' => 'btn btn-info d-none d-lg-block m-l-15 pull-right']) ?>

$dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => \yii\grid\SerialColumn::className()], [ 'attribute' => 'ingredient_name', 'filterInputOptions' => ['class' => 'form-control col-md-6'], 'value' => function (Ingredient $model) { return $model->ingredient_name; } ], [ 'attribute' => 'vendor_name', 'headerOptions' => ['style' => 'width:10%'], 'filter' => (new Vendor)->getVendorData(), 'filterInputOptions' => ['class' => 'select2 form-control', 'prompt' => 'All'], 'format' => 'raw' ], [ 'attribute' => 'sort_no', 'value' => function (Ingredient $model) { if ($model->sort_no != '') { return $model->sort_no; } else { return '-'; } } ], [ 'attribute' => 'created_at', 'filterInputOptions' => ['class' => 'form-control col-md-6'], 'value' => function (Ingredient $model) { return $model->created_at; } ], [ 'attribute' => 'ingredient_status', 'filter' => [Ingredient::ACTIVE => yii::t('backend','Active'), Ingredient::INACTIVE => yii::t('backend','Inactive')], 'filterInputOptions' => ['class' => 'select2 form-control col-md-4', 'prompt' => yii::t('backend','All')], 'format' => 'raw', 'value' => function (Ingredient $model) { $id = Html::getInputId($model, 'ingredient_status') . "-{$model->getPrimaryKey()}"; $html = Html::activeCheckbox($model, 'ingredient_status', ['data-size'=> 'mini','data-toggle' => 'switch', 'label' => false, 'id' => $id]); $html .= Html::tag('span', Html::label('', $id)); return Html::tag('div', $html, ['class' => 'bootstrap-switch']); } ], [ 'class' => \yii\grid\ActionColumn::className(), 'header' => Yii::t('backend', 'Actions'), 'template' => '{update}{delete}', 'buttons' => [ 'update' => function ($url, $model, $key) { $html = Html::tag('span', '', ['class' => 'fa fa-pencil text-inverse m-r-10']); return Html::a($html, $url); }, 'delete' => function ($url, $model, $key) { $html = Html::tag('span', '', ['class' => 'fa fa-trash-o']); return Html::a($html, $url, [ 'data-pjax' => '0', 'data-confirm' => yii::t('backend', 'Are you sure you want to delete this item?'), 'data-method' => 'post' ]); }, ], ], ], ]); ?>