Оформление на странице со списком точек

This commit is contained in:
Krivchikov Dmitry 2015-06-28 21:37:08 +03:00
parent 8e277d2927
commit ee88c3f923
2 changed files with 60 additions and 36 deletions

View File

@ -6,6 +6,8 @@ class PageController extends Controller
static function actionPoints() static function actionPoints()
{ {
self::$layout = 'layoutPage.php'; self::$layout = 'layoutPage.php';
self::addStyle('/css/style.css?ver=' . App::getConfig('version'));
self::addStyle('/css/pageStyle.css?ver=' . App::getConfig('version'));
self::addScript('/js/jquery-2.1.0.min.js'); self::addScript('/js/jquery-2.1.0.min.js');
self::addScript('/js/jquery-ui-1.10.4.custom.min.js'); self::addScript('/js/jquery-ui-1.10.4.custom.min.js');
self::addScript('/js/bootstrap.min.js'); self::addScript('/js/bootstrap.min.js');
@ -66,6 +68,7 @@ class PageController extends Controller
'user' => App::$user, 'user' => App::$user,
'points' => $result, 'points' => $result,
'notModeratedPoints' => $notModeratedPoints, 'notModeratedPoints' => $notModeratedPoints,
'randomPoint' => Point::model()->getRandom(),
)); ));
} }

View File

@ -1,37 +1,58 @@
<?php if($notModeratedPoints):?> <div id="pageSmoothBackground" style="background-image: url(<?= $randomPoint->getImg('middle') ?>);"></div>
<h3>Точки на модерации</h3>
<?php foreach ($notModeratedPoints as $point): ?> <div class="container" style="background-color: rgba(255,255,255, 0.8);margin-top: -10px;padding-bottom: 30px;">
#<?=$point['id']?> <img src="/ico/lock.png" /> <div class="row">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <div class="col-md-12">
<img src="<?=$point['categoryIcon']?>" /> <a href="/page/point/id/<?=$point['id']?>"><?=$point['name']?></a> <h1 style="text-align: right;">Списки точек по категориям</h1>
<?=$point['author']?> <div class="coords-container">
<br/> Вернуться <a href="/">на карту</a>.
<?php endforeach; ?> </div>
<div style="text-align: justify;">
<?php if ($notModeratedPoints): ?>
<h3>Точки на модерации</h3>
<?php foreach ($notModeratedPoints as $point): ?>
#<?= $point['id'] ?> <img src="/ico/lock.png" />
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<img src="<?= $point['categoryIcon'] ?>" /> <a href="/page/point/id/<?= $point['id'] ?>"><?= $point['name'] ?></a>
<?= $point['author'] ?>
<br/>
<?php endforeach; ?>
<hr/>
<?php endif; ?>
<h3>Выбор типа точки</h3>
<?php
foreach ($categories as $category) {
print "<a href='/page/points/category/$category->id'>";
print "<img src='$category->icon' title='$category->name' />";
print "</a>";
}
?>
<?php
$header = 'Неплоный список точек (100 недавно добавленных)';
if ((int) App::getParam('category')) {
$header = 'Список точек в категории "' . $categories[(int) App::getParam('category')]->name . '"';
}
?>
<h3><?= $header ?></h3>
<?php foreach ($points as $point): ?>
#<?= $point['id'] ?> <img src="<?= $point['categoryIcon'] ?>" /> <a href="/page/point/id/<?= $point['id'] ?>"><?= $point['name'] ?></a>
<?= $point['author'] ?>
<br/>
<?php endforeach; ?>
</div>
</div>
</div>
<hr/> <hr/>
<?php endif; ?> <div class="row">
<div class="col-md-12">
<h3>Выбор типа точки</h3> <a href="/page/point/id/<?= $randomPoint->id ?>" style="float: left; margin: 0 20px 0 0;"><img src="<?= $randomPoint->getImg() ?>" style="width: 200px;"/></a>
<?php <h3 style="margin-top: 0;">Это интересно: <?= $randomPoint->name ?></h3>
<p>
foreach ($categories as $category) { <?= mb_substr($randomPoint->description, 0, 400, 'UTF-8') ?>...
print "<a href='/page/points/category/$category->id'>"; <a class="" href="/page/point/id/<?= $randomPoint->id ?>" role="button"><nobr> читать далее »</nobr></a>
print "<img src='$category->icon' title='$category->name' />"; </p>
print "</a>"; </div>
} </div>
</div>
?>
<?php
$header = 'Неплоный список точек (100 недавно добавленных)';
if ((int)App::getParam('category')) {
$header = 'Список точек в категории "'.$categories[(int)App::getParam('category')]->name.'"';
}
?>
<h3><?=$header?></h3>
<?php foreach ($points as $point): ?>
#<?=$point['id']?> <img src="<?=$point['categoryIcon']?>" /> <a href="/page/point/id/<?=$point['id']?>"><?=$point['name']?></a>
<?=$point['author']?>
<br/>
<?php endforeach; ?>
<?= self::renderPartial('modals/categories.php', array('categories' => $categories), true) ?>