/** * Render the main calendar view from skin template */ function calendar_view() { $this->rc->output->set_pagetitle($this->gettext('calendar')); // Add CSS stylesheets to the page header $this->ui->addCSS(); // Add JS files to the page header $this->ui->addJS(); $this->ui->init_templates(); $this->rc->output->add_label('lowest', 'low', 'normal', 'high', 'highest', 'delete', 'cancel', 'uploading', 'noemailwarning', 'close'); $this->rc->output->add_label('libcalendaring.itipaccepted', 'libcalendaring.itiptentative', 'libcalendaring.itipdeclined', 'libcalendaring.itipdelegated', 'libcalendaring.expandattendeegroup', 'libcalendaring.expandattendeegroupnodata'); // initialize attendees autocompletion rcube_autocomplete_init(); $this->rc->output->set_env('timezone', $this->timezone->getName()); $this->rc->output->set_env('calendar_driver', $this->rc->config->get('calendar_driver'), false); $this->rc->output->set_env('calendar_resources', (bool) $this->rc->config->get('calendar_resources_driver')); $this->rc->output->set_env('mscolors', jqueryui::get_color_values()); $this->rc->output->set_env('identities-selector', $this->ui->identity_select(array('id' => 'edit-identities-list', 'aria-label' => $this->gettext('roleorganizer')))); $view = rcube_utils::get_input_value('view', rcube_utils::INPUT_GPC); if (in_array($view, array('agendaWeek', 'agendaDay', 'month', 'table'))) { $this->rc->output->set_env('view', $view); } if ($date = rcube_utils::get_input_value('date', rcube_utils::INPUT_GPC)) { $this->rc->output->set_env('date', $date); } if ($msgref = rcube_utils::get_input_value('itip', rcube_utils::INPUT_GPC)) { $this->rc->output->set_env('itip_events', $this->itip_events($msgref)); } $this->rc->output->send("calendar.calendar"); }
/** * Render the main calendar view from skin template */ function calendar_view() { $this->rc->output->set_pagetitle($this->gettext('calendar')); // Add CSS stylesheets to the page header $this->ui->addCSS(); // Add JS files to the page header $this->ui->addJS(); $this->ui->init_templates(); $this->rc->output->add_label('lowest', 'low', 'normal', 'high', 'highest', 'delete', 'cancel', 'uploading', 'noemailwarning'); // initialize attendees autocompletion rcube_autocomplete_init(); $this->rc->output->set_env('timezone', $this->timezone->getName()); $this->rc->output->set_env('calendar_driver', $this->rc->config->get('calendar_driver'), false); $this->rc->output->set_env('identities-selector', $this->ui->identity_select(array('id' => 'edit-identities-list'))); // Merge color values for available drivers $mscolors = array(); foreach ($this->get_drivers() as $name => $driver) { $colors = $driver->get_color_values(); if ($colors !== false) { $mscolor = array_merge($mscolors, $colors); } } $this->rc->output->set_env('mscolors', array_unique($mscolors)); $view = get_input_value('view', RCUBE_INPUT_GPC); if (in_array($view, array('agendaWeek', 'agendaDay', 'month', 'table'))) { $this->rc->output->set_env('view', $view); } if ($date = get_input_value('date', RCUBE_INPUT_GPC)) { $this->rc->output->set_env('date', $date); } $this->rc->output->send("calendar.calendar"); }