From d848098f60f78e6b4a72ae7f769fd66399a8ba82 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 11 Apr 2021 05:46:37 +0200 Subject: [PATCH] Enforce tab indentation in templates (#15289) * Enforce tab indendation in templates This adds editorconfig-checker [1] to lint the template files so they conform the editorconfig files. I fixed all current identation issues using the fix mode of eclint [2] and some manual corrections. We can extend this linting to other files later, for now I'd like this PR to focus on HTML template files only. [1] https://github.com/editorconfig-checker/editorconfig-checker [2] https://github.com/jedmao/eclint * fix indendation Co-authored-by: zeripath Co-authored-by: techknowlogick --- .editorconfig | 6 + Makefile | 1 + package-lock.json | 70 +++++ package.json | 1 + templates/admin/auth/edit.tmpl | 10 +- templates/admin/auth/new.tmpl | 4 +- templates/admin/auth/source/ldap.tmpl | 4 +- templates/admin/auth/source/oauth.tmpl | 6 +- templates/admin/base/search.tmpl | 4 +- templates/admin/repo/list.tmpl | 2 +- templates/admin/repo/unadopted.tmpl | 180 ++++++------ templates/base/alert_details.tmpl | 8 +- templates/base/head.tmpl | 2 +- templates/explore/code.tmpl | 1 - templates/explore/organizations.tmpl | 34 +-- templates/explore/repo_search.tmpl | 44 +-- templates/explore/search.tmpl | 4 +- templates/explore/users.tmpl | 24 +- templates/mail/issue/assigned.tmpl | 10 +- templates/mail/issue/default.tmpl | 2 +- templates/mail/notify/collaborator.tmpl | 10 +- templates/mail/release.tmpl | 2 +- templates/org/home.tmpl | 6 +- templates/org/settings/labels.tmpl | 2 +- templates/org/team/navbar.tmpl | 4 +- templates/post-install.tmpl | 2 +- templates/repo/activity.tmpl | 2 +- templates/repo/blame.tmpl | 4 +- templates/repo/branch/list.tmpl | 10 +- templates/repo/commit_page.tmpl | 18 +- templates/repo/commits_table.tmpl | 2 +- templates/repo/diff/compare.tmpl | 6 +- templates/repo/diff/csv_diff.tmpl | 2 +- templates/repo/diff/image_diff.tmpl | 2 +- templates/repo/diff/new_review.tmpl | 12 +- templates/repo/editor/edit.tmpl | 6 +- templates/repo/header.tmpl | 2 +- .../repo/issue/branch_selector_field.tmpl | 4 +- templates/repo/issue/comment_tab.tmpl | 2 +- .../repo/issue/labels/edit_delete_label.tmpl | 1 - .../issue/labels/label_load_template.tmpl | 3 +- templates/repo/issue/milestone_issues.tmpl | 32 +-- templates/repo/issue/milestones.tmpl | 2 +- templates/repo/issue/view_content.tmpl | 6 +- .../repo/issue/view_content/attachments.tmpl | 76 ++--- .../repo/issue/view_content/comments.tmpl | 20 +- templates/repo/issue/view_title.tmpl | 56 ++-- templates/repo/migrate/github.tmpl | 2 +- templates/repo/migrate/gitlab.tmpl | 2 +- templates/repo/migrate/gogs.tmpl | 2 +- templates/repo/pulls/status.tmpl | 58 ++-- templates/repo/release/list.tmpl | 2 +- templates/repo/settings/branches.tmpl | 62 ++--- templates/repo/settings/deploy_keys.tmpl | 6 +- templates/repo/settings/webhook/matrix.tmpl | 38 +-- templates/repo/settings/webhook/telegram.tmpl | 8 +- templates/repo/view_file.tmpl | 10 +- templates/repo/wiki/revision.tmpl | 2 +- templates/shared/issuelist.tmpl | 4 +- templates/user/auth/signup_openid_navbar.tmpl | 1 - templates/user/auth/twofa.tmpl | 2 +- templates/user/dashboard/issues.tmpl | 2 +- templates/user/dashboard/milestones.tmpl | 90 +++--- .../user/notification/notification_div.tmpl | 260 +++++++++--------- templates/user/settings/keys_gpg.tmpl | 2 +- templates/user/settings/repos.tmpl | 2 +- templates/user/settings/security_u2f.tmpl | 21 +- 67 files changed, 678 insertions(+), 609 deletions(-) diff --git a/.editorconfig b/.editorconfig index 54738e883..b7ff926c3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,6 +12,12 @@ insert_final_newline = true [*.{go,tmpl,html}] indent_style = tab +[templates/custom/*.tmpl] +insert_final_newline = false + +[templates/swagger/v1_json.tmpl] +indent_style = space + [Makefile] indent_style = tab diff --git a/Makefile b/Makefile index e8738c928..dcfaf89a8 100644 --- a/Makefile +++ b/Makefile @@ -325,6 +325,7 @@ lint: lint-frontend lint-backend lint-frontend: node_modules npx eslint --color --max-warnings=0 web_src/js build templates *.config.js npx stylelint --color --max-warnings=0 web_src/less + npx editorconfig-checker templates .PHONY: lint-backend lint-backend: golangci-lint revive vet diff --git a/package-lock.json b/package-lock.json index 2c1dd4f6b..3777c6b72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1570,6 +1570,32 @@ "resolved": "https://registry.npmjs.org/add-asset-webpack-plugin/-/add-asset-webpack-plugin-2.0.1.tgz", "integrity": "sha512-Hx9EKnirCUfdh684y1yhx8QOFolpkIG2VRHHgNm8wFy1Cf7P3RGwS678hoN7Y1XvZRPpVXWa+6QnfL/2i0CMCA==" }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "requires": { + "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -3388,6 +3414,17 @@ "safer-buffer": "^2.1.0" } }, + "editorconfig-checker": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/editorconfig-checker/-/editorconfig-checker-4.0.2.tgz", + "integrity": "sha512-tUI7ABIzMB1kfwTUQmX+gaZGCMNuUgGuRHJ+Xu4Tk9T8lV8Vy5w/EaQsSZ7NKrOgLxbekptw6MUgrzHTvhceLw==", + "dev": true, + "requires": { + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.0", + "tar": "^6.0.0" + } + }, "electron-to-chromium": { "version": "1.3.707", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.707.tgz", @@ -4936,6 +4973,33 @@ "sshpk": "^1.7.0" } }, + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -8107,6 +8171,12 @@ "lower-case": "^1.1.1" } }, + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "dev": true + }, "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", diff --git a/package.json b/package.json index 20a64856f..430e98c07 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ }, "devDependencies": { "eslint": "7.23.0", + "editorconfig-checker": "4.0.2", "eslint-plugin-html": "6.1.2", "eslint-plugin-import": "2.22.1", "eslint-plugin-unicorn": "29.0.0", diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index da1ea42a7..e14c3be76 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -96,8 +96,8 @@
- - + +
@@ -215,9 +215,9 @@
- - -
+ + +
diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index c252f7d3f..36a5d2c63 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -119,8 +119,8 @@ {{.i18n.Tr "admin.auths.tip.nextcloud"}}
  • Yandex
  • {{.i18n.Tr "admin.auths.tip.yandex"}} -
  • Mastodon
  • - {{.i18n.Tr "admin.auths.tip.mastodon"}} +
  • Mastodon
  • + {{.i18n.Tr "admin.auths.tip.mastodon"}}
    diff --git a/templates/admin/auth/source/ldap.tmpl b/templates/admin/auth/source/ldap.tmpl index dbadd31f1..584538f53 100644 --- a/templates/admin/auth/source/ldap.tmpl +++ b/templates/admin/auth/source/ldap.tmpl @@ -68,8 +68,8 @@
    - - + +
    diff --git a/templates/admin/auth/source/oauth.tmpl b/templates/admin/auth/source/oauth.tmpl index 1489ab839..787e29873 100644 --- a/templates/admin/auth/source/oauth.tmpl +++ b/templates/admin/auth/source/oauth.tmpl @@ -21,9 +21,9 @@
    - - -
    + + +
    diff --git a/templates/admin/base/search.tmpl b/templates/admin/base/search.tmpl index 8a7af53da..e4e7e2d46 100644 --- a/templates/admin/base/search.tmpl +++ b/templates/admin/base/search.tmpl @@ -17,7 +17,7 @@
    - - + +
    diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl index aff30ab51..dbd1ad692 100644 --- a/templates/admin/repo/list.tmpl +++ b/templates/admin/repo/list.tmpl @@ -7,7 +7,7 @@ {{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}}) +
    {{template "admin/repo/search" .}} diff --git a/templates/admin/repo/unadopted.tmpl b/templates/admin/repo/unadopted.tmpl index 481d77dfd..b1f172720 100644 --- a/templates/admin/repo/unadopted.tmpl +++ b/templates/admin/repo/unadopted.tmpl @@ -5,98 +5,98 @@ {{template "base/alert" .}}

    {{.i18n.Tr "admin.repos.unadopted"}} - +

    -
    -
    -
    - - - -
    -
    +
    +
    +
    + + + +
    +
    - {{if .search}} -
    - {{if .Dirs}} -
    - {{range $dirI, $dir := .Dirs}} -
    -
    - {{svg "octicon-file-directory"}} - {{$dir}} -
    - - - - -
    -
    -
    - {{end}} -
    - {{template "base/paginate" .}} - {{else}} -
    - {{.i18n.Tr "admin.repos.unadopted.no_more"}} -
    - {{template "base/paginate" .}} - {{end}} -
    - {{end}} -
    + {{if .search}} +
    + {{if .Dirs}} +
    + {{range $dirI, $dir := .Dirs}} +
    +
    + {{svg "octicon-file-directory"}} + {{$dir}} +
    + + + + +
    +
    +
    + {{end}} +
    + {{template "base/paginate" .}} + {{else}} +
    + {{.i18n.Tr "admin.repos.unadopted.no_more"}} +
    + {{template "base/paginate" .}} + {{end}} +
    + {{end}} +
    {{template "base/footer" .}} diff --git a/templates/base/alert_details.tmpl b/templates/base/alert_details.tmpl index 38a2721bf..1d7ec15dc 100644 --- a/templates/base/alert_details.tmpl +++ b/templates/base/alert_details.tmpl @@ -1,7 +1,7 @@ {{.Message}}
    - {{.Summary}} - - {{.Details | Str2html}} - + {{.Summary}} + + {{.Details | Str2html}} +
    diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 74bca7239..d8d24c61e 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -55,7 +55,7 @@ name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'}], {{ end }} {{ range .MentionableTeams }} - ['{{$.MentionableTeamsOrg}}/{{.Name}}', {key: '{{$.MentionableTeamsOrg}}/{{.Name}}', value: '{{$.MentionableTeamsOrg}}/{{.Name}}', + ['{{$.MentionableTeamsOrg}}/{{.Name}}', {key: '{{$.MentionableTeamsOrg}}/{{.Name}}', value: '{{$.MentionableTeamsOrg}}/{{.Name}}', name: '{{$.MentionableTeamsOrg}}/{{.Name}}', avatar: '{{$.MentionableTeamsOrgAvatar}}'}], {{ end }} ]).values()), diff --git a/templates/explore/code.tmpl b/templates/explore/code.tmpl index 222bbb8aa..6332413a1 100644 --- a/templates/explore/code.tmpl +++ b/templates/explore/code.tmpl @@ -18,7 +18,6 @@
    -
    {{if .SearchResults}}

    diff --git a/templates/explore/organizations.tmpl b/templates/explore/organizations.tmpl index b039c1ad2..b2fee6c19 100644 --- a/templates/explore/organizations.tmpl +++ b/templates/explore/organizations.tmpl @@ -8,24 +8,24 @@ {{range .Users}}
    {{avatar .}} -
    - - {{.Name}} {{.FullName}} - {{if .Visibility.IsPrivate}} - {{$.i18n.Tr "repo.desc.private"}} - {{end}} - -
    - {{if .Location}} - {{svg "octicon-location"}} {{.Location}} - {{end}} - {{if and .Website}} - {{svg "octicon-link"}} - {{.Website}} - {{end}} - {{svg "octicon-clock"}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}} +
    + + {{.Name}} {{.FullName}} + {{if .Visibility.IsPrivate}} + {{$.i18n.Tr "repo.desc.private"}} + {{end}} + +
    + {{if .Location}} + {{svg "octicon-location"}} {{.Location}} + {{end}} + {{if and .Website}} + {{svg "octicon-link"}} + {{.Website}} + {{end}} + {{svg "octicon-clock"}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}} +
    -
    {{else}}
    {{$.i18n.Tr "explore.org_no_results"}}
    diff --git a/templates/explore/repo_search.tmpl b/templates/explore/repo_search.tmpl index 53c5156dc..5e7bed8b3 100644 --- a/templates/explore/repo_search.tmpl +++ b/templates/explore/repo_search.tmpl @@ -1,30 +1,30 @@
    - - -
    - - -
    + + +
    + + +
    diff --git a/templates/explore/search.tmpl b/templates/explore/search.tmpl index d9d2f3b9a..245cc9f34 100644 --- a/templates/explore/search.tmpl +++ b/templates/explore/search.tmpl @@ -18,8 +18,8 @@
    - - + +
    diff --git a/templates/explore/users.tmpl b/templates/explore/users.tmpl index cdb8e9d37..dff4e8c8b 100644 --- a/templates/explore/users.tmpl +++ b/templates/explore/users.tmpl @@ -8,19 +8,19 @@ {{range .Users}}
    {{avatar .}} -
    - {{.Name}} {{.FullName}} -
    - {{if .Location}} - {{svg "octicon-location"}} {{.Location}} - {{end}} - {{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}} - {{svg "octicon-mail"}} - {{.Email}} - {{end}} - {{svg "octicon-clock"}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}} +
    + {{.Name}} {{.FullName}} +
    + {{if .Location}} + {{svg "octicon-location"}} {{.Location}} + {{end}} + {{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}} + {{svg "octicon-mail"}} + {{.Email}} + {{end}} + {{svg "octicon-clock"}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}} +
    -
    {{else}}
    {{$.i18n.Tr "explore.user_no_results"}}
    diff --git a/templates/mail/issue/assigned.tmpl b/templates/mail/issue/assigned.tmpl index d302a16f2..5b0d2526f 100644 --- a/templates/mail/issue/assigned.tmpl +++ b/templates/mail/issue/assigned.tmpl @@ -11,11 +11,11 @@

    @{{.Doer.Name}} assigned you to the {{if .IsPull}}pull request{{else}}issue{{end}} #{{.Issue.Index}} in repository {{.Repo}}.

    diff --git a/templates/mail/issue/default.tmpl b/templates/mail/issue/default.tmpl index b7d576bef..4b492dad8 100644 --- a/templates/mail/issue/default.tmpl +++ b/templates/mail/issue/default.tmpl @@ -19,7 +19,7 @@ {{if .IsMention}}

    @{{.Doer.Name}} mentioned you:

    {{end}} {{if eq .ActionName "push"}}

    - {{.Doer.Name}} + {{.Doer.Name}} {{if .Comment.IsForcePush}} {{ $oldCommitLink:= printf "%s%s/%s/commit/%s" AppUrl .Comment.Issue.PullRequest.BaseRepo.OwnerName .Comment.Issue.PullRequest.BaseRepo.Name .Comment.OldCommit}} {{ $newCommitLink:= printf "%s%s/%s/commit/%s" AppUrl .Comment.Issue.PullRequest.BaseRepo.OwnerName .Comment.Issue.PullRequest.BaseRepo.Name .Comment.NewCommit}} diff --git a/templates/mail/notify/collaborator.tmpl b/templates/mail/notify/collaborator.tmpl index 947b40439..19a243102 100644 --- a/templates/mail/notify/collaborator.tmpl +++ b/templates/mail/notify/collaborator.tmpl @@ -11,11 +11,11 @@

    You have been added as a collaborator of repository: {{.RepoName}}

    diff --git a/templates/mail/release.tmpl b/templates/mail/release.tmpl index 04b8c3bf5..7829bce24 100644 --- a/templates/mail/release.tmpl +++ b/templates/mail/release.tmpl @@ -26,7 +26,7 @@



    - --- + ---
    Downloads:

      diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index 25cd68291..9b77ae6b3 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -26,9 +26,9 @@
      {{if .CanCreateOrgRepo}}
      - {{if not .DisabledMirrors}} - {{.i18n.Tr "new_migrate"}} - {{end}} + {{if not .DisabledMirrors}} + {{.i18n.Tr "new_migrate"}} + {{end}} {{.i18n.Tr "new_repo"}}
      diff --git a/templates/org/settings/labels.tmpl b/templates/org/settings/labels.tmpl index 61302c731..482d1b17d 100644 --- a/templates/org/settings/labels.tmpl +++ b/templates/org/settings/labels.tmpl @@ -20,7 +20,7 @@ {{template "base/alert" .}} {{template "repo/issue/labels/label_list" .}}
      -
    +

    diff --git a/templates/org/team/navbar.tmpl b/templates/org/team/navbar.tmpl index 18d638796..b5732ed71 100644 --- a/templates/org/team/navbar.tmpl +++ b/templates/org/team/navbar.tmpl @@ -1,4 +1,4 @@ diff --git a/templates/post-install.tmpl b/templates/post-install.tmpl index 62abf5ef8..4637e5a18 100644 --- a/templates/post-install.tmpl +++ b/templates/post-install.tmpl @@ -1,6 +1,6 @@ {{template "base/head" .}}
    -
    +
    diff --git a/templates/repo/activity.tmpl b/templates/repo/activity.tmpl index bcf64a3fa..08e2a3111 100644 --- a/templates/repo/activity.tmpl +++ b/templates/repo/activity.tmpl @@ -93,7 +93,7 @@ {{if gt .Activity.Code.CommitCountInAllBranches 0}}
    - {{.i18n.Tr "repo.activity.git_stats_exclude_merges" }} + {{.i18n.Tr "repo.activity.git_stats_exclude_merges" }} {{.i18n.Tr (TrN .i18n.Lang .Activity.Code.AuthorCount "repo.activity.git_stats_author_1" "repo.activity.git_stats_author_n") .Activity.Code.AuthorCount }} {{.i18n.Tr (TrN .i18n.Lang .Activity.Code.AuthorCount "repo.activity.git_stats_pushed_1" "repo.activity.git_stats_pushed_n") }} {{.i18n.Tr (TrN .i18n.Lang .Activity.Code.CommitCount "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n") .Activity.Code.CommitCount }} diff --git a/templates/repo/blame.tmpl b/templates/repo/blame.tmpl index 5dd93d3d4..638683b25 100644 --- a/templates/repo/blame.tmpl +++ b/templates/repo/blame.tmpl @@ -19,7 +19,7 @@
    -
    +
    @@ -31,5 +31,5 @@
    -
    +
    diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index de4f0fb57..caddcf69e 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -25,11 +25,11 @@ diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl index 6260d2e96..01cbd5182 100644 --- a/templates/repo/commit_page.tmpl +++ b/templates/repo/commit_page.tmpl @@ -113,13 +113,13 @@ {{.i18n.Tr .Verification.Reason}} {{.i18n.Tr "repo.commits.gpg_key_id"}}: {{.Verification.SigningKey.KeyID}} {{else}} - - {{.i18n.Tr .Verification.Reason}} - {{if .Verification.SigningKey}} - {{if ne .Verification.SigningKey.KeyID ""}} - {{.i18n.Tr "repo.commits.gpg_key_id"}}: {{.Verification.SigningKey.KeyID}} - {{end}} - {{end}} + + {{.i18n.Tr .Verification.Reason}} + {{if .Verification.SigningKey}} + {{if ne .Verification.SigningKey.KeyID ""}} + {{.i18n.Tr "repo.commits.gpg_key_id"}}: {{.Verification.SigningKey.KeyID}} + {{end}} + {{end}} {{end}}
    {{end}} @@ -130,9 +130,9 @@ {{if .NoteAuthor}} {{if .NoteAuthor.FullName}} - {{.NoteAuthor.FullName}} + {{.NoteAuthor.FullName}} {{else}} - {{.NoteCommit.Author.Name}} + {{.NoteCommit.Author.Name}} {{end}} {{else}} diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index 623df6f63..3ef233984 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -28,7 +28,7 @@ {{if and .Commits (gt .CommitCount 0)}} - {{template "repo/commits_list" .}} + {{template "repo/commits_list" .}} {{end}} {{template "base/paginate" .}} diff --git a/templates/repo/diff/compare.tmpl b/templates/repo/diff/compare.tmpl index fdf65aaad..124b4e5d1 100644 --- a/templates/repo/diff/compare.tmpl +++ b/templates/repo/diff/compare.tmpl @@ -117,9 +117,9 @@ {{end}} {{else if and .PageIsComparePull (gt .CommitCount 0)}} {{if .HasPullRequest}} -
    - {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}} -
    +
    + {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}} +
    {{else}} {{if and $.IsSigned (not .Repository.IsArchived)}}
    diff --git a/templates/repo/diff/csv_diff.tmpl b/templates/repo/diff/csv_diff.tmpl index c4af70461..b86e9d2a7 100644 --- a/templates/repo/diff/csv_diff.tmpl +++ b/templates/repo/diff/csv_diff.tmpl @@ -43,4 +43,4 @@ {{end}} - \ No newline at end of file + diff --git a/templates/repo/diff/image_diff.tmpl b/templates/repo/diff/image_diff.tmpl index 01f7e3f8e..91092c412 100644 --- a/templates/repo/diff/image_diff.tmpl +++ b/templates/repo/diff/image_diff.tmpl @@ -106,4 +106,4 @@
    -{{end}} \ No newline at end of file +{{end}} diff --git a/templates/repo/diff/new_review.tmpl b/templates/repo/diff/new_review.tmpl index 630436941..9e65d6d42 100644 --- a/templates/repo/diff/new_review.tmpl +++ b/templates/repo/diff/new_review.tmpl @@ -13,16 +13,12 @@ {{svg "octicon-x" 16}}
    - +
    - - - + + +
    diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl index 695574cd9..3efde70f5 100644 --- a/templates/repo/editor/edit.tmpl +++ b/templates/repo/editor/edit.tmpl @@ -59,7 +59,7 @@
    diff --git a/templates/repo/issue/branch_selector_field.tmpl b/templates/repo/issue/branch_selector_field.tmpl index 7ca18508d..e115b4a3f 100644 --- a/templates/repo/issue/branch_selector_field.tmpl +++ b/templates/repo/issue/branch_selector_field.tmpl @@ -34,7 +34,7 @@ - diff --git a/templates/repo/issue/labels/label_load_template.tmpl b/templates/repo/issue/labels/label_load_template.tmpl index 76ee77658..037069c29 100644 --- a/templates/repo/issue/labels/label_load_template.tmpl +++ b/templates/repo/issue/labels/label_load_template.tmpl @@ -3,8 +3,7 @@
    diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl index f977074fe..8c2f36f04 100644 --- a/templates/repo/issue/milestone_issues.tmpl +++ b/templates/repo/issue/milestone_issues.tmpl @@ -14,29 +14,29 @@ {{if not .Repository.IsArchived}} {{end}}
    -
    -
    - {{ $closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix $.Lang }} - {{if .IsClosed}} +
    +
    + {{ $closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix $.Lang }} + {{if .IsClosed}} {{svg "octicon-clock"}} {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}} - {{else}} + {{else}} {{svg "octicon-calendar"}} - {{if .Milestone.DeadlineString}} - {{.Milestone.DeadlineString}} - {{else}} - {{$.i18n.Tr "repo.milestones.no_due_date"}} - {{end}} - {{end}} -   - {{.i18n.Tr "repo.milestones.completeness" .Milestone.Completeness}} -
    -
    + {{if .Milestone.DeadlineString}} + {{.Milestone.DeadlineString}} + {{else}} + {{$.i18n.Tr "repo.milestones.no_due_date"}} + {{end}} + {{end}} +   + {{.i18n.Tr "repo.milestones.completeness" .Milestone.Completeness}} +
    +
    diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl index c572e0c3f..c7d3522ab 100644 --- a/templates/repo/issue/milestones.tmpl +++ b/templates/repo/issue/milestones.tmpl @@ -14,7 +14,7 @@ {{template "base/alert" .}}
    -
    + {{$reactions := .Issue.Reactions.GroupByType}} {{if $reactions}} diff --git a/templates/repo/issue/view_content/attachments.tmpl b/templates/repo/issue/view_content/attachments.tmpl index 16d77847d..343d1d835 100644 --- a/templates/repo/issue/view_content/attachments.tmpl +++ b/templates/repo/issue/view_content/attachments.tmpl @@ -1,42 +1,42 @@
    - {{if .Attachments}} -
    - {{end}} -
    + {{if .Attachments}} +
    + {{end}} + - {{if $hasThumbnails}} -
    -
    - {{- range .Attachments -}} - {{if FilenameIsImage .Name}} - {{if not (containGeneric $.Content .UUID)}} - - - - {{end}} - {{end}} - {{end -}} -
    - {{end}} + {{if $hasThumbnails}} +
    +
    + {{- range .Attachments -}} + {{if FilenameIsImage .Name}} + {{if not (containGeneric $.Content .UUID)}} + + + + {{end}} + {{end}} + {{end -}} +
    + {{end}}
    diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index c86689400..81f0d0434 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -3,13 +3,13 @@ {{ $createdStr:= TimeSinceUnix .CreatedUnix $.Lang }} + 5 = COMMENT_REF, 6 = PULL_REF, 7 = COMMENT_LABEL, 12 = START_TRACKING, + 13 = STOP_TRACKING, 14 = ADD_TIME_MANUAL, 16 = ADDED_DEADLINE, 17 = MODIFIED_DEADLINE, + 18 = REMOVED_DEADLINE, 19 = ADD_DEPENDENCY, 20 = REMOVE_DEPENDENCY, 21 = CODE, + 22 = REVIEW, 23 = ISSUE_LOCKED, 24 = ISSUE_UNLOCKED, 25 = TARGET_BRANCH_CHANGED, + 26 = DELETE_TIME_MANUAL, 27 = REVIEW_REQUEST, 28 = MERGE_PULL_REQUEST, + 29 = PULL_PUSH_EVENT, 30 = PROJECT_CHANGED, 31 = PROJECT_BOARD_CHANGED + 32 = DISMISSED_REVIEW --> {{if eq .Type 0}}
    {{if .OriginalAuthor }} @@ -73,9 +73,9 @@
    {{.Content}}
    - {{if .Attachments}} - {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments "Content" .RenderedContent}} - {{end}} + {{if .Attachments}} + {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments "Content" .RenderedContent}} + {{end}}
    {{$reactions := .Reactions.GroupByType}} {{if $reactions}} diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl index f6cbb9206..b6bf965a1 100644 --- a/templates/repo/issue/view_title.tmpl +++ b/templates/repo/issue/view_title.tmpl @@ -57,34 +57,34 @@ {{end}} + + {{svg "octicon-arrow-right"}} + + {{end}} {{else}} {{ $createdStr:= TimeSinceUnix .Issue.CreatedUnix $.Lang }} diff --git a/templates/repo/migrate/github.tmpl b/templates/repo/migrate/github.tmpl index b7c5bd5b0..156f8896f 100644 --- a/templates/repo/migrate/github.tmpl +++ b/templates/repo/migrate/github.tmpl @@ -6,7 +6,7 @@ {{.CsrfTokenHtml}}

    {{.i18n.Tr "repo.migrate.migrate" .service.Title}} - +

    {{template "base/alert" .}} diff --git a/templates/repo/migrate/gitlab.tmpl b/templates/repo/migrate/gitlab.tmpl index 26eebd18b..e1424c250 100644 --- a/templates/repo/migrate/gitlab.tmpl +++ b/templates/repo/migrate/gitlab.tmpl @@ -6,7 +6,7 @@ {{.CsrfTokenHtml}}

    {{.i18n.Tr "repo.migrate.migrate" .service.Title}} - +

    {{template "base/alert" .}} diff --git a/templates/repo/migrate/gogs.tmpl b/templates/repo/migrate/gogs.tmpl index dc83ac5bb..b1900e83d 100644 --- a/templates/repo/migrate/gogs.tmpl +++ b/templates/repo/migrate/gogs.tmpl @@ -62,7 +62,7 @@
    - --> + -->
    diff --git a/templates/repo/pulls/status.tmpl b/templates/repo/pulls/status.tmpl index e48f5f3fe..f029d5cb6 100644 --- a/templates/repo/pulls/status.tmpl +++ b/templates/repo/pulls/status.tmpl @@ -1,32 +1,32 @@ {{if $.LatestCommitStatus}} - {{if not $.Issue.PullRequest.HasMerged}} -
    - {{if eq .LatestCommitStatus.State "pending"}} - {{$.i18n.Tr "repo.pulls.status_checking"}} - {{else if eq .LatestCommitStatus.State "success"}} - {{$.i18n.Tr "repo.pulls.status_checks_success"}} - {{else if eq .LatestCommitStatus.State "warning"}} - {{$.i18n.Tr "repo.pulls.status_checks_warning"}} - {{else if eq .LatestCommitStatus.State "failure"}} - {{$.i18n.Tr "repo.pulls.status_checks_failure"}} - {{else if eq .LatestCommitStatus.State "error"}} - {{$.i18n.Tr "repo.pulls.status_checks_error"}} - {{else}} - {{$.i18n.Tr "repo.pulls.status_checking"}} - {{end}} -
    - {{end}} + {{if not $.Issue.PullRequest.HasMerged}} +
    + {{if eq .LatestCommitStatus.State "pending"}} + {{$.i18n.Tr "repo.pulls.status_checking"}} + {{else if eq .LatestCommitStatus.State "success"}} + {{$.i18n.Tr "repo.pulls.status_checks_success"}} + {{else if eq .LatestCommitStatus.State "warning"}} + {{$.i18n.Tr "repo.pulls.status_checks_warning"}} + {{else if eq .LatestCommitStatus.State "failure"}} + {{$.i18n.Tr "repo.pulls.status_checks_failure"}} + {{else if eq .LatestCommitStatus.State "error"}} + {{$.i18n.Tr "repo.pulls.status_checks_error"}} + {{else}} + {{$.i18n.Tr "repo.pulls.status_checking"}} + {{end}} +
    + {{end}} - {{range $.LatestCommitStatuses}} -
    - {{template "repo/commit_status" .}} - {{.Context}} {{.Description}} -
    - {{if $.is_context_required}} - {{if (call $.is_context_required .Context)}}
    {{$.i18n.Tr "repo.pulls.status_checks_requested"}}
    {{end}} - {{end}} - {{if .TargetURL}}{{$.i18n.Tr "repo.pulls.status_checks_details"}}{{end}} -
    -
    - {{end}} + {{range $.LatestCommitStatuses}} +
    + {{template "repo/commit_status" .}} + {{.Context}} {{.Description}} +
    + {{if $.is_context_required}} + {{if (call $.is_context_required .Context)}}
    {{$.i18n.Tr "repo.pulls.status_checks_requested"}}
    {{end}} + {{end}} + {{if .TargetURL}}{{$.i18n.Tr "repo.pulls.status_checks_details"}}{{end}} +
    +
    + {{end}} {{end}} diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index 72a69a756..ce4de3ddf 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -127,7 +127,7 @@ {{$.i18n.Tr "repo.released_this"}} {{if .CreatedUnix}} - {{TimeSinceUnix .CreatedUnix $.Lang}} | + {{TimeSinceUnix .CreatedUnix $.Lang}} | {{end}} {{$.i18n.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}} {{$.i18n.Tr "repo.release.ahead.target" .Target}}

    diff --git a/templates/repo/settings/branches.tmpl b/templates/repo/settings/branches.tmpl index 81e80215c..fbe9a7463 100644 --- a/templates/repo/settings/branches.tmpl +++ b/templates/repo/settings/branches.tmpl @@ -9,37 +9,37 @@ {{.i18n.Tr "repo.settings.archive.branchsettings_unavailable"}}
    {{else}} -

    - {{.i18n.Tr "repo.default_branch"}} -

    -
    -

    - {{.i18n.Tr "repo.settings.default_branch_desc"}} -

    -
    - {{.CsrfTokenHtml}} - - {{if not .Repository.IsEmpty}} -
    - - -
    - {{end}} -
    -
    +

    + {{.i18n.Tr "repo.default_branch"}} +

    +
    +

    + {{.i18n.Tr "repo.settings.default_branch_desc"}} +

    +
    + {{.CsrfTokenHtml}} + + {{if not .Repository.IsEmpty}} +
    + + +
    + {{end}} +
    +

    {{.i18n.Tr "repo.settings.protected_branch"}} diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index 8e052ac30..7dfc27c64 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -19,12 +19,12 @@
    {{range .Deploykeys}}
    -
    +
    -
    -
    +
    +
    {{svg "octicon-key" 32}}
    diff --git a/templates/repo/settings/webhook/matrix.tmpl b/templates/repo/settings/webhook/matrix.tmpl index fa23bb73e..a99f8e09b 100644 --- a/templates/repo/settings/webhook/matrix.tmpl +++ b/templates/repo/settings/webhook/matrix.tmpl @@ -7,25 +7,25 @@
    - - -
    -
    - - -
    -
    - - -
    + + +
    +
    + + +
    +
    + + +
    {{template "repo/settings/webhook/settings" .}} {{end}} diff --git a/templates/repo/settings/webhook/telegram.tmpl b/templates/repo/settings/webhook/telegram.tmpl index 598ac4482..d062e7aac 100644 --- a/templates/repo/settings/webhook/telegram.tmpl +++ b/templates/repo/settings/webhook/telegram.tmpl @@ -6,10 +6,10 @@
    -
    - - -
    +
    + + +
    {{template "repo/settings/webhook/settings" .}} {{end}} diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index 76c0ac76f..889cb5a69 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -128,10 +128,10 @@ diff --git a/templates/repo/wiki/revision.tmpl b/templates/repo/wiki/revision.tmpl index 9838b2c11..d74c99152 100644 --- a/templates/repo/wiki/revision.tmpl +++ b/templates/repo/wiki/revision.tmpl @@ -29,7 +29,7 @@

    {{if and .Commits (gt .CommitCount 0)}} - {{template "repo/commits_list" .}} + {{template "repo/commits_list" .}} {{end}} {{template "base/paginate" .}} diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl index 1b4f21b40..d6cd60cbd 100644 --- a/templates/shared/issuelist.tmpl +++ b/templates/shared/issuelist.tmpl @@ -48,8 +48,8 @@
    {{if eq $.listType "dashboard"}} - {{.Repo.FullName}}#{{.Index}} - {{else}} + {{.Repo.FullName}}#{{.Index}} + {{else}} #{{.Index}} {{end}} diff --git a/templates/user/auth/signup_openid_navbar.tmpl b/templates/user/auth/signup_openid_navbar.tmpl index 9ba727548..9928bb619 100644 --- a/templates/user/auth/signup_openid_navbar.tmpl +++ b/templates/user/auth/signup_openid_navbar.tmpl @@ -10,4 +10,3 @@ {{end}}
    - diff --git a/templates/user/auth/twofa.tmpl b/templates/user/auth/twofa.tmpl index b8b489242..68b474c86 100644 --- a/templates/user/auth/twofa.tmpl +++ b/templates/user/auth/twofa.tmpl @@ -17,7 +17,7 @@ diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl index dfd0e5d8e..d2a51fd44 100644 --- a/templates/user/dashboard/issues.tmpl +++ b/templates/user/dashboard/issues.tmpl @@ -26,7 +26,7 @@ {{.i18n.Tr "repo.issues.filter_type.review_requested"}} {{CountFmt .IssueStats.ReviewRequestedCount}} - {{end}} + {{end}}
    All diff --git a/templates/user/dashboard/milestones.tmpl b/templates/user/dashboard/milestones.tmpl index 5c3aa5506..c7416e7cd 100644 --- a/templates/user/dashboard/milestones.tmpl +++ b/templates/user/dashboard/milestones.tmpl @@ -76,56 +76,56 @@ - -
    - {{range .Milestones}} -
  • -
    {{.Repo.FullName}}
    +
  • +
    + {{range .Milestones}} +
  • +
    {{.Repo.FullName}}
    {{svg "octicon-milestone"}}
    {{.Name}} -
    -
    -
    -
    -
    -
    - {{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.Lang }} - {{if .IsClosed}} +
    +
    +
    +
    +
    +
    + {{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.Lang }} + {{if .IsClosed}} {{svg "octicon-clock"}} {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}} - {{else}} + {{else}} {{svg "octicon-calendar"}} - {{if .DeadlineString}} - {{.DeadlineString}} - {{else}} - {{$.i18n.Tr "repo.milestones.no_due_date"}} - {{end}} - {{end}} - - {{svg "octicon-issue-opened"}} {{$.i18n.Tr "repo.milestones.open_tab" .NumOpenIssues}} + {{if .DeadlineString}} + {{.DeadlineString}} + {{else}} + {{$.i18n.Tr "repo.milestones.no_due_date"}} + {{end}} + {{end}} + + {{svg "octicon-issue-opened"}} {{$.i18n.Tr "repo.milestones.open_tab" .NumOpenIssues}} {{svg "octicon-issue-closed"}} {{$.i18n.Tr "repo.milestones.close_tab" .NumClosedIssues}} - {{if .TotalTrackedTime}}{{svg "octicon-clock"}} {{.TotalTrackedTime|Sec2Time}}{{end}} - -
    - {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}} - - {{end}} - {{if .Content}} -
    - {{.RenderedContent|Str2html}} -
    - {{end}} -
  • - {{end}} + {{if .TotalTrackedTime}}{{svg "octicon-clock"}} {{.TotalTrackedTime|Sec2Time}}{{end}} + +
    + {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}} + + {{end}} + {{if .Content}} +
    + {{.RenderedContent|Str2html}} +
    + {{end}} + + {{end}} - {{template "base/paginate" .}} - + {{template "base/paginate" .}} + diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl index 2158dcb00..e7327d34b 100644 --- a/templates/user/notification/notification_div.tmpl +++ b/templates/user/notification/notification_div.tmpl @@ -1,134 +1,134 @@

    {{.i18n.Tr "notification.notifications"}}

    - -
    - {{if eq (len .Notifications) 0}} - {{if eq .Status 1}} - {{.i18n.Tr "notification.no_unread"}} - {{else}} - {{.i18n.Tr "notification.no_read"}} - {{end}} - {{else}} - - - {{range $notification := .Notifications}} - {{$issue := .Issue}} - {{$repo := .Repository}} - {{$repoOwner := $repo.MustOwner}} - - - - - - - - {{end}} - -
    - {{if eq .Status 3}} - {{svg "octicon-pin"}} - {{else if not $issue}} - {{svg "octicon-repo"}} - {{else if $issue.IsPull}} - {{if $issue.IsClosed}} - {{if $issue.GetPullRequest.HasMerged}} - {{svg "octicon-git-merge"}} - {{else}} - {{svg "octicon-git-pull-request"}} - {{end}} - {{else}} - {{svg "octicon-git-pull-request"}} - {{end}} - {{else}} - {{if $issue.IsClosed}} - {{svg "octicon-issue-closed"}} - {{else}} - {{svg "octicon-issue-opened"}} - {{end}} - {{end}} - - - {{if $issue}} - #{{$issue.Index}} - {{$issue.Title}} - {{else}} - {{$repo.FullName}} - {{end}} - - - - {{$repoOwner.Name}}/{{$repo.Name}} - - - {{if ne .Status 3}} -
    - {{$.CsrfTokenHtml}} - - - -
    - {{end}} -
    - {{if or (eq .Status 1) (eq .Status 3)}} -
    - {{$.CsrfTokenHtml}} - - - - -
    - {{else if eq .Status 2}} -
    - {{$.CsrfTokenHtml}} - - - - -
    - {{end}} -
    - {{end}} -
    - {{template "base/paginate" .}} -
    + +
    + {{if eq (len .Notifications) 0}} + {{if eq .Status 1}} + {{.i18n.Tr "notification.no_unread"}} + {{else}} + {{.i18n.Tr "notification.no_read"}} + {{end}} + {{else}} + + + {{range $notification := .Notifications}} + {{$issue := .Issue}} + {{$repo := .Repository}} + {{$repoOwner := $repo.MustOwner}} + + + + + + + + {{end}} + +
    + {{if eq .Status 3}} + {{svg "octicon-pin"}} + {{else if not $issue}} + {{svg "octicon-repo"}} + {{else if $issue.IsPull}} + {{if $issue.IsClosed}} + {{if $issue.GetPullRequest.HasMerged}} + {{svg "octicon-git-merge"}} + {{else}} + {{svg "octicon-git-pull-request"}} + {{end}} + {{else}} + {{svg "octicon-git-pull-request"}} + {{end}} + {{else}} + {{if $issue.IsClosed}} + {{svg "octicon-issue-closed"}} + {{else}} + {{svg "octicon-issue-opened"}} + {{end}} + {{end}} + + + {{if $issue}} + #{{$issue.Index}} - {{$issue.Title}} + {{else}} + {{$repo.FullName}} + {{end}} + + + + {{$repoOwner.Name}}/{{$repo.Name}} + + + {{if ne .Status 3}} +
    + {{$.CsrfTokenHtml}} + + + +
    + {{end}} +
    + {{if or (eq .Status 1) (eq .Status 3)}} +
    + {{$.CsrfTokenHtml}} + + + + +
    + {{else if eq .Status 2}} +
    + {{$.CsrfTokenHtml}} + + + + +
    + {{end}} +
    + {{end}} +
    + {{template "base/paginate" .}} +
    diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl index 69dbcced8..4e04d831d 100644 --- a/templates/user/settings/keys_gpg.tmpl +++ b/templates/user/settings/keys_gpg.tmpl @@ -39,7 +39,7 @@

    {{.i18n.Tr "settings.gpg_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/about-commit-signature-verification#gpg-commit-signature-verification" | Str2html}}

    - {{.i18n.Tr "settings.add_new_gpg_key"}} + {{.i18n.Tr "settings.add_new_gpg_key"}}

    diff --git a/templates/user/settings/repos.tmpl b/templates/user/settings/repos.tmpl index 453dce727..b82f131b2 100644 --- a/templates/user/settings/repos.tmpl +++ b/templates/user/settings/repos.tmpl @@ -35,7 +35,7 @@ {{else}} {{svg "octicon-file-directory"}} {{$.Owner.Name}}/{{$dir}} -
    +
    {{if $.allowAdopt}} -