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