]> source.dussan.org Git - gitea.git/commitdiff
Enforce tab indentation in templates (#15289)
authorsilverwind <me@silverwind.io>
Sun, 11 Apr 2021 03:46:37 +0000 (05:46 +0200)
committerGitHub <noreply@github.com>
Sun, 11 Apr 2021 03:46:37 +0000 (23:46 -0400)
* 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 <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
67 files changed:
.editorconfig
Makefile
package-lock.json
package.json
templates/admin/auth/edit.tmpl
templates/admin/auth/new.tmpl
templates/admin/auth/source/ldap.tmpl
templates/admin/auth/source/oauth.tmpl
templates/admin/base/search.tmpl
templates/admin/repo/list.tmpl
templates/admin/repo/unadopted.tmpl
templates/base/alert_details.tmpl
templates/base/head.tmpl
templates/explore/code.tmpl
templates/explore/organizations.tmpl
templates/explore/repo_search.tmpl
templates/explore/search.tmpl
templates/explore/users.tmpl
templates/mail/issue/assigned.tmpl
templates/mail/issue/default.tmpl
templates/mail/notify/collaborator.tmpl
templates/mail/release.tmpl
templates/org/home.tmpl
templates/org/settings/labels.tmpl
templates/org/team/navbar.tmpl
templates/post-install.tmpl
templates/repo/activity.tmpl
templates/repo/blame.tmpl
templates/repo/branch/list.tmpl
templates/repo/commit_page.tmpl
templates/repo/commits_table.tmpl
templates/repo/diff/compare.tmpl
templates/repo/diff/csv_diff.tmpl
templates/repo/diff/image_diff.tmpl
templates/repo/diff/new_review.tmpl
templates/repo/editor/edit.tmpl
templates/repo/header.tmpl
templates/repo/issue/branch_selector_field.tmpl
templates/repo/issue/comment_tab.tmpl
templates/repo/issue/labels/edit_delete_label.tmpl
templates/repo/issue/labels/label_load_template.tmpl
templates/repo/issue/milestone_issues.tmpl
templates/repo/issue/milestones.tmpl
templates/repo/issue/view_content.tmpl
templates/repo/issue/view_content/attachments.tmpl
templates/repo/issue/view_content/comments.tmpl
templates/repo/issue/view_title.tmpl
templates/repo/migrate/github.tmpl
templates/repo/migrate/gitlab.tmpl
templates/repo/migrate/gogs.tmpl
templates/repo/pulls/status.tmpl
templates/repo/release/list.tmpl
templates/repo/settings/branches.tmpl
templates/repo/settings/deploy_keys.tmpl
templates/repo/settings/webhook/matrix.tmpl
templates/repo/settings/webhook/telegram.tmpl
templates/repo/view_file.tmpl
templates/repo/wiki/revision.tmpl
templates/shared/issuelist.tmpl
templates/user/auth/signup_openid_navbar.tmpl
templates/user/auth/twofa.tmpl
templates/user/dashboard/issues.tmpl
templates/user/dashboard/milestones.tmpl
templates/user/notification/notification_div.tmpl
templates/user/settings/keys_gpg.tmpl
templates/user/settings/repos.tmpl
templates/user/settings/security_u2f.tmpl

index 54738e8838d661e7dc847c9b58bbe04963b73654..b7ff926c34cd5fedbd66ee50ebc0d70b47408a6e 100644 (file)
@@ -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
 
index e8738c92897b30b8415f0bfe3d4c01e419f26aa4..dcfaf89a8a3e2d6883f5453f9d5cb6401d23aa1f 100644 (file)
--- 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
index 2c1dd4f6b4405766c925dd994998e8527f4d553e..3777c6b72d4fdd4b912347137eaaee1117f0fd25 100644 (file)
       "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",
         "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",
         "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",
         "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",
index 20a64856f8bad410a394b4deca1f4fcc4f58c347..430e98c0799b8b8540f1567c6033a0d9fe9f8203 100644 (file)
@@ -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",
index da1ea42a74ca5cf1de980b4a9ab4d9f73a20c361..e14c3be761649078e56c101b5126b76f1aef28d2 100644 (file)
@@ -96,8 +96,8 @@
                                                <input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="e.g. mail" required>
                                        </div>
                                        <div class="field">
-                                           <label for="attribute_ssh_public_key">{{.i18n.Tr "admin.auths.attribute_ssh_public_key"}}</label>
-                                           <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{$cfg.AttributeSSHPublicKey}}" placeholder="e.g. SshPublicKey">
+                                               <label for="attribute_ssh_public_key">{{.i18n.Tr "admin.auths.attribute_ssh_public_key"}}</label>
+                                               <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{$cfg.AttributeSSHPublicKey}}" placeholder="e.g. SshPublicKey">
                                        </div>
                                        <div class="inline field">
                                                <div class="ui checkbox">
                                                <input id="oauth2_secret" name="oauth2_secret" value="{{$cfg.ClientSecret}}" required>
                                        </div>
                                        <div class="optional field">
-            <label for="oauth2_icon_url">{{.i18n.Tr "admin.auths.oauth2_icon_url"}}</label>
-            <input id="oauth2_icon_url" name="oauth2_icon_url" value="{{$cfg.IconURL}}">
-          </div>
+                                               <label for="oauth2_icon_url">{{.i18n.Tr "admin.auths.oauth2_icon_url"}}</label>
+                                               <input id="oauth2_icon_url" name="oauth2_icon_url" value="{{$cfg.IconURL}}">
+                                       </div>
                                        <div class="open_id_connect_auto_discovery_url required field">
                                                <label for="open_id_connect_auto_discovery_url">{{.i18n.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label>
                                                <input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{$cfg.OpenIDConnectAutoDiscoveryURL}}">
index c252f7d3f214808867cb6222f6f614c7d4efb63f..36a5d2c632a8302457b55f6e8cd2f9960ea85c63 100644 (file)
                                <span>{{.i18n.Tr "admin.auths.tip.nextcloud"}}</span>
                                <li>Yandex</li>
                                <span>{{.i18n.Tr "admin.auths.tip.yandex"}}</span>
-        <li>Mastodon</li>
-        <span>{{.i18n.Tr "admin.auths.tip.mastodon"}}</span>
+                               <li>Mastodon</li>
+                               <span>{{.i18n.Tr "admin.auths.tip.mastodon"}}</span>
                        </div>
                </div>
        </div>
index dbadd31f14c27ecb675259d639ea20b79d146402..584538f53bc9191ece47cbd71119c25f272fc993 100644 (file)
@@ -68,8 +68,8 @@
                <input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="e.g. mail">
        </div>
        <div class="field">
-           <label for="attribute_ssh_public_key">{{.i18n.Tr "admin.auths.attribute_ssh_public_key"}}</label>
-           <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{.attribute_ssh_public_key}}" placeholder="e.g. SshPublicKey">
+               <label for="attribute_ssh_public_key">{{.i18n.Tr "admin.auths.attribute_ssh_public_key"}}</label>
+               <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{.attribute_ssh_public_key}}" placeholder="e.g. SshPublicKey">
        </div>
        <div class="inline field">
                <div class="ui checkbox">
index 1489ab8394c8b1f47b817457c544931e531e4e2b..787e29873d762f7af4c28f52c41548ef7440b50e 100644 (file)
@@ -21,9 +21,9 @@
                <input id="oauth2_secret" name="oauth2_secret" value="{{.oauth2_secret}}">
        </div>
        <div class="optional field">
-       <label for="oauth2_icon_url">{{.i18n.Tr "admin.auths.oauth2_icon_url"}}</label>
-       <input id="oauth2_icon_url" name="oauth2_icon_url" value="{{.oauth2_icon_url}}">
-  </div>
+               <label for="oauth2_icon_url">{{.i18n.Tr "admin.auths.oauth2_icon_url"}}</label>
+               <input id="oauth2_icon_url" name="oauth2_icon_url" value="{{.oauth2_icon_url}}">
+       </div>
        <div class="open_id_connect_auto_discovery_url required field">
                <label for="open_id_connect_auto_discovery_url">{{.i18n.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label>
                <input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{.open_id_connect_auto_discovery_url}}">
index 8a7af53da5bfd0b6fa5ee50f0f6925525549e253..e4e7e2d462523857099441a4811b8fef83b4346c 100644 (file)
@@ -17,7 +17,7 @@
 </div>
 <form class="ui form ignore-dirty"  style="max-width: 90%">
        <div class="ui fluid action input">
-         <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
-         <button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
+               <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
+               <button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
        </div>
 </form>
index aff30ab510b6d1cf47b7995431ac3cbe03363996..dbd1ad6921a0494f3f3914c00b9b93eaca9c7beb 100644 (file)
@@ -7,7 +7,7 @@
                        {{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
                        <div class="ui right">
                                <a class="ui blue tiny button" href="{{AppSubUrl}}/admin/repos/unadopted">{{.i18n.Tr "admin.repos.unadopted"}}</a>
-            </div>
+                       </div>
                </h4>
                <div class="ui attached segment">
                        {{template "admin/repo/search" .}}
index 481d77dfd28b4e7d875911212453ecb1eb32f0d6..b1f172720ae86d19bcba64030194c77bae5c4090 100644 (file)
@@ -5,98 +5,98 @@
                {{template "base/alert" .}}
                <h4 class="ui top attached header">
                        {{.i18n.Tr "admin.repos.unadopted"}}
-            <div class="ui right">
-                <a class="ui blue tiny button" href="{{AppSubUrl}}/admin/repos">{{.i18n.Tr "admin.repos.repo_manage_panel"}}</a>
-            </div>
+                       <div class="ui right">
+                               <a class="ui blue tiny button" href="{{AppSubUrl}}/admin/repos">{{.i18n.Tr "admin.repos.repo_manage_panel"}}</a>
+                       </div>
                </h4>
-        <div class="ui attached segment">
-            <form class="ui form ignore-dirty">
-                <div class="ui fluid action input">
-                <input name="search" value="true" type="hidden">
-                <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "repo.adopt_search"}}" autofocus>
-                <button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
-                </div>
-            </form>
+               <div class="ui attached segment">
+                       <form class="ui form ignore-dirty">
+                               <div class="ui fluid action input">
+                               <input name="search" value="true" type="hidden">
+                               <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "repo.adopt_search"}}" autofocus>
+                               <button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
+                               </div>
+                       </form>
                </div>
-        {{if .search}}
-            <div class="ui attached segment settings">
-                {{if .Dirs}}
-                    <div class="ui middle aligned divided list">
-                        {{range $dirI, $dir := .Dirs}}
-                            <div class="item">
-                                <div class="content">
-                                    <span class="icon">{{svg "octicon-file-directory"}}</span>
-                                    <span class="name">{{$dir}}</span>
-                                    <div class="right floated content">
-                                        <button class="ui button submit tiny green adopt show-modal" data-modal="#adopt-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-plus"}}</span><span class="label">{{$.i18n.Tr "repo.adopt_preexisting_label"}}</span></button>
-                                        <div class="ui basic modal" id="adopt-unadopted-modal-{{$dirI}}">
-                                            {{svg "octicon-x" 16 "close inside"}}
-                                            <div class="header">
-                                                <span class="label">{{$.i18n.Tr "repo.adopt_preexisting"}}</span>
-                                            </div>
-                                            <div class="content">
-                                                <p>{{$.i18n.Tr "repo.adopt_preexisting_content" $dir}}</p>
-                                            </div>
-                                            <form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted">
-                                                {{$.CsrfTokenHtml}}
-                                                <input type="hidden" name="id" value="{{$dir}}">
-                                                <input type="hidden" name="action" value="adopt">
-                                                                                                                                                                                               <input type="hidden" name="q" value="{{$.Keyword}}">
-                                                                                                                                                                                               <input type="hidden" name="page" value="{{$.CurrentPage}}">
-                                                <div class="actions">
-                                                    <div class="ui red basic inverted cancel button">
-                                                        {{svg "octicon-trash" 16 "mr-2"}}
-                                                        {{$.i18n.Tr "modal.no"}}
-                                                    </div>
-                                                    <button class="ui green basic inverted ok button">
-                                                        {{svg "octicon-check" 16 "mr-2"}}
-                                                        {{$.i18n.Tr "modal.yes"}}
-                                                    </button>
-                                                </div>
-                                            </form>
-                                        </div>
-                                        <button class="ui button submit tiny red delete show-modal" data-modal="#delete-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-x"}}</span><span class="label">{{$.i18n.Tr "repo.delete_preexisting_label"}}</span></button>
-                                        <div class="ui basic modal" id="delete-unadopted-modal-{{$dirI}}">
-                                            {{svg "octicon-x" 16 "close inside"}}
-                                            <div class="header">
-                                                <span class="label">{{$.i18n.Tr "repo.delete_preexisting"}}</span>
-                                            </div>
-                                            <div class="content">
-                                                <p>{{$.i18n.Tr "repo.delete_preexisting_content" $dir}}</p>
-                                            </div>
-                                            <form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted">
-                                                {{$.CsrfTokenHtml}}
-                                                <input type="hidden" name="id" value="{{$dir}}">
-                                                <input type="hidden" name="action" value="delete">
-                                                                                                                                                                                               <input type="hidden" name="q" value="{{$.Keyword}}">
-                                                                                                                                                                                               <input type="hidden" name="page" value="{{$.CurrentPage}}">
-                                                <div class="actions">
-                                                    <div class="ui red basic inverted cancel button">
-                                                        {{svg "octicon-trash" 16 "mr-2"}}
-                                                        {{$.i18n.Tr "modal.no"}}
-                                                    </div>
-                                                    <button class="ui green basic inverted ok button">
-                                                        {{svg "octicon-check" 16 "mr-2"}}
-                                                        {{$.i18n.Tr "modal.yes"}}
-                                                    </button>
-                                                </div>
-                                            </form>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        {{end}}
-                    </div>
-                    {{template "base/paginate" .}}
-                {{else}}
-                    <div class="item">
-                        {{.i18n.Tr "admin.repos.unadopted.no_more"}}
-                    </div>
-                    {{template "base/paginate" .}}
-                {{end}}
-            </div>
-        {{end}}
-    </div>
+               {{if .search}}
+                       <div class="ui attached segment settings">
+                               {{if .Dirs}}
+                                       <div class="ui middle aligned divided list">
+                                               {{range $dirI, $dir := .Dirs}}
+                                                       <div class="item">
+                                                               <div class="content">
+                                                                       <span class="icon">{{svg "octicon-file-directory"}}</span>
+                                                                       <span class="name">{{$dir}}</span>
+                                                                       <div class="right floated content">
+                                                                               <button class="ui button submit tiny green adopt show-modal" data-modal="#adopt-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-plus"}}</span><span class="label">{{$.i18n.Tr "repo.adopt_preexisting_label"}}</span></button>
+                                                                               <div class="ui basic modal" id="adopt-unadopted-modal-{{$dirI}}">
+                                                                                       {{svg "octicon-x" 16 "close inside"}}
+                                                                                       <div class="header">
+                                                                                               <span class="label">{{$.i18n.Tr "repo.adopt_preexisting"}}</span>
+                                                                                       </div>
+                                                                                       <div class="content">
+                                                                                               <p>{{$.i18n.Tr "repo.adopt_preexisting_content" $dir}}</p>
+                                                                                       </div>
+                                                                                       <form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted">
+                                                                                               {{$.CsrfTokenHtml}}
+                                                                                               <input type="hidden" name="id" value="{{$dir}}">
+                                                                                               <input type="hidden" name="action" value="adopt">
+                                                                                               <input type="hidden" name="q" value="{{$.Keyword}}">
+                                                                                               <input type="hidden" name="page" value="{{$.CurrentPage}}">
+                                                                                               <div class="actions">
+                                                                                                       <div class="ui red basic inverted cancel button">
+                                                                                                               {{svg "octicon-trash" 16 "mr-2"}}
+                                                                                                               {{$.i18n.Tr "modal.no"}}
+                                                                                                       </div>
+                                                                                                       <button class="ui green basic inverted ok button">
+                                                                                                               {{svg "octicon-check" 16 "mr-2"}}
+                                                                                                               {{$.i18n.Tr "modal.yes"}}
+                                                                                                       </button>
+                                                                                               </div>
+                                                                                       </form>
+                                                                               </div>
+                                                                               <button class="ui button submit tiny red delete show-modal" data-modal="#delete-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-x"}}</span><span class="label">{{$.i18n.Tr "repo.delete_preexisting_label"}}</span></button>
+                                                                               <div class="ui basic modal" id="delete-unadopted-modal-{{$dirI}}">
+                                                                                       {{svg "octicon-x" 16 "close inside"}}
+                                                                                       <div class="header">
+                                                                                               <span class="label">{{$.i18n.Tr "repo.delete_preexisting"}}</span>
+                                                                                       </div>
+                                                                                       <div class="content">
+                                                                                               <p>{{$.i18n.Tr "repo.delete_preexisting_content" $dir}}</p>
+                                                                                       </div>
+                                                                                       <form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted">
+                                                                                               {{$.CsrfTokenHtml}}
+                                                                                               <input type="hidden" name="id" value="{{$dir}}">
+                                                                                               <input type="hidden" name="action" value="delete">
+                                                                                               <input type="hidden" name="q" value="{{$.Keyword}}">
+                                                                                               <input type="hidden" name="page" value="{{$.CurrentPage}}">
+                                                                                               <div class="actions">
+                                                                                                       <div class="ui red basic inverted cancel button">
+                                                                                                               {{svg "octicon-trash" 16 "mr-2"}}
+                                                                                                               {{$.i18n.Tr "modal.no"}}
+                                                                                                       </div>
+                                                                                                       <button class="ui green basic inverted ok button">
+                                                                                                               {{svg "octicon-check" 16 "mr-2"}}
+                                                                                                               {{$.i18n.Tr "modal.yes"}}
+                                                                                                       </button>
+                                                                                               </div>
+                                                                                       </form>
+                                                                               </div>
+                                                                       </div>
+                                                               </div>
+                                                       </div>
+                                               {{end}}
+                                       </div>
+                                       {{template "base/paginate" .}}
+                               {{else}}
+                                       <div class="item">
+                                               {{.i18n.Tr "admin.repos.unadopted.no_more"}}
+                                       </div>
+                                       {{template "base/paginate" .}}
+                               {{end}}
+                       </div>
+               {{end}}
+       </div>
 </div>
 
 {{template "base/footer" .}}
index 38a2721bf8b0c5053c97178d5b3595da335a17a4..1d7ec15dc0ddedccbd5c5d92f3774bb0dc6a7626 100644 (file)
@@ -1,7 +1,7 @@
 {{.Message}}
 <details>
-    <summary>{{.Summary}}</summary>
-    <code>
-        {{.Details | Str2html}}
-    </code>
+       <summary>{{.Summary}}</summary>
+       <code>
+               {{.Details | Str2html}}
+       </code>
 </details>
index 74bca72399537a0e10f7c344f33dc033dcc6320d..d8d24c61eac328afa326890519ece24cf5e61d64 100644 (file)
@@ -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()),
index 222bbb8aae21871b583cb1fcf52e5bc36e0e15f9..6332413a173a6c72057304f7167d4a6aeafbdd22 100644 (file)
@@ -18,7 +18,6 @@
                        </div>
                </form>
                <div class="ui divider"></div>
-
                <div class="ui user list">
                        {{if .SearchResults}}
                                <h3>
index b039c1ad2a13857127755d1a78bd8cb93e142139..b2fee6c19ada4c7f038a12cd97e50e19351f80f7 100644 (file)
@@ -8,24 +8,24 @@
                        {{range .Users}}
                                <div class="item">
                                        {{avatar .}}
-                                 <div class="content">
-                                       <span class="header">
-                                               <a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}
-                                               {{if .Visibility.IsPrivate}}
-                                                       <span class="ui basic label">{{$.i18n.Tr "repo.desc.private"}}</span>
-                                               {{end}}
-                                       </span>
-                                       <div class="description">
-                                               {{if .Location}}
-                                                       {{svg "octicon-location"}} {{.Location}}
-                                               {{end}}
-                                               {{if and .Website}}
-                                                       {{svg "octicon-link"}}
-                                                       <a href="{{.Website}}" rel="nofollow">{{.Website}}</a>
-                                               {{end}}
-                                               {{svg "octicon-clock"}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
+                                       <div class="content">
+                                               <span class="header">
+                                                       <a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}
+                                                       {{if .Visibility.IsPrivate}}
+                                                               <span class="ui basic label">{{$.i18n.Tr "repo.desc.private"}}</span>
+                                                       {{end}}
+                                               </span>
+                                               <div class="description">
+                                                       {{if .Location}}
+                                                               {{svg "octicon-location"}} {{.Location}}
+                                                       {{end}}
+                                                       {{if and .Website}}
+                                                               {{svg "octicon-link"}}
+                                                               <a href="{{.Website}}" rel="nofollow">{{.Website}}</a>
+                                                       {{end}}
+                                                       {{svg "octicon-clock"}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
+                                               </div>
                                        </div>
-                                 </div>
                                </div>
                        {{else}}
                                <div>{{$.i18n.Tr "explore.org_no_results"}}</div>
index 53c5156dc9a8be0e773f929a442dd6bdf71cd53c..5e7bed8b3183210cd3fc06f7e35e0dbef2f4577a 100644 (file)
@@ -1,30 +1,30 @@
 <div class="ui right floated secondary filter menu">
-    <!-- Sort -->
-    <div class="ui right dropdown type jump item">
+       <!-- Sort -->
+       <div class="ui right dropdown type jump item">
                <span class="text">
                        {{.i18n.Tr "repo.issues.filter_sort"}}
-                {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+                               {{svg "octicon-triangle-down" 14 "dropdown icon"}}
                </span>
-        <div class="menu">
-            <a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
-            <a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
-            <a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
-            <a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
-            <a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
-            <a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
-            <a class="{{if eq .SortType "moststars"}}active{{end}} item" href="{{$.Link}}?sort=moststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.moststars"}}</a>
-            <a class="{{if eq .SortType "feweststars"}}active{{end}} item" href="{{$.Link}}?sort=feweststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.feweststars"}}</a>
-            <a class="{{if eq .SortType "mostforks"}}active{{end}} item" href="{{$.Link}}?sort=mostforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.mostforks"}}</a>
-            <a class="{{if eq .SortType "fewestforks"}}active{{end}} item" href="{{$.Link}}?sort=fewestforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.fewestforks"}}</a>
-        </div>
-    </div>
+               <div class="menu">
+                       <a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
+                       <a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
+                       <a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
+                       <a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
+                       <a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
+                       <a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
+                       <a class="{{if eq .SortType "moststars"}}active{{end}} item" href="{{$.Link}}?sort=moststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.moststars"}}</a>
+                       <a class="{{if eq .SortType "feweststars"}}active{{end}} item" href="{{$.Link}}?sort=feweststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.feweststars"}}</a>
+                       <a class="{{if eq .SortType "mostforks"}}active{{end}} item" href="{{$.Link}}?sort=mostforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.mostforks"}}</a>
+                       <a class="{{if eq .SortType "fewestforks"}}active{{end}} item" href="{{$.Link}}?sort=fewestforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.fewestforks"}}</a>
+               </div>
+       </div>
 </div>
 <form class="ui form ignore-dirty" style="max-width: 90%">
-    <input type="hidden" name="tab" value="{{$.TabName}}">
-    <input type="hidden" name="sort" value="{{$.SortType}}">
-    <div class="ui fluid action input">
-        <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
-        <button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
-    </div>
+       <input type="hidden" name="tab" value="{{$.TabName}}">
+       <input type="hidden" name="sort" value="{{$.SortType}}">
+       <div class="ui fluid action input">
+               <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
+               <button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
+       </div>
 </form>
 <div class="ui divider"></div>
index d9d2f3b9a3e0ed04abd0877df116f233e8b20b32..245cc9f345f22febdc33e7bfd4428ec15f132f74 100644 (file)
@@ -18,8 +18,8 @@
 <form class="ui form ignore-dirty" style="max-width: 90%">
        <input type="hidden" name="tab" value="{{$.TabName}}">
        <div class="ui fluid action input">
-         <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
-         <button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
+               <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
+               <button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
        </div>
 </form>
 <div class="ui divider"></div>
index cdb8e9d37592a116ad20ec4a4125bfc1ad7bbce6..dff4e8c8be717eeecf6539814373e8af251e6c9b 100644 (file)
@@ -8,19 +8,19 @@
                        {{range .Users}}
                                <div class="item">
                                        {{avatar .}}
-                                 <div class="content">
-                                       <span class="header"><a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}</span>
-                                       <div class="description">
-                                               {{if .Location}}
-                                                       {{svg "octicon-location"}} {{.Location}}
-                                               {{end}}
-                                               {{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}}
-                                                       {{svg "octicon-mail"}}
-                                                       <a href="mailto:{{.Email}}" rel="nofollow">{{.Email}}</a>
-                                               {{end}}
-                                               {{svg "octicon-clock"}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
+                                       <div class="content">
+                                               <span class="header"><a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}</span>
+                                               <div class="description">
+                                                       {{if .Location}}
+                                                               {{svg "octicon-location"}} {{.Location}}
+                                                       {{end}}
+                                                       {{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}}
+                                                               {{svg "octicon-mail"}}
+                                                               <a href="mailto:{{.Email}}" rel="nofollow">{{.Email}}</a>
+                                                       {{end}}
+                                                       {{svg "octicon-clock"}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
+                                               </div>
                                        </div>
-                                 </div>
                                </div>
                        {{else}}
                                <div>{{$.i18n.Tr "explore.user_no_results"}}</div>
index d302a16f26c7e276dbeb825ac1efd0e36ac24f46..5b0d2526f1252d1fc5d2f693da946cdb0f821988 100644 (file)
 <body>
        <p>@{{.Doer.Name}} assigned you to the {{if .IsPull}}pull request{{else}}issue{{end}} <a href="{{.Link}}">#{{.Issue.Index}}</a> in repository {{.Repo}}.</p>
        <div class="footer">
-           <p>
-               ---
-               <br>
-               <a href="{{.Link}}">View it on {{AppName}}</a>.
-           </p>
+               <p>
+                       ---
+                       <br>
+                       <a href="{{.Link}}">View it on {{AppName}}</a>.
+               </p>
        </div>
 </body>
 </html>
index b7d576bef4adf9cafb33dbaba13e27e2ed4ebdb1..4b492dad8ad1e101e339312bf9236f5e63a638f9 100644 (file)
@@ -19,7 +19,7 @@
        {{if .IsMention}}<p><b>@{{.Doer.Name}}</b> mentioned you:</p>{{end}}
        {{if eq .ActionName "push"}}
                <p>
-                       <b>{{.Doer.Name}}</b>  
+                       <b>{{.Doer.Name}}</b>
                        {{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}}
index 947b4043999b84ab413d3ccd4c7adb8a4aecb69e..19a24310233d31cf3210e2d7e04ebb65a1dd9c80 100644 (file)
 <body>
        <p>You have been added as a collaborator of repository: <code>{{.RepoName}}</code></p>
        <div class="footer">
-           <p>
-               ---
-               <br>
-               <a href="{{.Link}}">View it on {{AppName}}</a>.
-           </p>
+               <p>
+                       ---
+                       <br>
+                       <a href="{{.Link}}">View it on {{AppName}}</a>.
+               </p>
        </div>
 </body>
 </html>
index 04b8c3bf51b8211417750f21446cc4b7e1b5a169..7829bce243512564116e4e14d00470bd553db785 100644 (file)
@@ -26,7 +26,7 @@
        </p>
        <br><br>
        <p>
-               --- 
+               ---
                <br>
                Downloads:
                <ul>
index 25cd68291ce75cbf88a90a03d48067cdc09bc546..9b77ae6b3f2ab82a708b88e8d25beaf6386a541d 100644 (file)
@@ -26,9 +26,9 @@
                        <div class="ui eleven wide column">
                                {{if .CanCreateOrgRepo}}
                                        <div class="text right">
-            {{if not .DisabledMirrors}}
-                                                 <a class="ui green button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{.i18n.Tr "new_migrate"}}</a>
-            {{end}}
+                                               {{if not .DisabledMirrors}}
+                                                       <a class="ui green button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{.i18n.Tr "new_migrate"}}</a>
+                                               {{end}}
                                                <a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{.i18n.Tr "new_repo"}}</a>
                                        </div>
                                        <div class="ui divider"></div>
index 61302c731aae140b5654f091763b46c97775dc7c..482d1b17d09867694d1e8aeb157ae7f4f2310ed3 100644 (file)
@@ -20,7 +20,7 @@
                                        {{template "base/alert" .}}
                                        {{template "repo/issue/labels/label_list" .}}
                                </div>
-                       </div>  
+                       </div>
                </div>
        </div>
 </div>
index 18d638796c13806cf305a52b60df2b7b225d90bf..b5732ed71b90dbe0141996e9f82e327483af77ba 100644 (file)
@@ -1,4 +1,4 @@
 <div class="ui top attached tabular menu">
-  <a class="item{{if .PageIsOrgTeamMembers}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName}}">{{svg "octicon-person"}} <strong>{{.Team.NumMembers}}</strong>&nbsp; {{$.i18n.Tr "org.lower_members"}}</a>
-  <a class="item{{if .PageIsOrgTeamRepos}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/repositories">{{svg "octicon-repo"}} <strong>{{.Team.NumRepos}}</strong>&nbsp; {{$.i18n.Tr "org.lower_repositories"}}</a>
+       <a class="item{{if .PageIsOrgTeamMembers}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName}}">{{svg "octicon-person"}} <strong>{{.Team.NumMembers}}</strong>&nbsp; {{$.i18n.Tr "org.lower_members"}}</a>
+       <a class="item{{if .PageIsOrgTeamRepos}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/repositories">{{svg "octicon-repo"}} <strong>{{.Team.NumRepos}}</strong>&nbsp; {{$.i18n.Tr "org.lower_repositories"}}</a>
 </div>
index 62abf5ef8812b751dc540b9f68d5e6fea17f057b..4637e5a18581db7cb106a2d3a36b6b6208d58afe 100644 (file)
@@ -1,6 +1,6 @@
 {{template "base/head" .}}
 <div class="page-content install">
-    <div class="ui container">
+       <div class="ui container">
                <div class="ui grid">
                        <div class="sixteen wide column content">
                                <div class="home">
index bcf64a3fa139d9bdf01f2cf215f2b216b0cbc527..08e2a31115a35146016de5df7faa2a245cbfe473 100644 (file)
@@ -93,7 +93,7 @@
                        {{if gt .Activity.Code.CommitCountInAllBranches 0}}
                                <div class="ui attached segment horizontal segments">
                                        <div class="ui attached segment text">
-                                           {{.i18n.Tr "repo.activity.git_stats_exclude_merges" }}
+                                               {{.i18n.Tr "repo.activity.git_stats_exclude_merges" }}
                                                <strong>{{.i18n.Tr (TrN .i18n.Lang .Activity.Code.AuthorCount "repo.activity.git_stats_author_1" "repo.activity.git_stats_author_n") .Activity.Code.AuthorCount }}</strong>
                                                {{.i18n.Tr (TrN .i18n.Lang .Activity.Code.AuthorCount "repo.activity.git_stats_pushed_1" "repo.activity.git_stats_pushed_n") }}
                                                <strong>{{.i18n.Tr (TrN .i18n.Lang .Activity.Code.CommitCount "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n") .Activity.Code.CommitCount }}</strong>
index 5dd93d3d4611a382659541a28678d944e11d16e3..638683b25e5b9996aa22b8b929fe595132fdd1ac 100644 (file)
@@ -19,7 +19,7 @@
                        </div>
                </div>
        </h4>
-    <div class="ui attached table unstackable segment">
+       <div class="ui attached table unstackable segment">
                <div class="file-view code-view">
                        <table>
                                <tbody>
@@ -31,5 +31,5 @@
                                </tbody>
                        </table>
                </div>
-    </div>
+       </div>
 </div>
index de4f0fb57e9e4daf736782d76547e2c001d3f80d..caddcf69e4c87554bb37cec1c4428113538f8e0d 100644 (file)
                                                </td>
                                                <td class="right aligned overflow-visible">
                                                        <div class="ui basic jump dropdown icon button poping up" data-content="{{$.i18n.Tr "repo.branch.download" ($.DefaultBranch)}}" data-variation="tiny inverted" data-position="top right">
-                                                         {{svg "octicon-download"}}
-                                                         <div class="menu">
-                                                           <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.DefaultBranch}}.zip">{{svg "octicon-file-zip"}}&nbsp;ZIP</a>
-                                                           <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.DefaultBranch}}.tar.gz">{{svg "octicon-file-zip"}}&nbsp;TAR.GZ</a>
-                                                         </div>
+                                                               {{svg "octicon-download"}}
+                                                               <div class="menu">
+                                                                       <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.DefaultBranch}}.zip">{{svg "octicon-file-zip"}}&nbsp;ZIP</a>
+                                                                       <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.DefaultBranch}}.tar.gz">{{svg "octicon-file-zip"}}&nbsp;TAR.GZ</a>
+                                                               </div>
                                                        </div>
                                                </td>
                                        </tr>
index 6260d2e9652babebf186901526b64060f3504849..01cbd5182dc6632e17ebaf0781851711b0d2d931 100644 (file)
                                        <span class="ui text">{{.i18n.Tr .Verification.Reason}}</span>
                                        <span class="pull-right"><span class="ui text">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> <i class="warning icon"></i>{{.Verification.SigningKey.KeyID}}</span>
                                {{else}}
-                                 <i class="unlock icon"></i>
-                                 {{.i18n.Tr .Verification.Reason}}
-                                 {{if .Verification.SigningKey}}
-                                       {{if ne .Verification.SigningKey.KeyID ""}}
-                                               <span class="pull-right"><span class="ui text">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> <i class="warning icon"></i>{{.Verification.SigningKey.KeyID}}</span>
-                                       {{end}}
-                                 {{end}}
+                                       <i class="unlock icon"></i>
+                                       {{.i18n.Tr .Verification.Reason}}
+                                       {{if .Verification.SigningKey}}
+                                               {{if ne .Verification.SigningKey.KeyID ""}}
+                                                       <span class="pull-right"><span class="ui text">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> <i class="warning icon"></i>{{.Verification.SigningKey.KeyID}}</span>
+                                               {{end}}
+                                       {{end}}
                                {{end}}
                        </div>
                {{end}}
                                {{if .NoteAuthor}}
                                        <a href="{{.NoteAuthor.HomeLink}}">
                                                {{if .NoteAuthor.FullName}}
-                                                 <strong>{{.NoteAuthor.FullName}}</strong>
+                                                       <strong>{{.NoteAuthor.FullName}}</strong>
                                                {{else}}
-                                                 <strong>{{.NoteCommit.Author.Name}}</strong>
+                                                       <strong>{{.NoteCommit.Author.Name}}</strong>
                                                {{end}}
                                        </a>
                                {{else}}
index 623df6f63ea6dc50fd29c86d63629294dca5f203..3ef2339843a53ab0171e6daa2ce7b4abe1964591 100644 (file)
@@ -28,7 +28,7 @@
 </h4>
 
 {{if and .Commits (gt .CommitCount 0)}}
-    {{template "repo/commits_list" .}}
+       {{template "repo/commits_list" .}}
 {{end}}
 
 {{template "base/paginate" .}}
index fdf65aaad381f39dfa927b510fdd402171fed8fa..124b4e5d1c74d7528c504ea7dd80bf90572bfcbf 100644 (file)
                {{end}}
        {{else if and .PageIsComparePull (gt .CommitCount 0)}}
                {{if .HasPullRequest}}
-               <div class="ui segment">
-                       {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
-               </div>
+                       <div class="ui segment">
+                               {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
+                       </div>
                {{else}}
                        {{if and $.IsSigned (not .Repository.IsArchived)}}
                                <div class="ui info message show-form-container">
index c4af70461fed9ebf99f967146c84ab49440da731..b86e9d2a722773270e2810ba7c738a60a895bba5 100644 (file)
@@ -43,4 +43,4 @@
                        </table>
                {{end}}
        </td>
-</tr>
\ No newline at end of file
+</tr>
index 01f7e3f8e8f4a5d3a25fe1ca2d59232203513fbc..91092c412f6a3bcfed11206d8ba9205a308e3c3c 100644 (file)
                </div>
        </td>
 </tr>
-{{end}}
\ No newline at end of file
+{{end}}
index 6304369416072a1a1ca9aa0054fdb54499d88bab..9e65d6d42053a15dacda78872f7a9bfe6ae1d5c6 100644 (file)
                                        <a class="muted close px-3">{{svg "octicon-x" 16}}</a>
                                </div>
                                <div class="ui field">
-                                       <textarea name="content" tabindex="0" rows="2"
-                                                         placeholder="{{$.i18n.Tr "repo.diff.review.placeholder"}}"></textarea>
+                                       <textarea name="content" tabindex="0" rows="2" placeholder="{{$.i18n.Tr "repo.diff.review.placeholder"}}"></textarea>
                                </div>
                                <div class="ui divider"></div>
-                               <button type="submit" name="type" value="approve" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }}
-                                               class="ui submit green tiny button btn-submit">{{$.i18n.Tr "repo.diff.review.approve"}}</button>
-                               <button type="submit" name="type" value="comment"
-                                               class="ui submit tiny basic button btn-submit">{{$.i18n.Tr "repo.diff.review.comment"}}</button>
-                               <button type="submit" name="type" value="reject" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }}
-                                               class="ui submit red tiny button btn-submit">{{$.i18n.Tr "repo.diff.review.reject"}}</button>
+                               <button type="submit" name="type" value="approve" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }} class="ui submit green tiny button btn-submit">{{$.i18n.Tr "repo.diff.review.approve"}}</button>
+                               <button type="submit" name="type" value="comment" class="ui submit tiny basic button btn-submit">{{$.i18n.Tr "repo.diff.review.comment"}}</button>
+                               <button type="submit" name="type" value="reject" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }} class="ui submit red tiny button btn-submit">{{$.i18n.Tr "repo.diff.review.reject"}}</button>
                        </form>
                </div>
        </div>
index 695574cd99d6cdbc77b6789741f4a671a1ba9fb3..3efde70f50885ccd1340cafc9d3ebae4bc915d31 100644 (file)
@@ -59,7 +59,7 @@
        <div class="ui small basic modal" id="edit-empty-content-modal">
                <div class="ui icon header">
                        <i class="file icon"></i>
-            {{.i18n.Tr "repo.editor.commit_empty_file_header"}}
+                       {{.i18n.Tr "repo.editor.commit_empty_file_header"}}
                </div>
                <div class="center content">
                        <p>{{.i18n.Tr "repo.editor.commit_empty_file_text"}}</p>
                <div class="actions">
                        <div class="ui red basic cancel inverted button">
                                <i class="remove icon"></i>
-                {{.i18n.Tr "repo.editor.cancel"}}
+                               {{.i18n.Tr "repo.editor.cancel"}}
                        </div>
                        <div class="ui green basic ok inverted button">
                                <i class="save icon"></i>
-                {{.i18n.Tr "repo.editor.commit_changes"}}
+                               {{.i18n.Tr "repo.editor.commit_changes"}}
                        </div>
                </div>
        </div>
index 71963d698c71f68b6e83207d42df5ee28ff77ea1..188fc87b6a71cb3765e437e7d42a83fc758ff1ac 100644 (file)
@@ -32,7 +32,7 @@
                                                        {{end}}
                                                {{end}}
                                                {{if .IsArchived}}
-                                                 <span class="ui basic label">{{$.i18n.Tr "repo.desc.archived"}}</span>
+                                                       <span class="ui basic label">{{$.i18n.Tr "repo.desc.archived"}}</span>
                                                {{end}}
                                        </div>
                                </div>
index 7ca18508d9b0f8dd1a79d59a1f0b678815369272..e115b4a3f41370b1236cea15b7ce39ec70c411e2 100644 (file)
@@ -34,7 +34,7 @@
                <div id="branch-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}}">
                        {{if .Issue.Ref}}
                                <div class="item text small" data-id="" data-id-selector="#ref_selector"><strong><a href="#">{{$.i18n.Tr "repo.clear_ref"}}</a></strong></div>
-                       {{end}} 
+                       {{end}}
                        {{range .Branches}}
                                <div class="item" data-id="refs/heads/{{.}}" data-name="{{.}}" data-id-selector="#ref_selector">{{.}}</div>
                        {{end}}
@@ -42,7 +42,7 @@
                <div id="tag-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}}" style="display: none">
                        {{if .Issue.Ref}}
                                <div class="item text small" data-id="" data-id-selector="#ref_selector"><strong><a href="#">{{.i18n.Tr "repo.clear_ref"}}</a></strong></div>
-                       {{end}} 
+                       {{end}}
                        {{range .Tags}}
                                <div class="item" data-id="refs/tags/{{.}}" data-name="tags/{{.}}" data-id-selector="#ref_selector">{{.}}</div>
                        {{end}}
index 28a9b24edc5b4c0932d0014618a741596d5d46ab..ab874bdd136978839ec3060d9e15208b9afdcd95 100644 (file)
@@ -4,7 +4,7 @@
 </div>
 <div class="field">
        <div class="ui bottom active tab" data-tab="write">
-               <textarea id="content" class="edit_area js-quick-submit" name="content" tabindex="4" data-id="issue-{{.RepoName}}" data-url="{{.Repository.APIURL}}/markdown" data-context="{{.Repo.RepoLink}}">
+               <textarea id="content" class="edit_area js-quick-submit" name="content" tabindex="4" data-id="issue-{{.RepoName}}" data-url="{{.Repository.APIURL}}/markdown" data-context="{{.Repo.RepoLink}}">
                        {{- if .BodyQuery}}{{.BodyQuery}}{{else if .IssueTemplate}}{{.IssueTemplate}}{{else if .PullRequestTemplate}}{{.PullRequestTemplate}}{{else}}{{.content}}{{end -}}
                </textarea>
        </div>
index 8e1f914d5f50632e679a8e150859f9227b98e690..19f422cdfe8c29443e4f858d6725cc9de26829c6 100644 (file)
@@ -55,4 +55,3 @@
                </div>
        </div>
 </div>
-
index 76ee77658a01b6ef482e7c72579760af6e8538c3..037069c29beecb561d73df19e03175f1d4fada54 100644 (file)
@@ -3,8 +3,7 @@
                <div class="ui attached left aligned segment">
                        <!-- <h4 class="ui header">
                                {{.i18n.Tr "repo.issues.label_templates.title"}}
-                               <a target="_blank" rel="noopener noreferrer"
-                                  href="https://discuss.gogs.io/t/how-to-use-predefined-label-templates/599">
+                               <a target="_blank" rel="noopener noreferrer" href="https://discuss.gogs.io/t/how-to-use-predefined-label-templates/599">
                                        <span class="octicon octicon-question"></span>
                                </a>
                        </h4> -->
index f977074feab6b1b434e746678a4e59138f4ddb8e..8c2f36f04bc92013a6a068eeb1cca1ff67fbb0e8 100644 (file)
                        {{if not .Repository.IsArchived}}
                                <div class="column right aligned">
                                        {{if or .CanWriteIssues .CanWritePulls}}
-                                       <a class="ui button" href="{{.RepoLink}}/milestones/{{.MilestoneID}}/edit">{{.i18n.Tr "repo.milestones.edit"}}</a>
+                                               <a class="ui button" href="{{.RepoLink}}/milestones/{{.MilestoneID}}/edit">{{.i18n.Tr "repo.milestones.edit"}}</a>
                                        {{end}}
                                        <a class="ui primary button" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}?milestone={{.MilestoneID}}">{{.i18n.Tr "repo.issues.new"}}</a>
                                </div>
                        {{end}}
                </div>
-        <div class="ui one column stackable grid">
-            <div class="column">
-                {{ $closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix $.Lang }}
-                {{if .IsClosed}}
+               <div class="ui one column stackable grid">
+                       <div class="column">
+                               {{ $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}}
-                        <span {{if .IsOverdue}}class="overdue"{{end}}>{{.Milestone.DeadlineString}}</span>
-                    {{else}}
-                        {{$.i18n.Tr "repo.milestones.no_due_date"}}
-                    {{end}}
-                {{end}}
-                &nbsp;
-                <b>{{.i18n.Tr "repo.milestones.completeness" .Milestone.Completeness}}</b>
-            </div>
-        </div>
+                                       {{if .Milestone.DeadlineString}}
+                                               <span {{if .IsOverdue}}class="overdue"{{end}}>{{.Milestone.DeadlineString}}</span>
+                                       {{else}}
+                                               {{$.i18n.Tr "repo.milestones.no_due_date"}}
+                                       {{end}}
+                               {{end}}
+                               &nbsp;
+                               <b>{{.i18n.Tr "repo.milestones.completeness" .Milestone.Completeness}}</b>
+                       </div>
+               </div>
                <div class="ui divider"></div>
                <div id="issue-filters" class="ui stackable grid">
                        <div class="six wide column">
index c572e0c3f3de2c0378a6ec0f5d11b411c42765ba..c7d3522abcf470d980007119e136e3a095e39144 100644 (file)
@@ -14,7 +14,7 @@
                {{template "base/alert" .}}
 
                <div class="ui three column stackable grid">
-                 <div class="column">
+                       <div class="column">
                                <div class="ui compact tiny menu">
                                        <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/milestones?state=open&q={{$.Keyword}}">
                                                {{svg "octicon-milestone" 16 "mr-3"}}
index 233893be0bda415b03f2ca9a2ede29db0f4d0c71..0482604b70292c319159a695701f360028a2e6d9 100644 (file)
@@ -66,9 +66,9 @@
                                                </div>
                                                <div id="comment-{{.Issue.ID}}" class="raw-content hide">{{.Issue.Content}}</div>
                                                <div class="edit-content-zone hide" data-write="issue-{{.Issue.ID}}-write" data-preview="issue-{{.Issue.ID}}-preview" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/content" data-context="{{.RepoLink}}" data-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/attachments" data-view-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/view-attachments"></div>
-                                       {{if .Issue.Attachments}}
-                                               {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Issue.Attachments "Content" .Issue.RenderedContent}}
-                                       {{end}}
+                                               {{if .Issue.Attachments}}
+                                                       {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Issue.Attachments "Content" .Issue.RenderedContent}}
+                                               {{end}}
                                        </div>
                                        {{$reactions := .Issue.Reactions.GroupByType}}
                                        {{if $reactions}}
index 16d77847d012ce9073c6637efadea57a21297b93..343d1d835832d54fb306ec4368750895280f01bd 100644 (file)
@@ -1,42 +1,42 @@
 <div class="dropzone-attachments">
-    {{if .Attachments}}
-        <div class="ui clearing divider"></div>
-    {{end}}
-    <div class="ui middle aligned padded grid">
-        {{$hasThumbnails := false}}
-        {{- range .Attachments -}}
-            <div class="twelve wide column" style="padding: 6px;">
-                <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'>
-                    {{if FilenameIsImage .Name}}
-                        {{if not (containGeneric $.Content .UUID)}}
-                            {{$hasThumbnails = true}}
-                        {{end}}
-                        <span class="ui image">{{svg "octicon-file"}}</span>
-                    {{else}}
-                        <span class="ui image">{{svg "octicon-desktop-download"}}</span>
-                    {{end}}
-                    <span><strong>{{.Name}}</strong></span>
-                </a>
-            </div>
-            <div class="four wide column" style="padding: 0px;">
-                <span class="ui text grey right">{{.Size | FileSize}}</span>
-            </div>
-        {{end -}}
-    </div>
+       {{if .Attachments}}
+               <div class="ui clearing divider"></div>
+       {{end}}
+       <div class="ui middle aligned padded grid">
+               {{$hasThumbnails := false}}
+               {{- range .Attachments -}}
+                       <div class="twelve wide column" style="padding: 6px;">
+                               <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'>
+                                       {{if FilenameIsImage .Name}}
+                                               {{if not (containGeneric $.Content .UUID)}}
+                                                       {{$hasThumbnails = true}}
+                                               {{end}}
+                                               <span class="ui image">{{svg "octicon-file"}}</span>
+                                       {{else}}
+                                               <span class="ui image">{{svg "octicon-desktop-download"}}</span>
+                                       {{end}}
+                                       <span><strong>{{.Name}}</strong></span>
+                               </a>
+                       </div>
+                       <div class="four wide column" style="padding: 0px;">
+                               <span class="ui text grey right">{{.Size | FileSize}}</span>
+                       </div>
+               {{end -}}
+       </div>
 
-    {{if $hasThumbnails}}
-        <div class="ui clearing divider"></div>
-        <div class="ui small images thumbnails">
-            {{- range .Attachments -}}
-                {{if FilenameIsImage .Name}}
-                    {{if not (containGeneric $.Content .UUID)}}
-                    <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
-                        <img class="ui image" src="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'>
-                    </a>
-                    {{end}}
-                {{end}}
-            {{end -}}
-        </div>
-    {{end}}
+       {{if $hasThumbnails}}
+               <div class="ui clearing divider"></div>
+               <div class="ui small images thumbnails">
+                       {{- range .Attachments -}}
+                               {{if FilenameIsImage .Name}}
+                                       {{if not (containGeneric $.Content .UUID)}}
+                                       <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
+                                               <img class="ui image" src="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'>
+                                       </a>
+                                       {{end}}
+                               {{end}}
+                       {{end -}}
+               </div>
+       {{end}}
 
 </div>
index c86689400e05242e502eef54af6a7257333c7e2f..81f0d0434a28cf79ea3f9b7ce2ba592cd346c6f6 100644 (file)
@@ -3,13 +3,13 @@
        {{ $createdStr:= TimeSinceUnix .CreatedUnix $.Lang }}
 
        <!-- 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE_REF, 4 = COMMIT_REF,
-        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 -->
+       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}}
                <div class="timeline-item comment" id="{{.HashTag}}">
                {{if .OriginalAuthor }}
@@ -73,9 +73,9 @@
                                        </div>
                                        <div id="comment-{{.ID}}" class="raw-content hide">{{.Content}}</div>
                                        <div class="edit-content-zone hide" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
-                               {{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}}
                                </div>
                                {{$reactions := .Reactions.GroupByType}}
                                {{if $reactions}}
index f6cbb9206ca117fe07ec0858945d5ca2a0a9c07b..b6bf965a15fbc0a0725253fd458abbce69ef1d62 100644 (file)
                                </span>
                        {{end}}
                        <span id="pull-desc-edit" style="display: none">
-                                                               <div class="ui floating filter dropdown">
-                                                                       <div class="ui basic small button">
-                                                                               <span class="text">{{.i18n.Tr "repo.pulls.compare_compare"}}: {{$.HeadTarget}}</span>
-                                                                       </div>
-                                                               </div>
-                                                               {{svg "octicon-arrow-right"}}
-                                                                <div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
-                                                                       <div class="ui basic small button">
-                                                                               <span class="text" id="pull-target-branch" data-basename="{{$.BaseName}}" data-branch="{{$.BaseBranch}}">{{.i18n.Tr "repo.pulls.compare_base"}}: {{$.BaseName}}:{{$.BaseBranch}}</span>
-                                                                               {{svg "octicon-triangle-down" 14 "dropdown icon"}}
-                                                                       </div>
-                                                                       <div class="menu">
-                                                                               <div class="ui icon search input">
-                                                                                       <i class="icon df ac jc m-0">{{svg "octicon-filter" 16}}</i>
-                                                                                       <input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
-                                                                               </div>
-                                                                               <div class="scrolling menu" id="branch-select">
-                                                                                       {{range .Branches}}
-                                                                                               {{ $sameBase := ne $.BaseName $.HeadUserName }}
-                                                                                               {{ $differentBranch := ne . $.HeadBranch }}
-                                                                                               {{ if or $sameBase $differentBranch }}
-                                                                                                       <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-branch="{{.}}">{{$.BaseName}}{{if $.HeadRepo}}/{{$.HeadRepo}}{{end}}:{{.}}</div>
-                                                                                               {{ end }}
-                                                                                       {{end}}
-                                                                               </div>
-                                                                       </div>
-                                                               </div>
-                                        </span>
+                               <div class="ui floating filter dropdown">
+                                       <div class="ui basic small button">
+                                               <span class="text">{{.i18n.Tr "repo.pulls.compare_compare"}}: {{$.HeadTarget}}</span>
+                                       </div>
+                               </div>
+                               {{svg "octicon-arrow-right"}}
+                               <div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
+                                       <div class="ui basic small button">
+                                               <span class="text" id="pull-target-branch" data-basename="{{$.BaseName}}" data-branch="{{$.BaseBranch}}">{{.i18n.Tr "repo.pulls.compare_base"}}: {{$.BaseName}}:{{$.BaseBranch}}</span>
+                                               {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+                                       </div>
+                                       <div class="menu">
+                                               <div class="ui icon search input">
+                                                       <i class="icon df ac jc m-0">{{svg "octicon-filter" 16}}</i>
+                                                       <input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
+                                               </div>
+                                               <div class="scrolling menu" id="branch-select">
+                                                       {{range .Branches}}
+                                                               {{ $sameBase := ne $.BaseName $.HeadUserName }}
+                                                               {{ $differentBranch := ne . $.HeadBranch }}
+                                                               {{ if or $sameBase $differentBranch }}
+                                                                       <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-branch="{{.}}">{{$.BaseName}}{{if $.HeadRepo}}/{{$.HeadRepo}}{{end}}:{{.}}</div>
+                                                               {{ end }}
+                                                       {{end}}
+                                               </div>
+                                       </div>
+                               </div>
+                       </span>
                {{end}}
        {{else}}
                {{ $createdStr:= TimeSinceUnix .Issue.CreatedUnix $.Lang }}
index b7c5bd5b0d6b0078f8fb34dc0ff47951b2735e9c..156f8896fce04f5812b8087500ed1e9664b07753 100644 (file)
@@ -6,7 +6,7 @@
                                {{.CsrfTokenHtml}}
                                <h3 class="ui top attached header">
                                        {{.i18n.Tr "repo.migrate.migrate" .service.Title}}
-                    <input id="service_type" type="hidden" name="service" value="{{.service}}">
+                                       <input id="service_type" type="hidden" name="service" value="{{.service}}">
                                </h3>
                                <div class="ui attached segment">
                                        {{template "base/alert" .}}
index 26eebd18bb1c13a54c031c0bfda7b639b504f8e1..e1424c250fb059db30364e7d0a501e83b633f44f 100644 (file)
@@ -6,7 +6,7 @@
                                {{.CsrfTokenHtml}}
                                <h3 class="ui top attached header">
                                        {{.i18n.Tr "repo.migrate.migrate" .service.Title}}
-                    <input id="service_type" type="hidden" name="service" value="{{.service}}">
+                                       <input id="service_type" type="hidden" name="service" value="{{.service}}">
                                </h3>
                                <div class="ui attached segment">
                                        {{template "base/alert" .}}
index dc83ac5bb83c7fd54f4a876afe48a743c17fdb29..b1900e83d1019f20508ea6efbfb366bde0902071 100644 (file)
@@ -62,7 +62,7 @@
                                                                <label>{{.i18n.Tr "repo.migrate_items_releases" | Safe}}</label>
                                                        </div>
                                                </div>
-                                         -->
+                                               -->
                                        </div>
 
                                        <div class="ui divider"></div>
index e48f5f3fe310063ea73e65ca09ad5eb9706d6a65..f029d5cb6c7cb0aeb41cb7204a45c07d930d4ea2 100644 (file)
@@ -1,32 +1,32 @@
 {{if $.LatestCommitStatus}}
-    {{if not $.Issue.PullRequest.HasMerged}}
-        <div class="ui top attached header">
-            {{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}}
-           </div>
-    {{end}}
+       {{if not $.Issue.PullRequest.HasMerged}}
+               <div class="ui top attached header">
+                       {{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}}
+                       </div>
+       {{end}}
 
-    {{range $.LatestCommitStatuses}}
-        <div class="ui attached segment">
-            <span>{{template "repo/commit_status" .}}</span>
-            <span class="ui">{{.Context}} <span class="text grey">{{.Description}}</span></span>
-            <div class="ui right">
-                {{if $.is_context_required}}
-                    {{if (call $.is_context_required .Context)}}<div class="ui label">{{$.i18n.Tr "repo.pulls.status_checks_requested"}}</div>{{end}}
-                {{end}}
-                <span class="ui">{{if .TargetURL}}<a href="{{.TargetURL}}">{{$.i18n.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span>
-            </div>
-        </div>
-    {{end}}
+       {{range $.LatestCommitStatuses}}
+               <div class="ui attached segment">
+                       <span>{{template "repo/commit_status" .}}</span>
+                       <span class="ui">{{.Context}} <span class="text grey">{{.Description}}</span></span>
+                       <div class="ui right">
+                               {{if $.is_context_required}}
+                                       {{if (call $.is_context_required .Context)}}<div class="ui label">{{$.i18n.Tr "repo.pulls.status_checks_requested"}}</div>{{end}}
+                               {{end}}
+                               <span class="ui">{{if .TargetURL}}<a href="{{.TargetURL}}">{{$.i18n.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span>
+                       </div>
+               </div>
+       {{end}}
 {{end}}
index 72a69a756a7ea35a2dbf38e9a2327326f7ca88b2..ce4de3ddfa182cf0ad7fbeb16edd6f89fdac3053 100644 (file)
                                                                        {{$.i18n.Tr "repo.released_this"}}
                                                                </span>
                                                                {{if .CreatedUnix}}
-                                                                       <span class="time">{{TimeSinceUnix .CreatedUnix $.Lang}}</span> | 
+                                                                       <span class="time">{{TimeSinceUnix .CreatedUnix $.Lang}}</span> |
                                                                {{end}}
                                                                <span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | EscapePound}}...{{.Target}}">{{$.i18n.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{$.i18n.Tr "repo.release.ahead.target" .Target}}</span>
                                                        </p>
index 81e80215c5a262f6c8103d8f8cd2feb270ae37cf..fbe9a7463e5e2eed40ed5e83e6d267840c553c92 100644 (file)
@@ -9,37 +9,37 @@
                                {{.i18n.Tr "repo.settings.archive.branchsettings_unavailable"}}
                        </div>
                {{else}}
-            <h4 class="ui top attached header">
-                {{.i18n.Tr "repo.default_branch"}}
-            </h4>
-            <div class="ui attached segment">
-                <p>
-                    {{.i18n.Tr "repo.settings.default_branch_desc"}}
-                </p>
-                <form class="ui form" action="{{.Link}}" method="post">
-                    {{.CsrfTokenHtml}}
-                    <input type="hidden" name="action" value="default_branch">
-                    {{if not .Repository.IsEmpty}}
-                    <div class="required inline field">
-                        <div class="ui dropdown selection" tabindex="0">
-                            <select name="branch">
-                                <option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
-                                {{range .Branches}}
-                                    <option value="{{.}}">{{.}}</option>
-                                {{end}}
-                            </select>{{svg "octicon-triangle-down" 14 "dropdown icon"}}
-                            <div class="default text">{{.Repository.DefaultBranch}}</div>
-                            <div class="menu transition hidden" tabindex="-1" style="display: block !important;">
-                                {{range .Branches}}
-                                    <div class="item" data-value="{{.}}">{{.}}</div>
-                                {{end}}
-                            </div>
-                        </div>
-                        <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
-                    </div>
-                    {{end}}
-                </form>
-            </div>
+                       <h4 class="ui top attached header">
+                               {{.i18n.Tr "repo.default_branch"}}
+                       </h4>
+                       <div class="ui attached segment">
+                               <p>
+                                       {{.i18n.Tr "repo.settings.default_branch_desc"}}
+                               </p>
+                               <form class="ui form" action="{{.Link}}" method="post">
+                                       {{.CsrfTokenHtml}}
+                                       <input type="hidden" name="action" value="default_branch">
+                                       {{if not .Repository.IsEmpty}}
+                                       <div class="required inline field">
+                                               <div class="ui dropdown selection" tabindex="0">
+                                                       <select name="branch">
+                                                               <option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
+                                                               {{range .Branches}}
+                                                                       <option value="{{.}}">{{.}}</option>
+                                                               {{end}}
+                                                       </select>{{svg "octicon-triangle-down" 14 "dropdown icon"}}
+                                                       <div class="default text">{{.Repository.DefaultBranch}}</div>
+                                                       <div class="menu transition hidden" tabindex="-1" style="display: block !important;">
+                                                               {{range .Branches}}
+                                                                       <div class="item" data-value="{{.}}">{{.}}</div>
+                                                               {{end}}
+                                                       </div>
+                                               </div>
+                                               <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
+                                       </div>
+                                       {{end}}
+                               </form>
+                       </div>
 
                        <h4 class="ui top attached header">
                                {{.i18n.Tr "repo.settings.protected_branch"}}
index 8e052ac30390a29cc2fa0e99d2449d89d5781466..7dfc27c64f75bff0a0972069821df400e365e484 100644 (file)
                                <div class="ui key list">
                                        {{range .Deploykeys}}
                                                <div class="item">
-                                                   <div class="right floated content">
+                                                       <div class="right floated content">
                                                                <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
                                                                        {{$.i18n.Tr "settings.delete_key"}}
                                                                </button>
-                                                   </div>
-                                                   <div class="left floated content">
+                                                       </div>
+                                                       <div class="left floated content">
                                                                <i class="{{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}>{{svg "octicon-key" 32}}</i>
                                                        </div>
                                                        <div class="content">
index fa23bb73e8874cadb6f9246ad3ce78bad6e7b2e7..a99f8e09b537003b827ed954acdf4f6b6a4c4f77 100644 (file)
@@ -7,25 +7,25 @@
                        <input id="homeserver_url" name="homeserver_url" type="url" value="{{.MatrixHook.HomeserverURL}}" autofocus required>
                </div>
                <div class="required field {{if .Err_Room}}error{{end}}">
-               <label for="room_id">{{.i18n.Tr "repo.settings.matrix.room_id"}}</label>
-               <input id="room_id" name="room_id" type="text" value="{{.MatrixHook.Room}}" required>
-        </div>
-       <div class="required field {{if .Err_AccessToken}}error{{end}}">
-               <label for="access_token">{{.i18n.Tr "repo.settings.matrix.access_token"}}</label>
-               <input id="access_token" name="access_token" type="text" value="{{.MatrixHook.AccessToken}}" required>
-       </div>
-       <div class="field">
-               <label>{{.i18n.Tr "repo.settings.matrix.message_type"}}</label>
-               <div class="ui selection dropdown">
-                       <input type="hidden" id="message_type" name="message_type" value="{{if .MatrixHook.MessageType}}{{.MatrixHook.MessageType}}{{else}}1{{end}}">
-                       <div class="default text"></div>
-                               {{svg "octicon-triangle-down" 14 "dropdown icon"}}
-                               <div class="menu">
-                                       <div class="item" data-value="1">m.notice</div>
-                                       <div class="item" data-value="2">m.text</div>
-                               </div>
-                       </div>
-       </div>
+                       <label for="room_id">{{.i18n.Tr "repo.settings.matrix.room_id"}}</label>
+                       <input id="room_id" name="room_id" type="text" value="{{.MatrixHook.Room}}" required>
+               </div>
+               <div class="required field {{if .Err_AccessToken}}error{{end}}">
+                       <label for="access_token">{{.i18n.Tr "repo.settings.matrix.access_token"}}</label>
+                       <input id="access_token" name="access_token" type="text" value="{{.MatrixHook.AccessToken}}" required>
+               </div>
+               <div class="field">
+                       <label>{{.i18n.Tr "repo.settings.matrix.message_type"}}</label>
+                               <div class="ui selection dropdown">
+                               <input type="hidden" id="message_type" name="message_type" value="{{if .MatrixHook.MessageType}}{{.MatrixHook.MessageType}}{{else}}1{{end}}">
+                               <div class="default text"></div>
+                               {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+                               <div class="menu">
+                                       <div class="item" data-value="1">m.notice</div>
+                                       <div class="item" data-value="2">m.text</div>
+                               </div>
+                       </div>
+               </div>
                {{template "repo/settings/webhook/settings" .}}
        </form>
 {{end}}
index 598ac4482233efba2538eb46d6750544311ff71e..d062e7aac45bc16727eaec0625fad5d40dcff390 100644 (file)
@@ -6,10 +6,10 @@
                        <label for="bot_token">{{.i18n.Tr "repo.settings.bot_token"}}</label>
                        <input id="bot_token" name="bot_token" type="text" value="{{.TelegramHook.BotToken}}" autofocus required>
                </div>
-    <div class="required field {{if .Err_ChatID}}error{{end}}">
-      <label for="chat_id">{{.i18n.Tr "repo.settings.chat_id"}}</label>
-      <input id="chat_id" name="chat_id" type="text" value="{{.TelegramHook.ChatID}}" required>
-    </div>
+               <div class="required field {{if .Err_ChatID}}error{{end}}">
+                       <label for="chat_id">{{.i18n.Tr "repo.settings.chat_id"}}</label>
+                       <input id="chat_id" name="chat_id" type="text" value="{{.TelegramHook.ChatID}}" required>
+               </div>
                {{template "repo/settings/webhook/settings" .}}
        </form>
 {{end}}
index 76c0ac76fe713be93006a458f3dbc27e6f596c47..889cb5a691d0de7959f393833a51dc2e668ae904 100644 (file)
 
 <script>
 function submitDeleteForm() {
-    var message = prompt("{{.i18n.Tr "repo.delete_confirm_message"}}\n\n{{.i18n.Tr "repo.delete_commit_summary"}}", "Delete '{{.TreeName}}'");
-    if (message != null) {
-        $("#delete-message").val(message);
-        $("#delete-file-form").submit()
-    }
+       var message = prompt("{{.i18n.Tr "repo.delete_confirm_message"}}\n\n{{.i18n.Tr "repo.delete_commit_summary"}}", "Delete '{{.TreeName}}'");
+       if (message != null) {
+               $("#delete-message").val(message);
+               $("#delete-file-form").submit()
+       }
 }
 </script>
index 9838b2c11c233b466d8153bd22f839910fbb8848..d74c99152aece082414adcc14c69db7a9d6ae791 100644 (file)
@@ -29,7 +29,7 @@
                        </h4>
 
                        {{if and .Commits (gt .CommitCount 0)}}
-                {{template "repo/commits_list" .}}
+                               {{template "repo/commits_list" .}}
                        {{end}}
 
                        {{template "base/paginate" .}}
index 1b4f21b4004fb497d138411caf053e4b371211ef..d6cd60cbd245beb02b1e3c204f10ade0e45fca31 100644 (file)
@@ -48,8 +48,8 @@
                                <div class="desc issue-item-bottom-row df ac fw my-1">
                                        <a class="index ml-0 mr-2" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
                                                {{if eq $.listType "dashboard"}}
-                       {{.Repo.FullName}}#{{.Index}}
-               {{else}}
+                                                       {{.Repo.FullName}}#{{.Index}}
+                                               {{else}}
                                                        #{{.Index}}
                                                {{end}}
                                        </a>
index 9ba727548cd4750ccc56eb343c1227b5becdeae6..9928bb6198cf5610d8cff811e36d04b26c174f89 100644 (file)
@@ -10,4 +10,3 @@
                {{end}}
        </div>
 </div>
-
index b8b489242695f8226c760178d3bcff133c79aebb..68b474c86606ff07e556884dad26dda1819b223f 100644 (file)
@@ -17,7 +17,7 @@
                                        <div class="inline field">
                                                <label></label>
                                                <button class="ui green button">{{.i18n.Tr "auth.verify"}}</button>
-                        <a href="{{AppSubUrl}}/user/two_factor/scratch">{{.i18n.Tr "auth.use_scratch_code" | Str2html}}</a>
+                                               <a href="{{AppSubUrl}}/user/two_factor/scratch">{{.i18n.Tr "auth.use_scratch_code" | Str2html}}</a>
                                        </div>
                                </div>
                        </form>
index dfd0e5d8ec32a668e6115535bc9adf94e3f5832f..d2a51fd44a729a725bcd6c09049ba0cd046b196e 100644 (file)
@@ -26,7 +26,7 @@
                                                        {{.i18n.Tr "repo.issues.filter_type.review_requested"}}
                                                        <strong class="ui right">{{CountFmt .IssueStats.ReviewRequestedCount}}</strong>
                                                </a>
-                                       {{end}}          
+                                       {{end}}
                                        <div class="ui divider"></div>
                                        <a class="{{if not $.RepoIDs}}ui basic blue button{{end}} repo name item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&q={{$.Keyword}}">
                                                <span class="text truncate">All</span>
index 5c3aa55062649a7928c755f88a89352083472f2e..c7416e7cd7b94dd8aaa0730378e06f8a66d7d813 100644 (file)
                                                        </div>
                                                </div>
                                        </div>
-        </div>
-                <div class="milestone list">
-                    {{range .Milestones}}
-                        <li class="item">
-                            <div class="ui label">{{.Repo.FullName}}</div>
+                               </div>
+                               <div class="milestone list">
+                                       {{range .Milestones}}
+                                               <li class="item">
+                                                       <div class="ui label">{{.Repo.FullName}}</div>
                                                        {{svg "octicon-milestone"}} <a href="{{.Repo.Link }}/milestone/{{.ID}}">{{.Name}}</a>
-                            <div class="ui right green progress" data-percent="{{.Completeness}}">
-                                <div class="bar" {{if not .Completeness}}style="background-color: transparent"{{end}}>
-                                    <div class="progress"></div>
-                                </div>
-                            </div>
-                            <div class="meta">
-                                {{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.Lang }}
-                                {{if .IsClosed}}
+                                                       <div class="ui right green progress" data-percent="{{.Completeness}}">
+                                                               <div class="bar" {{if not .Completeness}}style="background-color: transparent"{{end}}>
+                                                                       <div class="progress"></div>
+                                                               </div>
+                                                       </div>
+                                                       <div class="meta">
+                                                               {{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.Lang }}
+                                                               {{if .IsClosed}}
                                                                        {{svg "octicon-clock"}} {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}}
-                                {{else}}
+                                                               {{else}}
                                                                        {{svg "octicon-calendar"}}
-                                    {{if .DeadlineString}}
-                                        <span {{if .IsOverdue}}class="overdue"{{end}}>{{.DeadlineString}}</span>
-                                    {{else}}
-                                        {{$.i18n.Tr "repo.milestones.no_due_date"}}
-                                    {{end}}
-                                {{end}}
-                                <span class="issue-stats">
-                                    {{svg "octicon-issue-opened"}} {{$.i18n.Tr "repo.milestones.open_tab" .NumOpenIssues}}
+                                                                       {{if .DeadlineString}}
+                                                                               <span {{if .IsOverdue}}class="overdue"{{end}}>{{.DeadlineString}}</span>
+                                                                       {{else}}
+                                                                               {{$.i18n.Tr "repo.milestones.no_due_date"}}
+                                                                       {{end}}
+                                                               {{end}}
+                                                               <span class="issue-stats">
+                                                                       {{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}}
-                                </span>
-                            </div>
-                            {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}}
-                                <div class="ui right operate">
-                                    <a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-pencil"}} {{$.i18n.Tr "repo.issues.label_edit"}}</a>
-                                    {{if .IsClosed}}
-                                        <a href="{{$.Link}}/{{.ID}}/open" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-check"}} {{$.i18n.Tr "repo.milestones.open"}}</a>
-                                    {{else}}
-                                        <a href="{{$.Link}}/{{.ID}}/close" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-x"}} {{$.i18n.Tr "repo.milestones.close"}}</a>
-                                    {{end}}
-                                    <a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.i18n.Tr "repo.issues.label_delete"}}</a>
-                                </div>
-                            {{end}}
-                            {{if .Content}}
-                                <div class="content">
-                                    {{.RenderedContent|Str2html}}
-                                </div>
-                            {{end}}
-                        </li>
-                    {{end}}
+                                                                       {{if .TotalTrackedTime}}{{svg "octicon-clock"}} {{.TotalTrackedTime|Sec2Time}}{{end}}
+                                                               </span>
+                                                       </div>
+                                                       {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}}
+                                                               <div class="ui right operate">
+                                                                       <a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-pencil"}} {{$.i18n.Tr "repo.issues.label_edit"}}</a>
+                                                                       {{if .IsClosed}}
+                                                                               <a href="{{$.Link}}/{{.ID}}/open" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-check"}} {{$.i18n.Tr "repo.milestones.open"}}</a>
+                                                                       {{else}}
+                                                                               <a href="{{$.Link}}/{{.ID}}/close" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-x"}} {{$.i18n.Tr "repo.milestones.close"}}</a>
+                                                                       {{end}}
+                                                                       <a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.i18n.Tr "repo.issues.label_delete"}}</a>
+                                                               </div>
+                                                       {{end}}
+                                                       {{if .Content}}
+                                                               <div class="content">
+                                                                       {{.RenderedContent|Str2html}}
+                                                               </div>
+                                                       {{end}}
+                                               </li>
+                                       {{end}}
 
-                    {{template "base/paginate" .}}
-                </div>
+                                       {{template "base/paginate" .}}
+                               </div>
 
                        </div>
                </div>
index 2158dcb000f1f945151e6f0aa12112da1d076916..e7327d34bbe99e7b50c147b8bbba500a261fcd40 100644 (file)
 <div class="page-content user notification" id="notification_div" data-params="{{.Page.GetParams}}">
        <div class="ui container">
                <h1 class="ui dividing header">{{.i18n.Tr "notification.notifications"}}</h1>
-        <div class="ui top attached tabular menu">
-            {{ $notificationUnreadCount := call .NotificationUnreadCount}}
-            <a href="{{AppSubUrl}}/notifications?q=unread" class="{{if eq .Status 1}}active{{end}} item">
-                {{.i18n.Tr "notification.unread"}}
-                <div class="ui label {{if not $notificationUnreadCount}}hidden{{end}}">{{$notificationUnreadCount}}</div>
-            </a>
-            <a href="{{AppSubUrl}}/notifications?q=read" class="{{if eq .Status 2}}active{{end}} item">
-                {{.i18n.Tr "notification.read"}}
-            </a>
-            {{if and (eq .Status 1)}}
-                <form action="{{AppSubUrl}}/notifications/purge" method="POST" style="margin-left: auto;">
-                    {{$.CsrfTokenHtml}}
-                    <div class="{{if not $notificationUnreadCount}}hide{{end}}">
-                        <button class="ui mini button primary" title='{{$.i18n.Tr "notification.mark_all_as_read"}}'>
-                            {{svg "octicon-checklist"}}
-                        </button>
-                    </div>
-                </form>
-            {{end}}
-        </div>
-        <div class="ui bottom attached active tab segment">
-            {{if eq (len .Notifications) 0}}
-                {{if eq .Status 1}}
-                    {{.i18n.Tr "notification.no_unread"}}
-                {{else}}
-                    {{.i18n.Tr "notification.no_read"}}
-                {{end}}
-            {{else}}
-                <table class="ui unstackable striped very compact small selectable table" id="notification_table">
-                    <tbody>
-                        {{range $notification := .Notifications}}
-                            {{$issue := .Issue}}
-                            {{$repo := .Repository}}
-                            {{$repoOwner := $repo.MustOwner}}
-                            <tr id="notification_{{.ID}}">
-                                <td class="collapsing" data-href="{{.HTMLURL}}">
-                                    {{if eq .Status 3}}
-                                        <span class="blue">{{svg "octicon-pin"}}</span>
-                                    {{else if not $issue}}
-                                        <span class="gray">{{svg "octicon-repo"}}</span>
-                                    {{else if $issue.IsPull}}
-                                        {{if $issue.IsClosed}}
-                                            {{if $issue.GetPullRequest.HasMerged}}
-                                                <span class="purple">{{svg "octicon-git-merge"}}</span>
-                                            {{else}}
-                                                <span class="red">{{svg "octicon-git-pull-request"}}</span>
-                                            {{end}}
-                                        {{else}}
-                                            <span class="green">{{svg "octicon-git-pull-request"}}</span>
-                                        {{end}}
-                                    {{else}}
-                                        {{if $issue.IsClosed}}
-                                            <span class="red">{{svg "octicon-issue-closed"}}</span>
-                                        {{else}}
-                                            <span class="green">{{svg "octicon-issue-opened"}}</span>
-                                        {{end}}
-                                    {{end}}
-                                </td>
-                                <td class="eleven wide" data-href="{{.HTMLURL}}">
-                                    <a class="item" href="{{.HTMLURL}}">
-                                        {{if $issue}}
-                                            #{{$issue.Index}} - {{$issue.Title}}
-                                        {{else}}
-                                            {{$repo.FullName}}
-                                        {{end}}
-                                    </a>
-                                </td>
-                                <td data-href="{{AppSubUrl}}/{{$repoOwner.Name}}/{{$repo.Name}}">
-                                    <a class="item" href="{{AppSubUrl}}/{{$repoOwner.Name}}/{{$repo.Name}}">
-                                        {{$repoOwner.Name}}/{{$repo.Name}}
-                                    </a>
-                                </td>
-                                <td class="collapsing">
-                                    {{if ne .Status 3}}
-                                        <form action="{{AppSubUrl}}/notifications/status" method="POST">
-                                            {{$.CsrfTokenHtml}}
-                                            <input type="hidden" name="notification_id" value="{{.ID}}" />
-                                            <input type="hidden" name="status" value="pinned" />
-                                            <button class="ui mini button" title='{{$.i18n.Tr "notification.pin"}}'
-                                                data-url="{{AppSubUrl}}/notifications/status"
-                                                data-status="pinned"
-                                                data-page="{{$.Page.Paginater.Current}}"
-                                                data-notification-id="{{.ID}}"
-                                                data-q="{{$.Keyword}}">
-                                                {{svg "octicon-pin"}}
-                                            </button>
-                                        </form>
-                                    {{end}}
-                                </td>
-                                <td class="collapsing">
-                                    {{if or (eq .Status 1) (eq .Status 3)}}
-                                        <form action="{{AppSubUrl}}/notifications/status" method="POST">
-                                            {{$.CsrfTokenHtml}}
-                                            <input type="hidden" name="notification_id" value="{{.ID}}" />
-                                            <input type="hidden" name="status" value="read" />
-                                            <input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" />
-                                            <button class="ui mini button" title='{{$.i18n.Tr "notification.mark_as_read"}}'
-                                                data-url="{{AppSubUrl}}/notifications/status"
-                                                data-status="read"
-                                                data-page="{{$.Page.Paginater.Current}}"
-                                                data-notification-id="{{.ID}}"
-                                                data-q="{{$.Keyword}}">
-                                                {{svg "octicon-check"}}
-                                            </button>
-                                        </form>
-                                    {{else if eq .Status 2}}
-                                        <form action="{{AppSubUrl}}/notifications/status" method="POST">
-                                            {{$.CsrfTokenHtml}}
-                                            <input type="hidden" name="notification_id" value="{{.ID}}" />
-                                            <input type="hidden" name="status" value="unread" />
-                                            <input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" />
-                                            <button class="ui mini button" title='{{$.i18n.Tr "notification.mark_as_unread"}}'
-                                                data-url="{{AppSubUrl}}/notifications/status"
-                                                data-status="unread"
-                                                data-page="{{$.Page.Paginater.Current}}"
-                                                data-notification-id="{{.ID}}"
-                                                data-q="{{$.Keyword}}">
-                                                {{svg "octicon-bell"}}
-                                            </button>
-                                        </form>
-                                    {{end}}
-                                </td>
-                            </tr>
-                        {{end}}
-                    </tbody>
-                </table>
-            {{end}}
-        </div>
-        {{template "base/paginate" .}}
-    </div>
+               <div class="ui top attached tabular menu">
+                       {{ $notificationUnreadCount := call .NotificationUnreadCount}}
+                       <a href="{{AppSubUrl}}/notifications?q=unread" class="{{if eq .Status 1}}active{{end}} item">
+                               {{.i18n.Tr "notification.unread"}}
+                               <div class="ui label {{if not $notificationUnreadCount}}hidden{{end}}">{{$notificationUnreadCount}}</div>
+                       </a>
+                       <a href="{{AppSubUrl}}/notifications?q=read" class="{{if eq .Status 2}}active{{end}} item">
+                               {{.i18n.Tr "notification.read"}}
+                       </a>
+                       {{if and (eq .Status 1)}}
+                               <form action="{{AppSubUrl}}/notifications/purge" method="POST" style="margin-left: auto;">
+                                       {{$.CsrfTokenHtml}}
+                                       <div class="{{if not $notificationUnreadCount}}hide{{end}}">
+                                               <button class="ui mini button primary" title='{{$.i18n.Tr "notification.mark_all_as_read"}}'>
+                                                       {{svg "octicon-checklist"}}
+                                               </button>
+                                       </div>
+                               </form>
+                       {{end}}
+               </div>
+               <div class="ui bottom attached active tab segment">
+                       {{if eq (len .Notifications) 0}}
+                               {{if eq .Status 1}}
+                                       {{.i18n.Tr "notification.no_unread"}}
+                               {{else}}
+                                       {{.i18n.Tr "notification.no_read"}}
+                               {{end}}
+                       {{else}}
+                               <table class="ui unstackable striped very compact small selectable table" id="notification_table">
+                                       <tbody>
+                                               {{range $notification := .Notifications}}
+                                                       {{$issue := .Issue}}
+                                                       {{$repo := .Repository}}
+                                                       {{$repoOwner := $repo.MustOwner}}
+                                                       <tr id="notification_{{.ID}}">
+                                                               <td class="collapsing" data-href="{{.HTMLURL}}">
+                                                                       {{if eq .Status 3}}
+                                                                               <span class="blue">{{svg "octicon-pin"}}</span>
+                                                                       {{else if not $issue}}
+                                                                               <span class="gray">{{svg "octicon-repo"}}</span>
+                                                                       {{else if $issue.IsPull}}
+                                                                               {{if $issue.IsClosed}}
+                                                                                       {{if $issue.GetPullRequest.HasMerged}}
+                                                                                               <span class="purple">{{svg "octicon-git-merge"}}</span>
+                                                                                       {{else}}
+                                                                                               <span class="red">{{svg "octicon-git-pull-request"}}</span>
+                                                                                       {{end}}
+                                                                               {{else}}
+                                                                                       <span class="green">{{svg "octicon-git-pull-request"}}</span>
+                                                                               {{end}}
+                                                                       {{else}}
+                                                                               {{if $issue.IsClosed}}
+                                                                                       <span class="red">{{svg "octicon-issue-closed"}}</span>
+                                                                               {{else}}
+                                                                                       <span class="green">{{svg "octicon-issue-opened"}}</span>
+                                                                               {{end}}
+                                                                       {{end}}
+                                                               </td>
+                                                               <td class="eleven wide" data-href="{{.HTMLURL}}">
+                                                                       <a class="item" href="{{.HTMLURL}}">
+                                                                               {{if $issue}}
+                                                                                       #{{$issue.Index}} - {{$issue.Title}}
+                                                                               {{else}}
+                                                                                       {{$repo.FullName}}
+                                                                               {{end}}
+                                                                       </a>
+                                                               </td>
+                                                               <td data-href="{{AppSubUrl}}/{{$repoOwner.Name}}/{{$repo.Name}}">
+                                                                       <a class="item" href="{{AppSubUrl}}/{{$repoOwner.Name}}/{{$repo.Name}}">
+                                                                               {{$repoOwner.Name}}/{{$repo.Name}}
+                                                                       </a>
+                                                               </td>
+                                                               <td class="collapsing">
+                                                                       {{if ne .Status 3}}
+                                                                               <form action="{{AppSubUrl}}/notifications/status" method="POST">
+                                                                                       {{$.CsrfTokenHtml}}
+                                                                                       <input type="hidden" name="notification_id" value="{{.ID}}" />
+                                                                                       <input type="hidden" name="status" value="pinned" />
+                                                                                       <button class="ui mini button" title='{{$.i18n.Tr "notification.pin"}}'
+                                                                                               data-url="{{AppSubUrl}}/notifications/status"
+                                                                                               data-status="pinned"
+                                                                                               data-page="{{$.Page.Paginater.Current}}"
+                                                                                               data-notification-id="{{.ID}}"
+                                                                                               data-q="{{$.Keyword}}">
+                                                                                               {{svg "octicon-pin"}}
+                                                                                       </button>
+                                                                               </form>
+                                                                       {{end}}
+                                                               </td>
+                                                               <td class="collapsing">
+                                                                       {{if or (eq .Status 1) (eq .Status 3)}}
+                                                                               <form action="{{AppSubUrl}}/notifications/status" method="POST">
+                                                                                       {{$.CsrfTokenHtml}}
+                                                                                       <input type="hidden" name="notification_id" value="{{.ID}}" />
+                                                                                       <input type="hidden" name="status" value="read" />
+                                                                                       <input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" />
+                                                                                       <button class="ui mini button" title='{{$.i18n.Tr "notification.mark_as_read"}}'
+                                                                                               data-url="{{AppSubUrl}}/notifications/status"
+                                                                                               data-status="read"
+                                                                                               data-page="{{$.Page.Paginater.Current}}"
+                                                                                               data-notification-id="{{.ID}}"
+                                                                                               data-q="{{$.Keyword}}">
+                                                                                               {{svg "octicon-check"}}
+                                                                                       </button>
+                                                                               </form>
+                                                                       {{else if eq .Status 2}}
+                                                                               <form action="{{AppSubUrl}}/notifications/status" method="POST">
+                                                                                       {{$.CsrfTokenHtml}}
+                                                                                       <input type="hidden" name="notification_id" value="{{.ID}}" />
+                                                                                       <input type="hidden" name="status" value="unread" />
+                                                                                       <input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" />
+                                                                                       <button class="ui mini button" title='{{$.i18n.Tr "notification.mark_as_unread"}}'
+                                                                                               data-url="{{AppSubUrl}}/notifications/status"
+                                                                                               data-status="unread"
+                                                                                               data-page="{{$.Page.Paginater.Current}}"
+                                                                                               data-notification-id="{{.ID}}"
+                                                                                               data-q="{{$.Keyword}}">
+                                                                                               {{svg "octicon-bell"}}
+                                                                                       </button>
+                                                                               </form>
+                                                                       {{end}}
+                                                               </td>
+                                                       </tr>
+                                               {{end}}
+                                       </tbody>
+                               </table>
+                       {{end}}
+               </div>
+               {{template "base/paginate" .}}
+       </div>
 </div>
index 69dbcced8c4ff73bc92308734261da399d2a3ee9..4e04d831d21af3454007e4b48f291a91f52aecfa 100644 (file)
@@ -39,7 +39,7 @@
 <p>{{.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}}</p>
 <div {{if not .HasGPGError}}class="hide"{{end}} id="add-gpg-key-panel">
        <h4 class="ui top attached header">
-                {{.i18n.Tr "settings.add_new_gpg_key"}}
+               {{.i18n.Tr "settings.add_new_gpg_key"}}
        </h4>
        <div class="ui attached segment">
                <form class="ui form" action="{{.Link}}" method="post">
index 453dce7278e73cee0e9f5402661a5cdfa54a0d7e..b82f131b205ae066d2c99480e28a2db54fcdcf08 100644 (file)
@@ -35,7 +35,7 @@
                                                                        {{else}}
                                                                                <span class="icon">{{svg "octicon-file-directory"}}</span>
                                                                                <span class="name">{{$.Owner.Name}}/{{$dir}}</span>
-                                               <div class="right floated content">
+                                                                               <div class="right floated content">
                                                                                        {{if $.allowAdopt}}
                                                                                                <button class="ui button submit tiny green adopt show-modal" data-modal="#adopt-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-plus"}}</span><span class="label">{{$.i18n.Tr "repo.adopt_preexisting_label"}}</span></button>
                                                                                                <div class="ui basic modal" id="adopt-unadopted-modal-{{$dirI}}">
index 6b8215f8d0db49c1656ed4547bfde1807c535da6..dcc56d8729ffa5265e9e59a4f1f79ed684aa31bf 100644 (file)
@@ -6,16 +6,16 @@
        {{if .TwofaEnrolled}}
                <div class="ui key list">
                        {{range .U2FRegistrations}}
-                           <div class="item">
-                               <div class="right floated content">
-                                       <button class="ui red tiny button delete-button" id="delete-registration" data-url="{{$.Link}}/u2f/delete" data-id="{{.ID}}">
-                                       {{$.i18n.Tr "settings.delete_key"}}
-                                       </button>
-                               </div>
-                               <div class="content">
-                                       <strong>{{.Name}}</strong>
-                               </div>
-                           </div>
+                               <div class="item">
+                                       <div class="right floated content">
+                                               <button class="ui red tiny button delete-button" id="delete-registration" data-url="{{$.Link}}/u2f/delete" data-id="{{.ID}}">
+                                               {{$.i18n.Tr "settings.delete_key"}}
+                                               </button>
+                                       </div>
+                                       <div class="content">
+                                               <strong>{{.Name}}</strong>
+                                       </div>
+                               </div>
                        {{end}}
                </div>
                <div class="ui form">
@@ -53,4 +53,3 @@
        </div>
        {{template "base/delete_modal_actions" .}}
 </div>
-