示例#1
0
文件: _view.php 项目: ranvirp/rdp
	<b><?php 
echo CHtml::encode($data->getAttributeLabel('id'));
?>
:</b>
	<?php 
echo CHtml::link(CHtml::encode($data->id), array('view', 'id' => $data->id));
?>
	<br />

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('schemeid'));
?>
:</b>
	<?php 
echo CHtml::encode(Schemes::model()->findByPk($data->schemeid)->name);
?>
	<br />

	
	<b><?php 
echo CHtml::encode($data->getAttributeLabel('from'));
?>
:</b>
	<?php 
echo CHtml::encode(Designation::model()->findByPk($data->from)->name);
?>
	<br />

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('to'));
示例#2
0
文件: _form.php 项目: ranvirp/rdp
$form = $this->beginWidget('CActiveForm', array('id' => 'schemes-form', 'enableAjaxValidation' => false));
?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php 
echo $form->errorSummary($model);
?>

	<div class="row">
	<?php 
echo $form->labelEx($model, 'parentid');
?>
		
	<?php 
echo $form->dropDownList($model, 'parentid', CHtml::listData(Schemes::model()->findAll("", array('order' => 'value ASC')), 'id', 'name'), array('empty' => 'Select parent Scheme'));
?>
		<?php 
echo $form->error($model, 'parentid');
?>
	</div>
	

	<div class="row">
		<?php 
echo $form->labelEx($model, 'name');
?>
		<?php 
echo $form->textArea($model, 'name', array('rows' => 6, 'cols' => 50));
?>
		<?php 
示例#3
0
文件: _form.php 项目: ranvirp/rdp
		<?php 
echo $form->dropDownList($model, 'to', array());
?>
	<?php 
echo $form->error($model, 'to', "");
?>
	</div>
	</td></tr>
	<tr>
	<td>
	<div class="row">
		<?php 
echo CHtml::label('Scheme:', false);
?>
		<?php 
echo $form->dropDownList($model, 'schemeid', CHtml::listData(Schemes::model()->findAll(), 'id', 'name'), array('empty' => 'Select Scheme'));
?>
		<?php 
echo $form->error($model, 'schemeid');
?>
	
	<?php 
echo $form->hiddenField($model, 'from', array('value' => $from));
?>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'instruction');
?>
		<?php 
echo $form->textArea($model, 'instruction', array('rows' => 5, 'cols' => 50));
示例#4
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = Schemes::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }