diff --git a/application/controllers/ErrorController.php b/application/controllers/ErrorController.php index c7c998101..e9f942c23 100644 --- a/application/controllers/ErrorController.php +++ b/application/controllers/ErrorController.php @@ -3,7 +3,6 @@ namespace Icinga\Controllers; -use Icinga\Web\Response\JsonResponse; use Zend_Controller_Plugin_ErrorHandler; use Icinga\Application\Icinga; use Icinga\Application\Logger; @@ -13,6 +12,7 @@ use Icinga\Exception\Http\HttpNotFoundException; use Icinga\Exception\MissingParameterException; use Icinga\Security\SecurityException; use Icinga\Web\Controller\ActionController; +use Icinga\Web\Url; /** * Application wide controller for displaying exceptions @@ -100,6 +100,15 @@ class ErrorController extends ActionController } $this->view->request = $error->request; - $this->view->hideControls = ! $isAuthenticated; + if (! $isAuthenticated) { + $this->view->hideControls = true; + } else { + $this->view->hideControls = false; + $this->getTabs()->add('error', array( + 'active' => true, + 'label' => $this->translate('Error'), + 'url' => Url::fromRequest() + )); + } } } diff --git a/application/views/scripts/error/error.phtml b/application/views/scripts/error/error.phtml index 978c39b63..1e0c29b0e 100644 --- a/application/views/scripts/error/error.phtml +++ b/application/views/scripts/error/error.phtml @@ -1,12 +1,12 @@ compact && ! $hideControls): ?>
- showOnlyCloseButton() ?> +
-

escape($message)) ?>

- -
-
escape($stackTrace) ?>
- +

escape($message)) ?>

+ +
+
escape($stackTrace) ?>
+
diff --git a/public/css/icinga/layout.less b/public/css/icinga/layout.less index 0042e0ffc..93125f6ee 100644 --- a/public/css/icinga/layout.less +++ b/public/css/icinga/layout.less @@ -113,8 +113,10 @@ background-color: @gray-lighter; } -.container { - // Don't outline containers when focused because they receive focus for accessibility only programmatically +.container, +.error-message { + // Don't outline containers and error messages when focused because they receive focus for accessibility only + // programmatically outline: none; }