示例#1
0
 public function executeReplyOut()
 {
     $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $outclass_counseling = OutclassCounselingPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($outclass_counseling);
     $this->outbox_emp = new OutboxEmp();
     $this->outbox_emp = new OutboxEmp();
     if ($outclass_counseling->getAcademicCalendar()->getCourseModel() == 'A') {
         $this->actions = array(array('name' => 'kirim', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")), array('name' => 'cancel', 'url' => 'course_counseling/listEmployee', 'color' => 'black'));
     } else {
         $this->actions = array(array('name' => 'kirim', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")), array('name' => 'cancel', 'url' => 'course_counseling/listEmployee2', 'color' => 'black'));
     }
     $this->subtitle = $employee->toString();
     $this->type = 'add';
     $this->employee_id = $employee_id;
     $this->outclass_counseling = $outclass_counseling;
     $this->student_id = $outclass_counseling->getStudentId();
 }
示例#2
0
 public function executeShowOutclassCounseling()
 {
     $class_counseling = OutclassCounselingPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($class_counseling);
     $this->subtitle = StudentPeer::retrieveByPK($class_counseling->getStudentId())->toString() . ' - id:' . $class_counseling->getId();
     $actions = array(array('name' => 'back', 'url' => 'sm_content/listOutclassCounseling', 'color' => 'black'));
     $this->actions = $actions;
     $actions2 = array(array('name' => '<span>Konseling Dalam Kelas</span>', 'url' => 'sm_content/listCounseling', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Konseling Luar Kelas</span>', 'url' => 'sm_content/listOutclassCounseling', 'color' => 'sun', 'type' => 'direct'));
     $this->actions2 = $actions2;
     $this->class_counseling = $class_counseling;
 }