aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2022-08-31 17:58:54 +0200
committerGitHub <noreply@github.com>2022-08-31 23:58:54 +0800
commit647b2649b1600107c5fec3505db691f78b2c1e2a (patch)
treeb3bcaf968426f6ad1ba4fde3e41f3ca3224ec47e /templates/user
parentc80ca94ab1de8ea3b13c1087cd7140165a11ceb7 (diff)
downloadgitea-647b2649b1600107c5fec3505db691f78b2c1e2a.tar.gz
gitea-647b2649b1600107c5fec3505db691f78b2c1e2a.zip
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
Diffstat (limited to 'templates/user')
-rw-r--r--templates/user/auth/change_passwd_inner.tmpl2
-rw-r--r--templates/user/auth/grant_error.tmpl2
-rw-r--r--templates/user/auth/reset_passwd.tmpl6
-rw-r--r--templates/user/auth/signup_inner.tmpl6
-rw-r--r--templates/user/auth/signup_openid_connect.tmpl2
-rw-r--r--templates/user/auth/signup_openid_register.tmpl8
-rw-r--r--templates/user/dashboard/feeds.tmpl38
-rw-r--r--templates/user/dashboard/milestones.tmpl2
-rw-r--r--templates/user/notification/notification_div.tmpl2
-rw-r--r--templates/user/settings/account.tmpl4
-rw-r--r--templates/user/settings/applications_oauth2.tmpl2
-rw-r--r--templates/user/settings/keys_ssh.tmpl2
-rw-r--r--templates/user/settings/repos.tmpl2
-rw-r--r--templates/user/settings/security/twofa.tmpl2
14 files changed, 40 insertions, 40 deletions
diff --git a/templates/user/auth/change_passwd_inner.tmpl b/templates/user/auth/change_passwd_inner.tmpl
index 49ae608053..4b18ac944f 100644
--- a/templates/user/auth/change_passwd_inner.tmpl
+++ b/templates/user/auth/change_passwd_inner.tmpl
@@ -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>
diff --git a/templates/user/auth/grant_error.tmpl b/templates/user/auth/grant_error.tmpl
index 2173a3311b..b775ac9b92 100644
--- a/templates/user/auth/grant_error.tmpl
+++ b/templates/user/auth/grant_error.tmpl
@@ -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">
diff --git a/templates/user/auth/reset_passwd.tmpl b/templates/user/auth/reset_passwd.tmpl
index bba7b2bc4b..e55eb8d330 100644
--- a/templates/user/auth/reset_passwd.tmpl
+++ b/templates/user/auth/reset_passwd.tmpl
@@ -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>
diff --git a/templates/user/auth/signup_inner.tmpl b/templates/user/auth/signup_inner.tmpl
index b868b77bed..43df945931 100644
--- a/templates/user/auth/signup_inner.tmpl
+++ b/templates/user/auth/signup_inner.tmpl
@@ -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}}
diff --git a/templates/user/auth/signup_openid_connect.tmpl b/templates/user/auth/signup_openid_connect.tmpl
index b023ca1125..36f0277b40 100644
--- a/templates/user/auth/signup_openid_connect.tmpl
+++ b/templates/user/auth/signup_openid_connect.tmpl
@@ -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>
diff --git a/templates/user/auth/signup_openid_register.tmpl b/templates/user/auth/signup_openid_register.tmpl
index 9fe0a9de1b..9c0558311f 100644
--- a/templates/user/auth/signup_openid_register.tmpl
+++ b/templates/user/auth/signup_openid_register.tmpl
@@ -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>
diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl
index 95e2239257..1862f32b6b 100644
--- a/templates/user/dashboard/feeds.tmpl
+++ b/templates/user/dashboard/feeds.tmpl
@@ -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>
diff --git a/templates/user/dashboard/milestones.tmpl b/templates/user/dashboard/milestones.tmpl
index 9044c7a2a4..248d37b2e4 100644
--- a/templates/user/dashboard/milestones.tmpl
+++ b/templates/user/dashboard/milestones.tmpl
@@ -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}}
diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl
index 6dce7f751b..192652d06b 100644
--- a/templates/user/notification/notification_div.tmpl
+++ b/templates/user/notification/notification_div.tmpl
@@ -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>
diff --git a/templates/user/settings/account.tmpl b/templates/user/settings/account.tmpl
index 53fd25313a..3070e8889c 100644
--- a/templates/user/settings/account.tmpl
+++ b/templates/user/settings/account.tmpl
@@ -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"}}
diff --git a/templates/user/settings/applications_oauth2.tmpl b/templates/user/settings/applications_oauth2.tmpl
index 424060d2e0..5e53ed00ca 100644
--- a/templates/user/settings/applications_oauth2.tmpl
+++ b/templates/user/settings/applications_oauth2.tmpl
@@ -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}}
diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl
index 7e0158a5f1..bcab968d59 100644
--- a/templates/user/settings/keys_ssh.tmpl
+++ b/templates/user/settings/keys_ssh.tmpl
@@ -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>
diff --git a/templates/user/settings/repos.tmpl b/templates/user/settings/repos.tmpl
index aedff91de9..54ea7ad2e1 100644
--- a/templates/user/settings/repos.tmpl
+++ b/templates/user/settings/repos.tmpl
@@ -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}}
diff --git a/templates/user/settings/security/twofa.tmpl b/templates/user/settings/security/twofa.tmpl
index 3d2f78ed0d..a4da947628 100644
--- a/templates/user/settings/security/twofa.tmpl
+++ b/templates/user/settings/security/twofa.tmpl
@@ -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>