Commit fd14e3ba7fdb6a4557947902cfad3239a172dc8b

Authored by Alexey Boroda
2 parents 8ee5e622 ebcbe93b

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	composer.lock
backend/views/layouts/main.php
1 1 <?php
2 2  
3 3 /**
4   - * @var string $content
  4 + * @var string $content
5 5 * @var \yii\web\View $this
6 6 */
7 7  
8   - use artweb\artbox\core\widgets\FleshWidget;
9   - use hiqdev\assets\pnotify\PNotifyAsset;
  8 + use artweb\artbox\core\models\User;
10 9 use yii\helpers\Html;
11 10 use yii\web\View;
12 11  
13 12 $bundle = yiister\gentelella\assets\Asset::register($this);
14   -
  13 + /**
  14 + * @var User $user
  15 + */
  16 + $user = \Yii::$app->user->identity;
15 17 ?>
16 18 <?php $this->beginPage(); ?>
17 19 <!DOCTYPE html>
18 20 <html lang="<?= Yii::$app->language ?>">
19   -<head>
20   - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
21   - <meta charset="<?= Yii::$app->charset ?>" />
22   - <meta http-equiv="X-UA-Compatible" content="IE=edge" />
23   - <meta name="viewport" content="width=device-width, initial-scale=1" />
24   - <?= Html::csrfMetaTags() ?>
25   - <title><?= Html::encode($this->title) ?></title>
26   - <?php $this->head() ?>
27   - <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
28   - <!--[if lt IE 9]>
29   - <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
30   - <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
31   - <![endif]-->
32   -</head>
33   -<body class="nav-md">
34   -<?php $this->beginBody(); ?>
35   -<div class="container body">
36   -
37   - <div class="main_container">
38   -
39   - <div class="col-md-3 left_col">
40   - <div class="left_col scroll-view">
41   -
42   - <div class="navbar nav_title" style="border: 0;">
43   - <a href="/" class="site_title"><i class="fa fa-paw"></i> <span>Gentellela Alela!</span></a>
44   - </div>
45   - <div class="clearfix"></div>
46   -
47   - <!-- menu prile quick info -->
48   - <div class="profile">
49   - <div class="profile_pic">
50   - <img src="http://placehold.it/128x128" alt="..." class="img-circle profile_img">
51   - </div>
52   - <div class="profile_info">
53   - <span>Welcome,</span>
54   - <h2>John Doe</h2>
55   - </div>
56   - </div>
57   - <!-- /menu prile quick info -->
58   -
59   - <br />
60   -
61   - <!-- sidebar menu -->
62   - <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
63   -
64   - <div class="menu_section">
65   - <h3>General</h3>
66   - <?=
67   - \yiister\gentelella\widgets\Menu::widget(
68   - [
69   - "items" => [
70   - ["label" => "Home", "url" => "/", "icon" => "home"],
71   - ["label" => "Layout", "url" => ["site/layout"], "icon" => "files-o"],
72   - ["label" => "Error page", "url" => ["site/error-page"], "icon" => "close"],
73   - [
74   - "label" => "Widgets",
75   - "icon" => "th",
76   - "url" => "#",
77   - "items" => [
78   - ["label" => "Menu", "url" => ["site/menu"]],
79   - ["label" => "Panel", "url" => ["site/panel"]],
80   - ],
81   - ],
82   - [
83   - "label" => "Badges",
84   - "url" => "#",
85   - "icon" => "table",
86   - "items" => [
87   - [
88   - "label" => "Default",
89   - "url" => "#",
90   - "badge" => "123",
91   - ],
92   - [
93   - "label" => "Success",
94   - "url" => "#",
95   - "badge" => "new",
96   - "badgeOptions" => ["class" => "label-success"],
97   - ],
98   - [
99   - "label" => "Danger",
100   - "url" => "#",
101   - "badge" => "!",
102   - "badgeOptions" => ["class" => "label-danger"],
103   - ],
104   - ],
105   - ],
106   - [
107   - "label" => "Multilevel",
108   - "url" => "#",
109   - "icon" => "table",
110   - "items" => [
111   - [
112   - "label" => "Second level 1",
113   - "url" => "#",
114   - ],
115   - [
116   - "label" => "Second level 2",
117   - "url" => "#",
118   - "items" => [
119   - [
120   - "label" => "Third level 1",
121   - "url" => "#",
122   - ],
123   - [
124   - "label" => "Third level 2",
125   - "url" => "#",
126   - ],
127   - ],
128   - ],
129   - ],
130   - ],
131   - ],
132   - ]
133   - )
134   - ?>
135   - </div>
136   -
137   - </div>
138   - <!-- /sidebar menu -->
139   -
140   - </div>
141   - </div>
142   -
143   - <!-- top navigation -->
144   - <div class="top_nav">
145   -
146   - <div class="nav_menu">
147   - <nav class="" role="navigation">
148   - <div class="nav toggle">
149   - <a id="menu_toggle"><i class="fa fa-bars"></i></a>
150   - </div>
151   -
152   - <ul class="nav navbar-nav navbar-right">
153   - <li class="">
154   - <a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
155   - <img src="http://placehold.it/128x128" alt=""><?=Yii::$app->user->identity->username?>
156   - <span class=" fa fa-angle-down"></span>
157   - </a>
158   - <ul class="dropdown-menu dropdown-usermenu pull-right">
159   - <li>
160   - <a href="#"><i class="fa fa-user pull-right"></i> Profile</a>
161   - </li>
162   - <li>
163   - <?= Html::a(
164   - Html::tag('i', '', [ 'class' => 'fa fa-cogs pull-right' ]) . ' Settings',
165   - [ '/settings' ]
166   - ) ?>
167   - </li>
168   - <li>
169   - <?= Html::a(
170   - Html::tag('i', '', [ 'class' => 'fa fa-sign-out pull-right' ]) . ' Log out',
171   - [ '/site/logout' ],
172   - [
173   - 'data-method' => 'POST',
174   - ]
175   - ) ?>
176   - </li>
177   - </ul>
178   - </li>
  21 + <head>
  22 + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  23 + <meta charset="<?= Yii::$app->charset ?>"/>
  24 + <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  25 + <meta name="viewport" content="width=device-width, initial-scale=1"/>
  26 + <?= Html::csrfMetaTags() ?>
  27 + <title><?= Html::encode($this->title) ?></title>
  28 + <?php $this->head() ?>
  29 + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  30 + <!--[if lt IE 9]>
  31 + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  32 + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  33 + <![endif]-->
  34 + </head>
  35 + <body class="nav-md">
  36 + <?php $this->beginBody(); ?>
  37 + <div class="container body">
179 38  
180   - </ul>
181   - </nav>
182   - </div>
183   -
184   - </div>
185   - <!-- /top navigation -->
186   -
187   - <!-- page content -->
188   - <div class="right_col" role="main">
189   - <?php if (isset($this->params['h1'])): ?>
190   - <div class="page-title">
191   - <div class="title_left">
192   - <h1><?= $this->params['h1'] ?></h1>
193   - </div>
194   - <div class="title_right">
195   - <div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search">
196   - <div class="input-group">
197   - <input type="text" class="form-control" placeholder="Search for...">
198   - <span class="input-group-btn">
  39 + <div class="main_container">
  40 +
  41 + <div class="col-md-3 left_col">
  42 + <div class="left_col scroll-view">
  43 +
  44 + <div class="navbar nav_title" style="border: 0;">
  45 + <a href="/" class="site_title"><i class="fa fa-rocket"></i> <span>Artbox!</span></a>
  46 + </div>
  47 + <div class="clearfix"></div>
  48 +
  49 + <!-- menu prile quick info -->
  50 + <div class="profile">
  51 + <div class="profile_pic">
  52 + <img src="http://placehold.it/128x128" alt="..." class="img-circle profile_img">
  53 + </div>
  54 + <div class="profile_info">
  55 + <span>Welcome,</span>
  56 + <h2>John Doe</h2>
  57 + </div>
  58 + </div>
  59 + <!-- /menu prile quick info -->
  60 +
  61 + <br/>
  62 +
  63 + <!-- sidebar menu -->
  64 + <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
  65 +
  66 + <div class="menu_section">
  67 + <h3>General</h3>
  68 + <?= \yiister\gentelella\widgets\Menu::widget(
  69 + [
  70 + "items" => [
  71 + [
  72 + "label" => "Home",
  73 + "url" => "/",
  74 + "icon" => "home",
  75 + ],
  76 + [
  77 + "label" => "Layout",
  78 + "url" => [ "site/layout" ],
  79 + "icon" => "files-o",
  80 + ],
  81 + [
  82 + "label" => "Error page",
  83 + "url" => [ "site/error-page" ],
  84 + "icon" => "close",
  85 + ],
  86 + [
  87 + "label" => "Widgets",
  88 + "icon" => "th",
  89 + "url" => "#",
  90 + "items" => [
  91 + [
  92 + "label" => "Menu",
  93 + "url" => [ "site/menu" ],
  94 + ],
  95 + [
  96 + "label" => "Panel",
  97 + "url" => [ "site/panel" ],
  98 + ],
  99 + ],
  100 + ],
  101 + [
  102 + "label" => "Badges",
  103 + "url" => "#",
  104 + "icon" => "table",
  105 + "items" => [
  106 + [
  107 + "label" => "Default",
  108 + "url" => "#",
  109 + "badge" => "123",
  110 + ],
  111 + [
  112 + "label" => "Success",
  113 + "url" => "#",
  114 + "badge" => "new",
  115 + "badgeOptions" => [ "class" => "label-success" ],
  116 + ],
  117 + [
  118 + "label" => "Danger",
  119 + "url" => "#",
  120 + "badge" => "!",
  121 + "badgeOptions" => [ "class" => "label-danger" ],
  122 + ],
  123 + ],
  124 + ],
  125 + [
  126 + "label" => "Multilevel",
  127 + "url" => "#",
  128 + "icon" => "table",
  129 + "items" => [
  130 + [
  131 + "label" => "Second level 1",
  132 + "url" => "#",
  133 + ],
  134 + [
  135 + "label" => "Second level 2",
  136 + "url" => "#",
  137 + "items" => [
  138 + [
  139 + "label" => "Third level 1",
  140 + "url" => "#",
  141 + ],
  142 + [
  143 + "label" => "Third level 2",
  144 + "url" => "#",
  145 + ],
  146 + ],
  147 + ],
  148 + ],
  149 + ],
  150 + ],
  151 + ]
  152 + ) ?>
  153 + </div>
  154 +
  155 + </div>
  156 + <!-- /sidebar menu -->
  157 +
  158 + </div>
  159 + </div>
  160 +
  161 + <!-- top navigation -->
  162 + <div class="top_nav">
  163 +
  164 + <div class="nav_menu">
  165 + <nav class="" role="navigation">
  166 + <div class="nav toggle">
  167 + <a id="menu_toggle"><i class="fa fa-bars"></i></a>
  168 + </div>
  169 +
  170 + <ul class="nav navbar-nav navbar-right">
  171 + <li class="">
  172 + <a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
  173 + <img src="http://placehold.it/128x128" alt=""><?= Yii::$app->user->identity->username ?>
  174 + <span class=" fa fa-angle-down"></span>
  175 + </a>
  176 + <ul class="dropdown-menu dropdown-usermenu pull-right">
  177 + <li>
  178 + <a href="#"><i class="fa fa-user pull-right"></i> Profile</a>
  179 + </li>
  180 + <li>
  181 + <?= Html::a(
  182 + Html::tag(
  183 + 'i',
  184 + '',
  185 + [ 'class' => 'fa fa-cogs pull-right' ]
  186 + ) . ' Settings',
  187 + [ '/settings' ]
  188 + ) ?>
  189 + </li>
  190 + <li>
  191 + <?= Html::a(
  192 + Html::tag(
  193 + 'i',
  194 + '',
  195 + [ 'class' => 'fa fa-sign-out pull-right' ]
  196 + ) . ' Log out',
  197 + [ '/site/logout' ],
  198 + [
  199 + 'data-method' => 'POST',
  200 + ]
  201 + ) ?>
  202 + </li>
  203 + </ul>
  204 + </li>
  205 +
  206 + </ul>
  207 + </nav>
  208 + </div>
  209 +
  210 + </div>
  211 + <!-- /top navigation -->
  212 +
  213 + <!-- page content -->
  214 + <div class="right_col" role="main">
  215 + <?php if (isset( $this->params[ 'h1' ] )): ?>
  216 + <div class="page-title">
  217 + <div class="title_left">
  218 + <h1><?= $this->params[ 'h1' ] ?></h1>
  219 + </div>
  220 + <div class="title_right">
  221 + <div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search">
  222 + <div class="input-group">
  223 + <input type="text" class="form-control" placeholder="Search for...">
  224 + <span class="input-group-btn">
199 225 <button class="btn btn-default" type="button">Go!</button>
200 226 </span>
  227 + </div>
  228 + </div>
  229 + </div>
  230 + </div>
  231 + <?php endif; ?>
  232 + <div class="clearfix"></div>
  233 +
  234 + <?= $content ?>
201 235 </div>
202   - </div>
  236 + <!-- /page content -->
  237 + <!-- footer content -->
  238 + <footer>
  239 +
  240 + </footer>
  241 + <!-- /footer content -->
203 242 </div>
204   - </div>
205   - <?php endif; ?>
206   - <div class="clearfix"></div>
207 243  
208   - <?= $content ?>
209   - </div>
210   - <!-- /page content -->
211   - <!-- footer content -->
212   - <footer>
213   - <div class="pull-right">
214   - Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com" rel="nofollow" target="_blank">Colorlib</a><br />
215   - Extension for Yii framework 2 by <a href="http://yiister.ru" rel="nofollow" target="_blank">Yiister</a>
216   - </div>
217   - <div class="clearfix"></div>
218   - </footer>
219   - <!-- /footer content -->
220   - </div>
221   -
222   -</div>
223   -
224   -<?=FleshWidget::widget();?>
225   -<!-- /footer content -->
226   -<?php $this->endBody(); ?>
227   -</body>
  244 + </div>
  245 +
  246 + <div id="custom_notifications" class="custom-notifications dsp_none">
  247 + <ul class="list-unstyled notifications clearfix" data-tabbed_notifications="notif-group">
  248 + </ul>
  249 + <div class="clearfix"></div>
  250 + <div id="notif-group" class="tabbed_notifications"></div>
  251 + </div>
  252 + <!-- /footer content -->
  253 + <?php $this->endBody(); ?>
  254 + </body>
228 255 </html>
229 256 <?php $this->endPage(); ?>
... ...
backend/views/site/index.php
1 1 <?php
2   -
3   -/* @var $this yii\web\View */
4   -
5   -$this->title = 'My Yii Application';
  2 +
  3 + /* @var $this yii\web\View */
  4 +
  5 + use artweb\artbox\gentelella\widgets\XPanel;
  6 + use yii\bootstrap\Carousel;
  7 + use yii\bootstrap\Collapse;
  8 +
  9 + $this->title = 'My Yii Application';
  10 +?>
  11 +<?php
  12 + $panel = XPanel::begin(
  13 + [
  14 + 'title' => 'Test',
  15 + 'toolbarLayout' => '{close}{collapse}',
  16 + ]
  17 + );
  18 + echo "Velox nuclear vexatum iaceres ducunt ad eleates.";
  19 + $panel::end();
6 20 ?>
7 21 <div class="site-index">
8   -
9   - <div class="jumbotron">
10   - <h1>Congratulations!</h1>
11   -
12   - <p class="lead">You have successfully created your Yii-powered application.</p>
13   -
14   - <p><a class="btn btn-lg btn-success" href="http://www.yiiframework.com">Get started with Yii</a></p>
15   - </div>
16   -
17   - <div class="body-content">
18   -
19   - <div class="row">
20   - <div class="col-lg-4">
21   - <h2>Heading</h2>
22   -
23   - <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
24   - dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
25   - ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
26   - fugiat nulla pariatur.</p>
27   -
28   - <p><a class="btn btn-default" href="http://www.yiiframework.com/doc/">Yii Documentation &raquo;</a></p>
29   - </div>
30   - <div class="col-lg-4">
31   - <h2>Heading</h2>
32   -
33   - <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
34   - dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
35   - ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
36   - fugiat nulla pariatur.</p>
37   -
38   - <p><a class="btn btn-default" href="http://www.yiiframework.com/forum/">Yii Forum &raquo;</a></p>
39   - </div>
40   - <div class="col-lg-4">
41   - <h2>Heading</h2>
42   -
43   - <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
44   - dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
45   - ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
46   - fugiat nulla pariatur.</p>
47   -
48   - <p><a class="btn btn-default" href="http://www.yiiframework.com/extensions/">Yii Extensions &raquo;</a></p>
49   - </div>
  22 + <div class="x_panel">
  23 + <div class="x_title">
  24 + <h2>Test</h2>
  25 + <ul class="nav navbar-right panel_toolbox">
  26 + <li>
  27 + <a class="collapse-link">
  28 + <i class="fa fa-chevron-up"></i>
  29 + </a>
  30 + </li>
  31 + <li>
  32 + <a class="close-link">
  33 + <i class="fa fa-close"></i>
  34 + </a>
  35 + </li>
  36 + </ul>
  37 + <div class="clearfix"></div>
50 38 </div>
51   -
  39 + <div class="x_content">Velox nuclear vexatum iaceres ducunt ad eleates.</div>
52 40 </div>
53 41 </div>
... ...
composer.json
... ... @@ -48,7 +48,8 @@
48 48 },
49 49 "autoload": {
50 50 "psr-4": {
51   - "artweb\\artbox\\core\\": "artweb/artbox-core/"
  51 + "artweb\\artbox\\core\\": "artweb/artbox-core/",
  52 + "artweb\\artbox\\gentelella\\": "artweb/artbox-gentelella/"
52 53 }
53 54 }
54 55 }
... ...
composer.lock
... ... @@ -4,8 +4,8 @@
4 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5 5 "This file is @generated automatically"
6 6 ],
7   - "hash": "ea5e2b94bb057f4b44d69c4e8e35a06f",
8   - "content-hash": "8378306ade4a941663a7b7c576be312a",
  7 + "hash": "2928aa19bb3e15f07d64bf3e1e09cac2",
  8 + "content-hash": "ecbd5dfde30e425db5d104f468df4ee5",
9 9 "packages": [
10 10 {
11 11 "name": "bower-asset/bootstrap",
... ...