codereview/templates/browser/view.html

62 lines
1.9 KiB
HTML
Raw Normal View History

2010-11-19 05:12:29 +00:00
{% extends "layouts/default.html" %}
{% load gravatar %}
{% load vcs %}
2010-11-22 15:12:29 +00:00
{% block navigation %}
{% include "browser/navigation.html" %}
{% endblock %}
2010-11-19 05:12:29 +00:00
{% block content %}
<h2>{{ commit.message|oneline }}</h2>
<dl>
<dt>Committer</dt>
<dd>
<img src="{{ commit.author_email|gravatar:32 }}" />
{{ commit.committer }}
</dd>
<dt>Committed</dt>
<dd>{{ commit.committed_date }}</dd>
<dt>Author</dt>
<dd>
<img src="{{ commit.author_email|gravatar:32 }}" />
{{ commit.author }}
</dd>
<dt>Written</dt>
<dd>{{ commit.authored_date }}</dd>
<dt>Message</dt>
<dd>
{{ commit.message }}
</dd>
</dl>
<div class="diff-container">
<div class="diff-html">
{% for diff in diffs %}
<table class="diff">
<caption>
{% if diff.a %}{{ diff.a.path }}{% else %}(New File){% endif %}
{% if diff.a.path != diff.b.path %}
=>
{% if diff.b %}{{ diff.b.path }}{% else %}(Deleted){% endif %}
{% endif %}
</caption>
2010-11-19 05:12:29 +00:00
{% for change in diff.changes %}
{% if change.type == '@' %}
<tr class="break">
<td colspan="3">{{ change.text }}</td>
</tr>
{% else %}
<tr class="{% if change.type == '+' %}add{% endif %}{% if change.type == '-' %}del{% endif %}">
<td class="number">{% if change.type != '+' %}{{ change.line_a }}{% endif %}</td>
<td class="number">{% if change.type != '-' %}{{ change.line_b }}{% endif %}</td>
<td class="text">{{ change.text }}</td>
</tr>
{% endif %}
2010-11-19 05:12:29 +00:00
{% endfor %}
</table>
{% endfor %}
</div>
</div>
{% endblock %}