{% extends 'tickle/base.html' %}

{% block tickle_title_name %}{{ area.name }}{% endblock %}
{% block tickle_header_name %}{{ area.name }}{% endblock %}

{% block tickle_nav %}
  {% include 'tickle/area_breadcrumb_trail.html' %}
{% endblock %}

{% block tickle_main %}
  {% if area.children.count > 0 %}
    <ul class='tickle-area-list'>
      {% for child in area.children.all %}
        <li><a href='{% url "tickle:area-detail" pk=child.pk %}'>{{ child.name }}</a></li>
      {% endfor %}
    </ul>
  {% endif %}

  <div>
    {{ area.notes }}
  </div>

  {% if area.boulders.count > 0 %}
    Boulders
    <ul>
      {% for boulder in area.boulders.all %}
        <li>{% include 'tickle/boulder_list_item.html' %}</li>
      {% endfor %}
    </ul>
  {% endif %}

  {% if area.routes.count > 0 %}
    Routes
    <ul>
      {% for route in area.routes.all %}
        <li>{% include 'tickle/route_list_item.html' %}</li>
      {% endfor %}
    </ul>
  {% endif %}
{% endblock %}
