{% extends 'skeleton.html' %}

{% block title %}
  {{ repo.name }} ({{ rev|shorten_sha1 }})
{% endblock %}

{% block breadcrumbs %}
  <span>
    <a href="{{ url_for('index', repo=repo.name, namespace=namespace) }}">{{ repo.namespaced_name }}</a>
    <span class=slash>/</span>
    <a href="{{ url_for('history', repo=repo.name, namespace=namespace, rev=rev) }}">{{ rev|shorten_sha1 }}</a>
  </span>

  {% if subpaths %}
  <span>
    {% for name, subpath in subpaths %}
      {% if loop.last %}
      <a href="">{{ name|force_unicode }}</a>
      {% else %}
      <a href="{{ url_for('history', repo=repo.name, namespace=namespace, rev=rev, path=subpath) }}">{{ name|force_unicode }}</a>
      <span class=slash>/</span>
      {% endif %}
    {% endfor %}
  </span>
  {% endif %}
{% endblock %}

{% block extra_header %}
<div class=branch-selector>
  <span>{{ rev|shorten_sha1 }}</span>
  <div>
    <ul class=branches>
      {% for branch in branches %}
      <li><a href="{{ url_for(view, repo=repo.name, namespace=namespace, rev=branch, path=path) }}">{{ branch }}</a></li>
      {% endfor %}
    </ul>
    {% if tags %}
    <ul class=tags>
      {% for tag in tags %}
      <li><a href="{{ url_for(view, repo=repo.name, namespace=namespace, rev=tag, path=path) }}">{{ tag }}</a></li>
      {% endfor %}
    </ul>
    {% endif %}
  </div>
</div>
{% endblock %}
