[WebProfilerBundle] fixed layout when templates are not defined

This commit is contained in:
Fabien Potencier 2011-01-07 15:48:05 +01:00
parent 0faf067acb
commit 3022aa3e35

View File

@ -15,18 +15,20 @@
<table> <table>
<tr><td class="menu"> <tr><td class="menu">
<ul> {% if templates is defined %}
{% for name, template in templates %} <ul>
{% set menu %}{{ template.renderBlock('menu', { 'collector': profiler.get(name)}) }}{% endset %} {% for name, template in templates %}
{% if menu %} {% set menu %}{{ template.renderBlock('menu', { 'collector': profiler.get(name)}) }}{% endset %}
<li {% if menu %}
{% if name == panel %}class="selected"{% endif %} <li
> {% if name == panel %}class="selected"{% endif %}
<a href="{{ path('_profiler_panel', { 'token': token, 'panel': name }) }}">{{ menu|raw }}</a> >
</li> <a href="{{ path('_profiler_panel', { 'token': token, 'panel': name }) }}">{{ menu|raw }}</a>
{% endif %} </li>
{% endfor %} {% endif %}
</ul> {% endfor %}
</ul>
{% endif %}
{% render 'WebProfilerBundle:Profiler:searchBar' with { 'token': token } %} {% render 'WebProfilerBundle:Profiler:searchBar' with { 'token': token } %}