<h2>Listed Entity</h2>

<?php 
$this->widget('bootstrap.widgets.BootGridView', array('id' => 't-account-entity-grid', 'dataProvider' => tAccountEntity::model()->searchAccount($model->id), 'itemsCssClass' => 'table table-striped table-bordered', 'template' => '{items}{pager}', 'columns' => array(array('class' => 'bootstrap.widgets.BootButtonColumn', 'template' => '{delete}', 'deleteButtonUrl' => 'Yii::app()->createUrl("/m2/tAccount/deleteEntity",array("id"=>$data->id))'), array('name' => 'entity_id', 'type' => 'raw', 'value' => 'CHtml::link($data->entity->name,Yii::app()->createUrl("/m2/aOrganization/view",array("id"=>$data->entity->id)))'), array('name' => 'state_id', 'value' => 'sParameter::item("cStatusP",$data->state_id)'), 'remark')));
?>

<br />
<h2>New Entity</h2>
<?php 
echo $this->renderPartial('_formEntity', array('model' => $modelEntity));
예제 #2
0
    $this->breadcrumbs = array($model->getparent->name => array('view', 'id' => $model->getparent->id), $model->name);
} else {
    $this->breadcrumbs = array($model->name);
}
$this->menu = array(array('label' => 'Home', 'url' => array('/aOrganization')), array('label' => 'Create', 'url' => array('create')), array('label' => 'Update', 'url' => array('update', 'id' => $model->id)), array('label' => 'Delete', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')));
$this->menu1 = aOrganization::getTopUpdated();
$this->menu2 = aOrganization::getTopCreated();
$this->menu3 = aOrganization::getTopRelated($model->id);
?>

<div class="page-header">
	<h1>
		<?php 
echo CHtml::image(Yii::app()->request->baseUrl . '/images/icon/document_organization_chart_01.png');
?>
		<?php 
echo $model->name;
?>
	</h1>
</div>


<?php 
//$this->widget('bootstrap.widgets.BootDetailView', array(
$this->widget('ext.XDetailView', array('ItemColumns' => 2, 'data' => $model, 'attributes' => array('branch_code', 'name', 'address', 'address2', 'address3', 'address4', 'pos_code', 'phone_code_area', 'telephone', 'fax', 'email', 'website')));
?>

<h2>Account Behalf of This Entity</h2>
<?php 
$this->widget('bootstrap.widgets.BootGridView', array('id' => 't-account-grid', 'dataProvider' => tAccountEntity::model()->searchEntity($model->id), 'itemsCssClass' => 'table table-striped table-bordered', 'template' => '{items}{pager}', 'columns' => array(array('header' => 'Account', 'type' => 'raw', 'value' => 'CHtml::link($data->account->account_concat(),Yii::app()->createUrl("/tAccount/view",array("id"=>$data->parent_id)))'), array('header' => 'Type Account', 'name' => 'haschild_id', 'value' => '$data->account->getRoot()'), array('header' => 'Currency', 'name' => 'currency_id', 'value' => '$data->account->getCurrency()'), array('header' => 'Status', 'name' => 'state_id', 'value' => '$data->account->getState()'))));
 public function loadModelEntity($id)
 {
     $model = tAccountEntity::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }