mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Make sure fmt catches all templates (#20979)
* Make sure fmt catches all templates Make's `wildcard` is not recursive so it missed many template files, fix that by using `find`. * Update Makefile
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui green button">{{.locale.Tr "settings.change_password" }}</button>
|
||||
<button class="ui green button">{{.locale.Tr "settings.change_password"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<div class="column seven wide">
|
||||
<div class="ui middle centered raised segments">
|
||||
<h1 class="ui top attached header">
|
||||
{{.locale.Tr "auth.authorization_failed" }}
|
||||
{{.locale.Tr "auth.authorization_failed"}}
|
||||
</h1>
|
||||
<h3 class="ui attached segment">{{.Error.ErrorDescription}}</h3>
|
||||
<div class="ui attached segment">
|
||||
|
@@ -10,10 +10,10 @@
|
||||
</h2>
|
||||
<div class="ui attached segment">
|
||||
{{template "base/alert" .}}
|
||||
{{if .user_email }}
|
||||
{{if .user_email}}
|
||||
<div class="inline field">
|
||||
<label for="user_name">{{.locale.Tr "email"}}</label>
|
||||
<input id="user_name" type="text" value="{{ .user_email }}" disabled>
|
||||
<input id="user_name" type="text" value="{{.user_email}}" disabled>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .IsResetForm}}
|
||||
@@ -34,7 +34,7 @@
|
||||
<h4 class="ui dividing header">
|
||||
{{.locale.Tr "twofa"}}
|
||||
</h4>
|
||||
<div class="ui warning visible message">{{.locale.Tr "settings.twofa_is_enrolled" | Str2html }}</div>
|
||||
<div class="ui warning visible message">{{.locale.Tr "settings.twofa_is_enrolled" | Str2html}}</div>
|
||||
{{if .scratch_code}}
|
||||
<div class="required inline field {{if .Err_Token}}error{{end}}">
|
||||
<label for="token">{{.locale.Tr "auth.scratch_code"}}</label>
|
||||
|
@@ -46,19 +46,19 @@
|
||||
{{end}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "recaptcha")}}
|
||||
<div class="inline field required">
|
||||
<div class="g-recaptcha" data-sitekey="{{ .RecaptchaSitekey }}"></div>
|
||||
<div class="g-recaptcha" data-sitekey="{{.RecaptchaSitekey}}"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "hcaptcha")}}
|
||||
<div class="inline field required">
|
||||
<div class="h-captcha" data-sitekey="{{ .HcaptchaSitekey }}"></div>
|
||||
<div class="h-captcha" data-sitekey="{{.HcaptchaSitekey}}"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "mcaptcha")}}
|
||||
<div class="inline field df ac db-small captcha-field">
|
||||
<span>{{.locale.Tr "captcha"}}</span>
|
||||
<div class="border-secondary w-100-small" id="mcaptcha__widget-container" style="width: 50%; height: 5em"></div>
|
||||
<div class="m-captcha" data-sitekey="{{ .McaptchaSitekey }}" data-instance-url="{{ .McaptchaURL }}"></div>
|
||||
<div class="m-captcha" data-sitekey="{{.McaptchaSitekey}}" data-instance-url="{{.McaptchaURL}}"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
|
@@ -22,7 +22,7 @@
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label for="openid">OpenID URI</label>
|
||||
<input id="openid" value="{{ .OpenID }}" readonly>
|
||||
<input id="openid" value="{{.OpenID}}" readonly>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
|
@@ -32,22 +32,22 @@
|
||||
{{end}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "recaptcha")}}
|
||||
<div class="inline field required">
|
||||
<div class="g-recaptcha" data-sitekey="{{ .RecaptchaSitekey }}"></div>
|
||||
<div class="g-recaptcha" data-sitekey="{{.RecaptchaSitekey}}"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "hcaptcha")}}
|
||||
<div class="inline field required">
|
||||
<div class="h-captcha" data-sitekey="{{ .HcaptchaSitekey }}"></div>
|
||||
<div class="h-captcha" data-sitekey="{{.HcaptchaSitekey}}"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "mcaptcha")}}
|
||||
<div class="inline field required">
|
||||
<div class="m-captcha" data-sitekey="{{ .McaptchaSitekey }}" data-instance-url="{{ .McaptchaURL }}"></div>
|
||||
<div class="m-captcha" data-sitekey="{{.McaptchaSitekey}}" data-instance-url="{{.McaptchaURL}}"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="inline field">
|
||||
<label for="openid">OpenID URI</label>
|
||||
<input id="openid" value="{{ .OpenID }}" readonly>
|
||||
<input id="openid" value="{{.OpenID}}" readonly>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
|
@@ -23,38 +23,38 @@
|
||||
{{$.locale.Tr "action.create_branch" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{end}}
|
||||
{{else if eq .GetOpType 6}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.create_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 7}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.create_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 8}}
|
||||
{{$.locale.Tr "action.transfer_repo" .GetContent (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 9}}
|
||||
{{$.locale.Tr "action.push_tag" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 10}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.comment_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 11}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.merge_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 12}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.close_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 13}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.reopen_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 14}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.close_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 15}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.reopen_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 16}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.delete_tag" (.GetRepoLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 17}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.delete_branch" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 18}}
|
||||
{{$.locale.Tr "action.mirror_sync_push" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
@@ -63,30 +63,30 @@
|
||||
{{else if eq .GetOpType 20}}
|
||||
{{$.locale.Tr "action.mirror_sync_delete" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 21}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.approve_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 22}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.reject_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 23}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.comment_pull" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 24}}
|
||||
{{ $linkText := .Content | RenderEmoji }}
|
||||
{{$linkText := .Content | RenderEmoji}}
|
||||
{{$.locale.Tr "action.publish_release" (.GetRepoLink|Escape) ((printf "%s/releases/tag/%s" .GetRepoLink .GetTag)|Escape) (.ShortRepoPath|Escape) $linkText | Str2html}}
|
||||
{{else if eq .GetOpType 25}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{ $reviewer := index .GetIssueInfos 1}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$reviewer := index .GetIssueInfos 1}}
|
||||
{{$.locale.Tr "action.review_dismissed" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) $reviewer | Str2html}}
|
||||
{{end}}
|
||||
</p>
|
||||
{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}
|
||||
<div class="content">
|
||||
<ul>
|
||||
{{ $push := ActionContent2Commits .}}
|
||||
{{ $repoLink := .GetRepoLink}}
|
||||
{{$push := ActionContent2Commits .}}
|
||||
{{$repoLink := .GetRepoLink}}
|
||||
{{range $push.Commits}}
|
||||
{{ $commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
|
||||
{{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
|
||||
<li>
|
||||
{{avatarHTML ($push.AvatarLink .AuthorEmail) 16 "mr-2" .AuthorName}}
|
||||
<a class="commit-id mr-2" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
|
||||
|
@@ -91,7 +91,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="meta">
|
||||
{{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.locale }}
|
||||
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}}
|
||||
{{if .IsClosed}}
|
||||
{{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate|Str2html}}
|
||||
{{else}}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<div class="ui container">
|
||||
<h1 class="ui dividing header">{{.locale.Tr "notification.notifications"}}</h1>
|
||||
<div class="ui top attached tabular menu">
|
||||
{{ $notificationUnreadCount := call .NotificationUnreadCount}}
|
||||
{{$notificationUnreadCount := call .NotificationUnreadCount}}
|
||||
<a href="{{AppSubUrl}}/notifications?q=unread" class="{{if eq .Status 1}}active{{end}} item">
|
||||
{{.locale.Tr "notification.unread"}}
|
||||
<div class="ui label {{if not $notificationUnreadCount}}hidden{{end}}">{{$notificationUnreadCount}}</div>
|
||||
|
@@ -139,9 +139,9 @@
|
||||
<div class="ui attached error segment">
|
||||
<div class="ui red message">
|
||||
<p class="text left">{{svg "octicon-alert"}} {{.locale.Tr "settings.delete_prompt" | Str2html}}</p>
|
||||
{{ if .UserDeleteWithComments }}
|
||||
{{if .UserDeleteWithComments}}
|
||||
<p class="text left" style="font-weight: bold;">{{.locale.Tr "settings.delete_with_all_comments" .UserDeleteWithCommentsMaxTime | Str2html}}</p>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
</div>
|
||||
<form class="ui form ignore-dirty" id="delete-form" action="{{AppSubUrl}}/user/settings/account/delete" method="post">
|
||||
{{template "base/disable_form_autofill"}}
|
||||
|
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
<div class="ui attached bottom segment">
|
||||
<h5 class="ui top header">
|
||||
{{.locale.Tr "settings.create_oauth2_application" }}
|
||||
{{.locale.Tr "settings.create_oauth2_application"}}
|
||||
</h5>
|
||||
<form class="ui form ignore-dirty" action="{{.Link}}/oauth2" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<h4 class="ui top attached header">
|
||||
{{.locale.Tr "settings.manage_ssh_keys"}}
|
||||
<div class="ui right">
|
||||
{{if not .DisableSSH }}
|
||||
{{if not .DisableSSH}}
|
||||
<div id="add-ssh-button" class="ui primary tiny show-panel button" data-panel="#add-ssh-key-panel">
|
||||
{{.locale.Tr "settings.add_key"}}
|
||||
</div>
|
||||
|
@@ -11,7 +11,7 @@
|
||||
{{if .Dirs}}
|
||||
<div class="ui middle aligned divided list">
|
||||
{{range $dirI, $dir := .Dirs}}
|
||||
{{ $repo := index $.ReposMap $dir}}
|
||||
{{$repo := index $.ReposMap $dir}}
|
||||
<div class="item">
|
||||
<div class="content">
|
||||
{{if $repo}}
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<div class="ui attached segment">
|
||||
<p>{{.locale.Tr "settings.twofa_desc"}}</p>
|
||||
{{if .TOTPEnrolled}}
|
||||
<p>{{$.locale.Tr "settings.twofa_is_enrolled" | Str2html }}</p>
|
||||
<p>{{$.locale.Tr "settings.twofa_is_enrolled" | Str2html}}</p>
|
||||
<form class="ui form" action="{{AppSubUrl}}/user/settings/security/two_factor/regenerate_scratch" method="post" enctype="multipart/form-data">
|
||||
{{.CsrfTokenHtml}}
|
||||
<p>{{.locale.Tr "settings.regenerate_scratch_token_desc"}}</p>
|
||||
|
Reference in New Issue
Block a user