[FrameworkBundle] made various small fixes to the Exception layout

This commit is contained in:
Fabien Potencier 2011-03-06 11:06:21 +01:00
parent d7ce23fe53
commit be8618ec56
6 changed files with 41 additions and 38 deletions

View File

@ -22,12 +22,6 @@ build: 56
text-align:left; text-align:left;
background-color:#efefef; background-color:#efefef;
} }
.sf-exceptionreset body
{
/* Pour faire des hovers autre que sur des a */
/*behavior: url(/htc/csshover.htc);*/
/* Ca fonctionne avec ie6 et ce n'est pas accessible */
}
.sf-exceptionreset abbr .sf-exceptionreset abbr
{ {
border-bottom: 1px dotted #000; border-bottom: 1px dotted #000;
@ -124,7 +118,7 @@ build: 56
{ {
background-color:#FFFFFF; background-color:#FFFFFF;
border:1px solid #dfdfdf; border:1px solid #dfdfdf;
padding:50px; padding:40px 50px;
} }
.sf-exceptionreset .block_exception .sf-exceptionreset .block_exception
@ -198,17 +192,10 @@ build: 56
text-decoration:underline; text-decoration:underline;
} }
.sf-exceptionreset .logs
{
padding-bottom:20px;
}
.sf-exceptionreset .logs h2 .sf-exceptionreset .logs h2
{ {
float:left; float:left;
width:654px; width:654px;
background: url(../images/icon_log.png) no-repeat 0 -4px;
padding-left:24px;
} }
.sf-exceptionreset .error_count .sf-exceptionreset .error_count
@ -273,4 +260,4 @@ build: 56
{ {
background-color: #ffd; background-color: #ffd;
padding: 4px 3px padding: 4px 3px
} }

View File

@ -159,4 +159,4 @@ button span span span
{ {
width:970px; width:970px;
margin:0 auto; margin:0 auto;
} }

View File

@ -1,5 +1,5 @@
<div class="sf-exceptionreset"> <div class="sf-exceptionreset">
<div class="block_exception"> <div class="block_exception">
<div class="block_exception_detected clear_fix"> <div class="block_exception_detected clear_fix">
<div class="illustration_exception"> <div class="illustration_exception">
@ -14,11 +14,11 @@
<h1> <h1>
{{ exception.message|replace({"\n": '<br />'})|format_file_from_text }} {{ exception.message|replace({"\n": '<br />'})|format_file_from_text }}
</h1> </h1>
<div> <div>
<strong>{{ status_code }}</strong> {{ status_text }} - {{ exception.class|abbr_class }} <strong>{{ status_code }}</strong> {{ status_text }} - {{ exception.class|abbr_class }}
</div> </div>
{% set previous_count = exception.previouses|length %} {% set previous_count = exception.previouses|length %}
{% if previous_count %} {% if previous_count %}
<div class="linked"><span><strong>{{ previous_count }}</strong> linked Exception{{ previous_count > 1 ? 's' : '' }}:</span> <div class="linked"><span><strong>{{ previous_count }}</strong> linked Exception{{ previous_count > 1 ? 's' : '' }}:</span>
@ -45,10 +45,17 @@
{% endfor %} {% endfor %}
{% if logger %} {% if logger %}
<div class="block"> <div class="block">
<div class="logs clear_fix"> <div class="logs clear_fix">
<h2>Logs <a href="#" onclick="toggle('logs'); return false;">&raquo;</a></h2> {% spaceless %}
<h2>
Logs&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" />
</a>
</h2>
{% endspaceless %}
{% if logger.counterrors %} {% if logger.counterrors %}
<div class="error_count"> <div class="error_count">
@ -65,13 +72,19 @@
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% if currentContent %} {% if currentContent %}
<div class="block"> <div class="block">
{% spaceless %}
<h2>Content of the Output <a href="#" onclick="toggle('output_content'); return false;">&raquo;</a></h2> <h2>
Content of the Output&nbsp;
<a href="#" onclick="toggle('output_content'); switchIcons('icon_content_open', 'icon_content_close'); return false;">
<img class="toggle" id="icon_content_close" alt="-" src="{{ asset('bundles/framework/images/blue_picto_less.gif') }}" style="visibility: hidden" />
<img class="toggle" id="icon_content_open" alt="+" src="{{ asset('bundles/framework/images/blue_picto_more.gif') }}" style="visibility: display; margin-left: -18px" />
</a>
</h2>
{% endspaceless %}
<div id="output_content" style="display: none"> <div id="output_content" style="display: none">
{{ currentContent }} {{ currentContent }}
@ -113,4 +126,4 @@
} }
//]]> //]]>
</script> </script>

View File

@ -4,27 +4,25 @@
<meta http-equiv="Content-Type" content="text/html; charset={{ _charset }}"/> <meta http-equiv="Content-Type" content="text/html; charset={{ _charset }}"/>
<title>{{ exception.message }} ({{ status_code }} {{ status_text }})</title> <title>{{ exception.message }} ({{ status_code }} {{ status_text }})</title>
<link href="{{ asset('/bundles/framework/css/exception_layout.css') }}" rel="stylesheet" type="text/css" media="all" /> <link href="{{ asset('bundles/framework/css/exception_layout.css') }}" rel="stylesheet" type="text/css" media="all" />
<link href="{{ asset('/bundles/framework/css/exception.css') }}" rel="stylesheet" type="text/css" media="all" /> <link href="{{ asset('bundles/framework/css/exception.css') }}" rel="stylesheet" type="text/css" media="all" />
</head> </head>
<body> <body>
<div id="content"> <div id="content">
<div class="header clear_fix"> <div class="header clear_fix">
<div class="header_logo"> <div class="header_logo">
<a href="http://symfony.com/">
<img src="{{ asset('bundles/framework/images/logo_symfony.gif') }}" alt="Symfony" /> <img src="{{ asset('bundles/framework/images/logo_symfony.gif') }}" alt="Symfony" />
</a>
</div> </div>
<div class="search"> <div class="search">
<form method="post" action="http://symfony.com/search"> <form method="get" action="http://symfony.com/search">
<div class="form_row"> <div class="form_row">
<label for="search_id"> <label for="search_id">
<img src="{{ asset('bundles/framework/images/grey_magnifier.png') }}" alt="Search on Symfony website" /> <img src="{{ asset('bundles/framework/images/grey_magnifier.png') }}" alt="Search on Symfony website" />
</label> </label>
<input name="search_name" id="search_id" type="text" placeholder="Search on Symfony website" /> <input name="q" id="search_id" type="text" placeholder="Search on Symfony website" />
<button type="submit"> <button type="submit">
<span class="border_l"> <span class="border_l">

View File

@ -9,11 +9,13 @@
{% endif %} {% endif %}
{% if trace.file is defined and trace.line is defined %} {% if trace.file is defined and trace.line is defined %}
in {{ trace.file|format_file(trace.line) }} in {{ trace.file|format_file(trace.line) }}&nbsp;
{% spaceless %}
<a href="#" onclick="toggle('trace_{{ prefix ~ '_' ~ i }}'); switchIcons('icon_{{ prefix ~ '_' ~ i }}_open', 'icon_{{ prefix ~ '_' ~ i }}_close'); return false;"> <a href="#" onclick="toggle('trace_{{ prefix ~ '_' ~ i }}'); switchIcons('icon_{{ prefix ~ '_' ~ i }}_open', 'icon_{{ prefix ~ '_' ~ i }}_close'); return false;">
<img class="toggle" id="icon_{{ prefix ~ '_' ~ i }}_close" alt="-" src="{{ asset('bundles/framework/images/blue_picto_less.gif') }}" style="visibility: {{ 0 == prefix ? 'hidden' : 'display' }}" /> <img class="toggle" id="icon_{{ prefix ~ '_' ~ i }}_close" alt="-" src="{{ asset('bundles/framework/images/blue_picto_less.gif') }}" style="visibility: {{ 0 == prefix ? 'hidden' : 'display' }}" />
<img class="toggle" id="icon_{{ prefix ~ '_' ~ i }}_open" alt="+" src="{{ asset('bundles/framework/images/blue_picto_more.gif') }}" style="visibility: {{ 0 == prefix ? 'display' : 'hidden' }}; margin-left: -22px" /> <img class="toggle" id="icon_{{ prefix ~ '_' ~ i }}_open" alt="+" src="{{ asset('bundles/framework/images/blue_picto_more.gif') }}" style="visibility: {{ 0 == prefix ? 'display' : 'hidden' }}; margin-left: -18px" />
</a> </a>
{% endspaceless %}
<div id="trace_{{ prefix ~ '_' ~ i }}" style="display: {{ 0 == i ? 'block' : 'none' }}" class="trace"> <div id="trace_{{ prefix ~ '_' ~ i }}" style="display: {{ 0 == i ? 'block' : 'none' }}" class="trace">
{{ trace.file|file_excerpt(trace.line) }} {{ trace.file|file_excerpt(trace.line) }}
</div> </div>

View File

@ -1,9 +1,14 @@
<div class="block"> <div class="block">
{% if count > 0 %} {% if count > 0 %}
<h2> <h2>
<span>{{ count - position + 1 }}/{{ count + 1 }}</span> <span><small>[{{ count - position + 1 }}/{{ count + 1 }}]</small></span>
{{ exception.class|abbr_class }}: {{ exception.message|replace({ "\n": '<br />' }) }} {{ exception.class|abbr_class }}: {{ exception.message|replace({ "\n": '<br />' }) }}&nbsp;
<a href="#" onclick="toggle('traces_{{ position }}', 'traces'); return false;">&raquo;</a><br /> {% spaceless %}
<a href="#" onclick="toggle('traces_{{ position }}', 'traces'); switchIcons('icon_traces_{{ position }}_open', 'icon_traces_{{ position }}_close'); return false;">
<img class="toggle" id="icon_traces_{{ position }}_close" alt="-" src="{{ asset('bundles/framework/images/blue_picto_less.gif') }}" style="visibility: {{ 0 == position ? 'display' : 'hidden' }}" />
<img class="toggle" id="icon_traces_{{ position }}_open" alt="+" src="{{ asset('bundles/framework/images/blue_picto_more.gif') }}" style="visibility: {{ 0 == position ? 'hidden' : 'display' }}; margin-left: -18px" />
</a>
{% endspaceless %}
</h2> </h2>
{% else %} {% else %}
<h2>Stack Trace</h3> <h2>Stack Trace</h3>
@ -11,12 +16,10 @@
<a id="traces_link_{{ position }}"></a> <a id="traces_link_{{ position }}"></a>
<ol class="traces list_exception" id="traces_{{ position }}" style="display: {{ 0 == position ? 'block' : 'none' }}"> <ol class="traces list_exception" id="traces_{{ position }}" style="display: {{ 0 == position ? 'block' : 'none' }}">
{% for i, trace in exception.trace %} {% for i, trace in exception.trace %}
<li> <li>
{% include 'FrameworkBundle:Exception:trace.html.twig' with { 'prefix': position, 'i': i, 'trace': trace } only %} {% include 'FrameworkBundle:Exception:trace.html.twig' with { 'prefix': position, 'i': i, 'trace': trace } only %}
</li> </li>
{% endfor %} {% endfor %}
</ol> </ol>
</div> </div>