Ejemplo n.º 1
0
<?php

/* @var $this yii\web\View */
/** @var $menu array */
/** @var $messages \maddoger\admin\models\Log[] */
use maddoger\admin\Module;
use maddoger\admin\widgets\Menu;
use yii\helpers\Html;
$this->title = Yii::t('maddoger/admin', 'Dashboard');
?>
<div class="dashboard">
    <?php 
echo Menu::widget(['items' => $menu, 'activateParents' => true, 'labelTemplate' => '<a href="#">{icon}{label}</a>', 'submenuTemplate' => "\n<ul class=\"menu\">\n{items}\n</ul>\n", 'submenuItemClass' => 'treeview', 'options' => ['class' => 'dashboard-menu']]);
?>

    <?php 
if ($messages !== false) {
    ?>
        <div class="panel panel-info">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="fa fa-warning"></i>&nbsp;<?php 
    echo Yii::t('maddoger/admin', 'Log');
    ?>
                    <small><?php 
    echo Html::a(Yii::t('maddoger/admin', 'more info'), ['log/index']);
    ?>
</small>
                </h3>
            </div>
            <!-- /.panel-header -->
            <div class="panel-body">
Ejemplo n.º 2
0
<?php

/**
 * @var $this yii\web\View
 * @var string $content
 */
use maddoger\admin\Module;
use maddoger\admin\widgets\Menu;
use maddoger\core\BackendModule;
/**
 * @var \maddoger\admin\Module $adminModule
 */
$adminModule = Module::getInstance();
/**
 * @var \maddoger\core\BackendModule $module
 */
Yii::beginProfile('SIDEBAR_MENU');
$menu = $adminModule->getSidebarMenu();
echo Menu::widget(['items' => $menu, 'activateParents' => true, 'labelTemplate' => '<a href="#">{icon}{label} <i class="fa fa-angle-left pull-right"></i></a>', 'submenuTemplate' => "\n<ul class=\"treeview-menu\">\n{items}\n</ul>\n", 'submenuItemClass' => 'treeview', 'options' => ['class' => 'sidebar-menu']]);
Yii::endProfile('SIDEBAR_MENU');