<?php /* @var $model Listing */ $f = Yii::app()->format; $urlReturn = "http://" . $_SERVER['HTTP_HOST'] . Yii::app()->request->requestUri; $link = Yii::app()->createAbsoluteUrl('site/login', array('returnUrl' => $urlReturn)); $propUrl = $this->createAbsoluteUrl('site/listingdetail', array('slug' => $model->slug)); $propName = StringHelper::limitStringLength(Listing::FormatNameListingIndexGrid($model, array('not_type' => 1)), 22); $propAddr = StringHelper::limitStringLength(strip_tags(Listing::FormatShowBuildingOrStreet($model)), 30); $sp = $model->rUser; $linkAgent = $this->createUrl('/agent/view', array('slug' => $model->rUser->slug)); // shortlist js $uId = (int) Yii::app()->user->id; $rId = (int) Yii::app()->user->role_id; $roleMember = ROLE_REGISTER_MEMBER; $url = Yii::app()->createAbsoluteUrl('site/addShortlist'); Yii::app()->clientScript->registerScript('shortlist-add-button', "setupShortList({ \n\tuserId: {$uId},\n\troleId: {$rId},\n\troleMember: {$roleMember},\n\taddShortListUrl: '{$url}'\n});"); // add this button Yii::app()->clientScript->registerScriptFile("//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-56133df5326f44f0", CClientScript::POS_END, array('async' => 'async')); ?> <div class="col-sm-6 col-md-4"> <div class="property-item"> <div class="image"> <div class="img-rad"> <?php echo InputHelper::holderImage($model->getDefaultImageUrl(266, 161), 266, 161); ?> </div> <div class="price"> <span class="head"> <span class="tail">
/** * @Author: ANH DUNG Mar 10, 2015 * @Todo: get address like client feed back * @Param: $model model listing */ public static function GetAddressReal($model) { return trim(strip_tags(Listing::FormatShowBuildingOrStreet($model))); }
<?php } ?> <p style="margin-bottom: 10px"> <i class="fa fa-eye fa-lg"></i> <?php echo (int) $data->view_count; ?> views</p> <div class="addthis_native_toolbox" data-title="<?php echo Listing::FormatNameListingIndexGrid($data, array('not_type' => 1)); ?> " accesskey=""data-url="<?php echo $this->createAbsoluteUrl('site/listingdetail', array('slug' => $data->slug)); ?> "></div> </div> <div class="description"> <h3> <a href="<?php echo Yii::app()->createAbsoluteUrl('site/listingdetail', array('slug' => $data->slug)); ?> "> <?php echo Listing::FormatNameListingIndexGrid($data, array('not_type' => 1)); ?> </a> </h3> <p><?php echo $data->rPropertyType ? $data->rPropertyType->name : '';