FIX
This commit is contained in:
parent
b438dd2d35
commit
923c3457cb
|
|
@ -66,6 +66,10 @@ class FeedController extends Controller
|
|||
self::addStyle('/css/bootstrap.min.css');
|
||||
self::addStyle('/css/bootstrap-theme.min.css');
|
||||
|
||||
if (!App::$user) {
|
||||
self::addScript('//ulogin.ru/js/ulogin.js');
|
||||
}
|
||||
|
||||
self::render('feed/index.php', array(
|
||||
'news' => $news,
|
||||
'articles' => $articles,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,10 @@ class PageController extends Controller
|
|||
self::addStyle('/css/bootstrap.min.css');
|
||||
self::addStyle('/css/bootstrap-theme.min.css');
|
||||
|
||||
if (!App::$user) {
|
||||
self::addScript('//ulogin.ru/js/ulogin.js');
|
||||
}
|
||||
|
||||
$notModeratedPoints = $result = array();
|
||||
|
||||
// On moderation
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class PointController extends Controller
|
|||
self::addVar('user', App::$user->id);
|
||||
} else {
|
||||
self::addVar('user', '0');
|
||||
self::addScript('//ulogin.ru/js/ulogin.js');
|
||||
}
|
||||
|
||||
$point = Point::model()->getByPK($pointId);
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ class UserController extends Controller
|
|||
self::addScript('/js/bootstrap.min.js');
|
||||
self::addScript('/js/leaflet-0.7.3.js');
|
||||
self::addScript('http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.3/fotorama.js');
|
||||
self::addScript('/js/app.js?ver=' . App::getConfig('version'));
|
||||
|
||||
self::addStyle('/css/style.css?ver=' . App::getConfig('version'));
|
||||
self::addStyle('/css/pageStyle.css?ver=' . App::getConfig('version'));
|
||||
|
|
@ -33,6 +34,10 @@ class UserController extends Controller
|
|||
self::addStyle('/css/bootstrap-theme.min.css');
|
||||
self::addStyle('http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.3/fotorama.css');
|
||||
|
||||
if (!App::$user) {
|
||||
self::addScript('//ulogin.ru/js/ulogin.js');
|
||||
}
|
||||
|
||||
if (App::$user && App::$user->id == $id) {
|
||||
$articles = Article::model()->getAll(array('where'=>'`author`='.(int)$user->id.' AND `status` != "del"', 'order' => '`pubDate` DESC'));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ $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();
|
||||
}
|
||||
|
||||
|
|
@ -16,7 +15,6 @@ if (App::$user && App::$user->id) {
|
|||
<?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>
|
||||
|
|
@ -48,26 +46,13 @@ if (App::$user && App::$user->id) {
|
|||
<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/>
|
||||
<a href="/point/<?= $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();">×</span> <?= $route->name ?></div>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
У вас пока нет сохраненных маршрутов.
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?= $user ? '' : self::renderPartial('modals/login.php', null, true) ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue