src/server/http/templates/tree.html
Ref: Size: 1.3 KiB History
{% extends "repo_base.html" %}
{% block title %}Tree — {{ repo_name }} — {{ site_title }}{% endblock %}
{% block content %}
<h2>
<select onchange="location.href=this.value">
{% for b in branches %}
<option value="/{{ repo_name }}/tree/{{ b }}{% if !path_display.is_empty() %}/{{ path_display }}{% endif %}"{% if *b == ref_name %} selected{% endif %}>{{ b }}</option>
{% endfor %}
</select>
{% if !path_display.is_empty() %} / {{ path_display }}{% endif %}
</h2>
<div class="table-scroll">
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
</tr>
</thead>
<tbody>
{% if show_parent %}
<tr>
<td class="mono"><a href="/{{ repo_name }}/tree/{{ ref_name }}/{{ parent_path }}">..</a></td>
<td style="color: #666;">dir</td>
</tr>
{% endif %}
{% for entry in entries %}
<tr>
{% if entry.is_dir %}
<td class="mono"><a href="/{{ repo_name }}/tree/{{ ref_name }}/{{ entry.full_path }}">{{ entry.name }}/</a></td>
<td style="color: #666;">dir</td>
{% else %}
<td class="mono"><a href="/{{ repo_name }}/blob/{{ ref_name }}/{{ entry.full_path }}">{{ entry.name }}</a></td>
<td style="color: #666;">file</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}