File tree 2 files changed +4
-0
lines changed
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -750,6 +750,7 @@ func CompareDiff(ctx *context.Context) {
750
750
return
751
751
}
752
752
753
+ ctx .Data ["PageIsCompareDiff" ] = true
753
754
ctx .Data ["PullRequestWorkInProgressPrefixes" ] = setting .Repository .PullRequest .WorkInProgressPrefixes
754
755
ctx .Data ["DirectComparison" ] = ci .DirectComparison
755
756
ctx .Data ["OtherCompareSeparator" ] = ".."
Original file line number Diff line number Diff line change 10
10
{{else if .Commit.ID.String}}
11
11
<a class="item" href="{{$.RepoLink}}/commit/{{PathEscape .Commit.ID.String}}.patch" download="{{ShortSha .Commit.ID.String}}.patch">{{ctx.Locale.Tr "repo.diff.download_patch"}}</a>
12
12
<a class="item" href="{{$.RepoLink}}/commit/{{PathEscape .Commit.ID.String}}.diff" download="{{ShortSha .Commit.ID.String}}.diff">{{ctx.Locale.Tr "repo.diff.download_diff"}}</a>
13
+ {{else if $.PageIsCompareDiff }}
14
+ <a class="item" href="{{$.Link}}.patch" download="{{$.BaseBranch}}...{{$.HeadBranch}}.patch">{{ctx.Locale.Tr "repo.diff.download_patch"}}</a>
15
+ <a class="item" href="{{$.Link}}.diff" download="{{$.BaseBranch}}...{{$.HeadBranch}}.diff">{{ctx.Locale.Tr "repo.diff.download_diff"}}</a>
13
16
{{end}}
14
17
<a id="expand-files-btn" class="item">{{ctx.Locale.Tr "repo.pulls.expand_files"}}</a>
15
18
<a id="collapse-files-btn" class="item">{{ctx.Locale.Tr "repo.pulls.collapse_files"}}</a>
You can’t perform that action at this time.
0 commit comments