codereview/templates/browser/navigation.html

36 lines
1.2 KiB
HTML
Raw Normal View History

2010-11-22 14:50:41 +00:00
{% load vcs %}
2010-11-22 20:12:09 +00:00
<h2><a href="{% url codereview.browser.views.log repository=repository %}?c={{ ref }}">{{ repository }}</a></h2>
<h3>Branches</h3>
<ul>
{% for branch, commit in repo.branches.items %}
<li>
{% if ref == branch or ref == commit.id %}
<strong>{{ branch }}</strong>
{% else %}
2010-11-22 20:12:09 +00:00
<a href="{% url codereview.browser.views.log repository=repository %}?c={{branch}}">{{ branch }}</a>
{% endif %}
</li>
{% endfor %}
</ul>
<h3>Browse</h3>
2010-11-22 20:12:09 +00:00
{% if path %}
<strong>{{ path }}</strong><br />
<a href="{% url codereview.browser.views.log repository=repository path=path|dirname %}?c={{ ref }}">Up one</a>
2010-11-22 14:50:41 +00:00
{% endif %}
2010-11-22 06:14:06 +00:00
<ul class="tree">
{% for dir in navigation.dirs %}
2010-11-22 14:50:41 +00:00
<li class="dir">
2010-11-22 20:12:09 +00:00
<a href="{% url codereview.browser.views.log repository=repository path=dir %}?c={{ ref }}">{{ dir|basename }}</a>
2010-11-22 14:50:41 +00:00
</li>
2010-11-22 06:14:06 +00:00
{% endfor %}
{% for file in navigation.files %}
2010-11-22 14:50:41 +00:00
<li class="file">
{% if file == path %}
<strong>{{ file|basename }}</strong>
{% else %}
2010-11-22 20:12:09 +00:00
<a href="{% url codereview.browser.views.blob repository=repository path=file %}?c={{ ref }}">{{ file|basename }}</a>
2010-11-22 14:50:41 +00:00
{% endif %}
</li>
2010-11-22 06:14:06 +00:00
{% endfor %}
</ul>