Added current ref to the navigation urls

This commit is contained in:
Correl Roush 2010-11-22 09:58:10 -05:00
parent 753b942d66
commit 00f020d24a

View file

@ -1,13 +1,13 @@
{% load vcs %} {% load vcs %}
<h2><a href="{% url codereview.browser.views.log repository=repository.name %}">{{ repository.name }}</a></h2> <h2><a href="{% url codereview.browser.views.log repository=repository.name %}?c={{ ref }}">{{ repository.name }}</a></h2>
{% if path|dirname %} {% if path|dirname %}
<strong>{{ path|dirname }}/</strong><br /> <strong>{{ path|dirname }}/</strong><br />
<a href="{% url codereview.browser.views.log repository=repository.name path=path|dirname %}">Up one</a> <a href="{% url codereview.browser.views.log repository=repository.name path=path|dirname %}?c={{ ref }}">Up one</a>
{% endif %} {% endif %}
<ul class="tree"> <ul class="tree">
{% for dir in navigation.dirs %} {% for dir in navigation.dirs %}
<li class="dir"> <li class="dir">
<a href="{% url codereview.browser.views.log repository=repository.name path=dir %}/">{{ dir|basename }}</a> <a href="{% url codereview.browser.views.log repository=repository.name path=dir %}/?c={{ ref }}">{{ dir|basename }}</a>
</li> </li>
{% endfor %} {% endfor %}
{% for file in navigation.files %} {% for file in navigation.files %}
@ -15,7 +15,7 @@
{% if file == path %} {% if file == path %}
<strong>{{ file|basename }}</strong> <strong>{{ file|basename }}</strong>
{% else %} {% else %}
<a href="{% url codereview.browser.views.log repository=repository.name path=file %}">{{ file|basename }}</a> <a href="{% url codereview.browser.views.log repository=repository.name path=file %}?c={{ ref }}">{{ file|basename }}</a>
{% endif %} {% endif %}
</li> </li>
{% endfor %} {% endfor %}