Exemple #1
0
<?php

$this->breadcrumbs = array('Projects' => array('index'), 'View');
$this->menu = array(array('label' => 'List Projects', 'url' => array('index')), array('label' => 'Create Projects', 'url' => array('create')), array('label' => 'Update Projects', 'url' => array('update', 'id' => $model->id)), array('label' => 'Delete Projects', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')), array('label' => 'Manage Projects', 'url' => array('admin')));
?>
<h1>View Projects</h1>
<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', array('label' => 'User Name', 'type' => 'raw', 'value' => CHtml::link(CHtml::encode(UserApi::getNameByUserId($model->user_id)), array('/store/user/view', 'id' => $model->user_id))), 'project_name', 'description', 'projectType.project_type', 'ownershipType.ownership_type', 'locality.locality', 'address', 'features', 'covered_area', 'land_area', 'total_price', 'price_starting_from', 'per_unit_price', 'area_type', 'display_price', 'price_negotiable', 'landmarks', 'tax_fees', 'terms_and_conditions', 'views', 'recently_viewed')));
$images = ProjectImagesApi::getAllImages($model->id);
$projectImages = ProjectImagesApi::getAll($model->id);
$projectAmenities = $model->projectAmenities;
$amenities = null;
foreach ($projectAmenities as $i => $projectAmenity) {
    if ($i != 0) {
        $amenities .= ", ";
    }
    $amenities .= $projectAmenity->amenity->amenity;
}
?>
<table id="yw0" class="detail-view">
	<tbody>
		<tr class="even">
			<th>Amenities</th>
			<td><?php 
echo $amenities;
?>
</td>
		</tr>
	</tbody>
</table>