File tree 4 files changed +30
-2
lines changed
4 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -1429,6 +1429,7 @@ compare.compare_head = compare
1429
1429
1430
1430
pulls.desc = Enable pull requests and code reviews.
1431
1431
pulls.new = New Pull Request
1432
+ pulls.view = View Pull Request
1432
1433
pulls.compare_changes = New Pull Request
1433
1434
pulls.compare_changes_desc = Select the branch to merge into and the branch to pull from.
1434
1435
pulls.compare_base = merge into
Original file line number Diff line number Diff line change @@ -735,6 +735,10 @@ func CompareDiff(ctx *context.Context) {
735
735
}
736
736
} else {
737
737
ctx .Data ["HasPullRequest" ] = true
738
+ if err := pr .LoadIssue (); err != nil {
739
+ ctx .ServerError ("LoadIssue" , err )
740
+ return
741
+ }
738
742
ctx .Data ["PullRequest" ] = pr
739
743
ctx .HTML (http .StatusOK , tplCompareDiff )
740
744
return
Original file line number Diff line number Diff line change 187
187
{{end}}
188
188
{{else if and .PageIsComparePull (gt .CommitCount 0)}}
189
189
{{if .HasPullRequest}}
190
- <div class="ui segment">
191
- {{.i18n.Tr "repo.pulls.has_pull_request" (Escape $.RepoLink) (Escape $.RepoRelPath) .PullRequest.Index | Safe}}
190
+ <div class="ui segment grid title">
191
+ <div class="twelve wide column issue-title">
192
+ {{.i18n.Tr "repo.pulls.has_pull_request" (Escape $.RepoLink) (Escape $.RepoRelPath) .PullRequest.Index | Safe}}
193
+ <h1>
194
+ <span id="issue-title">{{RenderIssueTitle .PullRequest.Issue.Title $.RepoLink $.Repository.ComposeMetas}}</span>
195
+ <span class="index">#{{.PullRequest.Issue.Index}}</span>
196
+ </h1>
197
+ </div>
198
+ <div class="four wide right middle aligned column">
199
+ {{- if .PullRequest.HasMerged -}}
200
+ <a href="{{Escape $.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button purple show-form">{{svg "octicon-git-merge" 16}} {{.i18n.Tr "repo.pulls.view"}}</a>
201
+ {{else if .Issue.IsClosed}}
202
+ <a href="{{Escape $.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button red show-form">{{svg "octicon-issue-closed" 16}} {{.i18n.Tr "repo.pulls.view"}}</a>
203
+ {{else}}
204
+ <a href="{{Escape $.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button green show-form">{{svg "octicon-git-pull-request" 16}} {{.i18n.Tr "repo.pulls.view"}}</a>
205
+ {{end}}</div>
192
206
</div>
193
207
{{else}}
194
208
{{if and $.IsSigned (not .Repository.IsArchived)}}
Original file line number Diff line number Diff line change 1298
1298
.markup {
1299
1299
font-size : 14px ;
1300
1300
}
1301
+
1302
+ .title {
1303
+ .issue-title {
1304
+ margin-bottom : .5rem ;
1305
+ .index {
1306
+ color : var (--color-text-light-2 );
1307
+ }
1308
+ }
1309
+ }
1301
1310
}
1302
1311
1303
1312
.filter.dropdown .menu {
You can’t perform that action at this time.
0 commit comments