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 54738e8838..b7ff926c34 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 e8738c9289..dcfaf89a8a 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 2c1dd4f6b4..3777c6b72d 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 20a64856f8..430e98c079 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 da1ea42a74..e14c3be761 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 c252f7d3f2..36a5d2c632 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 dbadd31f14..584538f53b 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 1489ab8394..787e29873d 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 8a7af53da5..e4e7e2d462 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 aff30ab510..dbd1ad6921 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 481d77dfd2..b1f172720a 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 38a2721bf8..1d7ec15dc0 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 74bca72399..d8d24c61ea 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 222bbb8aae..6332413a17 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 b039c1ad2a..b2fee6c19a 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 53c5156dc9..5e7bed8b31 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 d9d2f3b9a3..245cc9f345 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 cdb8e9d375..dff4e8c8be 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 d302a16f26..5b0d2526f1 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 b7d576bef4..4b492dad8a 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 947b404399..19a2431023 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 04b8c3bf51..7829bce243 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 25cd68291c..9b77ae6b3f 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 61302c731a..482d1b17d0 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 18d638796c..b5732ed71b 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 62abf5ef88..4637e5a185 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 bcf64a3fa1..08e2a31115 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 5dd93d3d46..638683b25e 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 de4f0fb57e..caddcf69e4 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 6260d2e965..01cbd5182d 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 623df6f63e..3ef2339843 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 fdf65aaad3..124b4e5d1c 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 c4af70461f..b86e9d2a72 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 01f7e3f8e8..91092c412f 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 6304369416..9e65d6d420 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 695574cd99..3efde70f50 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 7ca18508d9..e115b4a3f4 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 76ee77658a..037069c29b 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 f977074fea..8c2f36f04b 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 c572e0c3f3..c7d3522abc 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 16d77847d0..343d1d8358 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 c86689400e..81f0d0434a 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 f6cbb9206c..b6bf965a15 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 b7c5bd5b0d..156f8896fc 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 26eebd18bb..e1424c250f 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 dc83ac5bb8..b1900e83d1 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 e48f5f3fe3..f029d5cb6c 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 72a69a756a..ce4de3ddfa 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 81e80215c5..fbe9a7463e 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 8e052ac303..7dfc27c64f 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 fa23bb73e8..a99f8e09b5 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 598ac44822..d062e7aac4 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 76c0ac76fe..889cb5a691 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 9838b2c11c..d74c99152a 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 1b4f21b400..d6cd60cbd2 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 9ba727548c..9928bb6198 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 b8b4892426..68b474c866 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 dfd0e5d8ec..d2a51fd44a 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 5c3aa55062..c7416e7cd7 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 2158dcb000..e7327d34bb 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 69dbcced8c..4e04d831d2 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 453dce7278..b82f131b20 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}} -