OXYGENHUB
# 554ccacfc123 oxygenhub / templates / history.html
2.4 KiB · HTML · last changed Swimlanes: a bookmark's changes as lanes of independent work 1 month ago source blame history raw
1
{% extends "base.html" %}
2
{% import "repo_tabs.html" as m %}
3
{% block title %}Changes on {{ h.target.short_label() }} · {{ repo.owner }}/{{ repo.name }}{% endblock %}
4
{% block bodyattrs %} data-repo="{{ repo.url }}" data-ref="{{ h.target.label }}"{% endblock %}
5
{% block tabs %}{% call m::tabs(repo, "changes") %}{% endblock %}
6
{% block content %}
7
<div class="head"><h1>Changes <small>{% if h.target.kind == crate::repos::view::RefKind::Change %}up to # {{ h.target.short_label() }}{% else %}on {{ h.target.label }}{% endif %}{% if let Some(p) = h.path %} touching {{ p }}{% endif %} · {{ h.total }}</small></h1></div>
8
<p class="small"><a href="{{ repo.url }}/lanes/{{ h.target.label }}">See as swimlanes</a> <span class="mute">(independent work side by side)</span></p>
9
{% if h.target.heads.len() > 1 %}<div class="strip warn">{{ h.target.label }} has {{ h.target.heads.len() }} heads. The graph shows their union; heads are marked.</div>{% endif %}
10
{% if h.entries.is_empty() %}<p class="empty">No changes.</p>{% else %}
11
<div class="hist" style="--lanes: {{ lanes }}">
12
{% for c in h.entries %}
13
  {% let row = rows[loop.index0] %}
14
  <div class="hrow">
15
    <svg class="lanes" width="{{ lanes * 18 + 4 }}" height="100%" viewBox="0 0 {{ lanes * 18 + 4 }} 60" preserveAspectRatio="none" aria-hidden="true">
16
      {% for l in row.through %}<line x1="{{ l * 18 + 10 }}" y1="0" x2="{{ l * 18 + 10 }}" y2="60" class="lane"/>{% endfor %}
17
      {% for e in row.edges %}<path d="M{{ e.0 * 18 + 10 }} 30 L{{ e.0 * 18 + 10 }} 44 L{{ e.1 * 18 + 10 }} 60" class="lane"/>{% endfor %}
18
      {% if !c.deps.is_empty() && row.edges.is_empty() %}<line x1="{{ row.lane * 18 + 10 }}" y1="30" x2="{{ row.lane * 18 + 10 }}" y2="60" class="lane dashed"/>{% endif %}
19
      <line x1="{{ row.lane * 18 + 10 }}" y1="0" x2="{{ row.lane * 18 + 10 }}" y2="30" class="lane{% if c.head %} none{% endif %}"/>
20
      <circle cx="{{ row.lane * 18 + 10 }}" cy="30" r="4" class="node{% if c.head %} head{% endif %}{% if c.resolution %} res{% endif %}"/>
21
    </svg>
22
    {% call m::change_row(repo, c) %}
23
  </div>
24
{% endfor %}
25
</div>
26
<div class="pager">
27
  {% if h.offset > 0 %}<a class="go" href="?offset={{ h.offset.saturating_sub(50) }}{% if let Some(p) = h.path %}&path={{ p }}{% endif %}">newer</a>{% endif %}
28
  {% if h.has_more %}<a class="go" href="?offset={{ h.offset + 50 }}{% if let Some(p) = h.path %}&path={{ p }}{% endif %}">older</a>{% endif %}
29
</div>
30
{% endif %}
31
{% endblock %}