aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-11-21 09:04:18 -0800
committerGitHub <noreply@github.com>2024-11-21 17:04:18 +0000
commita175f9805c565aa22b1b5ead8cc15a127343819d (patch)
treeb3478ed26898d3b90dfa4310abdde5be3db79f74 /templates/repo
parenta32cfb2a8d32e4ac52504a490d2ac0a56e212167 (diff)
downloadgitea-a175f9805c565aa22b1b5ead8cc15a127343819d.tar.gz
gitea-a175f9805c565aa22b1b5ead8cc15a127343819d.zip
Add line-through for deleted branch on pull request view page (#32500)
Base branch deleted ![图片](https://github.com/user-attachments/assets/bc45aa33-d514-47c8-885a-de9732f2f3d5) branch deleted comment ![图片](https://github.com/user-attachments/assets/83729bbb-2ee8-4bd3-b6f1-780d2daad3d4) Head branch deleted ![图片](https://github.com/user-attachments/assets/90120b22-34a9-4387-aae9-5c882e8d421a)
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/issue/view_content/comments.tmpl3
-rw-r--r--templates/repo/issue/view_title.tmpl8
2 files changed, 8 insertions, 3 deletions
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index 477b6b33c6..47551c86e4 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -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}}
diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl
index 26b36d6ffc..cf775f22b5 100644
--- a/templates/repo/issue/view_title.tmpl
+++ b/templates/repo/issue/view_title.tmpl
@@ -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}}