main.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. </head>
  25. <body class="hold-transition">
  26. <?php $this->beginBody() ?>
  27. <div class="wrapper">
  28. <!-- Navbar -->
  29. <?= $this->render('navbar', ['assetDir' => $assetDir]) ?>
  30. <!-- /.navbar -->
  31. <!-- Main Sidebar Container -->
  32. <?= $this->render('sidebar', ['assetDir' => $assetDir]) ?>
  33. <!-- Content Wrapper. Contains page content -->
  34. <?= $this->render('content', ['content' => $content, 'assetDir' => $assetDir]) ?>
  35. <!-- /.content-wrapper -->
  36. <!-- Control Sidebar -->
  37. <?= $this->render('control-sidebar') ?>
  38. <!-- /.control-sidebar -->
  39. <!-- Main Footer -->
  40. <?= $this->render('footer') ?>
  41. </div>
  42. <?php $this->endBody() ?>
  43. </body>
  44. </html>
  45. <?php $this->endPage() ?>