Esempio n. 1
0
                                <label class="control-label"
                                       style="float: left; padding-right: 5px;"><?php 
    echo $model->attributeLabels()['id'];
    ?>
                                    : </label>
                                <span><?php 
    echo $model->id;
    ?>
</span>
                            </div>
                        <?php 
}
?>

                        <?php 
echo $form->field($model, 'store_type')->dropDownList(EavAttributeType::getStoreTypes(), ['prompt' => '']);
?>

                        <div class="form-group">
                            <?php 
if ($model->isNewRecord) {
    ?>
                                <?php 
    echo Html::submitButton(Yii::t('yee', 'Create'), ['class' => 'btn btn-primary']);
    ?>
                                <?php 
    echo Html::a(Yii::t('yee', 'Cancel'), ['/eav/attribute-type/index'], ['class' => 'btn btn-default']);
    ?>
                            <?php 
} else {
    ?>
Esempio n. 2
0
                </div>

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

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

            <?php 
echo GridView::widget(['id' => 'eav-attribute-type-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'eav-attribute-type-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' => 'name', 'controller' => '/eav/attribute-type', 'buttonsTemplate' => '{update} {delete}', 'title' => function (EavAttributeType $model) {
    return Html::a($model->name, ['update', 'id' => $model->id], ['data-pjax' => 0]);
}], ['attribute' => 'store_type', 'value' => function (EavAttributeType $model) {
    $types = EavAttributeType::getStoreTypes();
    return isset($types[$model->store_type]) ? $types[$model->store_type] : Yii::t('yii', '(not set)');
}, 'filter' => ArrayHelper::merge(['' => Yii::t('yee', 'Not Selected')], EavAttributeType::getStoreTypes())]]]);
?>

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