Exemple #1
0
?>

        <?php 
echo $form->field($model, 'title')->multilingualTextInput(['maxlength' => 255]);
?>
        
        <?php 
echo $form->field($model, 'alias')->textInput(['maxlength' => 255]);
?>
		
		<?php 
echo $form->field($model, 'enabled')->checkbox();
?>

        <?php 
echo $form->field($model, 'parent_id')->dropdownList(ArrayHelper::map(TopMenu::find()->all(), 'id', 'title'), ['prompt' => '']);
?>

        <div class="form-group">
            <div class="col-md-10 col-md-offset-2">
                <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
            </div>
        </div>

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

    </div>
Exemple #2
0
?>
</h3>
                <p><i class="fa fa-fw fa-phone"></i> <?php 
echo Config::get('contact_phone');
?>
 </p>
                <p><i class="fa fa-fw fa-envelope"></i> <?php 
echo Config::get('contact_email');
?>
 </p>

            </div>
        </div>    
        <?php 
NavBar::begin(['id' => 'navigation', 'options' => ['class' => 'navbar-default']]);
echo Nav::widget(['options' => ['class' => 'navbar-nav'], 'items' => TopMenu::frontEndItems(), 'activateParents' => true]);
?>
 
        <?php 
echo LangDropdown::widget();
?>
        <?php 
NavBar::end();
?>
        </header>
    
<?php 
echo $content;
?>
</div>
<div id="footer-wrapper">
Exemple #3
0
use yii\grid\GridView;
use app\modules\content\widgets\NestableSortableWidget;
use app\modules\content\models\TopMenu;
/* @var $this yii\web\View */
/* @var $searchModel app\modules\content\models\ContentSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Menu';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="page-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    

    <p>
        <?php 
echo Html::a('Create Menu Item', ['create'], ['class' => 'btn btn-success']);
?>
    </p>



</div>


<?php 
echo NestableSortableWidget::widget(['models' => TopMenu::find()->where(['parent_id' => 0])->orWhere(['parent_id' => null])->sorted()->all(), 'rearrangeAction' => '/admin/content/top-menu/rearrange']);