179 lines
7.3 KiB
PHP
179 lines
7.3 KiB
PHP
<?php
|
||
$index = 0;
|
||
?>
|
||
<div id="pageSmoothBackground" style="background-image: url(<?= $point->getImg('middle') ?>);"></div>
|
||
<div class="container" style="background-color: rgba(255,255,255, 0.8);margin-top: -10px;padding-bottom: 30px;">
|
||
<div class="row">
|
||
<div class="col-md-12">
|
||
<?php if ($point->status != Point::statusPublished): ?>
|
||
<h1 style="text-align: right; color: red;">Точка скрыта</h1>
|
||
<?php endif; ?>
|
||
<h1 style="text-align: right;"><?= $point->name ?></h1>
|
||
<div class="coords-container">
|
||
Координаты:
|
||
<nobr>
|
||
<?= $point->lat > 0 ? 'N' : 'S' ?><?= number_format(abs($point->lat), 5, '.', '') ?>°
|
||
<?= $point->lng > 0 ? 'E' : 'W' ?><?= number_format(abs($point->lng), 5, '.', '') ?>°
|
||
</nobr>
|
||
/
|
||
<nobr>
|
||
<?= $point->lat > 0 ? 'N' : 'S' ?><?= Coord::dergeeToMinute($point->lat) ?>
|
||
<?= $point->lng > 0 ? 'E' : 'W' ?><?= Coord::dergeeToMinute($point->lng) ?>
|
||
</nobr>
|
||
/
|
||
<a href="/?point=<?= $point->id ?>">На карте</a>
|
||
<?php if ($user && $user->isAdmin): ?>
|
||
/
|
||
<a href="/?point=<?= $point->id ?>&edit=true">Редактировать</a>
|
||
/
|
||
<a href="/page/vkpoint/id/<?= $point->id ?>">4VK</a>
|
||
<?php endif; ?>
|
||
</div>
|
||
|
||
<div class="mainTextBlock">
|
||
<?php
|
||
if (count($text) > 4) {
|
||
for ($index = 0; $index < 4; $index++) {
|
||
print $text[$index];
|
||
}
|
||
} else {
|
||
print $point->descriptionHtml;
|
||
}
|
||
?>
|
||
|
||
<?php if ($photos || $point->img): ?>
|
||
<br/><br/>
|
||
<div style="text-align: center;">
|
||
<div class="dfotorama" data-loop="true" data-allowfullscreen="true" data-nav="thumbs" data-thumbwidth="100" data-keyboard="true">
|
||
<?php if ($point->img): ?>
|
||
<img data-thumb="<?= $point->img ?>" src="<?= $point->img ?>">
|
||
<?php endif; ?>
|
||
<?php if ($photos): ?>
|
||
<?php foreach ($photos as $photo): ?>
|
||
<img data-thumb="/photos/small/<?= $photo->name ?>" src="/photos/big/<?= $photo->name ?>" data-caption="<?= $photo->getOriginalLink()?>" alt="<?= $point->name ?> на wikipoints.ru">
|
||
<?php endforeach; ?>
|
||
<?php endif; ?>
|
||
<span data-thumb="/img/mapThumb.png">
|
||
<div id="map" style="width: 100%; height: 100%; position: static; display: block;"></div>
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<br/><br/>
|
||
<?php endif; ?>
|
||
|
||
<?php
|
||
if (count($text) > 4) {
|
||
for ($index = $index; $index < count($text); $index++) {
|
||
print $text[$index] . ' ';
|
||
}
|
||
|
||
print "<br/><br/>";
|
||
}
|
||
?>
|
||
|
||
<?php if($extraParams): ?>
|
||
<div style="width: 100%; text-align: center;">
|
||
<table class="table table-bordered table-hover" style="background-color: #fff; display: inline-table; width: 100%; max-width: 700px; text-align: left;">
|
||
<thead>
|
||
<tr>
|
||
<th colspan="2">Дополнительная информация:</th>
|
||
</tr>
|
||
</thead>
|
||
<?php foreach ($extraParams as $extraParam) {
|
||
print '<tr>';
|
||
print '<td>'.$extraParam->name.'</td>';
|
||
print '<td>'.$extraParam->value.'</td>';
|
||
print '</tr>';
|
||
}
|
||
?>
|
||
</table>
|
||
</div>
|
||
<?php endif;
|
||
?>
|
||
|
||
<?php if ($photoLinks): ?>
|
||
Использованы фотоматериалы с сайтов: <?= $photoLinks ?>
|
||
<?php endif; ?>
|
||
</div>
|
||
<p style="margin-top: 5px; text-align: right;">
|
||
<?php if (App::$user && App::$user->id): ?>
|
||
<nobr>[ <button type="button" class="btn btn-link" style="color: #333;" onclick="addRemoveFavorite(<?= $point->id ?>)"><span id="myFavoritesButton" class="glyphicon glyphicon-star<?= $point->inFavorites ? '' : '-empty' ?>"></span> Хочу посетить</button> ]</nobr>
|
||
<nobr>[ <button type="button" class="btn btn-link" style="color: #333;" onclick="addRemoveLike(<?= $point->id ?>)"><span id="myLikesButton" class="glyphicon glyphicon-<?= $point->iLike ? 'ok' : 'thumbs-up' ?>"></span> Нравится</button> ]</nobr>
|
||
<?php else: ?>
|
||
<nobr>[ <span class="glyphicon glyphicon-star"></span> <?= $countInFavs ?> - в закладках ]</nobr>
|
||
<nobr>[ <span class="glyphicon glyphicon-thumbs-up"></span> <?= $countLikes ?> - нравится ]</nobr>
|
||
<?php endif; ?>
|
||
<nobr>[ <span class="glyphicon glyphicon-user"></span> <a href="/user/<?= $point->authorUser->id ?>"><?= $point->authorUser->nick ?></a> - <span class="glyphicon glyphicon-pencil" title="<?= date('d-m-Y H:i', $point->date) ?>"></span> <?= $point->authorUser->getPointsCount() ?> ]</nobr>
|
||
<?php if (App::$user && App::$user->isAdmin == 1): ?>
|
||
<nobr>[ <span class="glyphicon glyphicon-new-window"></span> <a href="<?= $point->source ?>" target="_blank">источник: <?= $point->source ?></a> ]</nobr>
|
||
<?php endif; ?>
|
||
</p>
|
||
</div>
|
||
</div>
|
||
<hr/>
|
||
<!--googleoff: all-->
|
||
<!--noindex-->
|
||
|
||
<?php if ($articles): ?>
|
||
<div class="row">
|
||
<div class="col-md-12">
|
||
<h3 style="margin-top: 0;">Эта точка в статьях:</h3>
|
||
<?php foreach ($articles as $article): ?>
|
||
<a href="/article/<?= $article->id ?>" class="pagePoinsNearCards"><img src="<?= $article->getImg('small') ?>" title="<?= $article->title ?>" class="pagePoinsNearCardsImg"/></a>
|
||
<?php endforeach; ?>
|
||
</div>
|
||
</div>
|
||
<hr/>
|
||
<?php endif; ?>
|
||
|
||
<?php if (!empty($closestPoints)): ?>
|
||
<div class="row">
|
||
<div class="col-md-12">
|
||
<h3 style="margin-top: 0;">Поблизости расположены:</h3>
|
||
<?php foreach ($closestPoints as $cPoint): ?><a href="/point/<?= $cPoint->id ?>" class="pagePoinsNearCards"><img src="<?= $cPoint->getImg() ?>" title="<?= $cPoint->name ?>" class="pagePoinsNearCardsImg"/></a><?php endforeach; ?>
|
||
</div>
|
||
</div>
|
||
<hr/>
|
||
<?php endif; ?>
|
||
|
||
<div class="row">
|
||
<div class="col-md-12">
|
||
<?= self::renderPartial('comments/all.php',array('parentId'=>$point->id, 'parentType' => 'point'),TRUE); ?>
|
||
</div>
|
||
</div>
|
||
<hr/>
|
||
|
||
<?php if (!empty($goods)): ?>
|
||
<div class="row test-ulm-row">
|
||
<div class="col-md-12">
|
||
<h3 style="margin-top: 0;">В путешествии обязательно пригодится:</h3>
|
||
<?php foreach ($goods as $good): ?><a href="/go/away/?url=<?= $good->url ?>" target="_blank" class="test-ulm"><img src="<?= $good->img ?>" title="<?= $good->name ?>" class=""/><br/><?= $good->name ?><br/><nobr><b><?= $good->price ?> руб.</nobr></b></a><?php endforeach; ?>
|
||
</div>
|
||
</div>
|
||
<hr/>
|
||
<?php endif; ?>
|
||
|
||
<?php if (!$articles): ?>
|
||
<div class="row">
|
||
<div class="col-md-12">
|
||
<h3 style="margin-top: 0;">Похожие точки:</h3>
|
||
<?php foreach ($similarPoints as $sPoint): ?><a href="/point/<?= $sPoint->id ?>" class="pagePoinsNearCards"><img src="<?= $sPoint->getImg() ?>" title="<?= $sPoint->name ?>" class="pagePoinsNearCardsImg"/></a><?php endforeach; ?>
|
||
</div>
|
||
</div>
|
||
<hr/>
|
||
<?php endif; ?>
|
||
|
||
<div class="row">
|
||
<div class="col-md-12">
|
||
<a href="/point/<?= $randomPoint->id ?>" style="float: left; margin: 0 20px 0 0;"><img src="<?= $randomPoint->getImg() ?>" style="width: 200px;"/></a>
|
||
<h3 style="margin-top: 0;">Это интересно: <?= $randomPoint->name ?></h3>
|
||
<p>
|
||
<?= mb_substr($randomPoint->description, 0, 400, 'UTF-8') ?>…
|
||
<a class="" href="/point/<?= $randomPoint->id ?>" role="button"><nobr> читать далее »</nobr></a>
|
||
</p>
|
||
</div>
|
||
</div>
|
||
<!--/noindex-->
|
||
<!--googleon: all-->
|
||
</div>
|