ID: 3e1b2cfbe14b2d8136cc069c4afbd206e14fe219
58 lines
โ
2K โ
View raw
| {% extends "repository/repository.html" %}
{% block page_title %}Tree: {{ repository }}/{{ revision }}{{ '/' + tree_path if tree_path }}{% endblock %}
{% 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:] == revision }}
{{ "selected" if revision == "HEAD" and head_ref == h }}
>{{ 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:] == revision }}
{{ "selected" if revision == "HEAD" and head_ref == h }}
>{{ 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 %}
|