registerJsFile(
\common\helpers\Mix::mix('/js/sorted-page-element.js'),
['depends' => [
'\common\assets\Flot',
'\yii\web\JqueryAsset',
'\yii\bootstrap4\BootstrapPluginAsset'
]]
);
$this->title = "Настроить отображение элементов на главной странице у \"{$roleName}\"";
?>
= Alert::widget([
'options' => ['class' => 'alert-danger'],
'body' => "Отсутствуют элементы для главной страницы \"{$roleName}\"",
]) ?>
buildItemsArray($role, SortedElementPage::TYPE_NEW); ?>
Новые элементы страницы '= $roleName ?>'
= Sortable::widget([
'connected' => true,
'options' => [
'id' => SortedElementPage::TYPE_NEW,
'class' => 'alert alert-info'
],
'items' => $newItems
]); ?>
= Sortable::widget([
'connected' => true,
'options' => ['id' => SortedElementPage::TYPE_LEFT],
'items' => $model->buildItemsArray($role, SortedElementPage::TYPE_LEFT)
]); ?>
= Sortable::widget([
'connected' => true,
'options' => ['id' => SortedElementPage::TYPE_RIGHT],
'items' => $model->buildItemsArray($role, SortedElementPage::TYPE_RIGHT)
]); ?>
= Sortable::widget([
'connected' => true,
'options' => [
'id' => SortedElementPage::TYPE_REMOVED,
'class' => 'alert alert-danger'
],
'items' => $model->buildItemsArray($role, SortedElementPage::TYPE_REMOVED)
]); ?>
'sorted_element_form']) ?>
= $form->field($model, 'sortablePageElements')->hiddenInput()->label(false) ?>
= Html::submitButton('Сохранить', ['class' => 'btn btn-primary float-right']) ?>