/** * @return BootstrapView * @AuthRequired */ public function defaultAction() { //if (!$this->router->getSessionSegment()->get("authenticated")) $this->router->redirectTo("?controller=main"); $view = new PersoenlicheStatusseiteView($this->router->getApplicationSession()->getUser()); $dashboard_content = new DashboardContentView(); $dashboard_content->setContent($view); $dashboard_content->setTitle("Persönliche Statusseite"); return BootstrapView::getDashboard(MainController::$MAIN_TITLE . " Persönliche Statusseite", $dashboard_content, $this->router); }
/** * @return BootstrapView * @AuthRequired */ public function defaultAction() { $staffSearchView = new StaffSearchView(); $content = new DashboardContentView(); $content->setTitle("Personensuche"); $content->setContent($staffSearchView); $bootstrap = BootstrapView::getDashboard("Personensuche", $content); $bootstrap->addAdditionalJScript("resources/js/staffSearch.js"); return $bootstrap; }
/** * @return BootstrapView * @LogInNotPermitted */ public function promptAction() { if ($this->router->getRequestAnalyzer()->getRequestMethod() == "POST" && self::$numberOfLoginsInCurrentRequest == 0) { $user = $this->router->getRequestAnalyzer()->getPostRequest()["user"]; $password = $this->router->getRequestAnalyzer()->getPostRequest()["password"]; self::$numberOfLoginsInCurrentRequest++; try { $this->router->getApplicationRoot()->getAuthenticator()->authenticate($user, $password); $userObject = $this->router->getApplicationRoot()->getUserDAO()->getUserByUsername($user); $this->router->getApplicationSession()->setUser($userObject); } catch (UnauthorizedException $e) { //$this->router->getApplicationSession()->setAlert(BootstrapAlert::WARNING("Login failed.")); //$this->router->reRouteTo("main", "default"); } $this->router->rewindAndRestartRouting(); } else { $view = new LoginView(); $view->setHeaderText("Awesome Inc."); $view->setBadge("Intranet"); return BootstrapView::getLoginPage("", $view); } }
public static function getLoginPage($title, LoginView $loginView) { $view = new BootstrapView(); $view->setTitle($title); $view->setCss("login.css"); $view->setBodyContent($loginView); $view->setAdditionalHeader(HTMLHelper::linkCss("vendor/components/font-awesome/css/font-awesome.min.css") . "\n"); $view->setContentPastJS(HTMLHelper::scriptJS("resources/js/login.js") . "\n"); return $view; }
/** * @return BootstrapView * @AuthReqiured */ public function defaultAction() { $content = new DashboardContentView(); $content->setTitle("Privat-Laufwerk"); return BootstrapView::getDashboard("Privat-Laufwerk", $content, $this->router); }
/** * Regelt die Singalisierung von Ausnahmen * @param \Exception $e * @return BootstrapView */ protected function exceptionHandler(\Exception $e) { $exception = new ExceptionView(); $exception->setException($e); $bootstrap = new BootstrapView(); $bootstrap->setBodyContent($exception); $bootstrap->setTitle("Error 500: Interner Fehler!"); //return $exception; return $bootstrap; }