|
20 | 20 | {% for group in endpoints_grouped %} |
21 | 21 | <h1 id="{{ group.grouper|lower }}">{{group.grouper}}</h1> |
22 | 22 |
|
| 23 | + <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> |
| 24 | + |
23 | 25 | {% for endpoint in group.list %} |
24 | | - <div class="endpoint"> |
25 | | - <div class="row"> |
26 | | - <div class="col-md-7"> |
27 | | - <h4 class="title">{{ endpoint.path }}</h4> |
| 26 | + |
| 27 | + <div class="panel panel-default endpoint"> |
| 28 | + <div class="panel-heading" role="tab" id="headingOne"> |
| 29 | + <div class="row"> |
| 30 | + <div class="col-md-7"> |
| 31 | + <h4 class="panel-title title"> |
| 32 | + <a role="button" data-toggle="collapse" data-parent="#accordion" href="#{{ endpoint.path|slugify }}" aria-expanded="true" aria-controls="{{ endpoint.path|slugify }}">{{ endpoint.path }}</a> |
| 33 | + </h4> |
| 34 | + </div> |
| 35 | + |
| 36 | + <div class="col-md-5 text-right"> |
| 37 | + <ul class="list-inline methods"> |
| 38 | + {% for method in endpoint.allowed_methods %} |
| 39 | + <li class="method {{ method|lower }}">{{ method }}</li> |
| 40 | + {% endfor %} |
| 41 | + </ul> |
| 42 | + </div> |
28 | 43 | </div> |
29 | | - <div class="col-md-5 text-right"> |
30 | | - <ul class="list-inline methods"> |
31 | | - {% for method in endpoint.allowed_methods %} |
32 | | - <li class="method {{ method|lower }}">{{ method }}</li> |
| 44 | + </div> |
| 45 | + <div id="{{ endpoint.path|slugify }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne"> |
| 46 | + <div class="panel-body"> |
| 47 | + {% if endpoint.fields %} |
| 48 | + <p>Fields:</p> |
| 49 | + <ul class="list fields"> |
| 50 | + {% for field in endpoint.fields %} |
| 51 | + <li class="field">{{ field.name }}: {{ field.type }}</li> |
33 | 52 | {% endfor %} |
34 | | - </ul> |
| 53 | + </ul> |
| 54 | + {% else %} |
| 55 | + <p>No fields.</p> |
| 56 | + {% endif %} |
35 | 57 | </div> |
36 | 58 | </div> |
37 | | - |
38 | | - {% if endpoint.fields %} |
39 | | - <p>Fields:</p> |
40 | | - <ul class="list fields"> |
41 | | - {% for field in endpoint.fields %} |
42 | | - <li class="field">{{ field.name }}: {{ field.type }}</li> |
43 | | - {% endfor %} |
44 | | - </ul> |
45 | | - {% else %} |
46 | | - <p>No fields.</p> |
47 | | - {% endif %} |
48 | | - |
49 | 59 | </div> |
50 | 60 | {% endfor %} |
51 | 61 |
|
| 62 | + </div> |
| 63 | + |
52 | 64 | {% endfor %} |
53 | 65 |
|
54 | 66 | {% endblock %} |
0 commit comments