diff options
author | 无闻 <joe2010xtmf@163.com> | 2014-04-27 19:46:38 -0400 |
---|---|---|
committer | 无闻 <joe2010xtmf@163.com> | 2014-04-27 19:46:38 -0400 |
commit | 31805e2bbea17d5fc3806f472ddab42736e7b4a1 (patch) | |
tree | f4aecb1ab5826f3f64936b084dc6c63b15fd8c67 /templates/repo | |
parent | 41b0a7b97c2cc1ffd8751fd12690642968961d0e (diff) | |
parent | 67002575589c1b77c86ecacd6edb5a05e81015cb (diff) | |
download | gitea-31805e2bbea17d5fc3806f472ddab42736e7b4a1.tar.gz gitea-31805e2bbea17d5fc3806f472ddab42736e7b4a1.zip |
Merge pull request #135 from clee/show-parents
Show parents in commit diff page
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/diff.tmpl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/templates/repo/diff.tmpl b/templates/repo/diff.tmpl index 0dce405337..38fe3fee2c 100644 --- a/templates/repo/diff.tmpl +++ b/templates/repo/diff.tmpl @@ -8,9 +8,16 @@ <a class="pull-right btn btn-primary btn-sm" rel="nofollow" href="{{.SourcePath}}">Browse Source</a> <h4>{{.Commit.Message}}</h4> </div> + {{ $username := .Username }} + {{ $reponame := .Reponame }} <div class="panel-body"> <span class="pull-right"> - commit <span class="label label-default sha">{{ShortSha .CommitId}}</span> + <ul class="list-unstyled"> + {{range .Parents}} + <li>parent <a href="/{{$username}}/{{$reponame}}/commit/{{.}}"><span class="label label-default sha">{{ShortSha .}}</span></a></li> + {{end}} + <li>commit <span class="label label-default sha">{{ShortSha .CommitId}}</span></li> + </ul> </span> <p class="author"> <img class="avatar" src="{{AvatarLink .Commit.Author.Email}}" alt=""/> |