示例#1
0
 /**
  * create a new room requests
  */
 public function new_action()
 {
     $options = array();
     $this->url_params = array();
     if (Request::get('origin') !== null) {
         $this->url_params['origin'] = Request::get('origin');
     }
     if (!RoomRequest::existsByCourse($this->course_id)) {
         $options[] = array('value' => 'course', 'name' => _('alle regelmäßigen und unregelmäßigen Termine der Veranstaltung'));
     }
     foreach (SeminarCycleDate::findBySeminar($this->course_id) as $cycle) {
         if (!RoomRequest::existsByCycle($cycle->getId())) {
             $name = _("alle Termine einer regelmäßigen Zeit");
             $name .= ' (' . $cycle->toString('full') . ')';
             $options[] = array('value' => 'cycle_' . $cycle->getId(), 'name' => $name);
         }
     }
     foreach (SeminarDB::getSingleDates($this->course_id) as $date) {
         if (!RoomRequest::existsByDate($date['termin_id'])) {
             $name = _("Einzeltermin der Veranstaltung");
             $termin = new SingleDate($date['termin_id']);
             $name .= ' (' . $termin->toString() . ')';
             $options[] = array('value' => 'date_' . $date['termin_id'], 'name' => $name);
         }
     }
     $this->options = $options;
     Helpbar::get()->addPlainText(_('Information'), _('Hier können Sie festlegen, welche Art von Raumanfrage Sie erstellen möchten.'));
 }