tablejohn/templates/commit_hash.html

58 lines
1.7 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ summary }}{% endblock %}
{% macro r_class(reachable) %}
{%- if reachable == 0 -%}
orphaned
{%- else if reachable == 1 -%}
reachable
{%- else -%}
tracked
{%- endif -%}
{% endmacro %}
{% macro r_title(reachable) %}
{%- if reachable == 0 -%}
This commit is orphaned. It can't be reached from any ref.
{%- else if reachable == 1 -%}
This commit can only be reached from untracked refs.
{%- else -%}
This commit can be reached from a tracked ref.
{%- endif -%}
{% endmacro %}
{% block body %}
<h2>Commit</h2>
<div class="commit">
<span class="hash">commit {{ hash }}</span>
<dl>
<dt>Author:</dt>
<dd>{{ author }}</dd>
<dt>AuthorDate:</dt>
<dd>{{ author_date }}</dd>
<dt>Commit:</dt>
<dd>{{ commit }}</dd>
<dt>CommitDate:</dt>
<dd>{{ commit_date }}</dd>
{% for commit in parents %}
<dt class="{% call r_class(commit.reachable) %}" title="{% call r_title(commit.reachable) %}">Parent:</dt>
<dd class="{% call r_class(commit.reachable) %}" title="{% call r_title(commit.reachable) %}">
<a href="{{ commit.hash }}">{{ commit.description }}</a>
</dd>
{% endfor %}
{% for commit in children %}
<dt class="{% call r_class(commit.reachable) %}" title="{% call r_title(commit.reachable) %}">Child:</dt>
<dd class="{% call r_class(commit.reachable) %}" title="{% call r_title(commit.reachable) %}">
<a href="{{ commit.hash }}">{{ commit.description }}</a>
</dd>
{% endfor %}
</dl>
<pre class="message {% call r_class(reachable) %}" title="{% call r_title(reachable) %}">{{ message }}</pre>
</div>
{% endblock %}