main.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /* @var $this \yii\web\View */
  3. /* @var $content string */
  4. use yii\helpers\Html;
  5. \hail812\adminlte3\assets\FontAwesomeAsset::register($this);
  6. \hail812\adminlte3\assets\AdminLteAsset::register($this);
  7. @app\modules\manager\assets\AdminAsset::register($this);
  8. $this->registerCssFile('https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback');
  9. $assetDir = Yii::$app->assetManager->getPublishedUrl('@vendor/almasaeed2010/adminlte/dist');
  10. $publishedRes = Yii::$app->assetManager->publish('@vendor/hail812/yii2-adminlte3/src/web/js');
  11. $this->registerJsFile($publishedRes[1].'/control_sidebar.js', ['depends' => '\hail812\adminlte3\assets\AdminLteAsset']);
  12. $profile = Yii::$app->user->identity->profile;
  13. ?>
  14. <?php $this->beginPage() ?>
  15. <!DOCTYPE html>
  16. <html lang="<?= Yii::$app->language ?>">
  17. <head>
  18. <meta charset="<?= Yii::$app->charset ?>">
  19. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  20. <meta name="viewport" content="width=device-width, initial-scale=1">
  21. <?php $this->registerCsrfMetaTags() ?>
  22. <title><?= Html::encode($this->title) ?></title>
  23. <?php $this->head() ?>
  24. <link href="/components/admin/select2/css/select2.css" rel="stylesheet" />
  25. <script src="/components/admin/select2/js/select2.min.js"></script>
  26. <script src="/components/admin/select2/js/i18n/ru.js"></script>
  27. </head>
  28. <body class="hold-transition layout-fixed">
  29. <?php $this->beginBody() ?>
  30. <div class="wrapper">
  31. <!-- Navbar -->
  32. <?= $this->render('navbar', ['assetDir' => $assetDir]) ?>
  33. <!-- /.navbar -->
  34. <!-- Main Sidebar Container -->
  35. <?= $this->render('sidebar', ['assetDir' => $assetDir]) ?>
  36. <!-- Content Wrapper. Contains page content -->
  37. <?= $this->render('content', ['content' => $content, 'assetDir' => $assetDir]) ?>
  38. <!-- /.content-wrapper -->
  39. <!-- Control Sidebar -->
  40. <?= $this->render('control-sidebar') ?>
  41. <!-- /.control-sidebar -->
  42. <!-- Main Footer -->
  43. <?= $this->render('footer') ?>
  44. <?= $this->render('actions') ?>
  45. </div>
  46. <?php $this->endBody() ?>
  47. </body>
  48. </html>
  49. <?php $this->endPage() ?>