diff options
author | Christopher Brickley <brickley@gmail.com> | 2014-08-26 08:20:18 -0400 |
---|---|---|
committer | Christopher Brickley <brickley@gmail.com> | 2014-09-01 14:56:19 -0400 |
commit | 00a864e693434bce687f3f5145d8369583197b78 (patch) | |
tree | df25bf583ec2a0070c159bcb3d0d161d931f6801 /templates/repo/diff.tmpl | |
parent | d55c5b9e289c0c97aa51ffe5cb5b77f703cc2a47 (diff) | |
download | gitea-00a864e693434bce687f3f5145d8369583197b78.tar.gz gitea-00a864e693434bce687f3f5145d8369583197b78.zip |
add commit compare functionality
Diffstat (limited to 'templates/repo/diff.tmpl')
-rw-r--r-- | templates/repo/diff.tmpl | 15 |
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}} |