<?php

$itemId = Yii::app()->request->getPost('itemId');

if (!$itemId) {
    return;
}

$popUnit = DolphinPopularDestWidget::getPopUnit();

$models = $popUnit->getUploadListingForItemId($itemId);
?>
<?php
if ($models) { ?>
    <div class="city-object-slick ">
        <?php foreach ($models as $item) { ?>
            <?php $res = Images::getMainThumb(320, 238, $item->images); ?>
            <div class="item_obj animated">
                <div class="obj_bg" style="background-image: url(<?php echo $res['thumbUrl']; ?>); "></div>
                <div class="text">
                    <a href="<?= $item->getUrl() ?>"><?= CHtml::encode($item->getStrByLang('title')) ?></a>
                    <div class="price">
                        <?php
                        if ($item->is_price_poa) {
                            echo tt('is_price_poa', 'apartments');
                        } else {
                            echo $item->getPrettyPrice(false);
                        }
                        ?>
                    </div>
                </div>
            </div>
        <?php } ?>
    </div>
<?php }