Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed exception html template (for Symfony 2.0.0 BETA1)

(28aa8e729a85e9ccdef0e76b5d7f777578d10e95)
  • Loading branch information...
commit 98d4bd3c42dfd82256e1c87c8c1b56abe32a3a74 1 parent 95cd014
@hidenorigoto hidenorigoto authored
Showing with 17 additions and 16 deletions.
  1. +17 −16 Resources/views/FrameworkBundle/views/Exception/exception.html.twig
View
33 Resources/views/FrameworkBundle/views/Exception/exception.html.twig
@@ -10,6 +10,7 @@
<div class="open_quote">
<img alt="" src="{{ asset('bundles/framework/images/open_quote.gif') }}"/>
</div>
+
<h1>
{{ exception.message|replace({"\n": '<br />'})|format_file_from_text }}
</h1>
@@ -18,13 +19,13 @@
<strong>{{ status_code }}</strong> {{ status_text }} - {{ exception.class|abbr_class }}
</div>
- {% set previous_count = exception.previouses|length %}
+ {% set previous_count = exception.allPrevious|length %}
{% if previous_count %}
<div class="linked"><span><strong>{{ previous_count }}</strong> linked Exception{{ previous_count > 1 ? 's' : '' }}:</span>
<ul>
- {% for i, previous in exception.previouses %}
+ {% for i, previous in exception.allPrevious %}
<li>
- {{ previous.class|abbr_class }} <a href="#traces_link_{{ i + 1 }}" onclick="toggle('traces_{{ i + 1 }}', 'traces');">&raquo;</a>
+ {{ previous.class|abbr_class }} <a href="#traces_link_{{ i + 1 }}" onclick="toggle('traces_{{ i + 1 }}', 'traces'); switchIcons('icon_traces_{{ i + 1 }}_open', 'icon_traces_{{ i + 1 }}_close');">&raquo;</a>
</li>
{% endfor %}
</ul>
@@ -50,8 +51,8 @@
<h2>
ろぐ&nbsp;
<a href="#" onclick="toggle('logs'); switchIcons('icon_logs_open', 'icon_logs_close'); return false;">
- <img class="toggle" id="icon_logs_close" alt="-" src="{{ asset('bundles/framework/images/blue_picto_less.gif') }}" style="visibility: hidden" />
- <img class="toggle" id="icon_logs_open" alt="+" src="{{ asset('bundles/framework/images/blue_picto_more.gif') }}" style="visibility: display; margin-left: -18px" />
+ <img class="toggle" id="icon_logs_open" alt="+" src="{{ asset('bundles/framework/images/blue_picto_more.gif') }}" style="visibility: hidden" />
+ <img class="toggle" id="icon_logs_close" alt="-" src="{{ asset('bundles/framework/images/blue_picto_less.gif') }}" style="visibility: display; margin-left: -18px" />
</a>
</h2>
{% endspaceless %}
@@ -66,7 +67,7 @@
</div>
- <div id="logs" style="display: none">
+ <div id="logs">
{% include 'FrameworkBundle:Exception:logs.html.twig' with { 'logs': logger.logs } only %}
</div>
@@ -95,25 +96,27 @@
</div>
-<script type="text/javascript">
- //<![CDATA[
+<script type="text/javascript">//<![CDATA[
function toggle(id, clazz) {
- el = document.getElementById(id);
- current = el.style.display
+ var el = document.getElementById(id),
+ current = el.style.display,
+ i;
if (clazz) {
var tags = document.getElementsByTagName('*');
- for (i = 0; i < tags.length; i++) {
- if (tags[i].className == clazz) {
+ for (i = tags.length - 1; i >= 0 ; i--) {
+ if (tags[i].className === clazz) {
tags[i].style.display = 'none';
}
}
}
- el.style.display = current == 'none' ? 'block' : 'none';
+ el.style.display = current === 'none' ? 'block' : 'none';
}
function switchIcons(id1, id2) {
+ var icon1, icon2, visibility1, visibility2;
+
icon1 = document.getElementById(id1);
icon2 = document.getElementById(id2);
@@ -123,6 +126,4 @@
icon1.style.visibility = visibility2;
icon2.style.visibility = visibility1;
}
-
- //]]>
-</script>
+//]]></script>
Please sign in to comment.
Something went wrong with that request. Please try again.