Thumbs navigator for Fotorama

This commit is contained in:
Krivchikov Dmitry 2015-03-07 11:17:22 +03:00
parent 1b0accdddb
commit f3e18468a0
1 changed files with 36 additions and 47 deletions

View File

@ -6,8 +6,8 @@
<div class="coords-container"> <div class="coords-container">
Координаты:&nbsp; Координаты:&nbsp;
<nobr> <nobr>
<?= $point->lat > 0 ? 'N' : 'S' ?><?= number_format(abs($point->lat),5,'.','') ?>° <?= $point->lat > 0 ? 'N' : 'S' ?><?= number_format(abs($point->lat), 5, '.', '') ?>°
<?= $point->lng > 0 ? 'E' : 'W' ?><?= number_format(abs($point->lng),5,'.','') ?>° <?= $point->lng > 0 ? 'E' : 'W' ?><?= number_format(abs($point->lng), 5, '.', '') ?>°
</nobr> </nobr>
&nbsp;&nbsp;/&nbsp;&nbsp; &nbsp;&nbsp;/&nbsp;&nbsp;
<nobr> <nobr>
@ -19,54 +19,43 @@
</div> </div>
<div style="text-align: justify;"> <div style="text-align: justify;">
<?php <?php
if (count($text) > 4) if (count($text) > 4) {
{ for ($index = 0; $index < 4; $index++) {
for ($index = 0; $index < 4; $index++) print $text[$index];
{ }
print $text[$index]; } else {
print $point->descriptionHtml;
} }
} else ?>
{
print $point->descriptionHtml;
}
?>
<?php if ($photos || $point->img): ?> <?php if ($photos || $point->img): ?>
<br/><br/> <br/><br/>
<table border="0"> <div style="text-align: center;">
<tr> <div class="fotorama" data-width="555" data-height="450" data-loop="true" data-nav="thumbs" data-thumbwidth="100">
<td width="33%"></td> <?php if ($point->img): ?>
<td width="34%"> <img data-thumb="<?= $point->img ?>" src="<?= $point->img ?>">
<div class="fotorama" data-width="555" data-height="450" data-loop="true"> <?php endif; ?>
<?php if ($point->img): ?> <?php if ($photos): ?>
<img data-thumb="<?= $point->img ?>" src="<?= $point->img ?>"> <?php foreach ($photos as $photo): ?>
<?php endif; ?> <img data-thumb="/photos/small/<?= $photo->name ?>" src="/photos/middle/<?= $photo->name ?>">
<?php if ($photos): ?> <?php endforeach; ?>
<?php foreach ($photos as $photo): ?> <?php endif; ?>
<img data-thumb="/photos/small/<?= $photo->name ?>" src="/photos/middle/<?= $photo->name ?>"> <span data-thumb="/img/mapThumb.png">
<?php endforeach; ?> <div id="map" style="width: 100%; height: 100%; position: static; display: block; -webkit-filter: grayscale(40%);"></div>
<?php endif; ?> </span>
<span> </div>
<div id="map" style="width: 100%; height: 100%; position: static; display: block; -webkit-filter: grayscale(40%);"></div> </div>
</span> <br/><br/>
</div> <?php endif; ?>
</td>
<td width="33%"></td>
</tr>
</table>
<br/><br/>
<?php endif; ?>
<?php <?php
if (count($text) > 3) if (count($text) > 3) {
{ for ($index = $index; $index < count($text); $index++) {
for ($index = $index; $index < count($text); $index++) print $text[$index] . ' ';
{ }
print $text[$index] . ' ';
} }
} ?>
?>
</div> </div>
<p style="margin-top: 25px; text-align: right;"> <p style="margin-top: 25px; text-align: right;">
@ -77,7 +66,7 @@
[ <span class="glyphicon glyphicon-star"></span> <?= $countInFavs ?> - в закладках ] [ <span class="glyphicon glyphicon-star"></span> <?= $countInFavs ?> - в закладках ]
[ <span class="glyphicon glyphicon-thumbs-up"></span> <?= $countLikes ?> - нравится ] [ <span class="glyphicon glyphicon-thumbs-up"></span> <?= $countLikes ?> - нравится ]
<?php endif; ?> <?php endif; ?>
[ <span class="glyphicon glyphicon-user"></span> <?= $point->authorUser->nick ?> - <span class="glyphicon glyphicon-pencil" title="<?= date('d-m-Y H:i',$point->date) ?>"></span> <?= $point->authorUser->getPointsCount() ?> ] [ <span class="glyphicon glyphicon-user"></span> <?= $point->authorUser->nick ?> - <span class="glyphicon glyphicon-pencil" title="<?= date('d-m-Y H:i', $point->date) ?>"></span> <?= $point->authorUser->getPointsCount() ?> ]
<?php if (App::$user && App::$user->isAdmin == 1): ?> <?php if (App::$user && App::$user->isAdmin == 1): ?>
[ <span class="glyphicon glyphicon-new-window"></span> <a href="<?= $point->source ?>" target="_blank">источник: <?= $point->source ?></a> ] [ <span class="glyphicon glyphicon-new-window"></span> <a href="<?= $point->source ?>" target="_blank">источник: <?= $point->source ?></a> ]
<?php endif; ?> <?php endif; ?>