Browse Source

bug fix: LEs template d'erreur ne s'etendaient pas vers le bon layout.

Sevajol Bastien 12 years ago
parent
commit
0d266c3ca4

+ 1 - 1
app/Resources/TwigBundle/views/Exception/error.html.twig View File

@@ -1,4 +1,4 @@
1
-{% extends "JSPCoreBundle::layout_error.html.twig" %}
1
+{% extends 'MuzichCoreBundle::layout.html.twig' %}
2 2
 
3 3
 {% block title %}{{ 'error_page.error.title'|trans({}, 'navigationui') }}{% endblock %}
4 4
 {% block mainbox_classes %}mainbox_padding{% endblock %}

+ 1 - 1
app/Resources/TwigBundle/views/Exception/error403.html.twig View File

@@ -1,4 +1,4 @@
1
-{% extends "JSPCoreBundle::layout_error.html.twig" %}
1
+{% extends 'MuzichCoreBundle::layout.html.twig' %}
2 2
 
3 3
 {% block title %}{{ 'error_page.forbidden.title'|trans({}, 'navigationui') }}{% endblock %}
4 4
 {% block mainbox_classes %}mainbox_padding{% endblock %}

+ 1 - 1
app/Resources/TwigBundle/views/Exception/error404.html.twig View File

@@ -1,4 +1,4 @@
1
-{% extends "JSPCoreBundle::layout_error.html.twig" %}
1
+{% extends 'MuzichCoreBundle::layout.html.twig' %}
2 2
 
3 3
 {% block title %}{{ 'error_page.notfound.title'|trans({}, 'navigationui') }}{% endblock %}
4 4
 {% block mainbox_classes %}mainbox_padding{% endblock %}

+ 10 - 0
src/Muzich/CoreBundle/Controller/InfoController.php View File

@@ -69,4 +69,14 @@ class InfoController extends Controller
69 69
     ));
70 70
   }
71 71
   
72
+  public function testErrorAction($code)
73
+  {
74
+    if (!is_numeric($code))
75
+    {
76
+      throw new HttpException(404);
77
+    }
78
+    
79
+    return $this->render('TwigBundle:Exception:error'.$code.'.html.twig');
80
+  }
81
+  
72 82
 }

+ 4 - 0
src/Muzich/CoreBundle/Resources/config/routing.yml View File

@@ -86,6 +86,10 @@ info_cgu:
86 86
   pattern: /info/cgu
87 87
   defaults: { _controller: MuzichCoreBundle:Info:cgu }
88 88
   
89
+test_errors:
90
+  pattern: /info/test-error/{code}
91
+  defaults: { _controller: MuzichCoreBundle:Info:testError }
92
+  
89 93
 ### helper
90 94
 
91 95
 helpbox_bootstrap: