Beispiel #1
0
echo $form->field($model, 'active_route')->textInput(['maxlength' => true]);
?>

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

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

    <?php 
echo $form->field($model, 'position')->dropDownList(Menu::getMenuPosition());
?>

    <?php 
echo $form->field($model, 'status')->dropDownList(Menu::getStatusOption());
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>
Beispiel #2
0
            <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>


            <?php 
Pjax::begin();
?>
            <div class="table-responsive">
                <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'sorter' => [], 'rowOptions' => function ($model, $key, $index, $grid) {
    return ['data-sortable-id' => $model->id];
}, 'options' => ['data' => ['sortable-widget' => 1, 'sortable-url' => \yii\helpers\Url::toRoute(['sorting'])]], 'columns' => [['class' => Column::className()], 'label', 'url', 'position', ['attribute' => 'status', 'value' => function ($model) {
    return $model->statusText;
}, 'filter' => \common\models\Menu::getStatusOption()], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update} {delete}']]]);
?>
            </div>
            <?php 
Pjax::end();
?>
            <p>
                <?php 
echo Html::a(Yii::t('app', 'Create Menu'), ['create'], ['class' => 'btn btn-success']);
?>
            </p>

        </div>
        <!-- Loading (remove the following to stop the loading)-->
        <div class="overlay grid-view-overlay hidden">
            <?php