<?php /* @var $this PersonviewController */ /* @var $model PersonSpecialityView */ Yii::app()->bootstrap->register(); ?> <center><h2>Абітурієнти контрактної форми навчання</h2></center> <?php $data = $model->searchPrice(); $cdpfilter = array(">1" => "будь-яка", "<1" => "немає"); foreach (CHtml::listData(Coursedp::model()->findAll(), "idCourseDP", "CourseDPName") as $key => $val) { $cdpfilter[$key] = $val; } $olympfilter = array(">1" => "будь-яка", "<1" => "немає"); foreach (CHtml::listData(Olympiadsawards::model()->findAll(), "OlympiadAwardID", "OlympiadAwardName") as $key => $val) { $olympfilter[$key] = $val; } $this->widget('bootstrap.widgets.TbGroupGridView', array('id' => 'person-speciality-view-grid', 'type' => 'striped bordered condensed', 'dataProvider' => $data, 'filter' => $model, 'mergeColumns' => array('FIO', 'Birthday', "PersonRequestNumber", 'idPerson', "QualificationID", 'isCopyEntrantDoc', 'CoursedpID', 'OlympiadID', 'CreateDate', "RequestFromEB"), 'columns' => array(array('name' => 'idPerson', 'htmlOptions' => array('style' => 'width: 50px')), array('name' => 'QualificationID', 'htmlOptions' => array('style' => 'width: 100px'), "value" => '!empty($data->QualificationID) ? $data->qualification->QualificationName: "немаэ"', 'filter' => CHtml::listData(Qualifications::model()->findAll(), "idQualification", "QualificationName")), array('name' => 'FIO', 'htmlOptions' => array('style' => 'width: 250px')), array('name' => 'Birthday', 'htmlOptions' => array('style' => 'width: 100px')), array('name' => 'EducationFormID', 'htmlOptions' => array('style' => 'width: 70px'), 'filter' => array('1' => 'Денна', '2' => 'Заочна'), 'value' => '($data->EducationFormID=="1")?("Денна"):("Заочна")'), array('name' => 'SpecCodeName'), array('class' => 'bootstrap.widgets.TbButtonColumn', 'template' => '{sign}', 'buttons' => array('sign' => array('label' => 'Підписати контракт', 'icon' => 'pencil', 'url' => 'Yii::app()->createUrl("pfd/contracts/create",array("specid"=>$data->idPersonSpeciality))', 'options' => array('class' => 'btn', 'onclick' => "PSN.editSpec(this); return false;", 'target' => "_blank"))))))); ?>
/** * 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 = Coursedp::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
<div class="row-fluid" id="subjects-holder"> <?php $this->renderPartial("_subjects_holder", array("model" => $model, 'specialityid' => $model->SepcialityID)); ?> </div> <hr> <div class="row-fluid"> <div class="span6"> <div class="row-fluid"> <div class="span8"> <?php echo $form->labelEx($model, 'CoursedpID'); ?> <?php echo $form->dropDownList($model, 'CoursedpID', CHtml::listData(Coursedp::model()->findAll(), "idCourseDP", "CourseDPName"), array('empty' => "", 'class' => "span12")); ?> <?php //echo $form->error($model,'CoursedpID'); ?> </div> <div class="span4"> <?php echo $form->labelEx($model, 'CoursedpBall'); ?> <?php echo $form->textField($model, 'CoursedpBall', array('class' => "span12")); ?> <?php //echo $form->error($model,'AdditionalBall'); ?>