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.
127 lines
3.9 KiB
127 lines
3.9 KiB
<?php |
|
/** |
|
* Created by Error202 |
|
* Date: 11.07.2018 |
|
*/ |
|
|
|
use yii\helpers\Html; |
|
|
|
/** |
|
* @var $this \yii\web\View |
|
* @var $item array |
|
*/ |
|
|
|
/* @var $menu_item \core\entities\menu\MenuItem */ |
|
$menu_item = $item['item']; |
|
|
|
?> |
|
|
|
<li class="dd-item dd3-item" data-id="<?= $menu_item->id ?>"> |
|
<div class="dd3-content"> |
|
<div class="panel-group" id="accordion"> |
|
<div class="panel panel-default"> |
|
<div class="panel-heading"> |
|
<h4 class="panel-title"> |
|
<div class="dd-handle dd3-handle"> </div> |
|
<a data-toggle="collapse" data-parent="#accordion" href="#collapse<?= $menu_item->id ?>"><?= $menu_item->name ?> |
|
<i class="fa fa-angle-down pull-right" aria-hidden="true"></i> <span style="font-size: 14px; color: #999" class="pull-right"><?= $menu_item->module ?></span></a> |
|
</h4> |
|
</div> |
|
<div id="collapse<?= $menu_item->id ?>" class="panel-collapse collapse"> |
|
<div class="panel-body"> |
|
|
|
<div class="row" style="font-weight: normal"> |
|
<div class="col-md-6"> |
|
<?= Html::label(Yii::t('menu','Item Name'), 'item-name', [ |
|
'style' => 'color: #555555', |
|
]) ?> |
|
<?= Html::input('text', 'item-name', $menu_item->name, [ |
|
'id' => 'item-name-' . $menu_item->id, |
|
'class' => 'form-control', |
|
]) ?> |
|
</div> |
|
<div class="col-md-6"> |
|
<?= Html::label(Yii::t('menu','Item Title Attribute'), 'item-title-attr', [ |
|
'style' => 'color: #555555', |
|
]) ?> |
|
<?= Html::input('text', 'item-title-attr', $menu_item->title_attr, [ |
|
'id' => 'item-title-attr-' . $menu_item->id, |
|
'class' => 'form-control', |
|
]) ?> |
|
</div> |
|
</div> |
|
|
|
<div class="row" style="font-weight: normal; margin-top: 5px;"> |
|
<div class="col-md-6"> |
|
<?= Html::label(Yii::t('menu','Style Attribute'), 'item-style', [ |
|
'style' => 'color: #555555', |
|
]) ?> |
|
<?= Html::input('text', 'item-style', $menu_item->style, [ |
|
'id' => 'item-style-' . $menu_item->id, |
|
'class' => 'form-control', |
|
]) ?> |
|
</div> |
|
<div class="col-md-6"> |
|
<?= Html::label(Yii::t('menu','CSS'), 'item-css', [ |
|
'style' => 'color: #555555', |
|
]) ?> |
|
<?= Html::input('text', 'item-css', $menu_item->css, [ |
|
'id' => 'item-css-' . $menu_item->id, |
|
'class' => 'form-control', |
|
]) ?> |
|
</div> |
|
</div> |
|
|
|
<div class="row" style="font-weight: normal; margin-top: 5px;"> |
|
<?php if (!$menu_item->url_params): ?> |
|
<div class="col-md-6"> |
|
<?= Html::label(Yii::t('menu','URL'), 'item-url', [ |
|
'style' => 'color: #555555', |
|
]) ?> |
|
<?= Html::input('text', 'item-url', $menu_item->url, [ |
|
'id' => 'item-url-' . $menu_item->id, |
|
'class' => 'form-control', |
|
]) ?> |
|
</div> |
|
<?php else: ?> |
|
<?= Html::hiddenInput('item-url', $menu_item->url, [ |
|
'id' => 'item-url-' . $menu_item->id, |
|
]) ?> |
|
<?php endif; ?> |
|
<div class="col-md-6"> |
|
<?= Html::label(Yii::t('menu','Target'), 'item-target', [ |
|
'style' => 'color: #555555', |
|
]) ?> |
|
<?= Html::dropDownList('item-target', $menu_item->target, [ |
|
'' => Yii::t('menu', 'Self Window'), |
|
'_blank' => Yii::t('menu', 'Blank Window'), |
|
], [ |
|
'id' => 'item-target-' . $menu_item->id, |
|
'class' => 'form-control', |
|
]) ?> |
|
</div> |
|
</div> |
|
|
|
<hr> |
|
<div class="pull-right"> |
|
<?= Html::a(Yii::t('buttons', 'Delete'), '#', [ |
|
'class' => 'item-delete-button btn btn-sm btn-danger', |
|
'data-id' => $menu_item->id, |
|
]) ?> |
|
<?= Html::a(Yii::t('buttons', 'Save'), '#', [ |
|
'class' => 'item-save-button btn btn-sm btn-success', |
|
'data-id' => $menu_item->id, |
|
]) ?> |
|
</div> |
|
|
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
|
|
<?php if (isset($item['children'])): ?> |
|
<?= menu_generate($item['children']) ?> |
|
<?php endif; ?> |
|
|
|
</li>
|
|
|