You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
115 lines
2.8 KiB
115 lines
2.8 KiB
6 years ago
|
<?php
|
||
|
/**
|
||
|
* Created by Error202
|
||
|
* Date: 10.07.2018
|
||
|
*/
|
||
|
|
||
|
use kartik\form\ActiveForm;
|
||
|
use yii\helpers\ArrayHelper;
|
||
|
use yii\helpers\Html;
|
||
|
|
||
|
/**
|
||
|
* @var $this \yii\web\View
|
||
|
* @var $model \core\forms\menu\MenuSelectForm
|
||
|
* @var $menus \core\entities\menu\Menu[]
|
||
|
* @var $menu \core\entities\menu\Menu
|
||
|
* @var $creator array
|
||
|
*/
|
||
|
|
||
|
$this->title = Yii::t('menu', 'Menu');
|
||
|
$this->params['breadcrumbs'][] = Html::encode($menu->name);
|
||
|
$this->params['breadcrumbs'][] = $this->title;
|
||
|
?>
|
||
|
|
||
|
<div class="menu">
|
||
|
<div class="box box-default">
|
||
|
<div class="box-header with-border"><?= Yii::t('menu', 'Current Menu') ?></div>
|
||
|
<div class="box-body">
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="col-md-6">
|
||
|
<?php $form = ActiveForm::begin([
|
||
|
'enableClientValidation' => false,
|
||
|
'method' => 'get',
|
||
|
'id' => 'select_menu',
|
||
|
]); ?>
|
||
|
|
||
|
<?= $form->field($model, 'id')->dropDownList(ArrayHelper::map($menus, 'id', 'name'), [
|
||
|
//'prompt' => Yii::t('menu', 'Select menu...'),
|
||
|
'value' => $menu->id,
|
||
|
'onchange' => 'this.form.submit()',
|
||
|
])->label(false) ?>
|
||
|
|
||
|
<?php ActiveForm::end(); ?>
|
||
|
</div>
|
||
|
<div class="col-md-6">
|
||
|
<?= Html::a(Yii::t('menu', 'Create Menu'), ['menu/create'], [
|
||
|
'class' => 'btn btn-success',
|
||
|
]) ?>
|
||
|
|
||
|
<?= Html::a(Yii::t('menu', 'Update Menu'), ['menu/update', 'id' => $menu->id], [
|
||
|
'class' => 'btn btn-primary',
|
||
|
]) ?>
|
||
|
|
||
|
<?= Html::a(Yii::t('menu', 'Delete Menu'), ['menu/delete', 'id' => $menu->id], [
|
||
|
'class' => 'btn btn-danger',
|
||
|
'data' => [
|
||
|
'confirm' => Yii::t('buttons', 'Are you sure you want to delete this item?'),
|
||
|
'method' => 'post',
|
||
|
],
|
||
|
]) ?>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="col-md-3">
|
||
|
<div class="box box-default">
|
||
|
<div class="box-header with-border"><?= Yii::t('menu', 'Available Blocks') ?></div>
|
||
|
<div class="box-body">
|
||
|
|
||
|
<div class="panel-group" id="accordion">
|
||
|
|
||
|
<?php foreach ($creator as $item): ?>
|
||
|
|
||
|
<div class="panel panel-default">
|
||
|
<div class="panel-heading">
|
||
|
<h4 class="panel-title">
|
||
|
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne"><?= $item['title'] ?>
|
||
|
<i class="fa fa-angle-down pull-right" aria-hidden="true"></i></a>
|
||
|
</h4>
|
||
|
</div>
|
||
|
<div id="collapseOne" class="panel-collapse collapse">
|
||
|
<div class="panel-body">
|
||
|
<?= $item['content'] ?>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<?php endforeach; ?>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-md-9">
|
||
|
<div class="box box-default">
|
||
|
<div class="box-header with-border"><?= Yii::t('menu', 'Menu Items') ?></div>
|
||
|
<div class="box-body">
|
||
|
|
||
|
<?= \backend\components\menu\widgets\MenuEditorWidget::widget([
|
||
|
'menu_id' => $menu->id
|
||
|
]) ?>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
|