Esempio n. 1
0
/* @var $this MrClassController */
/* @var $model MrClass */
//$this->breadcrumbs=array(
//	'Mr Classes'=>array('index'),
//	$model->id,
//);
//
//$this->menu=array(
//	array('label'=>'List MrClass', 'url'=>array('index')),
//	array('label'=>'Create MrClass', 'url'=>array('create')),
//	array('label'=>'Update MrClass', 'url'=>array('update', 'id'=>$model->id)),
//	array('label'=>'Delete MrClass', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
//	array('label'=>'Manage MrClass', 'url'=>array('admin')),
//);
if (Yii::app()->user->hasFlash('mrClassAdd')) {
    ?>
    <div class="alert alert-success"> <?php 
    echo Yii::app()->user->getFlash('mrClassAdd');
    ?>
 </div>
<?php 
}
?>
<h1>View Class #<?php 
echo $model->id;
?>
</h1>

<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', array('name' => 'course_id', 'type' => 'raw', 'value' => MrCourse::model()->findByPk($model->course_id)->course_name), 'class_details', 'schedule', array('name' => 'start_date', 'value' => $this->getDateFormat($model->start_date)), array('name' => 'end_date', 'value' => $this->getDateFormat($model->end_date)), 'capacity', 'status')));
Esempio n. 2
0
<!--	<div class="row">
		<?php 
echo $form->label($model, 'id');
?>
		<?php 
echo $form->textField($model, 'id');
?>
	</div>-->

	<div class="form-group">
		<?php 
echo $form->labelEx($model, 'course_id');
?>
             <?php 
echo $form->dropDownList($model, 'course_id', CHtml::listData(MrCourse::model()->findAll('status="Y"'), 'id', 'course_name'), array('empty' => '--- Select Course ---'));
?>
		<?php 
// echo $form->textField($model,'course_id');
?>
		<?php 
echo $form->error($model, 'course_id');
?>
	</div>

<!--	<div class="form-group">
		<?php 
echo $form->labelEx($model, 'class_details');
?>
		<?php 
echo $form->textArea($model, 'class_details', array('rows' => 6, 'cols' => 50));
    </tr>  
    <tr>
        <td class="srl">05</td>    
        <td class="app_label">Telephone/Mobile No. </td>  
        <td class="app_details"><?php 
echo $mobile;
?>
 </td>  
    </tr>  
    
    <tr>
        <td class="srl">06</td>    
        <td class="app_label">Course applied </td>  
        <td class="app_details">
        <?php 
echo CHtml::dropDownList('course_id', '', CHtml::listData(MrCourse::model()->findAll('status="Y"'), 'id', 'course_name'), array('empty' => '--- Select Course ---', 'onchange' => 'javascript:showClases();', 'class' => 'validate[required]'));
?>
         <div id="classesDiv"></div>  
        </td>  
    </tr>  
    
    <tr>
        <td class="srl">07</td>    
        <td class="app_label">C.D.C. No. <span style="float:right"><?php 
echo $CDCNO;
?>
&nbsp;&nbsp;</span></td>  
        <td class="app_details">Last sign off  
        <?php 
$this->widget('zii.widgets.jui.CJuiDatePicker', array('name' => 'last_sign_off', 'value' => date('d-m-Y'), 'options' => array('showAnim' => "slideDown", 'changeMonth' => true, 'numberOfMonths' => 1, 'showOn' => "button", 'buttonImageOnly' => false, 'dateFormat' => "dd-mm-yy", 'showButtonPanel' => true, 'minDate' => -5000, 'maxDate' => "+1M +5D")));
?>
Esempio n. 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 $id the ID of the model to be loaded
  * @return MrCourse the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = MrCourse::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Esempio n. 5
0
 function gridCourseName($val)
 {
     return MrCourse::model()->findByPk($val['course_id'])->course_name;
 }