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

<ul class="breadcrumb pull-left">
  {% for ancestor in urlpath.cached_ancestors %}
    <li><a href="{% url 'wiki:get' path=ancestor.path %}">{{ ancestor.article.current_revision.title|truncatechars:25 }}</a></li>
  {% endfor %}
  <li class="active">{{ article.current_revision.title|truncatechars:25 }}</li>
</ul>
<div class="pull-left" style="margin-left: 10px;">
  <div class="btn-group">
    <a class="btn btn-info dropdown-toggle" data-toggle="dropdown" href="#" style="padding: 7px;" title="{% trans "Sub-articles for" %} {{ article.current_revision.title }}">
      <span class="icon-sitemap"></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 btn-info dropdown-toggle" data-toggle="dropdown" href="#" style="padding: 7px;" title="{% trans "Sub-articles for" %} {{ article.current_revision.title }}">
      <span class="icon-file"></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 %}
