ADD file rightNav

This commit is contained in:
Krivchikov Dmitry 2015-10-31 23:17:15 +03:00
parent 822b7c035f
commit b438dd2d35
1 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,73 @@
<?php
$routes = array();
$favorites = array();
if (App::$user && App::$user->id) {
self::addVar('user', App::$user->id);
$routes = Route::model()->getByAuthor(App::$user->id);
$favorites = Favorite::model()->getAllMy();
}
?>
<div id="control" style="z-index: 1000; position: fixed;">
<div class="glyphicon _t glyphicon-info-sign boxButtonInfo" title="Информация" onclick="openBox('Info')"></div>
<div class="glyphicon _b glyphicon-font" title="Лента статей" onclick="location.href='/feed/'"></div>
<?php if (App::$user): ?>
<div class="glyphicon _t" id="addPointButton" title="Добавить точку" onclick="location.href='/'"><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 glyphicon-cloud-download _c boxButtonRoutes" onclick="openBox('Routes')" title="Мои маршруты"></div>
<div class="glyphicon glyphicon-user _b boxButtonUser" onclick="location.href='/user/'" title="Профиль"></div>
<?php else: ?>
<div class="glyphicon _t" id="addPointButton" onclick="location.href='/'" title="Добавить точку"><img src="/img/buttons/addPoint.png" style="margin-top: -10px; height: 30px;" /></div>
<div class="glyphicon glyphicon-user _b" id="loginButton" onclick="$('#loginModal').modal('show');" title="Войти для добавления точки"></div>
<?php endif; ?>
<a href="https://vk.com/wikipoints" target="_blank"><img src="/img/vkBigLogo.png?2" usemap="#vkbutton" style="margin-left: 285px; margin-top: 0px; position: absolute; display: none;" id="vkBigLogo" /><div class="glyphicon" style="line-height: 0;" title="WikiPoints вКонтакте"><img src="/img/b.png?v=2" style="margin-left: -5px; margin-top: 0px; height: 20px;" /></div></a>
</div>
<div id="box" style="position: fixed;">
<span id="boxClose" onclick="closeBox();">&times;</span>
<div id="boxInfo">
<h3>Информация</h3>
<a href="/article/1">О проекте</a><br/>
<a onclick="showArticle(2);" href="#">Как пользоваться</a><br/>
<a href="/page/points">Список точек</a><br/>
<a href="/feed/">Статьи</a><br/>
<br/>
<a href="/?point=random">Случайная точка</a>
<br/><br/><br/>
<a href="http://vk.com/wikipoints" target="_blank"><img src="/img/vk.png" width="24" height="24"/> Группа ВКонтакте</a>
<br/><br/><br/>
<h3>Контакты</h3>
EMail: <a href="mailto:info@wikipoints.ru">info@wikipoints.ru</a><br/>
VK: <a href="https://vk.com/all4dk" target="_blank">https://vk.com/all4dk</a><br/>
</div>
<?php if (App::$user): ?>
<div id="boxFavorites">
<h3>Хочу посетить</h3>
<div id="favorites">
<?php if ($favorites): ?>
<?php foreach ($favorites as $favorite) : ?>
<a onclick="showInfo(<?= $favorite->pointId ?>)" class="btn btn-link"><?= $favorite->point->name ?></a><br/>
<?php endforeach; ?>
<?php else: ?>
Ваши закладки пока пусты.
<?php endif; ?>
</div>
</div>
<div id="boxRoutes">
<h3>Мои маршруты</h3>
<div id="routes">
<?php if ($routes): ?>
<?php foreach ($routes as $route) : ?>
<div class="route" onclick="loadRoute(<?= $route->id ?>)"><span onclick="deleteRoute(<?= $route->id ?>);
$(this).parent().remove();
event.stopPropagation();">&times;</span> <?= $route->name ?></div>
<?php endforeach; ?>
<?php else: ?>
У вас пока нет сохраненных маршрутов.
<?php endif; ?>
</div>
</div>
<?php endif; ?>
</div>