ID: 7679756bf51ec1a7ff2b6957c81c505fae1d37e3
54 lines
โ
2K โ
View raw
| {% extends "repository/repository.html" %}
{% block menu_tree_class %}selected{% endblock %}
{% block content %}
<div>
<form action="{{ url('tree_change', repository=repository[:-4]) }}" method="post">
<select name="revision" id="revision">
<optgroup label="heads">
{% for h in heads %}
<option value="{{ h[11:] }}"
{{ "selected" if h[11:] == repository[2] }}
>{{ h[11:] }}{{ ' [HEAD]' if head_ref == h }}</option>
{% endfor %}
</optgroup>
<optgroup label="tags">
{% for t in tags %}
<option value="{{ t[10:] }}"
{{ "selected" if t[10:] == repository[2] }}
>{{ t[10:] }}</option>
{% endfor %}
</optgroup>
</select>
<input type="submit" value="switch" />
</form>
</div>
<div class="tree_list striped">
{# Display folders (trees) first #}
{% if tree_path %}
<a href="{{ request.url.rsplit('/', 1)[0] }}">
<pre> ๐ ..</pre>
</a>
{% endif %}
{# Display all the trees first #}
{% for obj in tree if obj.type_str == "tree": %}
<a href="{{ request.url }}/{{ obj.name }}">
<pre><span title="{{ obj.id }}">{{ obj.short_id }}</span> {{ obj.filemode|filemode }} <b>๐</b> {{ obj.name }}</pre>
</a>
{% endfor %}
{# Display all other files #}
{% for obj in tree if obj.type_str != "tree": %}
<a href="{{ request.url }}/{{ obj.name }}">
<pre><span title="{{ obj.id }}">{{ obj.short_id }}</span> {{ obj.filemode|filemode }} {{ obj.size|human_size }} {{ obj.name }}</pre>
</a>
{% endfor %}
</div>
{% endblock %}
|