/**
  * 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 = QualificationType::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Пример #2
0
?>
		<?php 
echo $form->textField($model, 'course_name', array('size' => 60, 'maxlength' => 100));
?>
<span class="status">&nbsp;</span>
		<?php 
echo $form->error($model, 'course_name');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'course_category_id');
?>
		<?php 
echo $form->dropDownList($model, 'course_category_id', CHtml::listData(QualificationType::model()->findAll(), 'qualification_type_id', 'qualification_type_name'), array('empty' => 'Select Category'));
?>
<span class="status">&nbsp;</span>
		<?php 
echo $form->error($model, 'course_category_id');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'course_level');
?>
		<?php 
echo $form->textField($model, 'course_level');
?>
<span class="status">&nbsp;</span>
Пример #3
0
<?php

$this->breadcrumbs = array('Course Master' => array('admin'), 'Manage');
?>
<h1>Manage Courses</h1>
 <div class="operation">
<?php 
echo CHtml::link('PDF', array('exportToPDFExcel/courseExportToPdf'), array('class' => 'btnyellow', 'target' => '_blank'));
echo CHtml::link('Excel', array('exportToPDFExcel/courseExportToExcel'), array('class' => 'btnblue'));
?>
</div>
<div class="portlet box blue">
 <div class="portlet-title"> Course Master
 </div>
<?php 
echo CHtml::link('Add New +', array('courseMaster/create'), array('class' => 'btn green'));
?>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'course-master-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectionChanged' => "function(id){\n\t\twindow.location='" . Yii::app()->urlManager->createUrl('courseMaster/view', array('id' => '')) . "' + \$.fn.yiiGridView.getSelection(id);\n\t}", 'columns' => array(array('header' => 'No', 'class' => 'IndexColumn'), 'course_name', array('name' => 'course_category_id', 'value' => '$data->relCat->qualification_type_name', 'filter' => CHtml::listData(QualificationType::model()->findAll(), 'qualification_type_id', 'qualification_type_name')), 'course_level', 'course_completion_hours', 'course_code', array('name' => 'course_cost', 'value' => '$data->concated')), 'pager' => array('class' => 'AjaxList', 'maxButtonCount' => $model->count(), 'header' => '')));
?>


</div>
Пример #4
0
                                "type":"POST",
				"dataType":"html",
                                "url":"' . CHtml::normalizeUrl(array("view")) . '",
                                "data": "id="+id,
                                "success":function(data){
				 $(".items td").click(function() {
				   if(!$(this).hasClass("checkbox-column")) {
					$("#unitData").html(data);
				   	$("#custom-dialog").dialog("open");
					
				   }
				   
				});
			 },				  
                    });
		}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'chk', 'value' => '$data->course_master_id'), 'course_name', array('name' => 'course_category_id', 'value' => '$data->relCat->qualification_type_name', 'filter' => CHtml::listData(QualificationType::model()->findAll(), 'qualification_type_id', 'qualification_type_name')), 'course_level', 'course_completion_hours', 'course_code', array('name' => 'course_cost', 'value' => '$data->concated'))));
?>

<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'custom-dialog', 'options' => array('autoOpen' => false, 'width' => 900, 'modal' => true, 'position' => "center", 'title' => "Unit of this course", 'overlay' => array('opacity' => 0.5, 'background' => "black"), 'htmlOptions' => array('class' => 'custom-dialog'), 'close' => 'js:function(event, ui) { window.location.href = "admin"; }')));
?>
<div id="unitData"></div>
<?php 
$this->endWidget('zii.widgets.jui.CJuiDialog');
?>

<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'dialogClassroom', 'options' => array('title' => 'Add Course', 'autoOpen' => false, 'position' => "center", 'modal' => true, 'width' => 900, 'height' => 450)));
?>
<div class="divForForm"></div>
 
        if ($m != 0) {
            ?>
	<tr>
       		<td>
			<?php 
            echo $k;
            ?>
		</td>
		<td>
			<?php 
            echo $v['course_name'];
            ?>
		</td>	
		<td>	
			<?php 
            echo QualificationType::model()->findByPk($v['course_category_id'])->qualification_type_name;
            ?>
 		
		</td>    
		<td>	
			<?php 
            echo $v['course_level'];
            ?>
		</td>  
		<td>	
			<?php 
            echo $v['course_completion_hours'];
            ?>
		</td> 

		<td>