OXYGENHUB
# cb7b3cd45dc0 oxygenhub / templates / tree.html
1.3 KiB · HTML · last changed File view: tree sidebar, state permalinks (y, heads joined with +), line range bar with copy lines and copy permalink, blame age shading and blame before this change 1 month ago source blame history raw
d23464c0 Andy McCall ↶ 1
{% extends "base.html" %}
2
{% import "repo_tabs.html" as m %}
6ae41081 Andy McCall ↶ 3
{% block title %}{{ t.path }} at {{ t.target.short_label() }} · {{ repo.owner }}/{{ repo.name }}{% endblock %}
4
{% block bodyattrs %} data-repo="{{ repo.url }}" data-ref="{{ t.target.label }}"{% if let Some(p) = t.target.permalink() %} data-permalink="{{ repo.url }}/tree/{{ p }}/{{ t.path }}"{% endif %}{% endblock %}
d23464c0 Andy McCall ↶ 5
{% block tabs %}{% call m::tabs(repo, "code") %}{% endblock %}
6
{% block mainclass %} class="wide"{% endblock %}
7
{% block content %}
8
<div class="bar">
6ae41081 Andy McCall ↶ 9
  <span class="ref px">{% if t.target.kind == crate::repos::view::RefKind::Change %}# {{ t.target.short_label() }}{% else %}◆ {{ t.target.label }}{% endif %}</span>
d23464c0 Andy McCall ↶ 10
  <span class="crumbs"><a href="{{ repo.url }}/tree/{{ t.target.label }}">{{ repo.name }}</a>{% for (n, p) in t.crumbs %} / <a href="{{ repo.url }}/tree/{{ t.target.label }}/{{ p }}">{{ n }}</a>{% endfor %}</span>
11
  <a class="go small" href="{{ repo.url }}/changes/{{ t.target.label }}{% if !t.path.is_empty() %}?path={{ t.path }}{% endif %}">history</a>
14530604 Andy McCall ↶ 12
  {% if repo.can(crate::auth::Access::Write) %}<a class="go small" href="{{ repo.url }}/newfile/{{ t.target.label }}?dir={{ t.path }}">new file</a>{% endif %}
d23464c0 Andy McCall ↶ 13
</div>
14
{% include "tree_rows.html" %}
15
{% if let Some(html) = readme_html %}<article class="doc readme">{{ html|safe }}</article>{% endif %}
16
{% endblock %}