Commit b313037a8bc1e0a74e14c78e669f6312fccde6d1

Authored by Alexey Boroda
1 parent 355d6999

-Flesh widget ready

backend/views/layouts/main.php
... ... @@ -5,10 +5,13 @@
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 10 use yii\helpers\Html;
  11 + use yii\web\View;
9 12  
10 13 $bundle = yiister\gentelella\assets\Asset::register($this);
11   -
  14 +
12 15 ?>
13 16 <?php $this->beginPage(); ?>
14 17 <!DOCTYPE html>
... ... @@ -133,23 +136,7 @@
133 136  
134 137 </div>
135 138 <!-- /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 -->
  139 +
153 140 </div>
154 141 </div>
155 142  
... ... @@ -165,99 +152,31 @@
165 152 <ul class="nav navbar-nav navbar-right">
166 153 <li class="">
167 154 <a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
168   - <img src="http://placehold.it/128x128" alt="">John Doe
  155 + <img src="http://placehold.it/128x128" alt=""><?=Yii::$app->user->identity->username?>
169 156 <span class=" fa fa-angle-down"></span>
170 157 </a>
171 158 <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 159 <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>
  160 + <a href="#"><i class="fa fa-user pull-right"></i> Profile</a>
235 161 </li>
236 162 <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>
  163 + <?= Html::a(
  164 + Html::tag('i', '', [ 'class' => 'fa fa-cogs pull-right' ]) . ' Settings',
  165 + [ '/settings' ]
  166 + ) ?>
249 167 </li>
250 168 <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>
  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 + ) ?>
257 176 </li>
258 177 </ul>
259 178 </li>
260   -
  179 +
261 180 </ul>
262 181 </nav>
263 182 </div>
... ... @@ -302,12 +221,7 @@
302 221  
303 222 </div>
304 223  
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>
  224 +<?=FleshWidget::widget();?>
311 225 <!-- /footer content -->
312 226 <?php $this->endBody(); ?>
313 227 </body>
... ...
common/config/bootstrap.php 100644 โ†’ 100755
... ... @@ -3,3 +3,4 @@ Yii::setAlias(&#39;@common&#39;, dirname(__DIR__));
3 3 Yii::setAlias('@frontend', dirname(dirname(__DIR__)) . '/frontend');
4 4 Yii::setAlias('@backend', dirname(dirname(__DIR__)) . '/backend');
5 5 Yii::setAlias('@console', dirname(dirname(__DIR__)) . '/console');
  6 +Yii::setAlias('@artbox-core', dirname(dirname(__DIR__)) . '/artweb/artbox-core');
... ...
common/config/main.php 100644 โ†’ 100755
... ... @@ -5,5 +5,13 @@ return [
5 5 'cache' => [
6 6 'class' => 'yii\caching\FileCache',
7 7 ],
  8 + 'i18n' => [
  9 + 'translations' => [
  10 + 'core' => [
  11 + 'class' => 'yii\i18n\PhpMessageSource',
  12 + 'basePath' => '@artbox-core/messages',
  13 + ],
  14 + ],
  15 + ],
8 16 ],
9 17 ];
... ...
common/config/params.php 100644 โ†’ 100755
common/config/settings.php
... ... @@ -2,8 +2,8 @@
2 2  
3 3 return [
4 4 1 => [
5   - 'id' => 1,
6   - 'name' => 'Administrator',
  5 + 'id' => '1',
  6 + 'name' => 'Admin',
7 7 'description' => 'Site administrator',
8 8 ],
9 9 ];
10 10 \ No newline at end of file
... ...
common/config/test.php 100644 โ†’ 100755
composer.json
... ... @@ -22,7 +22,8 @@
22 22 "yiister/yii2-gentelella": "~1.0",
23 23 "hiqdev/yii2-asset-icheck": "1.0.2.5",
24 24 "noam148/yii2-image-manager": "*",
25   - "yii2tech/filedb": "^1.0"
  25 + "yii2tech/filedb": "^1.0",
  26 + "hiqdev/yii2-asset-pnotify": "^2.1"
26 27 },
27 28 "require-dev": {
28 29 "yiisoft/yii2-debug": "~2.0.0",
... ...
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": "273c41f822738cb68bec5cafba6f54f5",
8   - "content-hash": "c2ffd5778bd51c266dfd00c514847f0a",
  7 + "hash": "b77198c9b7dc6a47b379a7f696023839",
  8 + "content-hash": "ecbd5dfde30e425db5d104f468df4ee5",
9 9 "packages": [
10 10 {
11 11 "name": "bower-asset/bootstrap",
... ... @@ -285,6 +285,68 @@
285 285 ]
286 286 },
287 287 {
  288 + "name": "bower-asset/pnotify",
  289 + "version": "2.1.0",
  290 + "source": {
  291 + "type": "git",
  292 + "url": "https://github.com/sciactive/pnotify.git",
  293 + "reference": "4ca6d8089ec45997ae7be37efc51f1ddad336933"
  294 + },
  295 + "dist": {
  296 + "type": "zip",
  297 + "url": "https://api.github.com/repos/sciactive/pnotify/zipball/4ca6d8089ec45997ae7be37efc51f1ddad336933",
  298 + "reference": "4ca6d8089ec45997ae7be37efc51f1ddad336933",
  299 + "shasum": ""
  300 + },
  301 + "type": "bower-asset-library",
  302 + "extra": {
  303 + "bower-asset-main": [
  304 + "src/pnotify.core.js",
  305 + "src/pnotify.core.min.js",
  306 + "src/pnotify.buttons.js",
  307 + "src/pnotify.buttons.min.js",
  308 + "src/pnotify.callbacks.js",
  309 + "src/pnotify.callbacks.min.js",
  310 + "src/pnotify.confirm.js",
  311 + "src/pnotify.confirm.min.js",
  312 + "src/pnotify.desktop.js",
  313 + "src/pnotify.desktop.min.js",
  314 + "src/pnotify.history.js",
  315 + "src/pnotify.history.min.js",
  316 + "src/pnotify.nonblock.js",
  317 + "src/pnotify.nonblock.min.js",
  318 + "src/pnotify.core.css",
  319 + "src/pnotify.core.min.css",
  320 + "src/pnotify.buttons.css",
  321 + "src/pnotify.buttons.min.css",
  322 + "src/pnotify.history.css",
  323 + "src/pnotify.history.min.css"
  324 + ],
  325 + "bower-asset-ignore": [
  326 + "build-cache/",
  327 + "build-tools/",
  328 + "includes/",
  329 + "oxygen/",
  330 + "devnote*.*",
  331 + "index.html",
  332 + "README.md",
  333 + "testing.html",
  334 + "buildcustom.php",
  335 + "package.json",
  336 + "src/pnotify.tooltip.js",
  337 + "src/pnotify.tooltip.min.js",
  338 + "src/pnotify.mobile.js",
  339 + "src/pnotify.mobile.min.js"
  340 + ]
  341 + },
  342 + "license": [
  343 + "GPL-3.0",
  344 + "LGPL-3.0",
  345 + "MPL-1.1"
  346 + ],
  347 + "description": "JavaScript notification plugin."
  348 + },
  349 + {
288 350 "name": "bower-asset/punycode",
289 351 "version": "v1.3.2",
290 352 "source": {
... ... @@ -574,6 +636,68 @@
574 636 "time": "2016-03-30 10:59:26"
575 637 },
576 638 {
  639 + "name": "hiqdev/yii2-asset-pnotify",
  640 + "version": "2.1.0",
  641 + "source": {
  642 + "type": "git",
  643 + "url": "https://github.com/hiqdev/yii2-asset-pnotify.git",
  644 + "reference": "d5bfa39fba84741523238e53b85ef7c2f37b789f"
  645 + },
  646 + "dist": {
  647 + "type": "zip",
  648 + "url": "https://api.github.com/repos/hiqdev/yii2-asset-pnotify/zipball/d5bfa39fba84741523238e53b85ef7c2f37b789f",
  649 + "reference": "d5bfa39fba84741523238e53b85ef7c2f37b789f",
  650 + "shasum": ""
  651 + },
  652 + "require": {
  653 + "bower-asset/pnotify": "2.1.0"
  654 + },
  655 + "type": "package",
  656 + "autoload": {
  657 + "psr-4": {
  658 + "hiqdev\\assets\\pnotify\\": "src"
  659 + }
  660 + },
  661 + "notification-url": "https://packagist.org/downloads/",
  662 + "license": [
  663 + "BSD-3-Clause"
  664 + ],
  665 + "authors": [
  666 + {
  667 + "name": "Andrii Vasyliev",
  668 + "email": "sol@hiqdev.com",
  669 + "homepage": "https://hipanel.com/",
  670 + "role": "Project lead"
  671 + },
  672 + {
  673 + "name": "Andrey Klochok",
  674 + "email": "tafid@hiqdev.com",
  675 + "homepage": "https://hiqdev.com/",
  676 + "role": "Lead frontend developer"
  677 + },
  678 + {
  679 + "name": "Yuriy Myronchuk",
  680 + "email": "bladeroot@hiqdev.com",
  681 + "homepage": "https://hiqdev.com/",
  682 + "role": "QA Lead"
  683 + },
  684 + {
  685 + "name": "Dmitry Naumenko",
  686 + "email": "silverfire@hiqdev.com",
  687 + "homepage": "http://silverfire.me/",
  688 + "role": "Lead backend developer"
  689 + }
  690 + ],
  691 + "description": "Yii2 Asset Pnotify",
  692 + "homepage": "https://github.com/hiqdev/yii2-asset-pnotify",
  693 + "keywords": [
  694 + "asset",
  695 + "pnotify",
  696 + "yii2"
  697 + ],
  698 + "time": "2015-09-09 15:16:38"
  699 + },
  700 + {
577 701 "name": "imagine/imagine",
578 702 "version": "v0.6.3",
579 703 "source": {
... ...