mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
#138 Changed template to handle the section grouping correctly
This commit is contained in:
parent
9c601664d1
commit
fe96e262ec
@ -1,20 +1,30 @@
|
|||||||
{% extends "NelmioApiDocBundle::layout.html.twig" %}
|
{% extends "NelmioApiDocBundle::layout.html.twig" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% for resource, methods in resources %}
|
{% for section, sections in resources %}
|
||||||
<li class="resource">
|
{% for resource, methods in sections %}
|
||||||
<div class="heading">
|
<li class="resource">
|
||||||
<h2>{{ resource }}</h2>
|
<div class="heading">
|
||||||
</div>
|
{% if section == 'others' and resource == 'others' %}
|
||||||
<ul class="endpoints">
|
<h2>{{ resource }}</h2>
|
||||||
<li class="endpoint">
|
{% endif %}
|
||||||
<ul class="operations">
|
{% if section != 'others' %}
|
||||||
{% for data in methods %}
|
<h1>{{ section }}</h1>
|
||||||
{% include 'NelmioApiDocBundle::method.html.twig' %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% if resource != 'others' %}
|
||||||
</ul>
|
<h2>{{ resource }}</h2>
|
||||||
</li>
|
{% endif %}
|
||||||
</ul>
|
</div>
|
||||||
</li>
|
<ul class="endpoints">
|
||||||
|
<li class="endpoint">
|
||||||
|
<ul class="operations">
|
||||||
|
{% for data in methods %}
|
||||||
|
{% include 'NelmioApiDocBundle::method.html.twig' %}
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user