コード例 #1
0
ファイル: view.php プロジェクト: rinodung/EduSec3.0.0
<div class="portlet box blue view" style="margin-top:50px;">
<div class="portlet-title"><span class="box-title"><i class="fa fa-sitemap"></i> Batch(s) of Course</span>
</div>
<div class="operation">
<?php if(Yii::app()->user->checkAccess('Batch.Create')) { ?>
<?php echo CHtml::link('<i class="fa fa-plus-square"></i>Add Batch', array('batch/create', 'courseId'=>$model->course_id), array('class'=>'btn green'));
}
?>

</div>
<?php 
$visible=Yii::app()->user->checkAccess("Batch.Update")? true : false; ?>
<?php 
	$batch = new Batch;
	$dataProvider = $batch->search1($model->course_id);
	$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'batch-grid',
	'dataProvider'=>$dataProvider,
	//'filter'=>$batch,
	//'selectionChanged'=>"function(id){
	//window.location='" . Yii::app()->urlManager->createUrl('batch/view', array('id'=>'')) . "' + $.fn.yiiGridView.getSelection(id);
	//}",
	'columns'=>array(
		array(
		'header'=>'SI No',
		'class'=>'IndexColumn',
		),
		//'course_id',
		array(
		'name'=>'batch_name',