first commit
This commit is contained in:
33
backend/views/layouts/blank.php
Executable file
33
backend/views/layouts/blank.php
Executable file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/** @var yii\web\View $this */
|
||||
/** @var string $content */
|
||||
|
||||
use backend\assets\AppAsset;
|
||||
use yii\helpers\Html;
|
||||
|
||||
AppAsset::register($this);
|
||||
?>
|
||||
<?php $this->beginPage() ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?= Yii::$app->language ?>" class="h-100">
|
||||
<head>
|
||||
<meta charset="<?= Yii::$app->charset ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<?php $this->registerCsrfMetaTags() ?>
|
||||
<title><?= Html::encode($this->title) ?></title>
|
||||
<?php $this->head() ?>
|
||||
</head>
|
||||
<body class="d-flex flex-column h-100">
|
||||
<?php $this->beginBody() ?>
|
||||
|
||||
<main role="main">
|
||||
<div class="container">
|
||||
<?= $content ?>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php $this->endBody() ?>
|
||||
</body>
|
||||
</html>
|
||||
<?php $this->endPage();
|
42
backend/views/layouts/content.php
Executable file
42
backend/views/layouts/content.php
Executable file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/* @var $content string */
|
||||
|
||||
use yii\bootstrap4\Breadcrumbs;
|
||||
?>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1 class="m-0">
|
||||
<?php
|
||||
if (!is_null($this->title)) {
|
||||
echo \yii\helpers\Html::encode($this->title);
|
||||
} else {
|
||||
echo \yii\helpers\Inflector::camelize($this->context->id);
|
||||
}
|
||||
?>
|
||||
</h1>
|
||||
</div><!-- /.col -->
|
||||
<div class="col-sm-6">
|
||||
<?php
|
||||
echo Breadcrumbs::widget([
|
||||
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
|
||||
'options' => [
|
||||
'class' => 'breadcrumb float-sm-right'
|
||||
]
|
||||
]);
|
||||
?>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- Main content -->
|
||||
<div class="content">
|
||||
<?= $content ?><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
</div>
|
5
backend/views/layouts/control-sidebar.php
Executable file
5
backend/views/layouts/control-sidebar.php
Executable file
@ -0,0 +1,5 @@
|
||||
<!-- Control Sidebar -->
|
||||
<aside class="control-sidebar control-sidebar-dark">
|
||||
<!-- Control sidebar content goes here -->
|
||||
</aside>
|
||||
<!-- /.control-sidebar -->
|
7
backend/views/layouts/footer.php
Executable file
7
backend/views/layouts/footer.php
Executable file
@ -0,0 +1,7 @@
|
||||
<footer class="main-footer">
|
||||
<strong>Copyright © 2014-2021 <a href="https://adminlte.io">AdminLTE.io</a>.</strong>
|
||||
All rights reserved.
|
||||
<div class="float-right d-none d-sm-inline-block">
|
||||
<b>Version</b> 3.1.0
|
||||
</div>
|
||||
</footer>
|
38
backend/views/layouts/main-login.php
Executable file
38
backend/views/layouts/main-login.php
Executable file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/* @var $this \yii\web\View */
|
||||
/* @var $content string */
|
||||
|
||||
\hail812\adminlte3\assets\AdminLteAsset::register($this);
|
||||
$this->registerCssFile('https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700');
|
||||
$this->registerCssFile('https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css');
|
||||
\hail812\adminlte3\assets\PluginAsset::register($this)->add(['fontawesome', 'icheck-bootstrap']);
|
||||
?>
|
||||
<?php $this->beginPage() ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="<?= Yii::$app->charset ?>">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>AdminLTE 3 | Log in</title>
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<?php $this->registerCsrfMetaTags() ?>
|
||||
<?php $this->head() ?>
|
||||
</head>
|
||||
<body class="hold-transition login-page">
|
||||
<?php $this->beginBody() ?>
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="<?=Yii::$app->homeUrl?>"><b>Admin</b>LTE</a>
|
||||
</div>
|
||||
<!-- /.login-logo -->
|
||||
|
||||
<?= $content ?>
|
||||
</div>
|
||||
<!-- /.login-box -->
|
||||
|
||||
<?php $this->endBody() ?>
|
||||
</body>
|
||||
</html>
|
||||
<?php $this->endPage() ?>
|
54
backend/views/layouts/main.php
Executable file
54
backend/views/layouts/main.php
Executable file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
/* @var $this \yii\web\View */
|
||||
/* @var $content string */
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
\hail812\adminlte3\assets\FontAwesomeAsset::register($this);
|
||||
\hail812\adminlte3\assets\AdminLteAsset::register($this);
|
||||
$this->registerCssFile('https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback');
|
||||
|
||||
$assetDir = Yii::$app->assetManager->getPublishedUrl('@vendor/almasaeed2010/adminlte/dist');
|
||||
|
||||
$publishedRes = Yii::$app->assetManager->publish('@vendor/hail812/yii2-adminlte3/src/web/js');
|
||||
$this->registerJsFile($publishedRes[1].'/control_sidebar.js', ['depends' => '\hail812\adminlte3\assets\AdminLteAsset']);
|
||||
?>
|
||||
<?php $this->beginPage() ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?= Yii::$app->language ?>">
|
||||
<head>
|
||||
<meta charset="<?= Yii::$app->charset ?>">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<?php $this->registerCsrfMetaTags() ?>
|
||||
<title><?= Html::encode($this->title) ?></title>
|
||||
<?php $this->head() ?>
|
||||
</head>
|
||||
<body class="hold-transition sidebar-mini">
|
||||
<?php $this->beginBody() ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<!-- Navbar -->
|
||||
<?= $this->render('navbar', ['assetDir' => $assetDir]) ?>
|
||||
<!-- /.navbar -->
|
||||
|
||||
<!-- Main Sidebar Container -->
|
||||
<?= $this->render('sidebar', ['assetDir' => $assetDir]) ?>
|
||||
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<?= $this->render('content', ['content' => $content, 'assetDir' => $assetDir]) ?>
|
||||
<!-- /.content-wrapper -->
|
||||
|
||||
<!-- Control Sidebar -->
|
||||
<?= $this->render('control-sidebar') ?>
|
||||
<!-- /.control-sidebar -->
|
||||
|
||||
<!-- Main Footer -->
|
||||
<?= $this->render('footer') ?>
|
||||
</div>
|
||||
|
||||
<?php $this->endBody() ?>
|
||||
</body>
|
||||
</html>
|
||||
<?php $this->endPage() ?>
|
26
backend/views/layouts/navbar.php
Executable file
26
backend/views/layouts/navbar.php
Executable file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
?>
|
||||
<!-- Navbar -->
|
||||
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
|
||||
|
||||
<!-- Right navbar links -->
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item">
|
||||
<?= Html::a('<i class="fas fa-sign-out-alt"></i>', ['/site/logout'], ['data-method' => 'post', 'class' => 'nav-link']) ?>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
|
||||
<i class="fas fa-expand-arrows-alt"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#" role="button">
|
||||
<i class="fas fa-th-large"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- /.navbar -->
|
47
backend/views/layouts/sidebar.php
Executable file
47
backend/views/layouts/sidebar.php
Executable file
@ -0,0 +1,47 @@
|
||||
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||
<!-- Brand Logo -->
|
||||
<a href="index3.html" class="brand-link">
|
||||
<img src="<?=$assetDir?>/img/AdminLTELogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">AdminLTE 3</span>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<!-- Sidebar user panel (optional) -->
|
||||
|
||||
<!-- SidebarSearch Form -->
|
||||
<!-- href be escaped -->
|
||||
<!-- <div class="form-inline">
|
||||
<div class="input-group" data-widget="sidebar-search">
|
||||
<input class="form-control form-control-sidebar" type="search" placeholder="Search" aria-label="Search">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sidebar">
|
||||
<i class="fas fa-search fa-fw"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<nav class="mt-2">
|
||||
<?php
|
||||
echo \hail812\adminlte\widgets\Menu::widget([
|
||||
'items' => [
|
||||
['label' => 'Products', 'icon' => 'th', 'url' => ['/product/product']],
|
||||
['label' => 'Categories', 'icon' => 'th', 'url' => ['/category/category']],
|
||||
['label' => 'Orders', 'icon' => 'th', 'url' => ['/order/order']],
|
||||
['label' => 'Tables', 'icon' => 'th', 'url' => ['/table/table']],
|
||||
['label' => 'Banners', 'icon' => 'th', 'url' => ['/banner/banner']],
|
||||
|
||||
['label' => 'Yii2 PROVIDED', 'header' => true],
|
||||
['label' => 'Login', 'url' => ['site/login'], 'icon' => 'sign-in-alt', 'visible' => Yii::$app->user->isGuest],
|
||||
['label' => 'Gii', 'icon' => 'file-code', 'url' => ['/gii'], 'target' => '_blank'],
|
||||
['label' => 'Debug', 'icon' => 'bug', 'url' => ['/debug'], 'target' => '_blank'],
|
||||
],
|
||||
]);
|
||||
?>
|
||||
</nav>
|
||||
<!-- /.sidebar-menu -->
|
||||
</div>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
27
backend/views/site/error.php
Executable file
27
backend/views/site/error.php
Executable file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/** @var yii\web\View $this */
|
||||
/** @var string $name */
|
||||
/** @var string $message */
|
||||
/** @var Exception $exception*/
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
$this->title = $name;
|
||||
?>
|
||||
<div class="site-error">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<div class="alert alert-danger">
|
||||
<?= nl2br(Html::encode($message)) ?>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The above error occurred while the Web server was processing your request.
|
||||
</p>
|
||||
<p>
|
||||
Please contact us if you think this is a server error. Thank you.
|
||||
</p>
|
||||
|
||||
</div>
|
53
backend/views/site/index.php
Executable file
53
backend/views/site/index.php
Executable file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
/** @var yii\web\View $this */
|
||||
|
||||
$this->title = 'My Yii Application';
|
||||
?>
|
||||
<div class="site-index">
|
||||
|
||||
<div class="jumbotron text-center bg-transparent">
|
||||
<h1 class="display-4">Congratulations!</h1>
|
||||
|
||||
<p class="lead">You have successfully created your Yii-powered application.</p>
|
||||
|
||||
<p><a class="btn btn-lg btn-success" href="https://www.yiiframework.com">Get started with Yii</a></p>
|
||||
</div>
|
||||
|
||||
<div class="body-content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<h2>Heading</h2>
|
||||
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
|
||||
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
|
||||
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
|
||||
fugiat nulla pariatur.</p>
|
||||
|
||||
<p><a class="btn btn-outline-secondary" href="https://www.yiiframework.com/doc/">Yii Documentation »</a></p>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<h2>Heading</h2>
|
||||
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
|
||||
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
|
||||
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
|
||||
fugiat nulla pariatur.</p>
|
||||
|
||||
<p><a class="btn btn-outline-secondary" href="https://www.yiiframework.com/forum/">Yii Forum »</a></p>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<h2>Heading</h2>
|
||||
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
|
||||
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
|
||||
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
|
||||
fugiat nulla pariatur.</p>
|
||||
|
||||
<p><a class="btn btn-outline-secondary" href="https://www.yiiframework.com/extensions/">Yii Extensions »</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
32
backend/views/site/login.php
Executable file
32
backend/views/site/login.php
Executable file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/** @var yii\web\View $this */
|
||||
/** @var yii\bootstrap5\ActiveForm $form */
|
||||
/** @var \common\models\LoginForm $model */
|
||||
|
||||
use yii\bootstrap5\ActiveForm;
|
||||
use yii\bootstrap5\Html;
|
||||
|
||||
$this->title = 'Login';
|
||||
?>
|
||||
<div class="site-login">
|
||||
<div class="mt-5 offset-lg-3 col-lg-6">
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<p>Please fill out the following fields to login:</p>
|
||||
|
||||
<?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
|
||||
|
||||
<?= $form->field($model, 'username')->textInput(['autofocus' => true]) ?>
|
||||
|
||||
<?= $form->field($model, 'password')->passwordInput() ?>
|
||||
|
||||
<?= $form->field($model, 'rememberMe')->checkbox() ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton('Login', ['class' => 'btn btn-primary btn-block', 'name' => 'login-button']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user