main.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. /* @var $this \yii\web\View */
  3. /* @var $content string */
  4. use yii\bootstrap4\Breadcrumbs;
  5. use yii\bootstrap4\Html;
  6. use backend\assets\BaseAsset;
  7. use backend\widgets\Alert;
  8. BaseAsset::register($this);
  9. ?>
  10. <?php $this->beginPage() ?>
  11. <!DOCTYPE html>
  12. <html lang="<?= Yii::$app->language ?>" class="h-100">
  13. <head>
  14. <meta charset="<?= Yii::$app->charset ?>">
  15. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  16. <?php $this->registerCsrfMetaTags() ?>
  17. <title><?= Html::encode($this->title) ?></title>
  18. <?php $this->head() ?>
  19. </head>
  20. <body class="hold-transition sidebar-mini">
  21. <?php $this->beginBody() ?>
  22. <div class="wrapper-content">
  23. <!-- Content Header (Page header) -->
  24. <section class="content-header" style="padding-bottom: 0">
  25. <div class="container-fluid">
  26. <div class="row mb-2">
  27. <div class="col-sm-6">
  28. <a href="<?= Yii::$app->request->getUrl(); ?>" class="rfHeaderFont">
  29. <i class="icon ion-loop"></i> 刷新
  30. </a>
  31. <?php if (Yii::$app->request->referrer != Yii::$app->request->hostInfo . Yii::$app->request->getBaseUrl() . '/') { ?>
  32. <a href="javascript:history.go(-1)" class="rfHeaderFont">
  33. <i class="icon ion-reply"></i> 返回
  34. </a>
  35. <?php } ?>
  36. </div>
  37. <div class="col-sm-6">
  38. <?= Breadcrumbs::widget([
  39. 'tag' => 'ol',
  40. 'homeLink' => [
  41. 'label' => '<i class="fa fa-tachometer-alt" style="font-size: 12px"></i> ' . Yii::$app->params['adminAcronym'],
  42. 'url' => "",
  43. ],
  44. 'options' => [
  45. 'class' => 'float-sm-right',
  46. ],
  47. 'encodeLabels' => false,
  48. 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
  49. ]) ?>
  50. </div>
  51. </div>
  52. </div><!-- /.container-fluid -->
  53. </section>
  54. <!-- Main content -->
  55. <section class="content">
  56. <?= $content; ?>
  57. <!-- /.card -->
  58. </section>
  59. <?= Alert::widget(); ?>
  60. <!-- /.content -->
  61. </div>
  62. <?= $this->render('_footer') ?>
  63. <?= $this->render('_common') ?>
  64. <script>
  65. // 配置
  66. let config = {
  67. tag: true,
  68. isMobile: "<?= Yii::$app->params['isMobile'] ?? false; ?>",
  69. };
  70. $(function () {
  71. setTimeout(function () {
  72. $('[data-toggle="tooltip"]').tooltip()
  73. }, 50)
  74. })
  75. </script>
  76. <?php $this->endBody() ?>
  77. </body>
  78. </html>
  79. <?php $this->endPage();
粤ICP备19079148号