-
Notifications
You must be signed in to change notification settings - Fork 2k
/
diff.html
60 lines (54 loc) · 2.3 KB
/
diff.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{% extends "page.html" %}
{% set pkg = c.pkg %}
{% set group = c.group %}
{% block subtitle %}{{ _('Differences')}}{% endblock %}
{% block breadcrumb_content %}
{% if c.diff_entity == 'package' %}
{% set dataset = pkg.title or pkg.name %}
<li>{% link_for _('Datasets'), controller='package', action='search', highlight_actions = 'new index' %}</li>
<li>{% link_for dataset, controller='package', action='read', id=pkg.name %}</li>
<li class="active"><a href="" title="{{ _('Revision Differences') }}">{{ _('Revision Differences') }}</a></li>
{% elif c.diff_entity == 'group' %}
{% set group = group.display_name or group.name %}
<li>{% link_for _('Groups'), controller='group', action='index' %}</li>
<li>{% link_for group, controller='group', action='read', id=group.name %}</li>
<li class="active"><a href="" title="{{ _('Revision Differences') }}">{{ _('Revision Differences') }}</a></li>
{% endif %}
{% endblock %}
{% block primary %}
<section class="module prose">
<section class="module-content">
<h1>{{ _('Revision Differences') }} -
{% if c.diff_entity == 'package' %}
{% link_for pkg.title, controller='package', action='read', id=pkg.name %}
{% elif c.diff_entity == 'group' %}
{% link_for group.display_name, controller='group', action='read', id=group.name %}
{% endif %}
</h1>
<p>
<strong>From:</strong> {% link_for c.revision_from.id, controller='revision', action='read', id=c.revision_from.id %} -
{{ h.render_datetime(c.revision_from.timestamp, with_hours=True) }}
</p>
<p>
<strong>To:</strong> {% link_for c.revision_to.id, controller='revision', action='read', id=c.revision_to.id %} -
{{ h.render_datetime(c.revision_to.timestamp, with_hours=True) }}
</p>
{% if c.diff %}
<table class="table table-bordered table-striped">
<tr>
<th>{{ _('Field') }}</th>
<th>{{ _('Difference') }}</th>
</tr>
{% for field, diff in c.diff %}
<tr>
<td>{{ field }}</td>
<td><pre>{{ diff }}</pre></td>
</tr>
{% endfor %}
</table>
{% else %}
<h3>{{ _('No Differences') }}</h3>
{% endif %}
</section>
</section>
{% endblock %}