#138 Changed template to handle the section grouping correctly

This commit is contained in:
drgomesp 2013-02-21 15:47:20 -03:00
parent 9c601664d1
commit fe96e262ec

View File

@ -1,10 +1,19 @@
{% extends "NelmioApiDocBundle::layout.html.twig" %} {% extends "NelmioApiDocBundle::layout.html.twig" %}
{% block content %} {% block content %}
{% for resource, methods in resources %} {% for section, sections in resources %}
{% for resource, methods in sections %}
<li class="resource"> <li class="resource">
<div class="heading"> <div class="heading">
{% if section == 'others' and resource == 'others' %}
<h2>{{ resource }}</h2> <h2>{{ resource }}</h2>
{% endif %}
{% if section != 'others' %}
<h1>{{ section }}</h1>
{% endif %}
{% if resource != 'others' %}
<h2>{{ resource }}</h2>
{% endif %}
</div> </div>
<ul class="endpoints"> <ul class="endpoints">
<li class="endpoint"> <li class="endpoint">
@ -17,4 +26,5 @@
</ul> </ul>
</li> </li>
{% endfor %} {% endfor %}
{% endfor %}
{% endblock content %} {% endblock content %}