OXYGENHUB
# 8bf3010760d7 oxygenhub / templates / tree_rows.html
1.3 KiB · HTML · last changed fix(web): the tree stays in its column (refs #152) 22 days ago source blame history raw
1
{% if t.entries.is_empty() %}
2
<p class="empty">Nothing here yet. <a href="{{ repo.url }}">The overview</a> shows how to make a first push.</p>
3
{% else %}
4
<table class="tree" data-last="{{ repo.url }}/last/{{ t.target.label }}" data-change="{{ repo.url }}/change/">
5
<colgroup><col class="c-g"><col class="c-name"><col class="c-last"><col class="c-age"></colgroup>
6
{% if !t.path.is_empty() %}
7
<tr><td class="g ic-file">{{ crate::web::icons::svg("up")|safe }}</td><td colspan="3"><a href="{{ repo.url }}/tree/{{ t.target.label }}{% if let Some((_, p)) = t.crumbs.iter().rev().nth(1) %}/{{ p }}{% endif %}">..</a></td></tr>
8
{% endif %}
9
{% for e in t.entries %}
10
<tr data-path="{{ e.path }}">
11
  <td class="g {{ e.kind.class() }}">{{ e.kind.icon()|safe }}</td>
12
  <td class="name">
13
    {% if e.kind == crate::repos::view::EntryKind::Dir %}<a href="{{ repo.url }}/tree/{{ t.target.label }}/{{ e.path }}">{{ e.name }}</a>
14
    {% else %}<a href="{{ repo.url }}/file/{{ t.target.label }}/{{ e.path }}">{{ e.name }}</a>{% endif %}
15
    {% if e.exec %}<span class="tag">exec</span>{% endif %}
16
    {% if e.conflicted %}<span class="tag bad">conflict</span>{% endif %}
17
  </td>
18
  <td class="last"><a href="{{ repo.url }}/changes/{{ t.target.label }}?path={{ e.path }}" class="mute">…</a></td>
19
  <td class="age mute"></td>
20
</tr>
21
{% endfor %}
22
</table>
23
{% endif %}