portal.mkgtu.ru/backend/views/settings/set_index_page.php

30 lines
916 B
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
use yii\bootstrap4\Alert;
use yii\helpers\Html;
use yii\helpers\Url;
$this->title = 'Настройка главной страницы';
?>
<?php if (empty($rolesList)) : ?>
<?= Alert::widget([
'options' => ['class' => 'alert-danger'],
'body' => 'Отсутствуют страницы дя настойки отображаемых панелей',
]) ?>
<?php else : ?>
<div class="rolerule-settings">
<?php foreach ($rolesList as $role => $roleName) {
$link = Html::a(
'Настроить',
Url::to(['page/index', 'role' => $role]),
['class' => 'btn btn-primary']
);
echo Html::tag(
'p',
"Настроить отображение элементов на главной у \"{$roleName}\" {$link}"
);
} ?>
</div>
<?php endif;