Небольшие доработки интерефейса - верхнего меню

This commit is contained in:
Krivchikov Dmitry 2016-04-08 14:53:01 +03:00
parent be71388a3f
commit 8345e5029e
3 changed files with 26 additions and 4 deletions

View File

@ -73,7 +73,8 @@ body.openBox div#control {right: 250px;}
div#control div {background-color: rgba(10, 10, 10, 0.8); border-radius: 8px 0 0 8px; width: auto; padding: 10px; margin-left: 10px; margin-bottom: 8px; cursor: pointer;}
div#control div:before {cursor: pointer;}
div#control div:hover {background-color: #000;}
div#control div.active {background-color: rgb(255, 162, 0);}
div#control div.active {background-color: rgb(255, 162, 0)!important;}
div#control div.important {background-color: rgba(0, 145, 90, 0.8);}
div#control div.big {font-size: 22px; padding: 14px; margin-left: 0;}
div#control div._t {border-radius: 8px 0 0 0;border-bottom: solid 1px #666; margin-bottom: 0;}
div#control div._c {border-radius: 0; border-bottom: solid 1px #666; margin-bottom: 0;}
@ -84,6 +85,9 @@ div#control div#notify {position: absolute; background-color: red;color: white;b
nav.navbar.navbar-inverse.navbar-fixed-top {opacity: 0.9}
nav.navbar.navbar-inverse .navbar-nav>li>a {color: #ddd;}
nav.navbar.navbar-inverse .navbar-nav>li.important {background-color: #3c3c3c;}
span.notifications {font-weight: bolder; color: red;}
/*BOX*/
body.openBox div#box {display: block; z-index: 100; overflow-y: scroll;overflow-x: hidden;}

View File

@ -15,7 +15,7 @@ if (App::$user) {
<div class="glyphicon _b boxButtonRoute" title="Маршрут" onclick="openBox('Route')"><img src="/img/buttons/route.png" style="margin-top: -10px; margin-left: -5px; width: 30px;" /></div>
<?php if ($user): ?>
<?php if (App::$user): ?>
<div class="glyphicon _t" id="addPointButton" title="Добавить точку" onclick="<?= $addWithoutConfirm ? 'activateAddPoint()' : 'showPointagreement()'; ?>"><img src="/img/buttons/addPoint.png" style="margin-top: -10px; height: 30px;" /></div>
<div class="glyphicon glyphicon-star _c boxButtonFavorites" onclick="openBox('Favorites')" title="Хочу посетить"></div>
<div class="glyphicon _b glyphicon-cloud-download boxButtonRoutes" onclick="openBox('Routes')" title="Мои маршруты"></div>

View File

@ -45,7 +45,7 @@ if (App::$user && App::$user->id) {
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<?= App::$user->nick ?>
<?php if (Notifications::getUnreadedCount()): ?>
<span style="font-weight: bolder; color: red;">
<span class="notifications">
[<?= Notifications::getUnreadedCount(); ?>]
</span>
<?php endif; ?>
@ -58,7 +58,11 @@ if (App::$user && App::$user->id) {
<li><a href="/user/favorites/">Избранное</a></li>
<li>
<a href="/user/notifications/">Уведомления
<?php if (Notifications::getUnreadedCount()): ?><span style="font-weight: bolder; color: red;">[<?= Notifications::getUnreadedCount(); ?>]</span><?php endif; ?>
<?php if (Notifications::getUnreadedCount()): ?>
<span class="notifications">
[<?= Notifications::getUnreadedCount(); ?>]
</span>
<?php endif; ?>
</a>
</li>
<li role="separator" class="divider"></li>
@ -68,6 +72,20 @@ if (App::$user && App::$user->id) {
<?php else: ?>
<li><a href="#" onclick="$('#loginModal').modal('show');"><span class="glyphicon glyphicon-user"></span> Вход</a></li>
<?php endif; ?>
<?php if(App::ic('index')): ?>
<?php if (App::$user):
$addWithoutConfirm = Point::model()->getCountByUser(App::$user->id) > 0;
$addWithoutConfirm = false;
?>
<li class="important">
<a href="#" onclick="<?= $addWithoutConfirm ? 'activateAddPoint()' : 'showPointagreement()'; ?>">Добавить объект</a>
</li>
<?php else: ?>
<li class="important"><a href="#" onclick="$('#loginModal').modal('show');">Добавить объект</a></li>
<?php endif; ?>
<?php endif; ?>
</ul>
</div><!--/.nav-collapse -->
</div>