summaryrefslogtreecommitdiffstats
path: root/templates/repo/diff.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/diff.tmpl')
-rw-r--r--templates/repo/diff.tmpl15
1 files changed, 13 insertions, 2 deletions
diff --git a/templates/repo/diff.tmpl b/templates/repo/diff.tmpl
index 6adea04593..7873345083 100644
--- a/templates/repo/diff.tmpl
+++ b/templates/repo/diff.tmpl
@@ -3,9 +3,20 @@
{{template "repo/nav" .}}
<div id="body" class="container" data-page="repo">
<div id="source">
+ {{if .IsDiffCompare }}
<div class="panel panel-info diff-box diff-head-box">
<div class="panel-heading">
<a class="pull-right btn btn-primary btn-sm" rel="nofollow" href="{{.SourcePath}}">Browse Source</a>
+ <h4><a href="{{$.RepoLink}}/commit/{{.BeforeCommitId}}" class="label label-success">{{ShortSha .BeforeCommitId}}</a> ... <a href="{{$.RepoLink}}/commit/{{.AfterCommitId}}" class="label label-success">{{ShortSha .AfterCommitId}}</a></h4>
+ </div>
+ <div class="panel-body compare">
+ {{template "repo/commits_table" .}}
+ </div>
+ </div>
+ {{else}}
+ <div class="panel panel-info diff-box diff-head-box">
+ <div class="panel-heading">
+ <a class="pull-right btn btn-primary btn-sm" rel="nofollow" href="{{.SourcePath}}">Browse Source</a>
<h4>{{.Commit.Message}}</h4>
</div>
<div class="panel-body">
@@ -22,9 +33,9 @@
<a class="name" href="/user/email2user?email={{.Commit.Author.Email}}"><strong>{{.Commit.Author.Name}}</strong></a>
<span class="time">{{TimeSince .Commit.Author.When $.Lang}}</span>
</p>
- </div>
+ </div>
</div>
-
+ {{end}}
{{if .DiffNotAvailable}}
<h4>Diff Data Not Available.</h4>
{{else}}