1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Refactor template empty checks (#28351)

This commit is contained in:
KN4CK3R
2023-12-04 22:48:42 +01:00
committed by GitHub
parent ec1feedbf5
commit b3c258828f
11 changed files with 23 additions and 23 deletions

View File

@@ -106,7 +106,7 @@
{{else if .GetOpType.InActions "comment_issue" "approve_pull_request" "reject_pull_request" "comment_pull"}}
<a href="{{.GetCommentLink ctx}}" class="text truncate issue title">{{(.GetIssueTitle ctx) | RenderEmoji $.Context | RenderCodeBlock}}</a>
{{$comment := index .GetIssueInfos 1}}
{{if gt (len $comment) 0}}
{{if $comment}}
<div class="markup gt-font-14">{{RenderMarkdownToHtml ctx $comment}}</div>
{{end}}
{{else if .GetOpType.InActions "merge_pull_request"}}

View File

@@ -24,7 +24,7 @@
</div>
<div class="gt-p-0">
<div id="notification_table">
{{if eq (len .Notifications) 0}}
{{if not .Notifications}}
<div class="gt-df gt-ac gt-fc gt-p-4">
{{svg "octicon-inbox" 56 "gt-mb-4"}}
{{if eq .Status 1}}

View File

@@ -63,7 +63,7 @@
</div>
</div>
<div class="divider"></div>
{{if eq (len .Issues) 0}}
{{if not .Issues}}
{{ctx.Locale.Tr "notification.no_subscriptions"}}
{{else}}
{{template "shared/issuelist" dict "." . "listType" "dashboard"}}

View File

@@ -55,7 +55,7 @@
{{if .Verified}}
<span class="flex-text-block" data-tooltip-content="{{ctx.Locale.Tr "settings.gpg_key_verified_long"}}">{{svg "octicon-verified"}} <strong>{{ctx.Locale.Tr "settings.gpg_key_verified"}}</strong></span>
{{end}}
{{if gt (len .Emails) 0}}
{{if .Emails}}
<span class="flex-text-block" data-tooltip-content="{{ctx.Locale.Tr "settings.gpg_key_matched_identities_long"}}">{{svg "octicon-mail"}} {{ctx.Locale.Tr "settings.gpg_key_matched_identities"}} {{range .Emails}}<strong>{{.Email}} </strong>{{end}}</span>
{{end}}
<div class="flex-item-body">