Example #1
0
    ?>
                        <br/>
                        <?php 
    echo $this->render('_items', ['menu' => $menu, 'items' => $menu->getChildren()->with(['children', 'page'])->all()]);
    ?>
                        <br/>
                        <hr/>
                        <h4><?php 
    echo Yii::t('maddoger/website', 'Menu settings');
    ?>
</h4>
                        <?php 
    echo $form->field($menu, 'slug', ['options' => ['class' => 'form-group form-group-sm']])->textInput()->hint(Yii::t('maddoger/website', 'You insert the menu to a template using it.'));
    ?>
                        <?php 
    echo $form->field($menu, 'language', ['options' => ['class' => 'form-group form-group-sm']])->dropDownList(array_merge(['' => '-'], I18N::getAvailableLanguagesList()))->hint(Yii::t('maddoger/website', 'The menu is for one language.'));
    ?>
                        <?php 
    echo $form->field($menu, 'css_class', ['options' => ['class' => 'form-group form-group-sm']])->textInput()->hint(Yii::t('maddoger/website', 'The menu UL element will receive this class.'));
    ?>
                        <?php 
    echo $form->field($menu, 'element_id', ['options' => ['class' => 'form-group form-group-sm']])->textInput()->hint(Yii::t('maddoger/website', 'The menu UL element will receive this ID.'));
    ?>
                    <?php 
}
?>
                </div>
                <div class="panel-footer clearfix">
                    <?php 
if (!$menu->isNewRecord) {
    echo Html::a(Yii::t('maddoger/website', 'Delete menu'), ['delete', 'id' => $menu->id], ['data-method' => 'post', 'data-confirm' => Yii::t('maddoger/website', 'Are you sure want to delete this menu?'), 'class' => 'text-danger']);