Parent: [b09028] (diff)

Child: [0e7d7f] (diff)

Download this file

diff.html    59 lines (54 with data), 2.0 kB

 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
{% extends 'allura:templates/repo/repo_master.html' %}
{% do g.register_forge_css('css/forge/hilite.css') %}
{% do g.register_forge_css('css/forge/diff.css') %}
{% block title %}
{{c.project.name}} / {{c.app.config.options.mount_label}} / Diff of {{h.really_unicode(b.path())}}
{% endblock %}
{% block header %}Diff of
<a href="{{b.url()}}">{{b.path()}}</a>
{% if a %}
<a href="{{a.url()}}">{{a.commit.shorthand_id()}}</a>
{% else %}
[000000]
{% endif %}
..
<a href="{{b.url()}}">{{b.commit.shorthand_id()}}</a>
{% endblock %}
{% block content %}
{% if a.has_image_view and b.has_image_view %}
<div class="grid-19">
<img src="{{a.url()}}?format=raw"
alt="{{h.text.truncate(a._commit._id, 10)}}"
title="{{h.text.truncate(a._commit._id, 10)}}"/>
<img src="{{b.url()}}?format=raw"
alt="{{h.text.truncate(b._commit._id, 10)}}"
title="{{h.text.truncate(b._commit._id, 10)}}"/>
</div>
{% else %}
<div class="clip grid-19">
<h3>
<span class="ico-l"><b data-icon="{{g.icons['table'].char}}" class="ico {{g.icons['table'].css}}"></b> {{h.really_unicode(a.filename) or h.html.literal('&nbsp;')}}</span>
<span class="fright">
{% if session.diformat == 'sidebyside' %}
{% set switch_url = request.url.replace('&diformat=sidebyside', '') + '&diformat=regular' %}
{% set switch_text = 'unified' %}
{% else %}
{% set switch_url = request.url.replace('&diformat=regular', '') + '&diformat=sidebyside' %}
{% set switch_text = 'side-by-side' %}
{% endif %}
<a href="{{ switch_url }}">Switch to {{ switch_text }} view</a>
<span>
</h3>
{% if session.diformat == 'sidebyside' %}
{{diff|safe}}
{% else %}
{{g.highlight(diff, lexer='diff')}}
{% endif %}
</div>
{% endif %}
{% endblock %}
{% block extra_css %}
<style type="text/css">
.clip h3 {margin-bottom: 0;}
</style>
{% endblock %}