mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Add line-through for deleted branch on pull request view page (#32500)
Base branch deleted  branch deleted comment  Head branch deleted 
This commit is contained in:
@@ -231,7 +231,8 @@
|
||||
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
||||
<span class="text grey muted-links">
|
||||
{{template "shared/user/authorlink" .Poster}}
|
||||
{{ctx.Locale.Tr "repo.issues.delete_branch_at" .OldRef $createdStr}}
|
||||
{{$oldRef := HTMLFormat `<span class="tw-line-through">%s</span>` .OldRef}}
|
||||
{{ctx.Locale.Tr "repo.issues.delete_branch_at" $oldRef $createdStr}}
|
||||
</span>
|
||||
</div>
|
||||
{{else if eq .Type 12}}
|
||||
|
@@ -61,12 +61,16 @@
|
||||
{{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}}
|
||||
{{if .BaseBranchLink}}
|
||||
{{$baseHref = HTMLFormat `<a href="%s">%s</a>` .BaseBranchLink $baseHref}}
|
||||
{{if .BaseBranchNotExist}}
|
||||
{{$baseHref = HTMLFormat `<span class="tw-line-through" data-tooltip-content="%s">%s</span>` (ctx.Locale.Tr "form.target_branch_not_exist") $baseHref}}
|
||||
{{else}}
|
||||
{{$baseHref = HTMLFormat `<a href="%s">%s</a>` .BaseBranchLink $baseHref}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .Issue.PullRequest.HasMerged}}
|
||||
{{$mergedStr:= DateUtils.TimeSince .Issue.PullRequest.MergedUnix}}
|
||||
|
Reference in New Issue
Block a user