if ($model->locCountry || $model->locRegion) { $adressFull .= ', '; } $adressFull .= $model->locCity->getStrByLang('name'); } } else { if (isset($model->city) && isset($model->city->name)) { $cityName = $model->city->name; if ($cityName) { $adressFull = ' ' . $cityName; } } } if ($model->canShowInView('address')) { if (issetModule('tariffPlans') && issetModule('paidservices')) { if (!Yii::app()->user->isGuest && TariffPlans::checkAllowShowAddress()) { $adressFull .= ', ' . CHtml::encode($model->getStrByLang('address')); } } else { $adressFull .= ', ' . CHtml::encode($model->getStrByLang('address')); } } if ($adressFull) { echo '<div><strong>' . tt('Address', 'apartments') . ':</strong> ' . $adressFull . '</div>'; } } ?> </div> <br /> <div>
$cityName = $data->city->name; if ($cityName) { $adressFull = ' ' . $cityName; } } } $adress = CHtml::encode($data->getStrByLang('address')); if ($adress) { if (issetModule('tariffPlans') && issetModule('paidservices') && $data->owner_id != Yii::app()->user->id) { if (Yii::app()->user->isGuest) { $defaultTariffInfo = TariffPlans::getFullTariffInfoById(TariffPlans::DEFAULT_TARIFF_PLAN_ID); if (!$defaultTariffInfo['showAddress']) { $adressFull = Yii::t('module_tariffPlans', 'Please <a href="{n}">login</a> to view', Yii::app()->controller->createUrl('/site/login')); } else { $adressFull .= ', ' . $adress; } } else { if (TariffPlans::checkAllowShowAddress()) { $adressFull .= ', ' . $adress; } else { $adressFull = ' ' . Yii::t('module_tariffPlans', 'Please <a href="{n}">change the tariff plan</a> to view', Yii::app()->controller->createUrl('/tariffPlans/main/index')); } } } else { $adressFull .= ', ' . $adress; } } if ($adressFull) { echo '<dt>' . tt('Address') . ':</dt><dd>' . $adressFull . '</dd>'; } }