{% load i18n %}
{% if urlpath %}
<div id="article-breadcrumbs">

<ul class="breadcrumb pull-left" class="">
  {% for ancestor in urlpath.cached_ancestors %}
    <span class="divider">/</span>
    <li><a href="{% url 'wiki:get' path=ancestor.path %}">{{ ancestor.article.current_revision.title }}</a></li>
  {% endfor %}
  <span class="divider">/</span>
  <li class="active"><a href="{% url 'wiki:get' path=urlpath.path %}">{{ article.current_revision.title }}</a></li>
  <span class="divider">/</span>
</ul>
<div class="pull-left" style="margin-left: 10px;">
  <div class="btn-group">
    <a class="btn dropdown-toggle" data-toggle="dropdown" href="#" style="padding: 7px;" title="{% trans "Sub-articles for" %} {{ article.current_revision.title }}">
      <span class="icon-list"></span>
      <span class="caret"></span>
    </a>
    <ul class="dropdown-menu">
      {% for child in children_slice %}
        <li>
          <a href="{% url 'wiki:get' path=child.path %}">
            {{ child.article.current_revision.title }}
          </a>
        </li>
        {% empty %}
        <li><a href="#"><em>{% trans "No sub-articles" %}</em></a></li>
      {% endfor %}
      {% if children_slice_more %}
      <li><a href="#"><em>{% trans "...and more" %}</em></a></li>
      {% endif %}
      <li class="divider"></li>
      <li>
        <a href="{% url 'wiki:dir' path=urlpath.path %}">{% trans "Browse articles in this level" %} &raquo;</a>
      </li>
    </ul>
  </div>
</div>
<div class="pull-left" style="margin-left: 10px;">
  <div class="btn-group">
    <a class="btn dropdown-toggle" data-toggle="dropdown" href="#" style="padding: 7px;" title="{% trans "Sub-articles for" %} {{ article.current_revision.title }}">
      <span class="icon-plus"></span>
      <span class="caret"></span>
    </a>    
    <ul class="dropdown-menu">
      <li>
        {% if urlpath.parent %}
        <a href="{% url 'wiki:create' path=urlpath.parent.path %}" style="padding: 7px;">
          <span class="icon-arrow-right"></span>
          {% trans "New article next to" %} {{ article.current_revision.title }}
        </a>
        {% endif %}
        <a href="{% url 'wiki:create' path=urlpath.path %}" style="padding: 7px;">
          <span class="icon-arrow-down"></span>
          {% trans "New article below" %} {{ article.current_revision.title }}
        </a>
      </li>
    </ul>
  </div>
</div>
<div style="clear: both"></div>
</div>
{% endif %}
