Commit b66c9c5adfdedd46fc69a21dce63ec3101edb7a5
1 parent
1755c393
-Admin template setted
Showing
8 changed files
with
895 additions
and
184 deletions
Show diff stats
backend/config/main.php
1 | <?php | 1 | <?php |
2 | -$params = array_merge( | ||
3 | - require(__DIR__ . '/../../common/config/params.php'), | ||
4 | - require(__DIR__ . '/../../common/config/params-local.php'), | ||
5 | - require(__DIR__ . '/params.php'), | ||
6 | - require(__DIR__ . '/params-local.php') | ||
7 | -); | ||
8 | - | ||
9 | -return [ | ||
10 | - 'id' => 'app-backend', | ||
11 | - 'basePath' => dirname(__DIR__), | ||
12 | - 'controllerNamespace' => 'backend\controllers', | ||
13 | - 'bootstrap' => ['log'], | ||
14 | - 'modules' => [], | ||
15 | - 'components' => [ | ||
16 | - 'request' => [ | ||
17 | - 'csrfParam' => '_csrf-backend', | ||
18 | - ], | ||
19 | - 'user' => [ | ||
20 | - 'identityClass' => 'common\models\User', | ||
21 | - 'enableAutoLogin' => true, | ||
22 | - 'identityCookie' => ['name' => '_identity-backend', 'httpOnly' => true], | ||
23 | - ], | ||
24 | - 'session' => [ | ||
25 | - // this is the name of the session cookie used for login on the backend | ||
26 | - 'name' => 'advanced-backend', | ||
27 | - ], | ||
28 | - 'log' => [ | ||
29 | - 'traceLevel' => YII_DEBUG ? 3 : 0, | ||
30 | - 'targets' => [ | ||
31 | - [ | ||
32 | - 'class' => 'yii\log\FileTarget', | ||
33 | - 'levels' => ['error', 'warning'], | 2 | + $params = array_merge( |
3 | + require( __DIR__ . '/../../common/config/params.php' ), | ||
4 | + require( __DIR__ . '/../../common/config/params-local.php' ), | ||
5 | + require( __DIR__ . '/params.php' ), | ||
6 | + require( __DIR__ . '/params-local.php' ) | ||
7 | + ); | ||
8 | + | ||
9 | + return [ | ||
10 | + 'id' => 'app-backend', | ||
11 | + 'homeUrl' => '/admin', | ||
12 | + 'basePath' => dirname(__DIR__), | ||
13 | + 'controllerNamespace' => 'backend\controllers', | ||
14 | + 'bootstrap' => [ 'log' ], | ||
15 | + 'modules' => [], | ||
16 | + 'components' => [ | ||
17 | + 'request' => [ | ||
18 | + 'csrfParam' => '_csrf-backend', | ||
19 | + 'baseUrl' => '/admin', | ||
20 | + ], | ||
21 | + 'user' => [ | ||
22 | + 'identityClass' => 'common\models\User', | ||
23 | + 'enableAutoLogin' => true, | ||
24 | + 'identityCookie' => [ | ||
25 | + 'name' => '_identity-backend', | ||
26 | + 'httpOnly' => true, | ||
34 | ], | 27 | ], |
35 | ], | 28 | ], |
36 | - ], | ||
37 | - 'errorHandler' => [ | ||
38 | - 'errorAction' => 'site/error', | ||
39 | - ], | ||
40 | - /* | ||
41 | - 'urlManager' => [ | ||
42 | - 'enablePrettyUrl' => true, | ||
43 | - 'showScriptName' => false, | ||
44 | - 'rules' => [ | 29 | + 'session' => [ |
30 | + // this is the name of the session cookie used for login on the backend | ||
31 | + 'name' => 'advanced-backend', | ||
32 | + ], | ||
33 | + 'log' => [ | ||
34 | + 'traceLevel' => YII_DEBUG ? 3 : 0, | ||
35 | + 'targets' => [ | ||
36 | + [ | ||
37 | + 'class' => 'yii\log\FileTarget', | ||
38 | + 'levels' => [ | ||
39 | + 'error', | ||
40 | + 'warning', | ||
41 | + ], | ||
42 | + ], | ||
43 | + ], | ||
44 | + ], | ||
45 | + 'errorHandler' => [ | ||
46 | + 'errorAction' => 'site/error', | ||
47 | + ], | ||
48 | + 'urlManager' => [ | ||
49 | + 'enablePrettyUrl' => true, | ||
50 | + 'showScriptName' => false, | ||
51 | + 'rules' => [], | ||
45 | ], | 52 | ], |
46 | ], | 53 | ], |
47 | - */ | ||
48 | - ], | ||
49 | - 'params' => $params, | ||
50 | -]; | 54 | + 'params' => $params, |
55 | + ]; |
backend/controllers/SiteController.php
@@ -78,7 +78,7 @@ class SiteController extends Controller | @@ -78,7 +78,7 @@ class SiteController extends Controller | ||
78 | if ($model->load(Yii::$app->request->post()) && $model->login()) { | 78 | if ($model->load(Yii::$app->request->post()) && $model->login()) { |
79 | return $this->goBack(); | 79 | return $this->goBack(); |
80 | } else { | 80 | } else { |
81 | - return $this->render('login', [ | 81 | + return $this->renderPartial('login', [ |
82 | 'model' => $model, | 82 | 'model' => $model, |
83 | ]); | 83 | ]); |
84 | } | 84 | } |
backend/views/layouts/main.php
1 | <?php | 1 | <?php |
2 | + | ||
3 | + /** | ||
4 | + * @var string $content | ||
5 | + * @var \yii\web\View $this | ||
6 | + */ | ||
7 | + | ||
8 | + use yii\helpers\Html; | ||
9 | + | ||
10 | + $bundle = yiister\gentelella\assets\Asset::register($this); | ||
2 | 11 | ||
3 | -/* @var $this \yii\web\View */ | ||
4 | -/* @var $content string */ | ||
5 | - | ||
6 | -use backend\assets\AppAsset; | ||
7 | -use yii\helpers\Html; | ||
8 | -use yii\bootstrap\Nav; | ||
9 | -use yii\bootstrap\NavBar; | ||
10 | -use yii\widgets\Breadcrumbs; | ||
11 | -use common\widgets\Alert; | ||
12 | - | ||
13 | -AppAsset::register($this); | ||
14 | ?> | 12 | ?> |
15 | -<?php $this->beginPage() ?> | 13 | +<?php $this->beginPage(); ?> |
16 | <!DOCTYPE html> | 14 | <!DOCTYPE html> |
17 | <html lang="<?= Yii::$app->language ?>"> | 15 | <html lang="<?= Yii::$app->language ?>"> |
18 | <head> | 16 | <head> |
19 | - <meta charset="<?= Yii::$app->charset ?>"> | ||
20 | - <meta name="viewport" content="width=device-width, initial-scale=1"> | 17 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
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 | <?= Html::csrfMetaTags() ?> | 21 | <?= Html::csrfMetaTags() ?> |
22 | - <title><?= Html::encode($this->title) ?></title> | 22 | + <title><?= Html::encode($this->title) ?></title> |
23 | <?php $this->head() ?> | 23 | <?php $this->head() ?> |
24 | + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> | ||
25 | + <!--[if lt IE 9]> | ||
26 | + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> | ||
27 | + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | ||
28 | + <![endif]--> | ||
24 | </head> | 29 | </head> |
25 | -<body> | ||
26 | -<?php $this->beginBody() ?> | ||
27 | - | ||
28 | -<div class="wrap"> | ||
29 | - <?php | ||
30 | - NavBar::begin([ | ||
31 | - 'brandLabel' => 'My Company', | ||
32 | - 'brandUrl' => Yii::$app->homeUrl, | ||
33 | - 'options' => [ | ||
34 | - 'class' => 'navbar-inverse navbar-fixed-top', | ||
35 | - ], | ||
36 | - ]); | ||
37 | - $menuItems = [ | ||
38 | - ['label' => 'Home', 'url' => ['/site/index']], | ||
39 | - ]; | ||
40 | - if (Yii::$app->user->isGuest) { | ||
41 | - $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']]; | ||
42 | - } else { | ||
43 | - $menuItems[] = '<li>' | ||
44 | - . Html::beginForm(['/site/logout'], 'post') | ||
45 | - . Html::submitButton( | ||
46 | - 'Logout (' . Yii::$app->user->identity->username . ')', | ||
47 | - ['class' => 'btn btn-link logout'] | ||
48 | - ) | ||
49 | - . Html::endForm() | ||
50 | - . '</li>'; | ||
51 | - } | ||
52 | - echo Nav::widget([ | ||
53 | - 'options' => ['class' => 'navbar-nav navbar-right'], | ||
54 | - 'items' => $menuItems, | ||
55 | - ]); | ||
56 | - NavBar::end(); | ||
57 | - ?> | ||
58 | - | ||
59 | - <div class="container"> | ||
60 | - <?= Breadcrumbs::widget([ | ||
61 | - 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], | ||
62 | - ]) ?> | ||
63 | - <?= Alert::widget() ?> | ||
64 | - <?= $content ?> | 30 | +<body class="nav-md"> |
31 | +<?php $this->beginBody(); ?> | ||
32 | +<div class="container body"> | ||
33 | + | ||
34 | + <div class="main_container"> | ||
35 | + | ||
36 | + <div class="col-md-3 left_col"> | ||
37 | + <div class="left_col scroll-view"> | ||
38 | + | ||
39 | + <div class="navbar nav_title" style="border: 0;"> | ||
40 | + <a href="/" class="site_title"><i class="fa fa-paw"></i> <span>Gentellela Alela!</span></a> | ||
41 | + </div> | ||
42 | + <div class="clearfix"></div> | ||
43 | + | ||
44 | + <!-- menu prile quick info --> | ||
45 | + <div class="profile"> | ||
46 | + <div class="profile_pic"> | ||
47 | + <img src="http://placehold.it/128x128" alt="..." class="img-circle profile_img"> | ||
48 | + </div> | ||
49 | + <div class="profile_info"> | ||
50 | + <span>Welcome,</span> | ||
51 | + <h2>John Doe</h2> | ||
52 | + </div> | ||
53 | + </div> | ||
54 | + <!-- /menu prile quick info --> | ||
55 | + | ||
56 | + <br /> | ||
57 | + | ||
58 | + <!-- sidebar menu --> | ||
59 | + <div id="sidebar-menu" class="main_menu_side hidden-print main_menu"> | ||
60 | + | ||
61 | + <div class="menu_section"> | ||
62 | + <h3>General</h3> | ||
63 | + <?= | ||
64 | + \yiister\gentelella\widgets\Menu::widget( | ||
65 | + [ | ||
66 | + "items" => [ | ||
67 | + ["label" => "Home", "url" => "/", "icon" => "home"], | ||
68 | + ["label" => "Layout", "url" => ["site/layout"], "icon" => "files-o"], | ||
69 | + ["label" => "Error page", "url" => ["site/error-page"], "icon" => "close"], | ||
70 | + [ | ||
71 | + "label" => "Widgets", | ||
72 | + "icon" => "th", | ||
73 | + "url" => "#", | ||
74 | + "items" => [ | ||
75 | + ["label" => "Menu", "url" => ["site/menu"]], | ||
76 | + ["label" => "Panel", "url" => ["site/panel"]], | ||
77 | + ], | ||
78 | + ], | ||
79 | + [ | ||
80 | + "label" => "Badges", | ||
81 | + "url" => "#", | ||
82 | + "icon" => "table", | ||
83 | + "items" => [ | ||
84 | + [ | ||
85 | + "label" => "Default", | ||
86 | + "url" => "#", | ||
87 | + "badge" => "123", | ||
88 | + ], | ||
89 | + [ | ||
90 | + "label" => "Success", | ||
91 | + "url" => "#", | ||
92 | + "badge" => "new", | ||
93 | + "badgeOptions" => ["class" => "label-success"], | ||
94 | + ], | ||
95 | + [ | ||
96 | + "label" => "Danger", | ||
97 | + "url" => "#", | ||
98 | + "badge" => "!", | ||
99 | + "badgeOptions" => ["class" => "label-danger"], | ||
100 | + ], | ||
101 | + ], | ||
102 | + ], | ||
103 | + [ | ||
104 | + "label" => "Multilevel", | ||
105 | + "url" => "#", | ||
106 | + "icon" => "table", | ||
107 | + "items" => [ | ||
108 | + [ | ||
109 | + "label" => "Second level 1", | ||
110 | + "url" => "#", | ||
111 | + ], | ||
112 | + [ | ||
113 | + "label" => "Second level 2", | ||
114 | + "url" => "#", | ||
115 | + "items" => [ | ||
116 | + [ | ||
117 | + "label" => "Third level 1", | ||
118 | + "url" => "#", | ||
119 | + ], | ||
120 | + [ | ||
121 | + "label" => "Third level 2", | ||
122 | + "url" => "#", | ||
123 | + ], | ||
124 | + ], | ||
125 | + ], | ||
126 | + ], | ||
127 | + ], | ||
128 | + ], | ||
129 | + ] | ||
130 | + ) | ||
131 | + ?> | ||
132 | + </div> | ||
133 | + | ||
134 | + </div> | ||
135 | + <!-- /sidebar menu --> | ||
136 | + | ||
137 | + <!-- /menu footer buttons --> | ||
138 | + <div class="sidebar-footer hidden-small"> | ||
139 | + <a data-toggle="tooltip" data-placement="top" title="Settings"> | ||
140 | + <span class="glyphicon glyphicon-cog" aria-hidden="true"></span> | ||
141 | + </a> | ||
142 | + <a data-toggle="tooltip" data-placement="top" title="FullScreen"> | ||
143 | + <span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span> | ||
144 | + </a> | ||
145 | + <a data-toggle="tooltip" data-placement="top" title="Lock"> | ||
146 | + <span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span> | ||
147 | + </a> | ||
148 | + <a data-toggle="tooltip" data-placement="top" title="Logout"> | ||
149 | + <span class="glyphicon glyphicon-off" aria-hidden="true"></span> | ||
150 | + </a> | ||
151 | + </div> | ||
152 | + <!-- /menu footer buttons --> | ||
153 | + </div> | ||
65 | </div> | 154 | </div> |
66 | -</div> | ||
67 | 155 | ||
68 | -<footer class="footer"> | ||
69 | - <div class="container"> | ||
70 | - <p class="pull-left">© My Company <?= date('Y') ?></p> | 156 | + <!-- top navigation --> |
157 | + <div class="top_nav"> | ||
158 | + | ||
159 | + <div class="nav_menu"> | ||
160 | + <nav class="" role="navigation"> | ||
161 | + <div class="nav toggle"> | ||
162 | + <a id="menu_toggle"><i class="fa fa-bars"></i></a> | ||
163 | + </div> | ||
164 | + | ||
165 | + <ul class="nav navbar-nav navbar-right"> | ||
166 | + <li class=""> | ||
167 | + <a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | ||
168 | + <img src="http://placehold.it/128x128" alt="">John Doe | ||
169 | + <span class=" fa fa-angle-down"></span> | ||
170 | + </a> | ||
171 | + <ul class="dropdown-menu dropdown-usermenu pull-right"> | ||
172 | + <li><a href="javascript:;"> Profile</a> | ||
173 | + </li> | ||
174 | + <li> | ||
175 | + <a href="javascript:;"> | ||
176 | + <span class="badge bg-red pull-right">50%</span> | ||
177 | + <span>Settings</span> | ||
178 | + </a> | ||
179 | + </li> | ||
180 | + <li> | ||
181 | + <a href="javascript:;">Help</a> | ||
182 | + </li> | ||
183 | + <li><a href="login.html"><i class="fa fa-sign-out pull-right"></i> Log Out</a> | ||
184 | + </li> | ||
185 | + </ul> | ||
186 | + </li> | ||
187 | + | ||
188 | + <li role="presentation" class="dropdown"> | ||
189 | + <a href="javascript:;" class="dropdown-toggle info-number" data-toggle="dropdown" aria-expanded="false"> | ||
190 | + <i class="fa fa-envelope-o"></i> | ||
191 | + <span class="badge bg-green">6</span> | ||
192 | + </a> | ||
193 | + <ul id="menu1" class="dropdown-menu list-unstyled msg_list" role="menu"> | ||
194 | + <li> | ||
195 | + <a> | ||
196 | + <span class="image"> | ||
197 | + <img src="http://placehold.it/128x128" alt="Profile Image" /> | ||
198 | + </span> | ||
199 | + <span> | ||
200 | + <span>John Smith</span> | ||
201 | + <span class="time">3 mins ago</span> | ||
202 | + </span> | ||
203 | + <span class="message"> | ||
204 | + Film festivals used to be do-or-die moments for movie makers. They were where... | ||
205 | + </span> | ||
206 | + </a> | ||
207 | + </li> | ||
208 | + <li> | ||
209 | + <a> | ||
210 | + <span class="image"> | ||
211 | + <img src="http://placehold.it/128x128" alt="Profile Image" /> | ||
212 | + </span> | ||
213 | + <span> | ||
214 | + <span>John Smith</span> | ||
215 | + <span class="time">3 mins ago</span> | ||
216 | + </span> | ||
217 | + <span class="message"> | ||
218 | + Film festivals used to be do-or-die moments for movie makers. They were where... | ||
219 | + </span> | ||
220 | + </a> | ||
221 | + </li> | ||
222 | + <li> | ||
223 | + <a> | ||
224 | + <span class="image"> | ||
225 | + <img src="http://placehold.it/128x128" alt="Profile Image" /> | ||
226 | + </span> | ||
227 | + <span> | ||
228 | + <span>John Smith</span> | ||
229 | + <span class="time">3 mins ago</span> | ||
230 | + </span> | ||
231 | + <span class="message"> | ||
232 | + Film festivals used to be do-or-die moments for movie makers. They were where... | ||
233 | + </span> | ||
234 | + </a> | ||
235 | + </li> | ||
236 | + <li> | ||
237 | + <a> | ||
238 | + <span class="image"> | ||
239 | + <img src="http://placehold.it/128x128" alt="Profile Image" /> | ||
240 | + </span> | ||
241 | + <span> | ||
242 | + <span>John Smith</span> | ||
243 | + <span class="time">3 mins ago</span> | ||
244 | + </span> | ||
245 | + <span class="message"> | ||
246 | + Film festivals used to be do-or-die moments for movie makers. They were where... | ||
247 | + </span> | ||
248 | + </a> | ||
249 | + </li> | ||
250 | + <li> | ||
251 | + <div class="text-center"> | ||
252 | + <a href="/"> | ||
253 | + <strong>See All Alerts</strong> | ||
254 | + <i class="fa fa-angle-right"></i> | ||
255 | + </a> | ||
256 | + </div> | ||
257 | + </li> | ||
258 | + </ul> | ||
259 | + </li> | ||
260 | + | ||
261 | + </ul> | ||
262 | + </nav> | ||
263 | + </div> | ||
71 | 264 | ||
72 | - <p class="pull-right"><?= Yii::powered() ?></p> | ||
73 | </div> | 265 | </div> |
74 | -</footer> | 266 | + <!-- /top navigation --> |
75 | 267 | ||
76 | -<?php $this->endBody() ?> | 268 | + <!-- page content --> |
269 | + <div class="right_col" role="main"> | ||
270 | + <?php if (isset($this->params['h1'])): ?> | ||
271 | + <div class="page-title"> | ||
272 | + <div class="title_left"> | ||
273 | + <h1><?= $this->params['h1'] ?></h1> | ||
274 | + </div> | ||
275 | + <div class="title_right"> | ||
276 | + <div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search"> | ||
277 | + <div class="input-group"> | ||
278 | + <input type="text" class="form-control" placeholder="Search for..."> | ||
279 | + <span class="input-group-btn"> | ||
280 | + <button class="btn btn-default" type="button">Go!</button> | ||
281 | + </span> | ||
282 | + </div> | ||
283 | + </div> | ||
284 | + </div> | ||
285 | + </div> | ||
286 | + <?php endif; ?> | ||
287 | + <div class="clearfix"></div> | ||
288 | + | ||
289 | + <?= $content ?> | ||
290 | + </div> | ||
291 | + <!-- /page content --> | ||
292 | + <!-- footer content --> | ||
293 | + <footer> | ||
294 | + <div class="pull-right"> | ||
295 | + Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com" rel="nofollow" target="_blank">Colorlib</a><br /> | ||
296 | + Extension for Yii framework 2 by <a href="http://yiister.ru" rel="nofollow" target="_blank">Yiister</a> | ||
297 | + </div> | ||
298 | + <div class="clearfix"></div> | ||
299 | + </footer> | ||
300 | + <!-- /footer content --> | ||
301 | + </div> | ||
302 | + | ||
303 | +</div> | ||
304 | + | ||
305 | +<div id="custom_notifications" class="custom-notifications dsp_none"> | ||
306 | + <ul class="list-unstyled notifications clearfix" data-tabbed_notifications="notif-group"> | ||
307 | + </ul> | ||
308 | + <div class="clearfix"></div> | ||
309 | + <div id="notif-group" class="tabbed_notifications"></div> | ||
310 | +</div> | ||
311 | +<!-- /footer content --> | ||
312 | +<?php $this->endBody(); ?> | ||
77 | </body> | 313 | </body> |
78 | </html> | 314 | </html> |
79 | -<?php $this->endPage() ?> | 315 | +<?php $this->endPage(); ?> |
backend/views/site/login.php
1 | <?php | 1 | <?php |
2 | - | ||
3 | -/* @var $this yii\web\View */ | ||
4 | -/* @var $form yii\bootstrap\ActiveForm */ | ||
5 | -/* @var $model \common\models\LoginForm */ | ||
6 | - | ||
7 | -use yii\helpers\Html; | ||
8 | -use yii\bootstrap\ActiveForm; | ||
9 | - | ||
10 | -$this->title = 'Login'; | ||
11 | -$this->params['breadcrumbs'][] = $this->title; | 2 | + |
3 | + /** | ||
4 | + * @var string $content | ||
5 | + * @var \yii\web\View $this | ||
6 | + */ | ||
7 | + | ||
8 | + use hiqdev\assets\icheck\iCheckAsset; | ||
9 | + use yii\helpers\Html; | ||
10 | + use yii\web\View; | ||
11 | + use yii\widgets\ActiveForm; | ||
12 | + | ||
13 | + $bundle = yiister\gentelella\assets\Asset::register($this); | ||
14 | + | ||
15 | + $this->title = 'Логин'; | ||
16 | + | ||
17 | + iCheckAsset::register($this); | ||
18 | + $js = <<< JS | ||
19 | +$('input').iCheck({ | ||
20 | +checkboxClass: 'icheckbox_square-blue', | ||
21 | +increaseArea: '20%' // optional | ||
22 | +}); | ||
23 | +JS; | ||
24 | + $this->registerJs($js, View::POS_READY); | ||
12 | ?> | 25 | ?> |
13 | -<div class="site-login"> | ||
14 | - <h1><?= Html::encode($this->title) ?></h1> | 26 | +<?php $this->beginPage(); ?> |
27 | +<!DOCTYPE html> | ||
28 | +<html lang="<?= Yii::$app->language ?>"> | ||
29 | +<head> | ||
30 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||
31 | + <meta charset="<?= Yii::$app->charset ?>"/> | ||
32 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"/> | ||
33 | + <meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
34 | + <?= Html::csrfMetaTags() ?> | ||
35 | + <title><?= Html::encode($this->title) ?></title> | ||
36 | + <?php $this->head() ?> | ||
37 | + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> | ||
38 | + <!--[if lt IE 9]> | ||
39 | + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> | ||
40 | + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | ||
41 | + <![endif]--> | ||
42 | +</head> | ||
43 | +<body> | ||
44 | +<?php $this->beginBody(); ?> | ||
45 | +<div class="container" style="background-color: #F7F7F7; height: 100%"> | ||
46 | + <div class="row" style="margin-top: 10%"> | ||
47 | + <div class="col-md-4 col-md-offset-4"> | ||
15 | 48 | ||
16 | - <p>Please fill out the following fields to login:</p> | ||
17 | 49 | ||
18 | - <div class="row"> | ||
19 | - <div class="col-lg-5"> | ||
20 | - <?php $form = ActiveForm::begin(['id' => 'login-form']); ?> | 50 | + <div class="site-login x_panel"> |
51 | + <div class="x_title"> | ||
52 | + <h1><?= Html::encode($this->title) ?></h1> | ||
21 | 53 | ||
22 | - <?= $form->field($model, 'username')->textInput(['autofocus' => true]) ?> | ||
23 | - | ||
24 | - <?= $form->field($model, 'password')->passwordInput() ?> | 54 | + <p>Please fill out the following fields to login:</p> |
55 | + </div> | ||
56 | + <div class="row"> | ||
57 | + <div> | ||
58 | + <?php $form = ActiveForm::begin( | ||
59 | + [ | ||
60 | + 'id' => 'login-form', | ||
61 | + 'validateOnBlur' => false, | ||
62 | + ] | ||
63 | + ); ?> | ||
64 | + | ||
65 | + <?= $form->field($model, 'username') | ||
66 | + ->textInput([ 'autofocus' => true ]) ?> | ||
67 | + | ||
68 | + <?= $form->field($model, 'password') | ||
69 | + ->passwordInput() ?> | ||
70 | + | ||
71 | + <?= $form->field($model, 'rememberMe') | ||
72 | + ->checkbox() ?> | ||
25 | 73 | ||
26 | - <?= $form->field($model, 'rememberMe')->checkbox() ?> | 74 | + <div class="form-group"> |
75 | + <?= Html::submitButton('Login', | ||
76 | + [ | ||
77 | + 'class' => 'btn btn-default', | ||
78 | + 'name' => 'login-button', | ||
79 | + ] | ||
80 | + ) ?> | ||
81 | + </div> | ||
82 | + | ||
83 | + <?php ActiveForm::end(); ?> | ||
84 | + </div> | ||
85 | + </div> | ||
86 | + </div> | ||
27 | 87 | ||
28 | - <div class="form-group"> | ||
29 | - <?= Html::submitButton('Login', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?> | ||
30 | - </div> | ||
31 | 88 | ||
32 | - <?php ActiveForm::end(); ?> | ||
33 | - </div> | ||
34 | </div> | 89 | </div> |
90 | + </div> | ||
91 | + | ||
35 | </div> | 92 | </div> |
93 | +<?php $this->endBody(); ?> | ||
94 | +</body> | ||
95 | +</html> | ||
96 | +<?php $this->endPage(); ?> | ||
97 | + |
composer.json
@@ -18,7 +18,9 @@ | @@ -18,7 +18,9 @@ | ||
18 | "yiisoft/yii2": "~2.0.6", | 18 | "yiisoft/yii2": "~2.0.6", |
19 | "yiisoft/yii2-bootstrap": "~2.0.0", | 19 | "yiisoft/yii2-bootstrap": "~2.0.0", |
20 | "yiisoft/yii2-swiftmailer": "~2.0.0", | 20 | "yiisoft/yii2-swiftmailer": "~2.0.0", |
21 | - "insolita/yii2-migration-generator": "~2.2" | 21 | + "insolita/yii2-migration-generator": "~2.2", |
22 | + "yiister/yii2-gentelella": "~1.0", | ||
23 | + "hiqdev/yii2-asset-icheck": "1.0.2.5" | ||
22 | }, | 24 | }, |
23 | "require-dev": { | 25 | "require-dev": { |
24 | "yiisoft/yii2-debug": "~2.0.0", | 26 | "yiisoft/yii2-debug": "~2.0.0", |
composer.lock
@@ -4,8 +4,8 @@ | @@ -4,8 +4,8 @@ | ||
4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", | 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", |
5 | "This file is @generated automatically" | 5 | "This file is @generated automatically" |
6 | ], | 6 | ], |
7 | - "hash": "c527bda5256bae6983f74a06a44681c5", | ||
8 | - "content-hash": "daadc2e7120bd89e994ac133ca2c3a24", | 7 | + "hash": "fe31b8499db20097973cd4c82a007cc0", |
8 | + "content-hash": "f7f7e3d4345571ee94a71c4e93204b09", | ||
9 | "packages": [ | 9 | "packages": [ |
10 | { | 10 | { |
11 | "name": "bower-asset/bootstrap", | 11 | "name": "bower-asset/bootstrap", |
@@ -57,6 +57,150 @@ | @@ -57,6 +57,150 @@ | ||
57 | ] | 57 | ] |
58 | }, | 58 | }, |
59 | { | 59 | { |
60 | + "name": "bower-asset/gentelella", | ||
61 | + "version": "1.4.0", | ||
62 | + "source": { | ||
63 | + "type": "git", | ||
64 | + "url": "https://github.com/puikinsh/gentelella.git", | ||
65 | + "reference": "3448fdfdf16a41707d6e2a8154d592a88d85c41c" | ||
66 | + }, | ||
67 | + "dist": { | ||
68 | + "type": "zip", | ||
69 | + "url": "https://api.github.com/repos/puikinsh/gentelella/zipball/3448fdfdf16a41707d6e2a8154d592a88d85c41c", | ||
70 | + "reference": "3448fdfdf16a41707d6e2a8154d592a88d85c41c", | ||
71 | + "shasum": "" | ||
72 | + }, | ||
73 | + "require-dev": { | ||
74 | + "bower-asset/animate.css": ">=3.5.1,<4.0.0", | ||
75 | + "bower-asset/autosize": ">=3.0.15,<4.0.0", | ||
76 | + "bower-asset/bootstrap": ">=3.3.7,<4.0.0", | ||
77 | + "bower-asset/bootstrap-colorpicker": ">=2.3.3,<3.0.0", | ||
78 | + "bower-asset/bootstrap-daterangepicker": "dev-master", | ||
79 | + "bower-asset/bootstrap-progressbar": ">=0.9.0,<0.10.0", | ||
80 | + "bower-asset/bootstrap-wysiwyg-steveathon": ">=1.0.5,<2.0.0", | ||
81 | + "bower-asset/chart.js": ">=2.0.2,<3.0.0", | ||
82 | + "bower-asset/cropper": ">=2.3.0,<3.0.0", | ||
83 | + "bower-asset/datatables.net": ">=1.10.11,<2.0.0", | ||
84 | + "bower-asset/datatables.net-bs": ">=1.10.11,<2.0.0", | ||
85 | + "bower-asset/datatables.net-buttons": ">=1.1.2,<2.0.0", | ||
86 | + "bower-asset/datatables.net-buttons-bs": ">=1.1.2,<2.0.0", | ||
87 | + "bower-asset/datatables.net-fixedheader": ">=3.1.1,<4.0.0", | ||
88 | + "bower-asset/datatables.net-fixedheader-bs": ">=3.1.1,<4.0.0", | ||
89 | + "bower-asset/datatables.net-keytable": ">=2.1.1,<3.0.0", | ||
90 | + "bower-asset/datatables.net-responsive": ">=2.0.2,<3.0.0", | ||
91 | + "bower-asset/datatables.net-responsive-bs": ">=2.0.2,<3.0.0", | ||
92 | + "bower-asset/datatables.net-scroller": ">=1.4.1,<2.0.0", | ||
93 | + "bower-asset/datatables.net-scroller-bs": ">=1.4.1,<2.0.0", | ||
94 | + "bower-asset/datejs": ">=1.0.0-RC3,<2.0.0", | ||
95 | + "bower-asset/devbridge-autocomplete": ">=1.2.24,<2.0.0", | ||
96 | + "bower-asset/dropzone": ">=4.3.0,<5.0.0", | ||
97 | + "bower-asset/echarts": ">=3.1.7,<4.0.0", | ||
98 | + "bower-asset/fastclick": ">=1.0.6,<2.0.0", | ||
99 | + "bower-asset/flot": ">=0.8.3,<0.9.0", | ||
100 | + "bower-asset/flot-spline": ">=0.8.2,<0.9.0", | ||
101 | + "bower-asset/flot.curvedlines": ">=1.1.1,<2.0.0", | ||
102 | + "bower-asset/flot.orderbars": "*", | ||
103 | + "bower-asset/fontawesome": ">=4.6.1,<5.0.0", | ||
104 | + "bower-asset/fullcalendar": ">=2.6.1,<3.0.0", | ||
105 | + "bower-asset/gauge.js": ">=1.2.1,<2.0.0", | ||
106 | + "bower-asset/icheck": ">=1.0.2,<2.0.0", | ||
107 | + "bower-asset/ionrangeslider": ">=2.1.3,<3.0.0", | ||
108 | + "bower-asset/jquery": ">=2.2.3,<3.0.0", | ||
109 | + "bower-asset/jquery-knob": ">=1.2.13,<2.0.0", | ||
110 | + "bower-asset/jquery-smart-wizard": ">=3.3.1,<4.0.0", | ||
111 | + "bower-asset/jquery-sparkline": ">=2.1.3,<3.0.0", | ||
112 | + "bower-asset/jquery.easy-pie-chart": ">=2.1.6,<3.0.0", | ||
113 | + "bower-asset/jquery.inputmask": ">=3.3.1,<4.0.0", | ||
114 | + "bower-asset/jquery.tagsinput": ">=1.3.6,<2.0.0", | ||
115 | + "bower-asset/jqvmap": "dev-master", | ||
116 | + "bower-asset/jszip": "2.6.0", | ||
117 | + "bower-asset/malihu-custom-scrollbar-plugin": ">=3.1.3,<4.0.0", | ||
118 | + "bower-asset/morris.js": ">=0.5.1,<0.6.0", | ||
119 | + "bower-asset/normalize-css": ">=4.1.1,<5.0.0", | ||
120 | + "bower-asset/nprogress": ">=0.2.0,<0.3.0", | ||
121 | + "bower-asset/parsleyjs": ">=2.3.10,<3.0.0", | ||
122 | + "bower-asset/pdfmake": ">=0.1.20,<0.2.0", | ||
123 | + "bower-asset/pnotify": ">=3.0.0,<4.0.0", | ||
124 | + "bower-asset/select2": ">=4.0.2,<5.0.0", | ||
125 | + "bower-asset/skycons": "*", | ||
126 | + "bower-asset/starrr": ">=2.0.0,<3.0.0", | ||
127 | + "bower-asset/switchery": ">=0.8.1,<0.9.0", | ||
128 | + "bower-asset/validator": ">=1.0.6,<2.0.0" | ||
129 | + }, | ||
130 | + "type": "bower-asset-library", | ||
131 | + "extra": { | ||
132 | + "bower-asset-ignore": [ | ||
133 | + "**/.*", | ||
134 | + "documentation" | ||
135 | + ] | ||
136 | + }, | ||
137 | + "license": [ | ||
138 | + "MIT" | ||
139 | + ], | ||
140 | + "description": "Gentelella Admin is a free to use Bootstrap admin template", | ||
141 | + "keywords": [ | ||
142 | + "admin", | ||
143 | + "backend", | ||
144 | + "bootstrap", | ||
145 | + "css", | ||
146 | + "html", | ||
147 | + "js", | ||
148 | + "responsive", | ||
149 | + "template", | ||
150 | + "theme" | ||
151 | + ] | ||
152 | + }, | ||
153 | + { | ||
154 | + "name": "bower-asset/icheck", | ||
155 | + "version": "1.0.2", | ||
156 | + "source": { | ||
157 | + "type": "git", | ||
158 | + "url": "https://github.com/fronteed/icheck.git", | ||
159 | + "reference": "8a6eb37bd7dab1e843c1b630c91c6398ff409d05" | ||
160 | + }, | ||
161 | + "dist": { | ||
162 | + "type": "zip", | ||
163 | + "url": "https://api.github.com/repos/fronteed/icheck/zipball/8a6eb37bd7dab1e843c1b630c91c6398ff409d05", | ||
164 | + "reference": "8a6eb37bd7dab1e843c1b630c91c6398ff409d05", | ||
165 | + "shasum": "" | ||
166 | + }, | ||
167 | + "require": { | ||
168 | + "bower-asset/jquery": ">=1.7" | ||
169 | + }, | ||
170 | + "type": "bower-asset-library", | ||
171 | + "extra": { | ||
172 | + "bower-asset-main": [ | ||
173 | + "./icheck.min.js" | ||
174 | + ], | ||
175 | + "bower-asset-ignore": [ | ||
176 | + ".gitignore", | ||
177 | + "CHANGELOG.md", | ||
178 | + "README.md", | ||
179 | + "demo/" | ||
180 | + ] | ||
181 | + }, | ||
182 | + "license": [ | ||
183 | + "MIT" | ||
184 | + ], | ||
185 | + "description": "Highly customizable checkboxes and radio buttons (jQuery & Zepto)", | ||
186 | + "keywords": [ | ||
187 | + "accessibility", | ||
188 | + "checkbox", | ||
189 | + "checked", | ||
190 | + "custom", | ||
191 | + "disabled", | ||
192 | + "field", | ||
193 | + "form", | ||
194 | + "icheck", | ||
195 | + "indeterminate", | ||
196 | + "input", | ||
197 | + "radio", | ||
198 | + "replacement", | ||
199 | + "skins", | ||
200 | + "ui" | ||
201 | + ] | ||
202 | + }, | ||
203 | + { | ||
60 | "name": "bower-asset/jquery", | 204 | "name": "bower-asset/jquery", |
61 | "version": "2.2.4", | 205 | "version": "2.2.4", |
62 | "source": { | 206 | "source": { |
@@ -264,21 +408,24 @@ | @@ -264,21 +408,24 @@ | ||
264 | }, | 408 | }, |
265 | { | 409 | { |
266 | "name": "ezyang/htmlpurifier", | 410 | "name": "ezyang/htmlpurifier", |
267 | - "version": "v4.8.0", | 411 | + "version": "v4.9.1", |
268 | "source": { | 412 | "source": { |
269 | "type": "git", | 413 | "type": "git", |
270 | "url": "https://github.com/ezyang/htmlpurifier.git", | 414 | "url": "https://github.com/ezyang/htmlpurifier.git", |
271 | - "reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2" | 415 | + "reference": "de82f9845f2a0f9f27abec67d6a4958427e6f5d6" |
272 | }, | 416 | }, |
273 | "dist": { | 417 | "dist": { |
274 | "type": "zip", | 418 | "type": "zip", |
275 | - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2", | ||
276 | - "reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2", | 419 | + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/de82f9845f2a0f9f27abec67d6a4958427e6f5d6", |
420 | + "reference": "de82f9845f2a0f9f27abec67d6a4958427e6f5d6", | ||
277 | "shasum": "" | 421 | "shasum": "" |
278 | }, | 422 | }, |
279 | "require": { | 423 | "require": { |
280 | "php": ">=5.2" | 424 | "php": ">=5.2" |
281 | }, | 425 | }, |
426 | + "require-dev": { | ||
427 | + "simpletest/simpletest": "^1.1" | ||
428 | + }, | ||
282 | "type": "library", | 429 | "type": "library", |
283 | "autoload": { | 430 | "autoload": { |
284 | "psr-0": { | 431 | "psr-0": { |
@@ -304,7 +451,127 @@ | @@ -304,7 +451,127 @@ | ||
304 | "keywords": [ | 451 | "keywords": [ |
305 | "html" | 452 | "html" |
306 | ], | 453 | ], |
307 | - "time": "2016-07-16 12:58:58" | 454 | + "time": "2017-03-08 08:22:36" |
455 | + }, | ||
456 | + { | ||
457 | + "name": "fortawesome/font-awesome", | ||
458 | + "version": "v4.7.0", | ||
459 | + "source": { | ||
460 | + "type": "git", | ||
461 | + "url": "https://github.com/FortAwesome/Font-Awesome.git", | ||
462 | + "reference": "a8386aae19e200ddb0f6845b5feeee5eb7013687" | ||
463 | + }, | ||
464 | + "dist": { | ||
465 | + "type": "zip", | ||
466 | + "url": "https://api.github.com/repos/FortAwesome/Font-Awesome/zipball/a8386aae19e200ddb0f6845b5feeee5eb7013687", | ||
467 | + "reference": "a8386aae19e200ddb0f6845b5feeee5eb7013687", | ||
468 | + "shasum": "" | ||
469 | + }, | ||
470 | + "require-dev": { | ||
471 | + "jekyll": "1.0.2", | ||
472 | + "lessc": "1.4.2" | ||
473 | + }, | ||
474 | + "type": "library", | ||
475 | + "extra": { | ||
476 | + "branch-alias": { | ||
477 | + "dev-master": "4.6.x-dev" | ||
478 | + } | ||
479 | + }, | ||
480 | + "notification-url": "https://packagist.org/downloads/", | ||
481 | + "license": [ | ||
482 | + "OFL-1.1", | ||
483 | + "MIT" | ||
484 | + ], | ||
485 | + "authors": [ | ||
486 | + { | ||
487 | + "name": "Dave Gandy", | ||
488 | + "email": "dave@fontawesome.io", | ||
489 | + "homepage": "http://twitter.com/davegandy", | ||
490 | + "role": "Developer" | ||
491 | + } | ||
492 | + ], | ||
493 | + "description": "The iconic font and CSS framework", | ||
494 | + "homepage": "http://fontawesome.io/", | ||
495 | + "keywords": [ | ||
496 | + "FontAwesome", | ||
497 | + "awesome", | ||
498 | + "bootstrap", | ||
499 | + "font", | ||
500 | + "icon" | ||
501 | + ], | ||
502 | + "time": "2016-10-24 15:52:54" | ||
503 | + }, | ||
504 | + { | ||
505 | + "name": "hiqdev/yii2-asset-icheck", | ||
506 | + "version": "1.0.2.5", | ||
507 | + "source": { | ||
508 | + "type": "git", | ||
509 | + "url": "https://github.com/hiqdev/yii2-asset-icheck.git", | ||
510 | + "reference": "9dc8ea8e854f27bcff59198f8815da80dd696d18" | ||
511 | + }, | ||
512 | + "dist": { | ||
513 | + "type": "zip", | ||
514 | + "url": "https://api.github.com/repos/hiqdev/yii2-asset-icheck/zipball/9dc8ea8e854f27bcff59198f8815da80dd696d18", | ||
515 | + "reference": "9dc8ea8e854f27bcff59198f8815da80dd696d18", | ||
516 | + "shasum": "" | ||
517 | + }, | ||
518 | + "require": { | ||
519 | + "bower-asset/icheck": "1.0.2", | ||
520 | + "yiisoft/yii2": "~2.0" | ||
521 | + }, | ||
522 | + "require-dev": { | ||
523 | + "hiqdev/composer-asset-plugin": "*@dev" | ||
524 | + }, | ||
525 | + "type": "yii2-extension", | ||
526 | + "extra": { | ||
527 | + "bower-dependencies": { | ||
528 | + "icheck": "1.0.2" | ||
529 | + } | ||
530 | + }, | ||
531 | + "autoload": { | ||
532 | + "psr-4": { | ||
533 | + "hiqdev\\assets\\icheck\\": "src" | ||
534 | + } | ||
535 | + }, | ||
536 | + "notification-url": "https://packagist.org/downloads/", | ||
537 | + "license": [ | ||
538 | + "BSD-3-Clause" | ||
539 | + ], | ||
540 | + "authors": [ | ||
541 | + { | ||
542 | + "name": "Dmitry Naumenko", | ||
543 | + "email": "silverfire@hiqdev.com", | ||
544 | + "homepage": "http://silverfire.me/", | ||
545 | + "role": "Lead backend developer" | ||
546 | + }, | ||
547 | + { | ||
548 | + "name": "Andrii Vasyliev", | ||
549 | + "email": "sol@hiqdev.com", | ||
550 | + "homepage": "http://hipanel.com/", | ||
551 | + "role": "Project lead" | ||
552 | + }, | ||
553 | + { | ||
554 | + "name": "Andrey Klochok", | ||
555 | + "email": "tafid@hiqdev.com", | ||
556 | + "homepage": "http://hiqdev.com/", | ||
557 | + "role": "Lead frontend developer" | ||
558 | + }, | ||
559 | + { | ||
560 | + "name": "Yuriy Myronchuk", | ||
561 | + "email": "bladeroot@hiqdev.com", | ||
562 | + "homepage": "http://hiqdev.com/", | ||
563 | + "role": "QA Lead" | ||
564 | + } | ||
565 | + ], | ||
566 | + "description": "Yii2 asset for bower iCheck", | ||
567 | + "homepage": "https://github.com/hiqdev/yii2-asset-icheck", | ||
568 | + "keywords": [ | ||
569 | + "asset", | ||
570 | + "extension", | ||
571 | + "iCheck", | ||
572 | + "yii2" | ||
573 | + ], | ||
574 | + "time": "2016-03-30 10:59:26" | ||
308 | }, | 575 | }, |
309 | { | 576 | { |
310 | "name": "insolita/yii2-migration-generator", | 577 | "name": "insolita/yii2-migration-generator", |
@@ -353,6 +620,58 @@ | @@ -353,6 +620,58 @@ | ||
353 | "time": "2017-02-03 01:23:24" | 620 | "time": "2017-02-03 01:23:24" |
354 | }, | 621 | }, |
355 | { | 622 | { |
623 | + "name": "rmrevin/yii2-fontawesome", | ||
624 | + "version": "2.17.1", | ||
625 | + "source": { | ||
626 | + "type": "git", | ||
627 | + "url": "https://github.com/rmrevin/yii2-fontawesome.git", | ||
628 | + "reference": "65ce306da864f4d558348aeba040ed7876878090" | ||
629 | + }, | ||
630 | + "dist": { | ||
631 | + "type": "zip", | ||
632 | + "url": "https://api.github.com/repos/rmrevin/yii2-fontawesome/zipball/65ce306da864f4d558348aeba040ed7876878090", | ||
633 | + "reference": "65ce306da864f4d558348aeba040ed7876878090", | ||
634 | + "shasum": "" | ||
635 | + }, | ||
636 | + "require": { | ||
637 | + "fortawesome/font-awesome": "~4.7", | ||
638 | + "php": ">=5.4.0", | ||
639 | + "yiisoft/yii2": "2.0.*" | ||
640 | + }, | ||
641 | + "type": "yii2-extension", | ||
642 | + "extra": { | ||
643 | + "asset-installer-paths": { | ||
644 | + "npm-asset-library": "vendor/npm", | ||
645 | + "bower-asset-library": "vendor/bower" | ||
646 | + } | ||
647 | + }, | ||
648 | + "autoload": { | ||
649 | + "psr-4": { | ||
650 | + "rmrevin\\yii\\fontawesome\\": "" | ||
651 | + } | ||
652 | + }, | ||
653 | + "notification-url": "https://packagist.org/downloads/", | ||
654 | + "license": [ | ||
655 | + "MIT" | ||
656 | + ], | ||
657 | + "authors": [ | ||
658 | + { | ||
659 | + "name": "Revin Roman", | ||
660 | + "email": "roman@rmrevin.com", | ||
661 | + "homepage": "https://rmrevin.com/" | ||
662 | + } | ||
663 | + ], | ||
664 | + "description": "Asset Bundle for Yii2 with Font Awesome", | ||
665 | + "keywords": [ | ||
666 | + "asset", | ||
667 | + "awesome", | ||
668 | + "bundle", | ||
669 | + "font", | ||
670 | + "yii" | ||
671 | + ], | ||
672 | + "time": "2017-01-11 14:05:47" | ||
673 | + }, | ||
674 | + { | ||
356 | "name": "swiftmailer/swiftmailer", | 675 | "name": "swiftmailer/swiftmailer", |
357 | "version": "v5.4.6", | 676 | "version": "v5.4.6", |
358 | "source": { | 677 | "source": { |
@@ -655,6 +974,64 @@ | @@ -655,6 +974,64 @@ | ||
655 | "yii2" | 974 | "yii2" |
656 | ], | 975 | ], |
657 | "time": "2016-09-09 11:48:11" | 976 | "time": "2016-09-09 11:48:11" |
977 | + }, | ||
978 | + { | ||
979 | + "name": "yiister/yii2-gentelella", | ||
980 | + "version": "1.2.0", | ||
981 | + "source": { | ||
982 | + "type": "git", | ||
983 | + "url": "https://github.com/yiister/yii2-gentelella.git", | ||
984 | + "reference": "a4b9b84ea928f3d3811910d7a372ba607293f630" | ||
985 | + }, | ||
986 | + "dist": { | ||
987 | + "type": "zip", | ||
988 | + "url": "https://api.github.com/repos/yiister/yii2-gentelella/zipball/a4b9b84ea928f3d3811910d7a372ba607293f630", | ||
989 | + "reference": "a4b9b84ea928f3d3811910d7a372ba607293f630", | ||
990 | + "shasum": "" | ||
991 | + }, | ||
992 | + "require": { | ||
993 | + "bower-asset/gentelella": "*", | ||
994 | + "php": ">=5.4.0", | ||
995 | + "rmrevin/yii2-fontawesome": "~2.0", | ||
996 | + "yiisoft/yii2": "~2.0.0", | ||
997 | + "yiisoft/yii2-bootstrap": "~2.0.0" | ||
998 | + }, | ||
999 | + "type": "yii2-extension", | ||
1000 | + "extra": { | ||
1001 | + "asset-installer-paths": { | ||
1002 | + "npm-asset-library": "vendor/npm", | ||
1003 | + "bower-asset-library": "vendor/bower" | ||
1004 | + } | ||
1005 | + }, | ||
1006 | + "autoload": { | ||
1007 | + "psr-4": { | ||
1008 | + "yiister\\gentelella\\": "" | ||
1009 | + } | ||
1010 | + }, | ||
1011 | + "notification-url": "https://packagist.org/downloads/", | ||
1012 | + "license": [ | ||
1013 | + "MIT" | ||
1014 | + ], | ||
1015 | + "authors": [ | ||
1016 | + { | ||
1017 | + "name": "Pavel Fedotov", | ||
1018 | + "email": "fps.06@mail.ru", | ||
1019 | + "homepage": "https://github.com/fps01", | ||
1020 | + "role": "Creator" | ||
1021 | + } | ||
1022 | + ], | ||
1023 | + "description": "Free admin template for backend", | ||
1024 | + "keywords": [ | ||
1025 | + "admin", | ||
1026 | + "asset", | ||
1027 | + "backend", | ||
1028 | + "bootsprap3", | ||
1029 | + "extension", | ||
1030 | + "gentelella", | ||
1031 | + "theme", | ||
1032 | + "yii2" | ||
1033 | + ], | ||
1034 | + "time": "2016-08-01 03:18:02" | ||
658 | } | 1035 | } |
659 | ], | 1036 | ], |
660 | "packages-dev": [ | 1037 | "packages-dev": [ |
@@ -2328,16 +2705,16 @@ | @@ -2328,16 +2705,16 @@ | ||
2328 | }, | 2705 | }, |
2329 | { | 2706 | { |
2330 | "name": "symfony/browser-kit", | 2707 | "name": "symfony/browser-kit", |
2331 | - "version": "v3.2.4", | 2708 | + "version": "v3.2.5", |
2332 | "source": { | 2709 | "source": { |
2333 | "type": "git", | 2710 | "type": "git", |
2334 | "url": "https://github.com/symfony/browser-kit.git", | 2711 | "url": "https://github.com/symfony/browser-kit.git", |
2335 | - "reference": "394a2475a3a89089353fde5714a7f402fbb83880" | 2712 | + "reference": "2fe0caa60c1a1dfeefd0425741182687a9b382b8" |
2336 | }, | 2713 | }, |
2337 | "dist": { | 2714 | "dist": { |
2338 | "type": "zip", | 2715 | "type": "zip", |
2339 | - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/394a2475a3a89089353fde5714a7f402fbb83880", | ||
2340 | - "reference": "394a2475a3a89089353fde5714a7f402fbb83880", | 2716 | + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/2fe0caa60c1a1dfeefd0425741182687a9b382b8", |
2717 | + "reference": "2fe0caa60c1a1dfeefd0425741182687a9b382b8", | ||
2341 | "shasum": "" | 2718 | "shasum": "" |
2342 | }, | 2719 | }, |
2343 | "require": { | 2720 | "require": { |
@@ -2381,20 +2758,20 @@ | @@ -2381,20 +2758,20 @@ | ||
2381 | ], | 2758 | ], |
2382 | "description": "Symfony BrowserKit Component", | 2759 | "description": "Symfony BrowserKit Component", |
2383 | "homepage": "https://symfony.com", | 2760 | "homepage": "https://symfony.com", |
2384 | - "time": "2017-01-31 21:49:23" | 2761 | + "time": "2017-02-21 09:12:04" |
2385 | }, | 2762 | }, |
2386 | { | 2763 | { |
2387 | "name": "symfony/console", | 2764 | "name": "symfony/console", |
2388 | - "version": "v3.2.4", | 2765 | + "version": "v3.2.5", |
2389 | "source": { | 2766 | "source": { |
2390 | "type": "git", | 2767 | "type": "git", |
2391 | "url": "https://github.com/symfony/console.git", | 2768 | "url": "https://github.com/symfony/console.git", |
2392 | - "reference": "0e5e6899f82230fcb1153bcaf0e106ffaa44b870" | 2769 | + "reference": "28fb243a2b5727774ca309ec2d92da240f1af0dd" |
2393 | }, | 2770 | }, |
2394 | "dist": { | 2771 | "dist": { |
2395 | "type": "zip", | 2772 | "type": "zip", |
2396 | - "url": "https://api.github.com/repos/symfony/console/zipball/0e5e6899f82230fcb1153bcaf0e106ffaa44b870", | ||
2397 | - "reference": "0e5e6899f82230fcb1153bcaf0e106ffaa44b870", | 2773 | + "url": "https://api.github.com/repos/symfony/console/zipball/28fb243a2b5727774ca309ec2d92da240f1af0dd", |
2774 | + "reference": "28fb243a2b5727774ca309ec2d92da240f1af0dd", | ||
2398 | "shasum": "" | 2775 | "shasum": "" |
2399 | }, | 2776 | }, |
2400 | "require": { | 2777 | "require": { |
@@ -2444,20 +2821,20 @@ | @@ -2444,20 +2821,20 @@ | ||
2444 | ], | 2821 | ], |
2445 | "description": "Symfony Console Component", | 2822 | "description": "Symfony Console Component", |
2446 | "homepage": "https://symfony.com", | 2823 | "homepage": "https://symfony.com", |
2447 | - "time": "2017-02-16 14:07:22" | 2824 | + "time": "2017-03-06 19:30:27" |
2448 | }, | 2825 | }, |
2449 | { | 2826 | { |
2450 | "name": "symfony/css-selector", | 2827 | "name": "symfony/css-selector", |
2451 | - "version": "v3.2.4", | 2828 | + "version": "v3.2.5", |
2452 | "source": { | 2829 | "source": { |
2453 | "type": "git", | 2830 | "type": "git", |
2454 | "url": "https://github.com/symfony/css-selector.git", | 2831 | "url": "https://github.com/symfony/css-selector.git", |
2455 | - "reference": "f0e628f04fc055c934b3211cfabdb1c59eefbfaa" | 2832 | + "reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c" |
2456 | }, | 2833 | }, |
2457 | "dist": { | 2834 | "dist": { |
2458 | "type": "zip", | 2835 | "type": "zip", |
2459 | - "url": "https://api.github.com/repos/symfony/css-selector/zipball/f0e628f04fc055c934b3211cfabdb1c59eefbfaa", | ||
2460 | - "reference": "f0e628f04fc055c934b3211cfabdb1c59eefbfaa", | 2836 | + "url": "https://api.github.com/repos/symfony/css-selector/zipball/a48f13dc83c168f1253a5d2a5a4fb46c36244c4c", |
2837 | + "reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c", | ||
2461 | "shasum": "" | 2838 | "shasum": "" |
2462 | }, | 2839 | }, |
2463 | "require": { | 2840 | "require": { |
@@ -2497,20 +2874,20 @@ | @@ -2497,20 +2874,20 @@ | ||
2497 | ], | 2874 | ], |
2498 | "description": "Symfony CssSelector Component", | 2875 | "description": "Symfony CssSelector Component", |
2499 | "homepage": "https://symfony.com", | 2876 | "homepage": "https://symfony.com", |
2500 | - "time": "2017-01-02 20:32:22" | 2877 | + "time": "2017-02-21 09:12:04" |
2501 | }, | 2878 | }, |
2502 | { | 2879 | { |
2503 | "name": "symfony/debug", | 2880 | "name": "symfony/debug", |
2504 | - "version": "v3.2.4", | 2881 | + "version": "v3.2.5", |
2505 | "source": { | 2882 | "source": { |
2506 | "type": "git", | 2883 | "type": "git", |
2507 | "url": "https://github.com/symfony/debug.git", | 2884 | "url": "https://github.com/symfony/debug.git", |
2508 | - "reference": "9b98854cb45bc59d100b7d4cc4cf9e05f21026b9" | 2885 | + "reference": "b90c9f91ad8ac37d9f114e369042d3226b34dc1a" |
2509 | }, | 2886 | }, |
2510 | "dist": { | 2887 | "dist": { |
2511 | "type": "zip", | 2888 | "type": "zip", |
2512 | - "url": "https://api.github.com/repos/symfony/debug/zipball/9b98854cb45bc59d100b7d4cc4cf9e05f21026b9", | ||
2513 | - "reference": "9b98854cb45bc59d100b7d4cc4cf9e05f21026b9", | 2889 | + "url": "https://api.github.com/repos/symfony/debug/zipball/b90c9f91ad8ac37d9f114e369042d3226b34dc1a", |
2890 | + "reference": "b90c9f91ad8ac37d9f114e369042d3226b34dc1a", | ||
2514 | "shasum": "" | 2891 | "shasum": "" |
2515 | }, | 2892 | }, |
2516 | "require": { | 2893 | "require": { |
@@ -2554,20 +2931,20 @@ | @@ -2554,20 +2931,20 @@ | ||
2554 | ], | 2931 | ], |
2555 | "description": "Symfony Debug Component", | 2932 | "description": "Symfony Debug Component", |
2556 | "homepage": "https://symfony.com", | 2933 | "homepage": "https://symfony.com", |
2557 | - "time": "2017-02-16 16:34:18" | 2934 | + "time": "2017-02-18 17:28:00" |
2558 | }, | 2935 | }, |
2559 | { | 2936 | { |
2560 | "name": "symfony/dom-crawler", | 2937 | "name": "symfony/dom-crawler", |
2561 | - "version": "v3.2.4", | 2938 | + "version": "v3.2.5", |
2562 | "source": { | 2939 | "source": { |
2563 | "type": "git", | 2940 | "type": "git", |
2564 | "url": "https://github.com/symfony/dom-crawler.git", | 2941 | "url": "https://github.com/symfony/dom-crawler.git", |
2565 | - "reference": "b814b41373fc4e535aff8c765abe39545216f391" | 2942 | + "reference": "403944e294cf4ceb3b8447f54cbad88ea7b99cee" |
2566 | }, | 2943 | }, |
2567 | "dist": { | 2944 | "dist": { |
2568 | "type": "zip", | 2945 | "type": "zip", |
2569 | - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/b814b41373fc4e535aff8c765abe39545216f391", | ||
2570 | - "reference": "b814b41373fc4e535aff8c765abe39545216f391", | 2946 | + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/403944e294cf4ceb3b8447f54cbad88ea7b99cee", |
2947 | + "reference": "403944e294cf4ceb3b8447f54cbad88ea7b99cee", | ||
2571 | "shasum": "" | 2948 | "shasum": "" |
2572 | }, | 2949 | }, |
2573 | "require": { | 2950 | "require": { |
@@ -2610,20 +2987,20 @@ | @@ -2610,20 +2987,20 @@ | ||
2610 | ], | 2987 | ], |
2611 | "description": "Symfony DomCrawler Component", | 2988 | "description": "Symfony DomCrawler Component", |
2612 | "homepage": "https://symfony.com", | 2989 | "homepage": "https://symfony.com", |
2613 | - "time": "2017-01-21 17:14:11" | 2990 | + "time": "2017-02-21 09:12:04" |
2614 | }, | 2991 | }, |
2615 | { | 2992 | { |
2616 | "name": "symfony/event-dispatcher", | 2993 | "name": "symfony/event-dispatcher", |
2617 | - "version": "v3.2.4", | 2994 | + "version": "v3.2.5", |
2618 | "source": { | 2995 | "source": { |
2619 | "type": "git", | 2996 | "type": "git", |
2620 | "url": "https://github.com/symfony/event-dispatcher.git", | 2997 | "url": "https://github.com/symfony/event-dispatcher.git", |
2621 | - "reference": "9137eb3a3328e413212826d63eeeb0217836e2b6" | 2998 | + "reference": "b7a1b9e0a0f623ce43b4c8d775eb138f190c9d8d" |
2622 | }, | 2999 | }, |
2623 | "dist": { | 3000 | "dist": { |
2624 | "type": "zip", | 3001 | "type": "zip", |
2625 | - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9137eb3a3328e413212826d63eeeb0217836e2b6", | ||
2626 | - "reference": "9137eb3a3328e413212826d63eeeb0217836e2b6", | 3002 | + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b7a1b9e0a0f623ce43b4c8d775eb138f190c9d8d", |
3003 | + "reference": "b7a1b9e0a0f623ce43b4c8d775eb138f190c9d8d", | ||
2627 | "shasum": "" | 3004 | "shasum": "" |
2628 | }, | 3005 | }, |
2629 | "require": { | 3006 | "require": { |
@@ -2670,20 +3047,20 @@ | @@ -2670,20 +3047,20 @@ | ||
2670 | ], | 3047 | ], |
2671 | "description": "Symfony EventDispatcher Component", | 3048 | "description": "Symfony EventDispatcher Component", |
2672 | "homepage": "https://symfony.com", | 3049 | "homepage": "https://symfony.com", |
2673 | - "time": "2017-01-02 20:32:22" | 3050 | + "time": "2017-02-21 09:12:04" |
2674 | }, | 3051 | }, |
2675 | { | 3052 | { |
2676 | "name": "symfony/finder", | 3053 | "name": "symfony/finder", |
2677 | - "version": "v3.2.4", | 3054 | + "version": "v3.2.5", |
2678 | "source": { | 3055 | "source": { |
2679 | "type": "git", | 3056 | "type": "git", |
2680 | "url": "https://github.com/symfony/finder.git", | 3057 | "url": "https://github.com/symfony/finder.git", |
2681 | - "reference": "8c71141cae8e2957946b403cc71a67213c0380d6" | 3058 | + "reference": "92d7476d2df60cd851a3e13e078664b1deb8ce10" |
2682 | }, | 3059 | }, |
2683 | "dist": { | 3060 | "dist": { |
2684 | "type": "zip", | 3061 | "type": "zip", |
2685 | - "url": "https://api.github.com/repos/symfony/finder/zipball/8c71141cae8e2957946b403cc71a67213c0380d6", | ||
2686 | - "reference": "8c71141cae8e2957946b403cc71a67213c0380d6", | 3062 | + "url": "https://api.github.com/repos/symfony/finder/zipball/92d7476d2df60cd851a3e13e078664b1deb8ce10", |
3063 | + "reference": "92d7476d2df60cd851a3e13e078664b1deb8ce10", | ||
2687 | "shasum": "" | 3064 | "shasum": "" |
2688 | }, | 3065 | }, |
2689 | "require": { | 3066 | "require": { |
@@ -2719,7 +3096,7 @@ | @@ -2719,7 +3096,7 @@ | ||
2719 | ], | 3096 | ], |
2720 | "description": "Symfony Finder Component", | 3097 | "description": "Symfony Finder Component", |
2721 | "homepage": "https://symfony.com", | 3098 | "homepage": "https://symfony.com", |
2722 | - "time": "2017-01-02 20:32:22" | 3099 | + "time": "2017-02-21 09:12:04" |
2723 | }, | 3100 | }, |
2724 | { | 3101 | { |
2725 | "name": "symfony/polyfill-mbstring", | 3102 | "name": "symfony/polyfill-mbstring", |
@@ -2782,16 +3159,16 @@ | @@ -2782,16 +3159,16 @@ | ||
2782 | }, | 3159 | }, |
2783 | { | 3160 | { |
2784 | "name": "symfony/yaml", | 3161 | "name": "symfony/yaml", |
2785 | - "version": "v3.2.4", | 3162 | + "version": "v3.2.5", |
2786 | "source": { | 3163 | "source": { |
2787 | "type": "git", | 3164 | "type": "git", |
2788 | "url": "https://github.com/symfony/yaml.git", | 3165 | "url": "https://github.com/symfony/yaml.git", |
2789 | - "reference": "9724c684646fcb5387d579b4bfaa63ee0b0c64c8" | 3166 | + "reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a" |
2790 | }, | 3167 | }, |
2791 | "dist": { | 3168 | "dist": { |
2792 | "type": "zip", | 3169 | "type": "zip", |
2793 | - "url": "https://api.github.com/repos/symfony/yaml/zipball/9724c684646fcb5387d579b4bfaa63ee0b0c64c8", | ||
2794 | - "reference": "9724c684646fcb5387d579b4bfaa63ee0b0c64c8", | 3170 | + "url": "https://api.github.com/repos/symfony/yaml/zipball/093e416ad096355149e265ea2e4cc1f9ee40ab1a", |
3171 | + "reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a", | ||
2795 | "shasum": "" | 3172 | "shasum": "" |
2796 | }, | 3173 | }, |
2797 | "require": { | 3174 | "require": { |
@@ -2833,7 +3210,7 @@ | @@ -2833,7 +3210,7 @@ | ||
2833 | ], | 3210 | ], |
2834 | "description": "Symfony Yaml Component", | 3211 | "description": "Symfony Yaml Component", |
2835 | "homepage": "https://symfony.com", | 3212 | "homepage": "https://symfony.com", |
2836 | - "time": "2017-02-16 22:46:52" | 3213 | + "time": "2017-03-07 16:47:02" |
2837 | }, | 3214 | }, |
2838 | { | 3215 | { |
2839 | "name": "webmozart/assert", | 3216 | "name": "webmozart/assert", |
1 | +<?php | ||
2 | + namespace console\controllers; | ||
3 | + | ||
4 | + use common\models\User; | ||
5 | + use yii\console\Controller; | ||
6 | + use yii\helpers\Console; | ||
7 | + | ||
8 | + /** | ||
9 | + * Class CreateController | ||
10 | + * | ||
11 | + * @package console\controllers | ||
12 | + */ | ||
13 | + class CreateController extends Controller | ||
14 | + { | ||
15 | + public function actionUser() | ||
16 | + { | ||
17 | + $user = new User(); | ||
18 | + $user->username = 'admin'; | ||
19 | + $user->email = 'admin@example.com'; | ||
20 | + $user->setPassword('admin321'); | ||
21 | + $user->generateAuthKey(); | ||
22 | + | ||
23 | + if ($user->save()) { | ||
24 | + $this->stdout('User created' . "\n", Console::FG_GREEN); | ||
25 | + } else { | ||
26 | + $this->stdout('Error!' . "\n", Console::FG_RED); | ||
27 | + } | ||
28 | + } | ||
29 | + } | ||
0 | \ No newline at end of file | 30 | \ No newline at end of file |
frontend/config/main.php
@@ -8,12 +8,14 @@ $params = array_merge( | @@ -8,12 +8,14 @@ $params = array_merge( | ||
8 | 8 | ||
9 | return [ | 9 | return [ |
10 | 'id' => 'app-frontend', | 10 | 'id' => 'app-frontend', |
11 | + 'homeUrl' => '/', | ||
11 | 'basePath' => dirname(__DIR__), | 12 | 'basePath' => dirname(__DIR__), |
12 | 'bootstrap' => ['log'], | 13 | 'bootstrap' => ['log'], |
13 | 'controllerNamespace' => 'frontend\controllers', | 14 | 'controllerNamespace' => 'frontend\controllers', |
14 | 'components' => [ | 15 | 'components' => [ |
15 | 'request' => [ | 16 | 'request' => [ |
16 | 'csrfParam' => '_csrf-frontend', | 17 | 'csrfParam' => '_csrf-frontend', |
18 | + 'baseUrl' => '', | ||
17 | ], | 19 | ], |
18 | 'user' => [ | 20 | 'user' => [ |
19 | 'identityClass' => 'common\models\User', | 21 | 'identityClass' => 'common\models\User', |
@@ -36,14 +38,12 @@ return [ | @@ -36,14 +38,12 @@ return [ | ||
36 | 'errorHandler' => [ | 38 | 'errorHandler' => [ |
37 | 'errorAction' => 'site/error', | 39 | 'errorAction' => 'site/error', |
38 | ], | 40 | ], |
39 | - /* | ||
40 | 'urlManager' => [ | 41 | 'urlManager' => [ |
41 | 'enablePrettyUrl' => true, | 42 | 'enablePrettyUrl' => true, |
42 | 'showScriptName' => false, | 43 | 'showScriptName' => false, |
43 | 'rules' => [ | 44 | 'rules' => [ |
44 | ], | 45 | ], |
45 | ], | 46 | ], |
46 | - */ | ||
47 | ], | 47 | ], |
48 | 'params' => $params, | 48 | 'params' => $params, |
49 | ]; | 49 | ]; |