Пример #1
0
 public function executeReview(sfWebRequest $request)
 {
     if (!$this->getUser()->hasCredential(array('Administrator', 'Staff', 'Pilot', 'Coordinator', 'Volunteer'), false)) {
         $this->getUser()->setFlash("warning", 'You don\'t have permission to access this url ' . $request->getReferer());
         $this->redirect('dashboard/index');
     }
     $this->getUser()->addRecentItem('Mission Report', 'mission_report', 'mission_report/review');
     sfContext::getInstance()->getConfiguration()->loadHelpers('Partial');
     slot('nav_menu', array('reports', 'mission_report_review'));
     # filter
     $this->processFilter($request);
     $this->miss = $request->hasParameter('missing');
     if ($this->miss) {
         $this->pagers = MissionLegPeer::getMigaPager($this->max, $this->page);
         $this->mission_legs = $this->pagers->getResults();
     } else {
         if ($request->isMethod('post') || $request->getParameter('page')) {
             $this->pager = MissionReportPeer::getPager($this->max, $this->page, $this->from_date, $this->to_date, $this->pilot_name, $this->passenger_name, $this->not_approved, $this->approved, $this->missing);
             $this->reports = $this->pager->getResults();
             //$this->date_widget = new widgetFormDate(array('format_date' => array('js' => 'mm/dd/yy', 'php' => 'm/d/Y')), array('class' => 'text'));
         }
     }
     $this->date_widget = new widgetFormDate(array('format_date' => array('js' => 'mm/dd/yy', 'php' => 'm/d/Y')), array('class' => 'text'));
 }