From fe96e262ec54c76509195b1b4d562f87fb173bc2 Mon Sep 17 00:00:00 2001 From: drgomesp Date: Thu, 21 Feb 2013 15:47:20 -0300 Subject: [PATCH] #138 Changed template to handle the section grouping correctly --- Resources/views/resources.html.twig | 40 ++++++++++++++++++----------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/Resources/views/resources.html.twig b/Resources/views/resources.html.twig index a602100..ffe1c2b 100644 --- a/Resources/views/resources.html.twig +++ b/Resources/views/resources.html.twig @@ -1,20 +1,30 @@ {% extends "NelmioApiDocBundle::layout.html.twig" %} {% block content %} - {% for resource, methods in resources %} -
  • -
    -

    {{ resource }}

    -
    - -
  • + {% for section, sections in resources %} + {% for resource, methods in sections %} +
  • +
    + {% if section == 'others' and resource == 'others' %} +

    {{ resource }}

    + {% endif %} + {% if section != 'others' %} +

    {{ section }}

    + {% endif %} + {% if resource != 'others' %} +

    {{ resource }}

    + {% endif %} +
    + +
  • + {% endfor %} {% endfor %} {% endblock content %}