|
@@ -0,0 +1,224 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+/* @var $this \yii\web\View */
|
|
|
+/* @var $content string */
|
|
|
+
|
|
|
+use app\widgets\Alert;
|
|
|
+use yii\helpers\Html;
|
|
|
+use yii\bootstrap4\Nav;
|
|
|
+use yii\bootstrap4\NavBar;
|
|
|
+use rmrevin\yii\fontawesome\FAR;
|
|
|
+use rmrevin\yii\fontawesome\FAS;
|
|
|
+use yii\widgets\Breadcrumbs;
|
|
|
+use app\widgets\MainSidebarMenu;
|
|
|
+use app\assets\AdminLteAsset;
|
|
|
+
|
|
|
+//AppAsset::register($this);
|
|
|
+AdminLteAsset::register($this);
|
|
|
+
|
|
|
+$bodyClass = $this->params['body-class'] ?? null;
|
|
|
+Html::addCssClass($bodyClass, ['hold-transition', 'sidebar-mini', 'layout-fixed', 'layout-navbar-fixed']);
|
|
|
+
|
|
|
+?>
|
|
|
+<?php $this->beginPage() ?>
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="<?= Yii::$app->language ?>">
|
|
|
+<head>
|
|
|
+ <meta charset="<?= Yii::$app->charset ?>">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
+ <?php $this->registerCsrfMetaTags() ?>
|
|
|
+ <title><?= Html::encode($this->title) ?></title>
|
|
|
+ <?php $this->head() ?>
|
|
|
+</head>
|
|
|
+<?= Html::tag('body', '', $bodyClass); ?>
|
|
|
+<?php $this->beginBody() ?>
|
|
|
+<!-- Site wrapper -->
|
|
|
+<div class="wrapper">
|
|
|
+ <!-- Navbar -->
|
|
|
+ <?php
|
|
|
+ NavBar::begin([
|
|
|
+ 'brandUrl' => Yii::$app->homeUrl,
|
|
|
+ 'togglerOptions' => ['data-widget' => 'pushmenu', 'type' => 'link', 'widget'=>'nav-link'],
|
|
|
+ 'renderInnerContainer' => false,
|
|
|
+ 'options' => [
|
|
|
+ 'class' => 'main-header navbar navbar-expand navbar-light',
|
|
|
+ ],
|
|
|
+ ]);
|
|
|
+
|
|
|
+ echo Nav::widget([
|
|
|
+ 'options' => ['class' => 'navbar-nav'],
|
|
|
+ 'items' => [
|
|
|
+ ['label' => '<i class="fas fa-bars"></i>', 'linkOptions' => ['data-widget' => 'pushmenu'], 'encode' => false],
|
|
|
+ ],
|
|
|
+ ]);
|
|
|
+
|
|
|
+ $menuItems = [
|
|
|
+ [
|
|
|
+ 'label' => FAS::icon('users', ['class' => ['nav-icon']]) . ' Пользователи',
|
|
|
+ 'raw' => true,
|
|
|
+ 'url' => ['/user/admin/index'],
|
|
|
+ 'active' => Yii::$app->controller->module->id == 'user',
|
|
|
+ 'visible' => Yii::$app->user->can('admin'),
|
|
|
+ ],
|
|
|
+ ];
|
|
|
+ if (Yii::$app->user->isGuest) {
|
|
|
+ $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
|
|
|
+ } else {
|
|
|
+ $menuItems[] = '<li class="nav-item">'
|
|
|
+ . Html::beginForm(['/logout'], 'post')
|
|
|
+ . Html::submitButton(
|
|
|
+ 'Выйти (' . Yii::$app->user->identity->username . ')',
|
|
|
+ ['class' => 'btn btn-link logout']
|
|
|
+ )
|
|
|
+ . Html::endForm()
|
|
|
+ . '</li>';
|
|
|
+ };
|
|
|
+ $menuItems[] = ['label' => 'Home2', 'url' => ['/site/index'], 'linkOptions' => ['data-widget' => 'control-sidebar', 'class' => 'd-none']];
|
|
|
+ echo Nav::widget([
|
|
|
+ 'options' => ['class' => 'navbar-nav ml-auto'],
|
|
|
+ 'encodeLabels' => false,
|
|
|
+ 'items' => $menuItems,
|
|
|
+ ]);
|
|
|
+ NavBar::end();
|
|
|
+ ?>
|
|
|
+ <!-- /.navbar -->
|
|
|
+
|
|
|
+ <!-- Main Sidebar Container -->
|
|
|
+ <aside class="main-sidebar sidebar-dark-success elevation-4">
|
|
|
+ <!-- Brand Logo -->
|
|
|
+ <a href="<?= Yii::$app->homeUrl; ?>" class="brand-link navbar-dark text-center text-uppercase">
|
|
|
+ <!--<img src="../dist/img/AdminLTELogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .8">-->
|
|
|
+ <?= Html::img('@web/img/logo.png', ['alt' => Yii::$app->name, 'style' => 'width: 30%;opacity:.8;', 'class'=>'d-none brand-image img-circle elevation-3']); ?>
|
|
|
+ <span class="brand-text font-weight-light"><?= Yii::$app->name; ?></span>
|
|
|
+ </a>
|
|
|
+
|
|
|
+ <!-- Sidebar -->
|
|
|
+ <div class="sidebar">
|
|
|
+ <!-- Sidebar user panel (optional) -->
|
|
|
+ <div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
|
|
+ <div class="image d-none">
|
|
|
+ <!--<img src="../dist/img/user2-160x160.jpg" class="img-circle elevation-2" alt="User Image">-->
|
|
|
+ <?= Html::img('@web/img/logo.png', ['alt' => 'User Image', 'style' => '', 'class'=>'d-none img-circle elevation-2']); ?>
|
|
|
+ </div>
|
|
|
+ <div class="info d-none">
|
|
|
+ <a href="#" class="d-block">Alexander Pierce</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- Sidebar Menu -->
|
|
|
+ <nav class="mt-2">
|
|
|
+ <?php
|
|
|
+ echo MainSidebarMenu::widget([
|
|
|
+ 'options' => [
|
|
|
+ 'class' => 'nav nav-pills nav-sidebar flex-column nav-child-indent',
|
|
|
+ 'data' => [
|
|
|
+ 'widget' => 'treeview',
|
|
|
+ 'accordion' => 'false'
|
|
|
+ ],
|
|
|
+ 'role' => 'menu',
|
|
|
+ ],
|
|
|
+ 'encodeLabels' => false,
|
|
|
+ //'activateParents' => true,
|
|
|
+ 'items' => [
|
|
|
+ [
|
|
|
+ 'icon' => FAS::icon('home', ['class' => ['nav-icon']]),
|
|
|
+ 'label' => 'Главная',
|
|
|
+ 'url' => Yii::$app->homeUrl,
|
|
|
+ 'active' => Yii::$app->controller->id === 'site',
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'icon' => FAS::icon('hand-holding-usd', ['class' => ['nav-icon']]),
|
|
|
+ 'label' => 'Пополнить счет',
|
|
|
+ 'url' => Yii::$app->homeUrl,
|
|
|
+ //'active' => Yii::$app->controller->id === 'site',
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'icon' => FAS::icon('money-check-alt', ['class' => ['nav-icon']]),
|
|
|
+ 'label' => 'Тарифы',
|
|
|
+ 'url' => ['/pricing/index'],
|
|
|
+ 'active' => Yii::$app->controller->id === 'pricing',
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'icon' => FAS::icon('history', ['class' => ['nav-icon']]),
|
|
|
+ 'label' => 'История платежей',
|
|
|
+ 'url' => Yii::$app->homeUrl,
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'icon' => FAS::icon('user-alt', ['class' => ['nav-icon']]),
|
|
|
+ 'label' => 'Профайл',
|
|
|
+ 'url' => Yii::$app->homeUrl,//['/site/index'],
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'icon' => FAS::icon('sign-out-alt', ['class' => ['nav-icon']]),
|
|
|
+ 'label' => 'Выход',
|
|
|
+ 'url' => ['/logout'],
|
|
|
+ 'template' => Html::beginForm(['/logout'], 'post')
|
|
|
+ . '<a href="#" onclick="this.parentNode.submit();" class="nav-link">{icon} <p>{label}</p></a>'
|
|
|
+ . Html::endForm()
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ ]);
|
|
|
+ ?>
|
|
|
+ </nav>
|
|
|
+ <!-- /.sidebar-menu -->
|
|
|
+ </div>
|
|
|
+ <!-- /.sidebar -->
|
|
|
+ </aside>
|
|
|
+
|
|
|
+ <!-- Content Wrapper. Contains page content -->
|
|
|
+ <div class="content-wrapper">
|
|
|
+ <!-- Content Header (Page header) -->
|
|
|
+ <div class="content-header">
|
|
|
+ <div class="container-fluid">
|
|
|
+ <div class="row mb-2">
|
|
|
+ <div class="col-sm-6">
|
|
|
+ <h1><?= Html::encode($this->title); ?></h1>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-6 align-self-end">
|
|
|
+ <?= Breadcrumbs::widget([
|
|
|
+ 'homeLink' => [
|
|
|
+ 'label' => FAS::icon('home', ['class' => ['nav-icon']]),
|
|
|
+ 'url' => Yii::$app->homeUrl,
|
|
|
+ 'class' => 'text-secondary',
|
|
|
+ 'encode' => false,
|
|
|
+ ],
|
|
|
+ 'tag' => 'ol',
|
|
|
+ 'options' => [
|
|
|
+ 'class' => 'breadcrumb text-sm float-sm-right'
|
|
|
+ ],
|
|
|
+ 'itemTemplate' => "<li class=\"breadcrumb-item\">{link}</li>\n",
|
|
|
+ 'activeItemTemplate' => "<li class=\"breadcrumb-item active\">{link}</li>\n",
|
|
|
+ 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
|
|
|
+ ]) ?>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div><!-- /.container-fluid -->
|
|
|
+ </div>
|
|
|
+ <!-- /.content-header -->
|
|
|
+
|
|
|
+ <!-- Main content -->
|
|
|
+ <div class="content">
|
|
|
+
|
|
|
+ <div class="container-fluid">
|
|
|
+ <?= Alert::widget() ?>
|
|
|
+ <?= $content ?>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <!-- /.content -->
|
|
|
+ </div>
|
|
|
+ <!-- /.content-wrapper -->
|
|
|
+
|
|
|
+ <footer class="main-footer text-sm">
|
|
|
+ <div class="float-right d-none d-sm-block">
|
|
|
+ Розробка: <a href="http://reactlogic.com.ua/" target="_blank">ReactLogic</a>
|
|
|
+ </div>
|
|
|
+ <strong>Copyright © <?= date('Y') ?> <?= Html::encode(Yii::$app->name) ?>.</strong> All rights reserved.
|
|
|
+ </footer>
|
|
|
+</div>
|
|
|
+
|
|
|
+<?php $this->endBody() ?>
|
|
|
+</body>
|
|
|
+</html>
|
|
|
+<?php $this->endPage() ?>
|