Start adding views
[tickle] / tickle / templates / tickle / area_list_item.html
1 <li>
2   <header>
3     <a href='{% url "tickle:area-detail" pk=area.pk %}'>{{ area.name }}</a>
4   </header>
5   {% if area.children.count > 0 %}
6     <ul>
7       {% for child in area.children.all %}
8         {% include 'tickle/area_list_item.html' with area=child %}
9       {% endfor %}
10     </ul>
11   {% endif %}
12
13   {% if area.boulders.count > 0 %}
14     Boulders
15     <ul>
16       {% for boulder in area.boulders.all %}
17         <li>{{ boulder.name }}</li>
18       {% endfor %}
19     </ul>
20   {% endif %}
21
22   {% if area.routes.count > 0 %}
23     Routes
24     <ul>
25       {% for route in area.routes.all %}
26         <li>{{ route.name }}</li>
27       {% endfor %}
28     </ul>
29   {% endif %}
30 </li>