<div class="row"> <div class="span7"> <h2> <?php echo Yii::t('P3MediaModule.crud', 'Data'); ?> <small> #<?php echo $model->id; ?> </small> </h2> <?php $this->widget('TbDetailView', array('data' => $model, 'attributes' => array(array('name' => 'id', 'type' => 'raw', 'value' => $this->widget('TbEditableField', array('model' => $model, 'attribute' => 'id', 'url' => $this->createUrl('/p3media/p3MediaTranslation/editableSaver')), true)), array('name' => 'p3_media_id', 'value' => $model->p3Media !== null ? CHtml::link('<i class="icon icon-circle-arrow-left"></i> ' . $model->p3Media->itemLabel, array('/p3media/p3Media/view', 'id' => $model->p3Media->id), array('class' => '')) . ' ' . CHtml::link('<i class="icon icon-pencil"></i> ', array('/p3media/p3Media/update', 'id' => $model->p3Media->id), array('class' => '')) : 'n/a', 'type' => 'html'), array('name' => 'status', 'type' => 'raw', 'value' => $this->widget('TbEditableField', array('model' => $model, 'emptytext' => 'Click to select', 'type' => 'select', 'source' => P3MediaTranslation::optsstatus(), 'attribute' => 'status', 'url' => $this->createUrl('/p3media/p3MediaTranslation/editableSaver'), 'select2' => array('placeholder' => 'Select...', 'allowClear' => true)), true)), array('name' => 'language', 'type' => 'raw', 'value' => $this->widget('TbEditableField', array('model' => $model, 'emptytext' => 'Click to select', 'type' => 'select', 'source' => P3MediaTranslation::optslanguage(), 'attribute' => 'language', 'url' => $this->createUrl('/p3media/p3MediaTranslation/editableSaver'), 'select2' => array('placeholder' => 'Select...', 'allowClear' => true)), true)), array('name' => 'title', 'type' => 'raw', 'value' => $this->widget('TbEditableField', array('model' => $model, 'attribute' => 'title', 'url' => $this->createUrl('/p3media/p3MediaTranslation/editableSaver')), true)), array('name' => 'description', 'type' => 'raw', 'value' => $model->description), array('name' => 'access_owner', 'type' => 'raw', 'value' => $model->access_owner), array('name' => 'access_read', 'type' => 'raw', 'value' => $model->access_read), array('name' => 'access_update', 'type' => 'raw', 'value' => $model->access_update), array('name' => 'access_delete', 'type' => 'raw', 'value' => $model->access_delete), array('name' => 'copied_from_id', 'type' => 'raw', 'value' => $model->copied_from_id), array('name' => 'created_at', 'type' => 'raw', 'value' => $model->created_at), array('name' => 'updated_at', 'type' => 'raw', 'value' => $model->updated_at)))); ?> </div> <div class="span5"> <div class="well"> <?php $this->renderPartial('_view-relations', array('model' => $model)); ?> </div> </div> </div> <?php $this->renderPartial("_toolbar", array("model" => $model));
<div class="row"> <?php echo $form->label($model, 'access_update'); ?> <?php echo $form->dropDownList($model, 'access_update', P3MediaTranslation::optsaccessupdate(), array('empty' => 'undefined')); ?> </div> <div class="row"> <?php echo $form->label($model, 'access_delete'); ?> <?php echo $form->dropDownList($model, 'access_delete', P3MediaTranslation::optsaccessdelete(), array('empty' => 'undefined')); ?> </div> <div class="row"> <?php echo $form->label($model, 'copied_from_id'); ?> <?php echo $form->textField($model, 'copied_from_id', array('disabled' => 'disabled')); ?> </div> <div class="row"> <?php echo $form->label($model, 'created_at');
public function loadModel($id) { $m = P3MediaTranslation::model(); // apply scope, if available $scopes = $m->scopes(); if (isset($scopes[$this->scope])) { $m->{$this->scope}(); } $model = $m->findByPk($id); if ($model === null) { throw new CHttpException(404, Yii::t('P3MediaModule.crud', 'The requested page does not exist.')); } return $model; }