Ejemplo n.º 1
0
?>

<div class="eav-attribute-option-form">

    <?php 
$form = ActiveForm::begin(['id' => 'eav-attribute-option-form', 'validateOnBlur' => false]);
?>

    <div class="row">
        <div class="col-md-9">

            <div class="panel panel-default">
                <div class="panel-body">

                    <?php 
echo $form->field($model, 'attribute_id')->dropDownList(EavAttribute::getEavAttributes(), ['prompt' => '']);
?>

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

                </div>

            </div>
        </div>

        <div class="col-md-3">

            <div class="panel panel-default">
                <div class="panel-body">
Ejemplo n.º 2
0
?>
                </div>

                <div class="col-sm-6 text-right">
                    <?php 
echo GridPageSize::widget(['pjaxId' => 'eav-attribute-option-grid-pjax']);
?>
                </div>
            </div>

            <?php 
Pjax::begin(['id' => 'eav-attribute-option-grid-pjax']);
?>

            <?php 
echo GridView::widget(['id' => 'eav-attribute-option-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'eav-attribute-option-grid', 'actions' => [Url::to(['bulk-delete']) => Yii::t('yee', 'Delete')]], 'columns' => [['class' => 'yeesoft\\grid\\CheckboxColumn', 'options' => ['style' => 'width:10px']], ['attribute' => 'id', 'options' => ['style' => 'width:20px']], ['class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'attribute' => 'value', 'controller' => '/eav/attribute-option', 'buttonsTemplate' => '{update} {delete}', 'title' => function (EavAttributeOption $model) {
    return Html::a($model->value, ['update', 'id' => $model->id], ['data-pjax' => 0]);
}], ['attribute' => 'attribute_id', 'value' => function (EavAttributeOption $model) {
    return "{$model->attribute->id} - {$model->attribute->name} - {$model->attribute->label}";
}, 'filter' => ArrayHelper::merge(['' => Yii::t('yee', 'Not Selected')], EavAttribute::getEavAttributes()), 'options' => ['style' => 'width:300px']]]]);
?>

            <?php 
Pjax::end();
?>
        </div>
    </div>
</div>