Initial commit,修正

This commit is contained in:
2025-07-13 19:37:38 +08:00
parent 38ce288e27
commit 65bbd06981
12384 changed files with 3985464 additions and 8 deletions
+41
View File
@@ -0,0 +1,41 @@
<?php
use yii\helpers\Html;
/* @var $this \yii\web\View */
/* @var $content string */
$controller = $this->context;
$menus = $controller->module->menus;
$route = $controller->route;
foreach ($menus as $i => $menu) {
$menus[$i]['active'] = strpos($route, trim($menu['url'][0], '/')) === 0;
}
$this->params['nav-items'] = $menus;
?>
<?php $this->beginContent($controller->module->mainLayout) ?>
<div class="row">
<div class="col-sm-3">
<div id="manager-menu" class="list-group">
<?php
foreach ($menus as $menu) {
$label = Html::tag('i', '', ['class' => 'glyphicon glyphicon-chevron-right pull-right']) .
Html::tag('span', Html::encode($menu['label']), []);
$active = $menu['active'] ? ' active' : '';
echo Html::a($label, $menu['url'], [
'class' => 'list-group-item' . $active,
]);
}
?>
</div>
</div>
<div class="col-sm-9">
<?= $content ?>
</div>
</div>
<?php
list(, $url) = Yii::$app->assetManager->publish('@mdm/admin/assets');
$this->registerCssFile($url . '/list-item.css');
?>
<?php $this->endContent(); ?>
+58
View File
@@ -0,0 +1,58 @@
<?php
use yii\bootstrap\NavBar;
use yii\bootstrap\Nav;
use yii\helpers\Html;
/* @var $this \yii\web\View */
/* @var $content string */
list(,$url) = Yii::$app->assetManager->publish('@mdm/admin/assets');
$this->registerCssFile($url.'/main.css');
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<?= Html::csrfMetaTags() ?>
<title><?= Html::encode($this->title) ?></title>
<?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>
<?php
NavBar::begin([
'brandLabel' => false,
'options' => ['class' => 'navbar-inverse navbar-fixed-top'],
]);
if (!empty($this->params['top-menu']) && isset($this->params['nav-items'])) {
echo Nav::widget([
'options' => ['class' => 'nav navbar-nav'],
'items' => $this->params['nav-items'],
]);
}
echo Nav::widget([
'options' => ['class' => 'nav navbar-nav navbar-right'],
'items' => $this->context->module->navbar,
]);
NavBar::end();
?>
<div class="container">
<?= $content ?>
</div>
<footer class="footer">
<div class="container">
<p class="pull-right"><?= Yii::powered() ?></p>
</div>
</footer>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
+35
View File
@@ -0,0 +1,35 @@
<?php
use yii\helpers\Html;
/* @var $this \yii\web\View */
/* @var $content string */
$controller = $this->context;
$menus = $controller->module->menus;
$route = $controller->route;
foreach ($menus as $i => $menu) {
$menus[$i]['active'] = strpos($route, trim($menu['url'][0], '/')) === 0;
}
$this->params['nav-items'] = $menus;
?>
<?php $this->beginContent($controller->module->mainLayout) ?>
<div class="row">
<div class="col-sm-9">
<?= $content ?>
</div>
<div class="col-sm-3">
<div id="manager-menu" class="list-group">
<?php
foreach ($menus as $menu) {
$label = Html::tag('span', Html::encode($menu['label']), []);
$active = $menu['active'] ? ' active' : '';
echo Html::a($label, $menu['url'], [
'class' => 'list-group-item' . $active,
]);
}
?>
</div>
</div>
</div>
<?php $this->endContent(); ?>
+20
View File
@@ -0,0 +1,20 @@
<?php
/* @var $this \yii\web\View */
/* @var $content string */
$controller = $this->context;
$menus = $controller->module->menus;
$route = $controller->route;
foreach ($menus as $i => $menu) {
$menus[$i]['active'] = strpos($route, trim($menu['url'][0], '/')) === 0;
}
$this->params['nav-items'] = $menus;
$this->params['top-menu'] = true;
?>
<?php $this->beginContent($controller->module->mainLayout) ?>
<div class="row">
<div class="col-sm-12">
<?= $content ?>
</div>
</div>
<?php $this->endContent(); ?>