ADD ссылка на точки пользователя

This commit is contained in:
Krivchikov Dmitry 2015-09-25 18:44:15 +03:00
parent 5659d83398
commit 0c96d6da2e
4 changed files with 12 additions and 1 deletions

View File

@ -41,6 +41,8 @@ class PageController extends Controller
$param['order'] = 'id DESC';
if (App::getParam('category')) {
$param['where'] = 'categoryId = ' . (int) App::getParam('category') . ' AND `moderate` = 1';
} else if (App::getParam('user')) {
$param['where'] = '`author` = ' . (int) App::getParam('user') . ' AND `moderate` = 1';
} else {
$param['where'] = '`moderate` = 1';
if (!(App::$user && App::$user->isAdmin)) {

View File

@ -33,6 +33,14 @@
if ((int) App::getParam('category')) {
$header = 'Список точек в категории "' . $categories[(int) App::getParam('category')]->name . '"';
}
if (App::getParam('user')) {
$user = User::model()->getByPK((int) App::getParam('user'));
if ($user->id) {
$header = 'Список точек пользователя <a href="/user/'.$user->id.'">"' . $user->nick . '"</a>';
} else {
App::redirect('/page/points/');
}
}
?>
<h3><?= $header ?></h3>

View File

@ -9,7 +9,7 @@
<div class="socialNetworks">
В социальных сетях: <a href="<?= $user->profile ?>" target="_blank"><img src="/img/social/<?= $user->network ?>.png" /></a>
<br/><br/>
Создано точек: <b><?= $user->getPointsCount() ?></b>
Создано точек: <b><a href="/page/points/user/<?= $user->id ?>" class="toPoints"><?= $user->getPointsCount() ?></a></b>
</div>
</div>
<div class="container lightBody">

View File

@ -3,6 +3,7 @@
.darkHeader .userPic {font-size: 70px; font-family: Ubuntu, inherit;}
.darkHeader .userPic img {height: 70px; border-radius: 5px;}
.darkHeader .socialNetworks {margin-top: 10px;}
.darkHeader .socialNetworks a.toPoints{color: #fff;}
.darkHeader .socialNetworks img {height: 30px; margin: 0 5px;}
.lightBody {background-color: rgba(255,255,255, 0.8);margin-top: 0px;padding-bottom: 30px;}