Skip to content

Commit

Permalink
[WebProfilerBundle] add import for Twig macro
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Aug 22, 2015
1 parent 6983416 commit 1795071
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -418,6 +418,7 @@
{% endblock %}

{% macro form_tree_entry(name, data, expanded) %}
{% import _self as tree %}
<li>
<div class="tree-inner" data-tab-target-id="{{ data.id }}-details">
{% if data.children is not empty %}
Expand All @@ -434,14 +435,15 @@
{% if data.children is not empty %}
<ul id="{{ data.id }}-children"{% if not expanded %} class="hidden"{% endif %}>
{% for childName, childData in data.children %}
{{ form_tree_entry(childName, childData, false) }}
{{ tree.form_tree_entry(childName, childData, false) }}
{% endfor %}
</ul>
{% endif %}
</li>
{% endmacro %}

{% macro form_tree_details(name, data, forms_by_hash) %}
{% import _self as tree %}
<div class="tree-details" {% if data.id is defined %} id="{{ data.id }}-details"{% endif %}>
<h2>
{{ name|default('(no name)') }}
Expand Down Expand Up @@ -673,6 +675,6 @@
</div>

{% for childName, childData in data.children %}
{{ form_tree_details(childName, childData, forms_by_hash) }}
{{ tree.form_tree_details(childName, childData, forms_by_hash) }}
{% endfor %}
{% endmacro %}

0 comments on commit 1795071

Please sign in to comment.