mirror of
https://github.com/go-gitea/gitea
synced 2024-11-25 01:52:49 +01:00
Fix bug
This commit is contained in:
parent
d139e94b0e
commit
d7efc1ec15
2 changed files with 2 additions and 7 deletions
|
@ -432,7 +432,6 @@ func PrepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *git.C
|
|||
ctx.Data["GetCommitMessages"] = pull_service.GetSquashMergeCommitMessages(ctx, pull)
|
||||
} else {
|
||||
ctx.Data["GetCommitMessages"] = ""
|
||||
ctx.Data["HeadBranchNotExist"] = true
|
||||
}
|
||||
|
||||
sha, err := baseGitRepo.GetRefCommitID(pull.GetGitRefName())
|
||||
|
|
|
@ -56,16 +56,12 @@
|
|||
{{if .Issue.IsPull}}
|
||||
{{$headHref := .HeadTarget}}
|
||||
{{if .HeadBranchLink}}
|
||||
{{if .HeadBranchNotExist}}
|
||||
{{$headHref = HTMLFormat `<span class="tw-line-through" data-tooltip-content="%s">%s</span>` (ctx.Locale.Tr "form.target_branch_not_exist") $headHref}}
|
||||
{{else}}
|
||||
{{$headHref = HTMLFormat `<a href="%s">%s</a> <button class="btn interact-fg" data-tooltip-content="%s" data-clipboard-text="%s">%s</button>` .HeadBranchLink $headHref (ctx.Locale.Tr "copy_branch") .HeadTarget (svg "octicon-copy" 14)}}
|
||||
{{end}}
|
||||
{{$headHref = HTMLFormat `<a href="%s">%s</a> <button class="btn interact-fg" data-tooltip-content="%s" data-clipboard-text="%s">%s</button>` .HeadBranchLink $headHref (ctx.Locale.Tr "copy_branch") .HeadTarget (svg "octicon-copy" 14)}}
|
||||
{{else}}
|
||||
{{if .Issue.PullRequest.IsAgitFlow}}
|
||||
{{$headHref = HTMLFormat `%s <a href="%s" target="_blank"><span class="ui label basic tiny" data-tooltip-content="%s">AGit</span></a>` $headHref "https://docs.gitea.com/usage/agit" (ctx.Locale.Tr "repo.pull.agit_documentation")}}
|
||||
{{else}}
|
||||
{{$headHref = HTMLFormat `<span data-tooltip-content="%s">%s</span>` (ctx.Locale.Tr "form.target_branch_not_exist") $headHref}}
|
||||
{{$headHref = HTMLFormat `<span class="tw-line-through" data-tooltip-content="%s">%s</span>` (ctx.Locale.Tr "form.target_branch_not_exist") $headHref}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{$baseHref := .BaseTarget}}
|
||||
|
|
Loading…
Reference in a new issue