OXYGENHUB
◆ v0.9.24 oxygenhub / templates / compare.html
1.9 KiB · HTML · last changed Compare page: bookmark and tag pickers, swap, /compare picks a sensible pair, and Propose this for writers 1 month ago source blame history raw
1
{% extends "base.html" %}
2
{% import "repo_tabs.html" as m %}
3
{% block title %}Compare {{ cmp.base.short_label() }}...{{ cmp.head.short_label() }} · {{ repo.owner }}/{{ repo.name }}{% endblock %}
4
{% block bodyattrs %} data-repo="{{ repo.url }}"{% endblock %}
5
{% block tabs %}{% call m::tabs(repo, "changes") %}{% endblock %}
6
{% block mainclass %} class="wide"{% endblock %}
7
{% block content %}
8
<div class="head"><h1>Compare <small>{{ cmp.base.short_label() }} … {{ cmp.head.short_label() }}</small></h1></div>
9
<form class="compare-bar" method="get" action="{{ repo.url }}/compare">
10
  <label>base <input type="text" name="base" value="{{ base_spec }}" list="compare-refs" aria-label="Base: bookmark, tag, change or state" required></label>
11
  <a class="swap" href="{{ repo.url }}/compare/{{ head_spec }}...{{ base_spec }}" title="Swap the two sides" aria-label="Swap the two sides">⇄</a>
12
  <label>head <input type="text" name="head" value="{{ head_spec }}" list="compare-refs" aria-label="Head: bookmark, tag, change or state" required></label>
13
  <button type="submit">COMPARE</button>
14
  {% if let Some(p) = propose %}{% if let Some(n) = p.existing %}<a class="go small" href="{{ repo.url }}/proposal/{{ n }}">proposal #{{ n }} is open</a>{% else %}<a class="go" href="{{ p.url }}">Propose this</a>{% endif %}{% endif %}
15
  <datalist id="compare-refs">{% for b in bookmarks %}<option value="{{ b }}">bookmark</option>{% endfor %}{% for t in tags %}<option value="{{ t }}">tag</option>{% endfor %}</datalist>
16
</form>
17
<p class="lead">{{ cmp.added.len()|plural("change", "changes") }} in <strong>{{ cmp.head.label }}</strong> not in <strong>{{ cmp.base.label }}</strong>{% if cmp.missing > 0 %}; {{ cmp.missing }} the other way{% endif %}. {{ files.len()|plural("file", "files") }} differ between the two states.</p>
18
{% for c in cmp.added %}{% call m::change_row(repo, c) %}{% endfor %}
19
{% call m::diff(files, ignore_ws, "") %}
20
{% endblock %}