From c9ddd6fd8b647764f2d2bca64d97cff2cab1ea34 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 22 Sep 2011 09:05:42 +0200 Subject: [PATCH] [WebProfilerBundle] moved the token not found error to the new info page --- .../Controller/ProfilerController.php | 2 +- .../Resources/views/Profiler/info.html.twig | 5 +++ .../views/Profiler/notfound.html.twig | 33 ------------------- 3 files changed, 6 insertions(+), 34 deletions(-) delete mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/notfound.html.twig diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index 3b11cf5666..df02962a9d 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -38,7 +38,7 @@ class ProfilerController extends ContainerAware $panel = $this->container->get('request')->query->get('panel', 'request'); if (!$profile = $profiler->loadProfile($token)) { - return $this->container->get('templating')->renderResponse('WebProfilerBundle:Profiler:notfound.html.twig', array('token' => $token)); + return $this->container->get('templating')->renderResponse('WebProfilerBundle:Profiler:info.html.twig', array('about' => 'no_token', 'token' => $token)); } if (!$profile->hasCollector($panel)) { diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/info.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/info.html.twig index 44b83889df..d35f91c94c 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/info.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/info.html.twig @@ -24,6 +24,11 @@

The token already exists in the database.

+ {% elseif about == 'no_token' %} +

Token not found

+

+ Token "{{ token }}" was not found in the database. +

{% endif %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/notfound.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/notfound.html.twig deleted file mode 100644 index bf7ff8ce0f..0000000000 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/notfound.html.twig +++ /dev/null @@ -1,33 +0,0 @@ -{% extends 'WebProfilerBundle:Profiler:base.html.twig' %} - -{% block body %} -
- {% include 'WebProfilerBundle:Profiler:header.html.twig' only %} - -
-

- No request matching the token "{{ token }}". -

-
- -
-
-
-
- {% block panel %} -

Token not found

-

- No request matching the token "{{ token }}". -

- {% endblock %} -
-
- -
-
-
- -{% endblock %}