3dd870b28b103ba61691a999dfd40f0b80b21bce
[tickle] / tickle / templates / tickle / area_list.html
1 {% extends 'tickle/base.html' %}
2
3 {% block tickle_title_name %}All Areas{% endblock %}
4 {% block tickle_header_name %}All Areas{% endblock %}
5
6 {% block tickle_main %}
7   <ul class='tickle-area-list'>
8     {% for area in area_list %}
9       <li>
10         <header>
11           <a href='{% url "tickle:area-detail" pk=area.pk %}'>{{ area.name }}</a>
12         </header>
13
14         {% if area.children.count > 0 %}
15           <ul>
16             {% for child in area.children.all %}
17               <li><a href='{% url "tickle:area-detail" pk=area.pk %}'>{{ area.name }}</a></li>
18             {% endfor %}
19           </ul>
20         {% endif %}
21
22         {% if area.boulders.count > 0 %}
23           Boulders
24           <ul>
25             {% for boulder in area.boulders.all %}
26               <li>{% include 'tickle/boulder_list_item.html' %}</li>
27             {% endfor %}
28           </ul>
29         {% endif %}
30
31         {% if area.routes.count > 0 %}
32           Routes
33           <ul>
34             {% for route in area.routes.all %}
35               <li>{% include 'tickle/route_list_item.html' %}</li>
36             {% endfor %}
37           </ul>
38         {% endif %}
39       </li>
40     {% endfor %}
41   </ul>
42 {% endblock %}