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.
 
 
 
 
 

98 lines
2.7 KiB

<?php
/**
* Created by Error202
* Date: 11.07.2018
*/
use yii\helpers\Html;
use kartik\form\ActiveForm;
/**
* @var $this \yii\web\View
* @var $item array
* @var $model \core\forms\menu\MenuItemForm
*/
/* @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->translation->name ?>
<i class="fa fa-angle-down pull-right" aria-hidden="true"></i> <span style="font-size: 14px; color: #999" class="pull-right"><?= Yii::t($menu_item->module, ucfirst($menu_item->module)) ?></span></a>
</h4>
</div>
<div id="collapse<?= $menu_item->id ?>" class="panel-collapse collapse">
<div class="panel-body">
<?php $form = ActiveForm::begin([
'action' => ['/menu/save-item', 'id' => $menu_item->id],
]); ?>
<?php
$items = [];
foreach (Yii::$app->params['translatedLanguages'] as $language => $language_name) {
$items[] = [
'label' => $language_name,
'content' => $this->render('_item_tab', [
'form' => $form,
'model' => $model,
'language' => $language,
]),
];
}
?>
<div class="nav-tabs-custom">
<?= \yii\bootstrap\Tabs::widget([
'items' => $items
]) ?>
</div>
<div class="row">
<div class="col-md-6">
<?= $form->field($model, 'target')->dropDownList([
'' => Yii::t('menu', 'Self Window'),
'_blank' => Yii::t('menu', 'Blank Window'),
]) ?>
<?= $form->field($model, 'style')->textInput(['maxlength' => true]) ?>
</div>
<div class="col-md-6">
<?= $form->field($model, 'css')->textInput(['maxlength' => true]) ?>
<?php if (!$menu_item->url_params): ?>
<?= $form->field($model, 'url')->textInput(['maxlength' => true]) ?>
<?php endif; ?>
</div>
</div>
<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::submitButton(Yii::t('buttons', 'Save'), [
'class' => 'btn btn-success btn-sm'
]) ?>
</div>
<div style="clear: both"></div>
<?php ActiveForm::end(); ?>
</div>
</div>
</div>
</div>
</div>
<?php if (isset($item['children'])): ?>
<?= menu_generate($item['children']) ?>
<?php endif; ?>
</li>