mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-01 17:38:33 +00:00
add commit compare functionality
This commit is contained in:
parent
d55c5b9e28
commit
00a864e693
11 changed files with 169 additions and 66 deletions
|
@ -3,7 +3,18 @@
|
|||
{{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>
|
||||
|
@ -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}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue