main.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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\control\assets\AdminAsset::register($this);
  8. @app\modules\control\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. </div>
  46. <?php $this->endBody() ?>
  47. </body>
  48. </html>
  49. <?php $this->endPage() ?>