FIX окно логина не на всех страницах

This commit is contained in:
Krivchikov Dmitry 2016-01-29 15:58:53 +03:00
parent 71812dc37d
commit 92eddd4ce3
8 changed files with 3 additions and 22 deletions

View File

@ -66,10 +66,6 @@ class FeedController extends Controller
self::addStyle('/css/bootstrap.min.css');
self::addStyle('/css/bootstrap-theme.min.css');
if (!App::$user) {
self::addScript('http://ulogin.ru/js/ulogin.js');
}
self::render('feed/index.php', array(
'news' => $news,
'articles' => $articles,

View File

@ -39,10 +39,6 @@ class IndexController extends Controller
self::addStyle('/css/fotorama.css');
self::addStyle('/css/indexMap.css?ver='.App::getConfig('version'));
if (!App::$user) {
self::addScript('http://ulogin.ru/js/ulogin.js');
}
$category = Category::model()->getAll(array('order' => 'ord ASC'));
$categoryArray = Category::model()->getAll(array('order' => 'ord ASC', 'asArray' => true));

View File

@ -17,10 +17,6 @@ class PageController extends Controller
self::addStyle('/css/bootstrap.min.css');
self::addStyle('/css/bootstrap-theme.min.css');
if (!App::$user) {
self::addScript('http://ulogin.ru/js/ulogin.js');
}
$notModeratedPoints = $result = array();
// On moderation

View File

@ -41,7 +41,6 @@ class PointController extends Controller
self::addVar('user', App::$user->id);
} else {
self::addVar('user', '0');
self::addScript('http://ulogin.ru/js/ulogin.js');
}
if ($point->status != Point::statusPublished) {

View File

@ -41,10 +41,6 @@ class UserController extends Controller
App::error404();
}
if (!App::$user) {
self::addScript('http://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 {

View File

@ -17,7 +17,4 @@ if (App::$user) {
self::renderPartial('comments/form.php',array('parentId'=>$parentId, 'parentType' => $parentType));
} else {
self::renderPartial('comments/deny.php', array());
self::addScript('http://ulogin.ru/js/ulogin.js');
self::renderPartial('modals/login.php', array());
}

View File

@ -135,8 +135,8 @@ if (App::$user) {
</div>
<?php endif; ?>
</div>
<?= $user ? '' : self::renderPartial('modals/login.php', null, true) ?>
<?= $user ? self::renderPartial('modals/addPoint.php', array('categories' => Category::model()->getCategoriesForChoise()), true) : '' ?>
<?= App::$user ? '' : self::renderPartial('modals/login.php', null, true) ?>
<?= App::$user ? self::renderPartial('modals/addPoint.php', array('categories' => Category::model()->getCategoriesForChoise()), true) : '' ?>
<?= self::renderPartial('modals/categories.php', array('categories' => $categories), true) ?>
<?= self::renderPartial('modals/image.php', array(), true) ?>
<map name="vkbutton">

View File

@ -1,3 +1,4 @@
<script src="//ulogin.ru/js/ulogin.js" async type="text/javascript"></script>
<div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-hidden="true" style="display: none;">
<div class="modal-dialog">
<div class="modal-content">