Если поблизости нет известных точек, то просто не выводим этот блок

This commit is contained in:
Krivchikov Dmitry 2015-11-08 20:05:03 +03:00
parent 923c3457cb
commit 5f8a9f60d6
1 changed files with 7 additions and 4 deletions

View File

@ -120,6 +120,7 @@ $index = 0;
<hr/> <hr/>
<!--googleoff: all--> <!--googleoff: all-->
<!--noindex--> <!--noindex-->
<?php if ($articles): ?> <?php if ($articles): ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
@ -131,23 +132,24 @@ $index = 0;
</div> </div>
<hr/> <hr/>
<?php endif; ?> <?php endif; ?>
<?php if (!empty($closestPoints)): ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<h3 style="margin-top: 0;">Поблизости расположены:</h3> <h3 style="margin-top: 0;">Поблизости расположены:</h3>
<?php if (empty($closestPoints)): ?>
нет известных нам точек.
<?php else: ?>
<?php foreach ($closestPoints as $cPoint): ?><a href="/point/<?= $cPoint->id ?>" class="pagePoinsNearCards"><img src="<?= $cPoint->getImg() ?>" title="<?= $cPoint->name ?>" class="pagePoinsNearCardsImg"/></a><?php endforeach; ?> <?php foreach ($closestPoints as $cPoint): ?><a href="/point/<?= $cPoint->id ?>" class="pagePoinsNearCards"><img src="<?= $cPoint->getImg() ?>" title="<?= $cPoint->name ?>" class="pagePoinsNearCardsImg"/></a><?php endforeach; ?>
<?php endif; ?>
</div> </div>
</div> </div>
<hr/> <hr/>
<?php endif; ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<?= self::renderPartial('comments/all.php',array('parentId'=>$point->id, 'parentType' => 'point'),TRUE); ?> <?= self::renderPartial('comments/all.php',array('parentId'=>$point->id, 'parentType' => 'point'),TRUE); ?>
</div> </div>
</div> </div>
<hr/> <hr/>
<?php if (!$articles): ?> <?php if (!$articles): ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
@ -157,6 +159,7 @@ $index = 0;
</div> </div>
<hr/> <hr/>
<?php endif; ?> <?php endif; ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <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> <a href="/point/<?= $randomPoint->id ?>" style="float: left; margin: 0 20px 0 0;"><img src="<?= $randomPoint->getImg() ?>" style="width: 200px;"/></a>