Пример #1
0
 function index_action()
 {
     $form_fields['comment'] = array('caption' => _("Kommentar"), 'type' => 'textarea', 'attributes' => array('rows' => 4, 'style' => 'width:100%'));
     $form_fields['snd_message'] = array('caption' => _("Benachrichtigung über ausfallende Termine an alle Teilnehmer verschicken"), 'type' => 'checkbox', 'attributes' => array('style' => 'vertical-align:middle'));
     $form_buttons['save_close'] = array('caption' => _('OK'), 'info' => _("Termine absagen und Dialog schließen"));
     $form = new StudipForm($form_fields, $form_buttons, 'cancel_dates', false);
     if ($form->isClicked('save_close')) {
         $sem = Seminar::getInstance($this->course_id);
         $comment = $form->getFormFieldValue('comment');
         foreach ($this->dates as $date) {
             $sem->cancelSingleDate($date->getTerminId(), $date->getMetadateId());
             $date->setComment($comment);
             $date->setExTermin(true);
             $date->store();
         }
         if ($form->getFormFieldValue('snd_message') && count($this->dates)) {
             $snd_messages = raumzeit_send_cancel_message($comment, $this->dates);
             if ($snd_messages) {
                 $msg = sprintf(_("Es wurden %s Benachrichtigungen gesendet."), $snd_messages);
             }
         }
         PageLayout::postMessage(MessageBox::success(_("Folgende Termine wurden abgesagt") . ($msg ? ' (' . $msg . '):' : ':'), array_map(function ($d) {
             return $d->toString();
         }, $this->dates)));
         $this->redirect($this->url_for('course/dates'));
     }
     $this->form = $form;
 }
Пример #2
0
 /**
  * This method is called to show the form to upload a new avatar for a
  * course.
  *
  * @return void
  */
 function index_action()
 {
     // nothing to do
     if ($this->studygroup_mode) {
         $this->avatar = StudygroupAvatar::getAvatar($this->course_id);
     } else {
         $this->avatar = CourseAvatar::getAvatar($this->course_id);
     }
     if (get_config('NEWS_RSS_EXPORT_ENABLE') && $this->course_id) {
         $rss_id = StudipNews::GetRssIdFromRangeId($this->course_id);
         if ($rss_id) {
             PageLayout::addHeadElement('link', array('rel' => 'alternate', 'type' => 'application/rss+xml', 'title' => 'RSS', 'href' => 'rss.php?id=' . $rss_id));
         }
     }
     // Fetch news
     $response = $this->relay('news/display/' . $this->course_id);
     $this->news = $response->body;
     // Fetch  votes
     if (get_config('VOTE_ENABLE')) {
         $response = $this->relay('questionnaire/widget/' . $this->course_id);
         $this->votes = $response->body;
     }
     // Fetch dates
     if (!$this->studygroup_mode) {
         $response = $this->relay("calendar/contentbox/display/{$this->course_id}/1210000");
         $this->dates = $response->body;
     }
 }
Пример #3
0
 /**
  * Common code for all actions: set default layout and page title.
  *
  * @param type $action
  * @param type $args
  */
 function before_filter(&$action, &$args)
 {
     $this->validate_args($args, array('option', 'option'));
     parent::before_filter($action, $args);
     // set correct encoding if this is an ajax-call
     if (Request::isAjax()) {
         header('Content-Type: text/html; charset=Windows-1252');
     }
     $this->flash = Trails_Flash::instance();
     // set default layout
     $layout = $GLOBALS['template_factory']->open('layouts/base');
     $this->set_layout($layout);
     // Set help keyword for Stud.IP's user-documentation and page title
     PageLayout::setHelpKeyword('Basis.Forum');
     PageLayout::setTitle($_SESSION['SessSemName']['header_line'] . ' - ' . _('Forum'));
     $this->AVAILABLE_DESIGNS = array('web20', 'studip');
     if ($GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP'] && $GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP'] != '/') {
         $this->picturepath = $GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP'] . '/' . $this->dispatcher->trails_root . '/img';
     } else {
         $this->picturepath = '/' . $this->dispatcher->trails_root . '/img';
     }
     // we want to display the dates in german
     setlocale(LC_TIME, 'de_DE@euro', 'de_DE', 'de', 'ge');
     // the default for displaying timestamps
     $this->time_format_string = "%a %d. %B %Y, %H:%M";
     $this->time_format_string_short = "%d.%m.%Y, %H:%M";
     $this->template_factory = new Flexi_TemplateFactory(dirname(__FILE__) . '/../templates');
     //$this->check_token();
     ForumVisit::setVisit($this->getId());
     if (Request::int('page')) {
         ForumHelpers::setPage(Request::int('page'));
     }
     $this->seminar_id = $this->getId();
 }
Пример #4
0
 /**
  * @todo der include muss weg
  */
 public function showweek_action($timestamp = null)
 {
     $calendar = Calendar::getInstance(Calendar::RANGE_INST, $this->institute_id);
     PageLayout::setTitle(getHeaderLine($this->institute_id) . ' - ' . _("Terminkalender - Wochenansicht"));
     $_SESSION['calendar_sess_control_data']['view_prv'] = 'showweek';
     Navigation::activateItem("/course/calendar/week");
     $atime = $timestamp ?: time();
     $at = date('G', $atime);
     if ($at >= $this->calendar_settings['start'] && $at <= $this->calendar_settings['end'] || !$atime) {
         $st = $this->calendar_settings['start'];
         $et = $this->calendar_settings['end'];
     } elseif ($at < $this->calendar_settings['start']) {
         $st = 0;
         $et = $this->calendar_settings['start'] + 2;
     } else {
         $st = $this->calendar_settings['end'] - 2;
         $et = 23;
     }
     include_once $GLOBALS['RELATIVE_PATH_CALENDAR'] . '/lib/DbCalendarWeek.class.php';
     $this->_calendar = $calendar;
     $this->atime = $atime;
     $this->cmd = 'showweek';
     $this->st = $st;
     $this->et = $et;
 }
Пример #5
0
 public function initialize()
 {
     PageLayout::addStylesheet($this->getPluginUrl() . '/css/style.css');
     //PageLayout::addStylesheet($this->getPluginURL().'/assets/style.css');
     PageLayout::addScript($this->getPluginURL() . '/js/script.js');
     $this->setupAutoload();
 }
Пример #6
0
 /**
  *
  **/
 public function authorize_action()
 {
     global $user, $auth;
     $auth->login_if($user->id == 'nobody');
     $user_id = OAuthUser::getMappedId($user->id);
     // Fetch the oauth store and the oauth server.
     $store = OAuthStore::instance();
     $server = new OAuthServer();
     try {
         // Check if there is a valid request token in the current request
         // Returns an array with the consumer key, consumer secret, token, token secret and token type.
         $rs = $server->authorizeVerify();
         if (isset($_POST['allow'])) {
             // See if the user clicked the 'allow' submit button (or whatever you choose)
             $authorized = array_key_exists('allow', $_POST);
             // Set the request token to be authorized or not authorized
             // When there was a oauth_callback then this will redirect to the consumer
             $server->authorizeFinish($authorized, $user_id);
             // No oauth_callback, show the user the result of the authorization
             // ** your code here **
             PageLayout::postMessage(Messagebox::success(_('Sie haben der Applikation Zugriff auf Ihre Daten gewährt.')));
             $this->redirect('user#' . $rs['consumer_key']);
         }
     } catch (OAuthException $e) {
         // No token to be verified in the request, show a page where the user can enter the token to be verified
         // **your code here**
         die('invalid');
     }
     PageLayout::disableHeader();
     $this->set_layout($GLOBALS['template_factory']->open('layouts/base_without_infobox'));
     $this->rs = $rs;
 }
Пример #7
0
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     // Lock context to user id
     $this->owner = $GLOBALS['user'];
     $this->context_id = $this->owner->id;
     $this->full_access = true;
     if (Config::get()->PERSONALDOCUMENT_OPEN_ACCESS) {
         $username = Request::username('username', $GLOBALS['user']->username);
         $user = User::findByUsername($username);
         if ($user && $user->id !== $GLOBALS['user']->id) {
             $this->owner = $user;
             $this->context_id = $user->id;
             $this->full_access = Config::get()->PERSONALDOCUMENT_OPEN_ACCESS_ROOT_PRIVILEDGED && $GLOBALS['user']->perms === 'root';
             URLHelper::bindLinkParam('username', $username);
         }
     }
     $this->limit = $GLOBALS['user']->cfg->PERSONAL_FILES_ENTRIES_PER_PAGE ?: Config::get()->ENTRIES_PER_PAGE;
     $this->userConfig = DocUsergroupConfig::getUserConfig($GLOBALS['user']->id);
     if ($this->userConfig['area_close'] == 1) {
         $this->redirect('document/closed/index');
     }
     if (Request::isPost()) {
         CSRFProtection::verifySecurityToken();
     }
     if (($ticket = Request::get('studip-ticket')) && !check_ticket($ticket)) {
         $message = _('Bei der Verarbeitung Ihrer Anfrage ist ein Fehler aufgetreten.') . "\n" . _('Bitte versuchen Sie es erneut.');
         PageLayout::postMessage(MessageBox::error($message));
         $this->redirect('document/files/index');
     }
 }
Пример #8
0
 /**
  * Set up this controller.
  *
  * @param String $action Name of the action to be invoked
  * @param Array  $args   Arguments to be passed to the action method
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setTitle(_('Allgemeine Einstellungen anpassen'));
     Navigation::activateItem('/profile/settings/general');
     SkipLinks::addIndex(_('Allgemeine Einstellungen anpassen'), 'layout_content', 100);
 }
 /**
  * Initialize a new instance of the plugin.
  */
 function __construct()
 {
     parent::__construct();
     if (Config::get()->WYSIWYG && is_object($GLOBALS['user'])) {
         if (strpos($_SERVER['REQUEST_URI'], 'dispatch.php/settings/general') !== false) {
             if (Request::submitted('forced_language')) {
                 $GLOBALS['user']->cfg->store('WYSIWYG_DISABLE', Request::submitted('wysiwyg_user_config'));
             }
             $snippet = '
             <tr>
                 <td>
                     <label for="wysiwyg_user_config">
                         WYSIWYG Editor ausschalten<br>
                         <dfn id="cookie_auth_token_description">
                             Mit dieser Einstellung können Sie den Stud.IP WYSIWYG Editor ausschalten. Dadurch müssen Sie ggf. Texte in HTML schreiben.
                         </dfn>
                     </label>
                 </td>
                 <td>
                     <input type="checkbox" value="1" aria-describedby="wysiwyg_user_config" id="wysiwyg_user_config" name="wysiwyg_user_config" ' . ($GLOBALS['user']->cfg->WYSIWYG_DISABLE ? 'checked' : '') . '>
                 </td>
             </tr>';
             $snippet = jsready($snippet, 'script-double');
             PageLayout::addHeadElement('script', array('type' => 'text/javascript'), "jQuery(function (\$) {\$('#main_content tbody tr').first().after('{$snippet}');});");
         }
         if (!(Config::get()->WYSIWYG = !$GLOBALS['user']->cfg->WYSIWYG_DISABLE)) {
             $old_packages = array_flip(PageLayout::getSqueezePackages());
             unset($old_packages['wysiwyg']);
             call_user_func_array('PageLayout::setSqueezePackages', array_values(array_flip($old_packages)));
         }
     }
 }
Пример #10
0
 public function overview_action()
 {
     Navigation::activateItem("/admin/locations/sem_classes");
     if (count($_POST) && Request::submitted('delete') && Request::get("delete_sem_class")) {
         $sem_class = $GLOBALS['SEM_CLASS'][Request::get("delete_sem_class")];
         if ($sem_class->delete()) {
             PageLayout::postMessage(MessageBox::success(_("Veranstaltungskategorie wurde gelöscht.")));
             $GLOBALS['SEM_CLASS'] = SemClass::refreshClasses();
         }
     }
     if (count($_POST) && Request::get("add_name")) {
         $statement = DBManager::get()->prepare("SELECT 1 FROM sem_classes WHERE name = :name");
         $statement->execute(array('name' => Request::get("add_name")));
         $duplicate = $statement->fetchColumn();
         if ($duplicate) {
             $message = sprintf(_("Es existiert bereits eine Veranstaltungskategorie mit dem Namen \"%s\""), Request::get("add_name"));
             PageLayout::postMessage(MessageBox::error($message));
             $this->redirect('admin/sem_classes/overview');
         } else {
             $statement = DBManager::get()->prepare("INSERT INTO sem_classes SET name = :name, mkdate = UNIX_TIMESTAMP(), chdate = UNIX_TIMESTAMP() " . "");
             $statement->execute(array('name' => Request::get("add_name")));
             $id = DBManager::get()->lastInsertId();
             if (Request::get("add_like")) {
                 $sem_class = clone $GLOBALS['SEM_CLASS'][Request::get("add_like")];
                 $sem_class->set('name', Request::get("add_name"));
                 $sem_class->set('id', $id);
                 $sem_class->store();
             }
             $this->redirect(URLHelper::getURL($this->url_for('admin/sem_classes/details'), array('id' => $id)));
             PageLayout::postMessage(MessageBox::success(_("Veranstaltungskategorie wurde erstellt.")));
             $GLOBALS['SEM_CLASS'] = SemClass::refreshClasses();
         }
     }
 }
Пример #11
0
 /**
  *
  */
 function auth_registerform()
 {
     // set up dummy user environment
     if ($GLOBALS['user']->id !== 'nobody') {
         $GLOBALS['user'] = new Seminar_User('nobody');
         $GLOBALS['perm'] = new Seminar_Perm();
         $GLOBALS['auth'] = $this;
     }
     // set up user session
     include 'lib/seminar_open.php';
     if (!$_COOKIE[get_class($GLOBALS['sess'])]) {
         $register_template = $GLOBALS['template_factory']->open('nocookies');
     } else {
         $register_template = $GLOBALS['template_factory']->open('registerform');
         $register_template->set_attribute('validator', new email_validation_class());
         $register_template->set_attribute('error_msg', $this->error_msg);
         $register_template->set_attribute('username', Request::get('username'));
         $register_template->set_attribute('Vorname', Request::get('Vorname'));
         $register_template->set_attribute('Nachname', Request::get('Nachname'));
         $register_template->set_attribute('Email', Request::get('Email'));
         $register_template->set_attribute('title_front', Request::get('title_front'));
         $register_template->set_attribute('title_rear', Request::get('title_rear'));
         $register_template->set_attribute('geschlecht', Request::int('geschlecht', 0));
     }
     PageLayout::setHelpKeyword('Basis.AnmeldungRegistrierung');
     PageLayout::setTitle(_('Registrierung'));
     // $header_template = $GLOBALS['template_factory']->open('header');
     // $header_template->current_page = _('Registrierung');
     $layout = $GLOBALS['template_factory']->open('layouts/base.php');
     $register_template->set_layout($layout);
     // include 'lib/include/html_head.inc.php';
     // echo $header_template->render();
     echo $register_template->render();
     // include 'lib/include/html_end.inc.php';
 }
Пример #12
0
 public function fetchData()
 {
     if ($this->already_fetched) {
         return;
     }
     $this->already_fetched = true;
     try {
         if (!$this->customImportEnabled()) {
             if (in_array($this['source'], array("csv_upload", "extern"))) {
                 return;
             } elseif ($this['source'] === "database") {
                 $this->fetchDataFromDatabase();
                 return;
             } elseif ($this['source'] === "csv_weblink") {
                 $this->fetchDataFromWeblink();
                 return;
             } elseif ($this['source'] === "csv_studipfile") {
                 $output = $this->getCSVDataFromFile(get_upload_file_path($this['tabledata']['weblink']['file_id']), ";");
                 $headline = array_shift($output);
                 $this->createTable($headline, $output);
                 return;
             }
         } else {
             $this->getPlugin()->fetchData();
         }
     } catch (Exception $e) {
         PageLayout::postMessage(MessageBox::error(sprintf(_("Konnte Tabelle '%s' nicht mit Daten befüllen."), $this['name'])));
     }
 }
Пример #13
0
 /**
  * Displays a page.
  */
 public function index_action($id = null)
 {
     Navigation::activateItem('/course/literature/view');
     PageLayout::setTitle($_SESSION['SessSemName']["header_line"] . " - " . _("Literatur"));
     $this->list = StudipLitList::GetFormattedListsByRange($_SESSION["SessionSeminar"], object_get_visit($_SESSION["SessionSeminar"], "literature"));
     $this->_range_id = $_SESSION["SessionSeminar"];
 }
Пример #14
0
 /**
  * Set up this controller.
  *
  * @param String $action Name of the action to be invoked
  * @param Array  $args   Arguments to be passed to the action method
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setHelpKeyword('Basis.MyStudIPPrivacy');
     PageLayout::setTitle(_('Privatsphäre'));
     Navigation::activateItem('/profile/settings/privacy');
     SkipLinks::addIndex(_('Privatsphäre'), 'layout_content', 100);
 }
Пример #15
0
 /**
  * This method dispatches all actions.
  *
  * @param string $unconsumed_path  part of the dispatch path that was not consumed
  */
 public function perform($unconsumed_path)
 {
     $this->setupAutoload();
     // Add JS and StyleSheet to header
     PageLayout::addScript($this->getPluginURL() . '/javascript/forum.js');
     PageLayout::addStylesheet($this->getPluginURL() . '/stylesheets/forum.css');
     parent::perform($unconsumed_path);
 }
Пример #16
0
 public function initialize()
 {
     PageLayout::addSqueezePackage('lightbox');
     $this->addStylesheet('assets/pluginmarket.less');
     PageLayout::addHeadElement('link', array('rel' => 'alternate', 'type' => 'application/rss+xml', 'href' => PluginEngine::getLink($this, array(), 'rss/newest'), 'title' => _('Neueste Plugins')));
     $sidebar = Sidebar::Get();
     $sidebar->setImage('../../' . $this->getPluginPath() . '/assets/sidebar-marketplace.png');
 }
Пример #17
0
 /**
  * Set up this controller and define the infobox.
  *
  * @param String $action Name of the action to be invoked
  * @param Array  $args   Arguments to be passed to the action method
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setHelpKeyword('Basis.HomepageLebenslauf');
     PageLayout::setTitle($this->user->perms == 'dozent' ? _('Lebenslauf, Arbeitsschwerpunkte und Publikationen bearbeiten') : _('Lebenslauf bearbeiten'));
     Navigation::activateItem('/profile/edit/details');
     SkipLinks::addIndex(_('Private Daten bearbeiten'), 'layout_content');
 }
Пример #18
0
 /**
  * Set up this controller and define the infobox
  *
  * @param String $action Name of the action to be invoked
  * @param Array  $args   Arguments to be passed to the action method
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setHelpKeyword('Basis.HomepagePersönlicheDaten');
     PageLayout::setTitle(_('Benutzerkonto bearbeiten'));
     Navigation::activateItem('/profile/edit/profile');
     SkipLinks::addIndex(_('Benutzerkonto bearbeiten'), 'layout_content');
     Sidebar::get()->setImage('sidebar/person-sidebar.png');
 }
Пример #19
0
 public function new_topic_action()
 {
     Navigation::activateItem('/course/schedule/dates');
     if (Request::isAjax()) {
         PageLayout::setTitle(_("Thema hinzufügen"));
     }
     $this->date = new CourseDate(Request::option("termin_id"));
     $this->course = Course::findCurrent();
 }
Пример #20
0
 /**
  * Inserts container for skip links in page layout.
  */
 public static function insertContainer()
 {
     if (UserConfig::get($GLOBALS['user']->id)->getValue('SKIPLINKS_ENABLE')) {
         PageLayout::addBodyElements('<style> *:focus, .focus_box, a.button:focus, button.button:focus { outline: 2px dashed #ff6600; }</style>');
         if (is_object($GLOBALS['auth']) && $GLOBALS['auth']->is_authenticated()) {
             PageLayout::addBodyElements('<div id="skip_link_navigation" aria-busy="true"></div>');
         }
     }
 }
Пример #21
0
 public function tabularasa_action($timestamp = null)
 {
     $institutes = MyRealmModel::getMyInstitutes();
     foreach ($institutes as $index => $institut) {
         MyRealmModel::setObjectVisits($institutes[$index], $institut['institut_id'], $GLOBALS['user']->id, $timestamp);
     }
     PageLayout::postMessage(MessageBox::success(_('Alles als gelesen markiert!')));
     $this->redirect('my_institutes/index');
 }
Пример #22
0
 public function index_action()
 {
     PageLayout::setHelpKeyword("Basis.MeineStudiengruppen");
     PageLayout::setTitle(_("Meine Studiengruppen"));
     URLHelper::removeLinkParam('cid');
     $this->studygroups = MyRealmModel::getStudygroups();
     $this->nav_elements = MyRealmModel::calc_single_navigation($this->studygroups);
     $this->set_sidebar();
 }
Пример #23
0
 public function getPortalTemplate()
 {
     PageLayout::addScript('https://www.google.com/jsapi');
     $this->template_factory = new Flexi_TemplateFactory($this->getPluginPath() . '/templates');
     $template = $this->template_factory->open('show');
     $template->set_attribute('load', self::getCPU());
     $template->set_layout($GLOBALS['template_factory']->open('layouts/base_without_infobox'));
     return $template;
 }
Пример #24
0
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setTitle(_('Studiengruppen suchen'));
     Navigation::activateItem('/community/studygroups/browse');
     PageLayout::setHelpKeyword('Basis.SuchenStudiengruppen');
     // add skip link
     SkipLinks::addIndex(Navigation::getItem('/community/studygroups/browse')->getTitle(), 'layout_content', 100);
     Sidebar::get()->setImage('sidebar/studygroup-sidebar.png');
 }
Пример #25
0
 /**
  * This method is called to remove an avatar for a course.
  *
  * @return void
  */
 function delete_action()
 {
     CourseAvatar::getAvatar($this->course_id)->reset();
     PageLayout::postMessage(MessageBox::success(_("Veranstaltungsbild gelöscht.")));
     if ($this->studygroup_mode) {
         $this->redirect(URLHelper::getUrl('dispatch.php/course/studygroup/edit/' . $this->course_id));
     } else {
         $this->redirect(URLHelper::getUrl('dispatch.php/course/avatar/update/' . $this->course_id));
     }
 }
Пример #26
0
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     //Configurations for the Documentarea for this user
     $this->userConfig = DocUsergroupConfig::getUserConfig($GLOBALS['user']->id);
     $this->set_layout($GLOBALS['template_factory']->open('layouts/base'));
     PageLayout::setTitle(_('Dateiverwaltung'));
     PageLayout::setHelpKeyword('Basis.Dateien');
     Navigation::activateItem('/document/files');
 }
Пример #27
0
 public function overview_action()
 {
     PageLayout::addScript($this->plugin->getPluginURL() . "/assets/jquery.elastic.source.js");
     $this->configs = FleximportConfig::all();
     $this->possibleConfigs = array();
     foreach (FleximportTable::findAll() as $table) {
         $this->possibleConfigs = array_merge($this->possibleConfigs, $table->neededConfigs());
     }
     $this->possibleConfigs = array_unique($this->possibleConfigs);
 }
Пример #28
0
 /**
  * Set up this controller.
  *
  * @param String $action Name of the action to be invoked
  * @param Array  $args   Arguments to be passed to the action method
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setHelpKeyword('Basis.HomepageNutzerdomänen');
     PageLayout::setTitle(_('Nutzerdomänen bearbeiten'));
     Navigation::activateItem('/profile/edit/userdomains');
     SkipLinks::addIndex(_('Zugeordnete Nutzerdomänen'), 'assigned_userdomains');
     SkipLinks::addIndex(_('Nutzerdomäne auswählen'), 'select_userdomains');
     Sidebar::get()->setImage('sidebar/admin-sidebar.png');
 }
Пример #29
0
 /**
  * Set up this controller. Rewrites $action on verification.
  *
  * @param String $action Name of the action to be invoked
  * @param Array  $args   Arguments to be passed to the action method
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     Navigation::activateItem('/profile/categories');
     PageLayout::setHelpKeyword('Basis.HomepageSonstiges');
     PageLayout::setTitle(_('Eigene Kategorien bearbeiten'));
     SkipLinks::addIndex(_('Eigene Kategorien bearbeiten'), 'layout_content', 100);
     if ($action === 'verify') {
         $action = 'index';
     }
 }
Пример #30
0
 /**
  * Set up this controller
  *
  * @param String $action Name of the action to be invoked
  * @param Array  $args   Arguments to be passed to the action method
  * @throws AccessDeniedException if the calendar is not globally enabled
  */
 public function before_filter(&$action, &$args)
 {
     if (!get_config('CALENDAR_ENABLE')) {
         throw new AccessDeniedException(_('Der Kalender ist nicht aktiviert.'));
     }
     parent::before_filter($action, $args);
     PageLayout::setHelpKeyword('Basis.MyStudIPTerminkalender');
     PageLayout::setTitle(_('Einstellungen des Terminkalenders anpassen'));
     Navigation::activateItem('/profile/settings/calendar_new');
     SkipLinks::addIndex(_('Einstellungen des Terminkalenders anpassen'), 'main_content', 100);
 }