Enforce tab indentation in templates (#15289)

* Enforce tab indendation in templates

This adds editorconfig-checker [1] to lint the template files so they
conform the editorconfig files. I fixed all current identation issues
using the fix mode of eclint [2] and some manual corrections.

We can extend this linting to other files later, for now I'd like this
PR to focus on HTML template files only.

[1] https://github.com/editorconfig-checker/editorconfig-checker
[2] https://github.com/jedmao/eclint

* fix indendation

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
silverwind 2021-04-11 05:46:37 +02:00 committed by GitHub
parent 0c77e0791c
commit d848098f60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
67 changed files with 678 additions and 609 deletions

View File

@ -12,6 +12,12 @@ insert_final_newline = true
[*.{go,tmpl,html}] [*.{go,tmpl,html}]
indent_style = tab indent_style = tab
[templates/custom/*.tmpl]
insert_final_newline = false
[templates/swagger/v1_json.tmpl]
indent_style = space
[Makefile] [Makefile]
indent_style = tab indent_style = tab

View File

@ -325,6 +325,7 @@ lint: lint-frontend lint-backend
lint-frontend: node_modules lint-frontend: node_modules
npx eslint --color --max-warnings=0 web_src/js build templates *.config.js npx eslint --color --max-warnings=0 web_src/js build templates *.config.js
npx stylelint --color --max-warnings=0 web_src/less npx stylelint --color --max-warnings=0 web_src/less
npx editorconfig-checker templates
.PHONY: lint-backend .PHONY: lint-backend
lint-backend: golangci-lint revive vet lint-backend: golangci-lint revive vet

70
package-lock.json generated
View File

@ -1570,6 +1570,32 @@
"resolved": "https://registry.npmjs.org/add-asset-webpack-plugin/-/add-asset-webpack-plugin-2.0.1.tgz", "resolved": "https://registry.npmjs.org/add-asset-webpack-plugin/-/add-asset-webpack-plugin-2.0.1.tgz",
"integrity": "sha512-Hx9EKnirCUfdh684y1yhx8QOFolpkIG2VRHHgNm8wFy1Cf7P3RGwS678hoN7Y1XvZRPpVXWa+6QnfL/2i0CMCA==" "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": { "aggregate-error": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
@ -3388,6 +3414,17 @@
"safer-buffer": "^2.1.0" "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": { "electron-to-chromium": {
"version": "1.3.707", "version": "1.3.707",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.707.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.707.tgz",
@ -4936,6 +4973,33 @@
"sshpk": "^1.7.0" "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": { "human-signals": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
@ -8107,6 +8171,12 @@
"lower-case": "^1.1.1" "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": { "node-int64": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz",

View File

@ -47,6 +47,7 @@
}, },
"devDependencies": { "devDependencies": {
"eslint": "7.23.0", "eslint": "7.23.0",
"editorconfig-checker": "4.0.2",
"eslint-plugin-html": "6.1.2", "eslint-plugin-html": "6.1.2",
"eslint-plugin-import": "2.22.1", "eslint-plugin-import": "2.22.1",
"eslint-plugin-unicorn": "29.0.0", "eslint-plugin-unicorn": "29.0.0",

View File

@ -96,8 +96,8 @@
<input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="e.g. mail" required> <input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="e.g. mail" required>
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_ssh_public_key">{{.i18n.Tr "admin.auths.attribute_ssh_public_key"}}</label> <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"> <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{$cfg.AttributeSSHPublicKey}}" placeholder="e.g. SshPublicKey">
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
@ -215,9 +215,9 @@
<input id="oauth2_secret" name="oauth2_secret" value="{{$cfg.ClientSecret}}" required> <input id="oauth2_secret" name="oauth2_secret" value="{{$cfg.ClientSecret}}" required>
</div> </div>
<div class="optional field"> <div class="optional field">
<label for="oauth2_icon_url">{{.i18n.Tr "admin.auths.oauth2_icon_url"}}</label> <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}}"> <input id="oauth2_icon_url" name="oauth2_icon_url" value="{{$cfg.IconURL}}">
</div> </div>
<div class="open_id_connect_auto_discovery_url required field"> <div class="open_id_connect_auto_discovery_url required field">
<label for="open_id_connect_auto_discovery_url">{{.i18n.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label> <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}}"> <input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{$cfg.OpenIDConnectAutoDiscoveryURL}}">

View File

@ -119,8 +119,8 @@
<span>{{.i18n.Tr "admin.auths.tip.nextcloud"}}</span> <span>{{.i18n.Tr "admin.auths.tip.nextcloud"}}</span>
<li>Yandex</li> <li>Yandex</li>
<span>{{.i18n.Tr "admin.auths.tip.yandex"}}</span> <span>{{.i18n.Tr "admin.auths.tip.yandex"}}</span>
<li>Mastodon</li> <li>Mastodon</li>
<span>{{.i18n.Tr "admin.auths.tip.mastodon"}}</span> <span>{{.i18n.Tr "admin.auths.tip.mastodon"}}</span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -68,8 +68,8 @@
<input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="e.g. mail"> <input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="e.g. mail">
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_ssh_public_key">{{.i18n.Tr "admin.auths.attribute_ssh_public_key"}}</label> <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"> <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{.attribute_ssh_public_key}}" placeholder="e.g. SshPublicKey">
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">

View File

@ -21,9 +21,9 @@
<input id="oauth2_secret" name="oauth2_secret" value="{{.oauth2_secret}}"> <input id="oauth2_secret" name="oauth2_secret" value="{{.oauth2_secret}}">
</div> </div>
<div class="optional field"> <div class="optional field">
<label for="oauth2_icon_url">{{.i18n.Tr "admin.auths.oauth2_icon_url"}}</label> <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}}"> <input id="oauth2_icon_url" name="oauth2_icon_url" value="{{.oauth2_icon_url}}">
</div> </div>
<div class="open_id_connect_auto_discovery_url required field"> <div class="open_id_connect_auto_discovery_url required field">
<label for="open_id_connect_auto_discovery_url">{{.i18n.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label> <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}}"> <input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{.open_id_connect_auto_discovery_url}}">

View File

@ -17,7 +17,7 @@
</div> </div>
<form class="ui form ignore-dirty" style="max-width: 90%"> <form class="ui form ignore-dirty" style="max-width: 90%">
<div class="ui fluid action input"> <div class="ui fluid action input">
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus> <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button> <button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
</div> </div>
</form> </form>

View File

@ -7,7 +7,7 @@
{{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}}) {{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
<div class="ui right"> <div class="ui right">
<a class="ui blue tiny button" href="{{AppSubUrl}}/admin/repos/unadopted">{{.i18n.Tr "admin.repos.unadopted"}}</a> <a class="ui blue tiny button" href="{{AppSubUrl}}/admin/repos/unadopted">{{.i18n.Tr "admin.repos.unadopted"}}</a>
</div> </div>
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{template "admin/repo/search" .}} {{template "admin/repo/search" .}}

View File

@ -5,98 +5,98 @@
{{template "base/alert" .}} {{template "base/alert" .}}
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.i18n.Tr "admin.repos.unadopted"}} {{.i18n.Tr "admin.repos.unadopted"}}
<div class="ui right"> <div class="ui right">
<a class="ui blue tiny button" href="{{AppSubUrl}}/admin/repos">{{.i18n.Tr "admin.repos.repo_manage_panel"}}</a> <a class="ui blue tiny button" href="{{AppSubUrl}}/admin/repos">{{.i18n.Tr "admin.repos.repo_manage_panel"}}</a>
</div> </div>
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form ignore-dirty"> <form class="ui form ignore-dirty">
<div class="ui fluid action input"> <div class="ui fluid action input">
<input name="search" value="true" type="hidden"> <input name="search" value="true" type="hidden">
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "repo.adopt_search"}}" autofocus> <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "repo.adopt_search"}}" autofocus>
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button> <button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
</div> </div>
</form> </form>
</div> </div>
{{if .search}} {{if .search}}
<div class="ui attached segment settings"> <div class="ui attached segment settings">
{{if .Dirs}} {{if .Dirs}}
<div class="ui middle aligned divided list"> <div class="ui middle aligned divided list">
{{range $dirI, $dir := .Dirs}} {{range $dirI, $dir := .Dirs}}
<div class="item"> <div class="item">
<div class="content"> <div class="content">
<span class="icon">{{svg "octicon-file-directory"}}</span> <span class="icon">{{svg "octicon-file-directory"}}</span>
<span class="name">{{$dir}}</span> <span class="name">{{$dir}}</span>
<div class="right floated content"> <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> <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}}"> <div class="ui basic modal" id="adopt-unadopted-modal-{{$dirI}}">
{{svg "octicon-x" 16 "close inside"}} {{svg "octicon-x" 16 "close inside"}}
<div class="header"> <div class="header">
<span class="label">{{$.i18n.Tr "repo.adopt_preexisting"}}</span> <span class="label">{{$.i18n.Tr "repo.adopt_preexisting"}}</span>
</div> </div>
<div class="content"> <div class="content">
<p>{{$.i18n.Tr "repo.adopt_preexisting_content" $dir}}</p> <p>{{$.i18n.Tr "repo.adopt_preexisting_content" $dir}}</p>
</div> </div>
<form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted"> <form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="id" value="{{$dir}}"> <input type="hidden" name="id" value="{{$dir}}">
<input type="hidden" name="action" value="adopt"> <input type="hidden" name="action" value="adopt">
<input type="hidden" name="q" value="{{$.Keyword}}"> <input type="hidden" name="q" value="{{$.Keyword}}">
<input type="hidden" name="page" value="{{$.CurrentPage}}"> <input type="hidden" name="page" value="{{$.CurrentPage}}">
<div class="actions"> <div class="actions">
<div class="ui red basic inverted cancel button"> <div class="ui red basic inverted cancel button">
{{svg "octicon-trash" 16 "mr-2"}} {{svg "octicon-trash" 16 "mr-2"}}
{{$.i18n.Tr "modal.no"}} {{$.i18n.Tr "modal.no"}}
</div> </div>
<button class="ui green basic inverted ok button"> <button class="ui green basic inverted ok button">
{{svg "octicon-check" 16 "mr-2"}} {{svg "octicon-check" 16 "mr-2"}}
{{$.i18n.Tr "modal.yes"}} {{$.i18n.Tr "modal.yes"}}
</button> </button>
</div> </div>
</form> </form>
</div> </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> <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}}"> <div class="ui basic modal" id="delete-unadopted-modal-{{$dirI}}">
{{svg "octicon-x" 16 "close inside"}} {{svg "octicon-x" 16 "close inside"}}
<div class="header"> <div class="header">
<span class="label">{{$.i18n.Tr "repo.delete_preexisting"}}</span> <span class="label">{{$.i18n.Tr "repo.delete_preexisting"}}</span>
</div> </div>
<div class="content"> <div class="content">
<p>{{$.i18n.Tr "repo.delete_preexisting_content" $dir}}</p> <p>{{$.i18n.Tr "repo.delete_preexisting_content" $dir}}</p>
</div> </div>
<form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted"> <form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="id" value="{{$dir}}"> <input type="hidden" name="id" value="{{$dir}}">
<input type="hidden" name="action" value="delete"> <input type="hidden" name="action" value="delete">
<input type="hidden" name="q" value="{{$.Keyword}}"> <input type="hidden" name="q" value="{{$.Keyword}}">
<input type="hidden" name="page" value="{{$.CurrentPage}}"> <input type="hidden" name="page" value="{{$.CurrentPage}}">
<div class="actions"> <div class="actions">
<div class="ui red basic inverted cancel button"> <div class="ui red basic inverted cancel button">
{{svg "octicon-trash" 16 "mr-2"}} {{svg "octicon-trash" 16 "mr-2"}}
{{$.i18n.Tr "modal.no"}} {{$.i18n.Tr "modal.no"}}
</div> </div>
<button class="ui green basic inverted ok button"> <button class="ui green basic inverted ok button">
{{svg "octicon-check" 16 "mr-2"}} {{svg "octicon-check" 16 "mr-2"}}
{{$.i18n.Tr "modal.yes"}} {{$.i18n.Tr "modal.yes"}}
</button> </button>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{{end}} {{end}}
</div> </div>
{{template "base/paginate" .}} {{template "base/paginate" .}}
{{else}} {{else}}
<div class="item"> <div class="item">
{{.i18n.Tr "admin.repos.unadopted.no_more"}} {{.i18n.Tr "admin.repos.unadopted.no_more"}}
</div> </div>
{{template "base/paginate" .}} {{template "base/paginate" .}}
{{end}} {{end}}
</div> </div>
{{end}} {{end}}
</div> </div>
</div> </div>
{{template "base/footer" .}} {{template "base/footer" .}}

View File

@ -1,7 +1,7 @@
{{.Message}} {{.Message}}
<details> <details>
<summary>{{.Summary}}</summary> <summary>{{.Summary}}</summary>
<code> <code>
{{.Details | Str2html}} {{.Details | Str2html}}
</code> </code>
</details> </details>

View File

@ -18,7 +18,6 @@
</div> </div>
</form> </form>
<div class="ui divider"></div> <div class="ui divider"></div>
<div class="ui user list"> <div class="ui user list">
{{if .SearchResults}} {{if .SearchResults}}
<h3> <h3>

View File

@ -8,24 +8,24 @@
{{range .Users}} {{range .Users}}
<div class="item"> <div class="item">
{{avatar .}} {{avatar .}}
<div class="content"> <div class="content">
<span class="header"> <span class="header">
<a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}} <a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}
{{if .Visibility.IsPrivate}} {{if .Visibility.IsPrivate}}
<span class="ui basic label">{{$.i18n.Tr "repo.desc.private"}}</span> <span class="ui basic label">{{$.i18n.Tr "repo.desc.private"}}</span>
{{end}} {{end}}
</span> </span>
<div class="description"> <div class="description">
{{if .Location}} {{if .Location}}
{{svg "octicon-location"}} {{.Location}} {{svg "octicon-location"}} {{.Location}}
{{end}} {{end}}
{{if and .Website}} {{if and .Website}}
{{svg "octicon-link"}} {{svg "octicon-link"}}
<a href="{{.Website}}" rel="nofollow">{{.Website}}</a> <a href="{{.Website}}" rel="nofollow">{{.Website}}</a>
{{end}} {{end}}
{{svg "octicon-clock"}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}} {{svg "octicon-clock"}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
</div>
</div> </div>
</div>
</div> </div>
{{else}} {{else}}
<div>{{$.i18n.Tr "explore.org_no_results"}}</div> <div>{{$.i18n.Tr "explore.org_no_results"}}</div>

View File

@ -1,30 +1,30 @@
<div class="ui right floated secondary filter menu"> <div class="ui right floated secondary filter menu">
<!-- Sort --> <!-- Sort -->
<div class="ui right dropdown type jump item"> <div class="ui right dropdown type jump item">
<span class="text"> <span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}} {{.i18n.Tr "repo.issues.filter_sort"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
</span> </span>
<div class="menu"> <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 "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 "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 "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 "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 "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 "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 "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 "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 "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> <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> </div>
</div> </div>
<form class="ui form ignore-dirty" style="max-width: 90%"> <form class="ui form ignore-dirty" style="max-width: 90%">
<input type="hidden" name="tab" value="{{$.TabName}}"> <input type="hidden" name="tab" value="{{$.TabName}}">
<input type="hidden" name="sort" value="{{$.SortType}}"> <input type="hidden" name="sort" value="{{$.SortType}}">
<div class="ui fluid action input"> <div class="ui fluid action input">
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus> <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button> <button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
</div> </div>
</form> </form>
<div class="ui divider"></div> <div class="ui divider"></div>

View File

@ -18,8 +18,8 @@
<form class="ui form ignore-dirty" style="max-width: 90%"> <form class="ui form ignore-dirty" style="max-width: 90%">
<input type="hidden" name="tab" value="{{$.TabName}}"> <input type="hidden" name="tab" value="{{$.TabName}}">
<div class="ui fluid action input"> <div class="ui fluid action input">
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus> <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button> <button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
</div> </div>
</form> </form>
<div class="ui divider"></div> <div class="ui divider"></div>

View File

@ -8,19 +8,19 @@
{{range .Users}} {{range .Users}}
<div class="item"> <div class="item">
{{avatar .}} {{avatar .}}
<div class="content"> <div class="content">
<span class="header"><a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}</span> <span class="header"><a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}</span>
<div class="description"> <div class="description">
{{if .Location}} {{if .Location}}
{{svg "octicon-location"}} {{.Location}} {{svg "octicon-location"}} {{.Location}}
{{end}} {{end}}
{{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}} {{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}}
{{svg "octicon-mail"}} {{svg "octicon-mail"}}
<a href="mailto:{{.Email}}" rel="nofollow">{{.Email}}</a> <a href="mailto:{{.Email}}" rel="nofollow">{{.Email}}</a>
{{end}} {{end}}
{{svg "octicon-clock"}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}} {{svg "octicon-clock"}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
</div>
</div> </div>
</div>
</div> </div>
{{else}} {{else}}
<div>{{$.i18n.Tr "explore.user_no_results"}}</div> <div>{{$.i18n.Tr "explore.user_no_results"}}</div>

View File

@ -11,11 +11,11 @@
<body> <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> <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"> <div class="footer">
<p> <p>
--- ---
<br> <br>
<a href="{{.Link}}">View it on {{AppName}}</a>. <a href="{{.Link}}">View it on {{AppName}}</a>.
</p> </p>
</div> </div>
</body> </body>
</html> </html>

View File

@ -11,11 +11,11 @@
<body> <body>
<p>You have been added as a collaborator of repository: <code>{{.RepoName}}</code></p> <p>You have been added as a collaborator of repository: <code>{{.RepoName}}</code></p>
<div class="footer"> <div class="footer">
<p> <p>
--- ---
<br> <br>
<a href="{{.Link}}">View it on {{AppName}}</a>. <a href="{{.Link}}">View it on {{AppName}}</a>.
</p> </p>
</div> </div>
</body> </body>
</html> </html>

View File

@ -26,9 +26,9 @@
<div class="ui eleven wide column"> <div class="ui eleven wide column">
{{if .CanCreateOrgRepo}} {{if .CanCreateOrgRepo}}
<div class="text right"> <div class="text right">
{{if not .DisabledMirrors}} {{if not .DisabledMirrors}}
<a class="ui green button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{.i18n.Tr "new_migrate"}}</a> <a class="ui green button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{.i18n.Tr "new_migrate"}}</a>
{{end}} {{end}}
<a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{.i18n.Tr "new_repo"}}</a> <a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{.i18n.Tr "new_repo"}}</a>
</div> </div>
<div class="ui divider"></div> <div class="ui divider"></div>

View File

@ -1,4 +1,4 @@
<div class="ui top attached tabular menu"> <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 .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 .PageIsOrgTeamRepos}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/repositories">{{svg "octicon-repo"}} <strong>{{.Team.NumRepos}}</strong>&nbsp; {{$.i18n.Tr "org.lower_repositories"}}</a>
</div> </div>

View File

@ -1,6 +1,6 @@
{{template "base/head" .}} {{template "base/head" .}}
<div class="page-content install"> <div class="page-content install">
<div class="ui container"> <div class="ui container">
<div class="ui grid"> <div class="ui grid">
<div class="sixteen wide column content"> <div class="sixteen wide column content">
<div class="home"> <div class="home">

View File

@ -93,7 +93,7 @@
{{if gt .Activity.Code.CommitCountInAllBranches 0}} {{if gt .Activity.Code.CommitCountInAllBranches 0}}
<div class="ui attached segment horizontal segments"> <div class="ui attached segment horizontal segments">
<div class="ui attached segment text"> <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> <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") }} {{.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> <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>

View File

@ -19,7 +19,7 @@
</div> </div>
</div> </div>
</h4> </h4>
<div class="ui attached table unstackable segment"> <div class="ui attached table unstackable segment">
<div class="file-view code-view"> <div class="file-view code-view">
<table> <table>
<tbody> <tbody>
@ -31,5 +31,5 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
</div> </div>

View File

@ -25,11 +25,11 @@
</td> </td>
<td class="right aligned overflow-visible"> <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"> <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"}} {{svg "octicon-download"}}
<div class="menu"> <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}}.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> <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.DefaultBranch}}.tar.gz">{{svg "octicon-file-zip"}}&nbsp;TAR.GZ</a>
</div> </div>
</div> </div>
</td> </td>
</tr> </tr>

View File

@ -113,13 +113,13 @@
<span class="ui text">{{.i18n.Tr .Verification.Reason}}</span> <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> <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}} {{else}}
<i class="unlock icon"></i> <i class="unlock icon"></i>
{{.i18n.Tr .Verification.Reason}} {{.i18n.Tr .Verification.Reason}}
{{if .Verification.SigningKey}} {{if .Verification.SigningKey}}
{{if ne .Verification.SigningKey.KeyID ""}} {{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> <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}} {{end}}
{{end}} {{end}}
</div> </div>
{{end}} {{end}}
@ -130,9 +130,9 @@
{{if .NoteAuthor}} {{if .NoteAuthor}}
<a href="{{.NoteAuthor.HomeLink}}"> <a href="{{.NoteAuthor.HomeLink}}">
{{if .NoteAuthor.FullName}} {{if .NoteAuthor.FullName}}
<strong>{{.NoteAuthor.FullName}}</strong> <strong>{{.NoteAuthor.FullName}}</strong>
{{else}} {{else}}
<strong>{{.NoteCommit.Author.Name}}</strong> <strong>{{.NoteCommit.Author.Name}}</strong>
{{end}} {{end}}
</a> </a>
{{else}} {{else}}

View File

@ -28,7 +28,7 @@
</h4> </h4>
{{if and .Commits (gt .CommitCount 0)}} {{if and .Commits (gt .CommitCount 0)}}
{{template "repo/commits_list" .}} {{template "repo/commits_list" .}}
{{end}} {{end}}
{{template "base/paginate" .}} {{template "base/paginate" .}}

View File

@ -117,9 +117,9 @@
{{end}} {{end}}
{{else if and .PageIsComparePull (gt .CommitCount 0)}} {{else if and .PageIsComparePull (gt .CommitCount 0)}}
{{if .HasPullRequest}} {{if .HasPullRequest}}
<div class="ui segment"> <div class="ui segment">
{{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}} {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
</div> </div>
{{else}} {{else}}
{{if and $.IsSigned (not .Repository.IsArchived)}} {{if and $.IsSigned (not .Repository.IsArchived)}}
<div class="ui info message show-form-container"> <div class="ui info message show-form-container">

View File

@ -13,16 +13,12 @@
<a class="muted close px-3">{{svg "octicon-x" 16}}</a> <a class="muted close px-3">{{svg "octicon-x" 16}}</a>
</div> </div>
<div class="ui field"> <div class="ui field">
<textarea name="content" tabindex="0" rows="2" <textarea name="content" tabindex="0" rows="2" placeholder="{{$.i18n.Tr "repo.diff.review.placeholder"}}"></textarea>
placeholder="{{$.i18n.Tr "repo.diff.review.placeholder"}}"></textarea>
</div> </div>
<div class="ui divider"></div> <div class="ui divider"></div>
<button type="submit" name="type" value="approve" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }} <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>
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="comment" <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>
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> </form>
</div> </div>
</div> </div>

View File

@ -59,7 +59,7 @@
<div class="ui small basic modal" id="edit-empty-content-modal"> <div class="ui small basic modal" id="edit-empty-content-modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="file icon"></i> <i class="file icon"></i>
{{.i18n.Tr "repo.editor.commit_empty_file_header"}} {{.i18n.Tr "repo.editor.commit_empty_file_header"}}
</div> </div>
<div class="center content"> <div class="center content">
<p>{{.i18n.Tr "repo.editor.commit_empty_file_text"}}</p> <p>{{.i18n.Tr "repo.editor.commit_empty_file_text"}}</p>
@ -67,11 +67,11 @@
<div class="actions"> <div class="actions">
<div class="ui red basic cancel inverted button"> <div class="ui red basic cancel inverted button">
<i class="remove icon"></i> <i class="remove icon"></i>
{{.i18n.Tr "repo.editor.cancel"}} {{.i18n.Tr "repo.editor.cancel"}}
</div> </div>
<div class="ui green basic ok inverted button"> <div class="ui green basic ok inverted button">
<i class="save icon"></i> <i class="save icon"></i>
{{.i18n.Tr "repo.editor.commit_changes"}} {{.i18n.Tr "repo.editor.commit_changes"}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -32,7 +32,7 @@
{{end}} {{end}}
{{end}} {{end}}
{{if .IsArchived}} {{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}} {{end}}
</div> </div>
</div> </div>

View File

@ -4,7 +4,7 @@
</div> </div>
<div class="field"> <div class="field">
<div class="ui bottom active tab" data-tab="write"> <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 -}} {{- if .BodyQuery}}{{.BodyQuery}}{{else if .IssueTemplate}}{{.IssueTemplate}}{{else if .PullRequestTemplate}}{{.PullRequestTemplate}}{{else}}{{.content}}{{end -}}
</textarea> </textarea>
</div> </div>

View File

@ -55,4 +55,3 @@
</div> </div>
</div> </div>
</div> </div>

View File

@ -3,8 +3,7 @@
<div class="ui attached left aligned segment"> <div class="ui attached left aligned segment">
<!-- <h4 class="ui header"> <!-- <h4 class="ui header">
{{.i18n.Tr "repo.issues.label_templates.title"}} {{.i18n.Tr "repo.issues.label_templates.title"}}
<a target="_blank" rel="noopener noreferrer" <a target="_blank" rel="noopener noreferrer" href="https://discuss.gogs.io/t/how-to-use-predefined-label-templates/599">
href="https://discuss.gogs.io/t/how-to-use-predefined-label-templates/599">
<span class="octicon octicon-question"></span> <span class="octicon octicon-question"></span>
</a> </a>
</h4> --> </h4> -->

View File

@ -14,29 +14,29 @@
{{if not .Repository.IsArchived}} {{if not .Repository.IsArchived}}
<div class="column right aligned"> <div class="column right aligned">
{{if or .CanWriteIssues .CanWritePulls}} {{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}} {{end}}
<a class="ui primary button" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}?milestone={{.MilestoneID}}">{{.i18n.Tr "repo.issues.new"}}</a> <a class="ui primary button" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}?milestone={{.MilestoneID}}">{{.i18n.Tr "repo.issues.new"}}</a>
</div> </div>
{{end}} {{end}}
</div> </div>
<div class="ui one column stackable grid"> <div class="ui one column stackable grid">
<div class="column"> <div class="column">
{{ $closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix $.Lang }} {{ $closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix $.Lang }}
{{if .IsClosed}} {{if .IsClosed}}
{{svg "octicon-clock"}} {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}} {{svg "octicon-clock"}} {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}}
{{else}} {{else}}
{{svg "octicon-calendar"}} {{svg "octicon-calendar"}}
{{if .Milestone.DeadlineString}} {{if .Milestone.DeadlineString}}
<span {{if .IsOverdue}}class="overdue"{{end}}>{{.Milestone.DeadlineString}}</span> <span {{if .IsOverdue}}class="overdue"{{end}}>{{.Milestone.DeadlineString}}</span>
{{else}} {{else}}
{{$.i18n.Tr "repo.milestones.no_due_date"}} {{$.i18n.Tr "repo.milestones.no_due_date"}}
{{end}} {{end}}
{{end}} {{end}}
&nbsp; &nbsp;
<b>{{.i18n.Tr "repo.milestones.completeness" .Milestone.Completeness}}</b> <b>{{.i18n.Tr "repo.milestones.completeness" .Milestone.Completeness}}</b>
</div> </div>
</div> </div>
<div class="ui divider"></div> <div class="ui divider"></div>
<div id="issue-filters" class="ui stackable grid"> <div id="issue-filters" class="ui stackable grid">
<div class="six wide column"> <div class="six wide column">

View File

@ -14,7 +14,7 @@
{{template "base/alert" .}} {{template "base/alert" .}}
<div class="ui three column stackable grid"> <div class="ui three column stackable grid">
<div class="column"> <div class="column">
<div class="ui compact tiny menu"> <div class="ui compact tiny menu">
<a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/milestones?state=open&q={{$.Keyword}}"> <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/milestones?state=open&q={{$.Keyword}}">
{{svg "octicon-milestone" 16 "mr-3"}} {{svg "octicon-milestone" 16 "mr-3"}}

View File

@ -66,9 +66,9 @@
</div> </div>
<div id="comment-{{.Issue.ID}}" class="raw-content hide">{{.Issue.Content}}</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> <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}} {{if .Issue.Attachments}}
{{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Issue.Attachments "Content" .Issue.RenderedContent}} {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Issue.Attachments "Content" .Issue.RenderedContent}}
{{end}} {{end}}
</div> </div>
{{$reactions := .Issue.Reactions.GroupByType}} {{$reactions := .Issue.Reactions.GroupByType}}
{{if $reactions}} {{if $reactions}}

View File

@ -1,42 +1,42 @@
<div class="dropzone-attachments"> <div class="dropzone-attachments">
{{if .Attachments}} {{if .Attachments}}
<div class="ui clearing divider"></div> <div class="ui clearing divider"></div>
{{end}} {{end}}
<div class="ui middle aligned padded grid"> <div class="ui middle aligned padded grid">
{{$hasThumbnails := false}} {{$hasThumbnails := false}}
{{- range .Attachments -}} {{- range .Attachments -}}
<div class="twelve wide column" style="padding: 6px;"> <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}}'> <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'>
{{if FilenameIsImage .Name}} {{if FilenameIsImage .Name}}
{{if not (containGeneric $.Content .UUID)}} {{if not (containGeneric $.Content .UUID)}}
{{$hasThumbnails = true}} {{$hasThumbnails = true}}
{{end}} {{end}}
<span class="ui image">{{svg "octicon-file"}}</span> <span class="ui image">{{svg "octicon-file"}}</span>
{{else}} {{else}}
<span class="ui image">{{svg "octicon-desktop-download"}}</span> <span class="ui image">{{svg "octicon-desktop-download"}}</span>
{{end}} {{end}}
<span><strong>{{.Name}}</strong></span> <span><strong>{{.Name}}</strong></span>
</a> </a>
</div> </div>
<div class="four wide column" style="padding: 0px;"> <div class="four wide column" style="padding: 0px;">
<span class="ui text grey right">{{.Size | FileSize}}</span> <span class="ui text grey right">{{.Size | FileSize}}</span>
</div> </div>
{{end -}} {{end -}}
</div> </div>
{{if $hasThumbnails}} {{if $hasThumbnails}}
<div class="ui clearing divider"></div> <div class="ui clearing divider"></div>
<div class="ui small images thumbnails"> <div class="ui small images thumbnails">
{{- range .Attachments -}} {{- range .Attachments -}}
{{if FilenameIsImage .Name}} {{if FilenameIsImage .Name}}
{{if not (containGeneric $.Content .UUID)}} {{if not (containGeneric $.Content .UUID)}}
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}"> <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
<img class="ui image" src="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'> <img class="ui image" src="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'>
</a> </a>
{{end}} {{end}}
{{end}} {{end}}
{{end -}} {{end -}}
</div> </div>
{{end}} {{end}}
</div> </div>

View File

@ -3,13 +3,13 @@
{{ $createdStr:= TimeSinceUnix .CreatedUnix $.Lang }} {{ $createdStr:= TimeSinceUnix .CreatedUnix $.Lang }}
<!-- 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE_REF, 4 = COMMIT_REF, <!-- 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE_REF, 4 = COMMIT_REF,
5 = COMMENT_REF, 6 = PULL_REF, 7 = COMMENT_LABEL, 12 = START_TRACKING, 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, 13 = STOP_TRACKING, 14 = ADD_TIME_MANUAL, 16 = ADDED_DEADLINE, 17 = MODIFIED_DEADLINE,
18 = REMOVED_DEADLINE, 19 = ADD_DEPENDENCY, 20 = REMOVE_DEPENDENCY, 21 = CODE, 18 = REMOVED_DEADLINE, 19 = ADD_DEPENDENCY, 20 = REMOVE_DEPENDENCY, 21 = CODE,
22 = REVIEW, 23 = ISSUE_LOCKED, 24 = ISSUE_UNLOCKED, 25 = TARGET_BRANCH_CHANGED, 22 = REVIEW, 23 = ISSUE_LOCKED, 24 = ISSUE_UNLOCKED, 25 = TARGET_BRANCH_CHANGED,
26 = DELETE_TIME_MANUAL, 27 = REVIEW_REQUEST, 28 = MERGE_PULL_REQUEST, 26 = DELETE_TIME_MANUAL, 27 = REVIEW_REQUEST, 28 = MERGE_PULL_REQUEST,
29 = PULL_PUSH_EVENT, 30 = PROJECT_CHANGED, 31 = PROJECT_BOARD_CHANGED 29 = PULL_PUSH_EVENT, 30 = PROJECT_CHANGED, 31 = PROJECT_BOARD_CHANGED
32 = DISMISSED_REVIEW --> 32 = DISMISSED_REVIEW -->
{{if eq .Type 0}} {{if eq .Type 0}}
<div class="timeline-item comment" id="{{.HashTag}}"> <div class="timeline-item comment" id="{{.HashTag}}">
{{if .OriginalAuthor }} {{if .OriginalAuthor }}
@ -73,9 +73,9 @@
</div> </div>
<div id="comment-{{.ID}}" class="raw-content hide">{{.Content}}</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> <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}} {{if .Attachments}}
{{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments "Content" .RenderedContent}} {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments "Content" .RenderedContent}}
{{end}} {{end}}
</div> </div>
{{$reactions := .Reactions.GroupByType}} {{$reactions := .Reactions.GroupByType}}
{{if $reactions}} {{if $reactions}}

View File

@ -57,34 +57,34 @@
</span> </span>
{{end}} {{end}}
<span id="pull-desc-edit" style="display: none"> <span id="pull-desc-edit" style="display: none">
<div class="ui floating filter dropdown"> <div class="ui floating filter dropdown">
<div class="ui basic small button"> <div class="ui basic small button">
<span class="text">{{.i18n.Tr "repo.pulls.compare_compare"}}: {{$.HeadTarget}}</span> <span class="text">{{.i18n.Tr "repo.pulls.compare_compare"}}: {{$.HeadTarget}}</span>
</div> </div>
</div> </div>
{{svg "octicon-arrow-right"}} {{svg "octicon-arrow-right"}}
<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}"> <div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
<div class="ui basic small button"> <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> <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"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
</div> </div>
<div class="menu"> <div class="menu">
<div class="ui icon search input"> <div class="ui icon search input">
<i class="icon df ac jc m-0">{{svg "octicon-filter" 16}}</i> <i class="icon df ac jc m-0">{{svg "octicon-filter" 16}}</i>
<input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}..."> <input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
</div> </div>
<div class="scrolling menu" id="branch-select"> <div class="scrolling menu" id="branch-select">
{{range .Branches}} {{range .Branches}}
{{ $sameBase := ne $.BaseName $.HeadUserName }} {{ $sameBase := ne $.BaseName $.HeadUserName }}
{{ $differentBranch := ne . $.HeadBranch }} {{ $differentBranch := ne . $.HeadBranch }}
{{ if or $sameBase $differentBranch }} {{ if or $sameBase $differentBranch }}
<div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-branch="{{.}}">{{$.BaseName}}{{if $.HeadRepo}}/{{$.HeadRepo}}{{end}}:{{.}}</div> <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-branch="{{.}}">{{$.BaseName}}{{if $.HeadRepo}}/{{$.HeadRepo}}{{end}}:{{.}}</div>
{{ end }} {{ end }}
{{end}} {{end}}
</div> </div>
</div> </div>
</div> </div>
</span> </span>
{{end}} {{end}}
{{else}} {{else}}
{{ $createdStr:= TimeSinceUnix .Issue.CreatedUnix $.Lang }} {{ $createdStr:= TimeSinceUnix .Issue.CreatedUnix $.Lang }}

View File

@ -6,7 +6,7 @@
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<h3 class="ui top attached header"> <h3 class="ui top attached header">
{{.i18n.Tr "repo.migrate.migrate" .service.Title}} {{.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> </h3>
<div class="ui attached segment"> <div class="ui attached segment">
{{template "base/alert" .}} {{template "base/alert" .}}

View File

@ -6,7 +6,7 @@
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<h3 class="ui top attached header"> <h3 class="ui top attached header">
{{.i18n.Tr "repo.migrate.migrate" .service.Title}} {{.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> </h3>
<div class="ui attached segment"> <div class="ui attached segment">
{{template "base/alert" .}} {{template "base/alert" .}}

View File

@ -62,7 +62,7 @@
<label>{{.i18n.Tr "repo.migrate_items_releases" | Safe}}</label> <label>{{.i18n.Tr "repo.migrate_items_releases" | Safe}}</label>
</div> </div>
</div> </div>
--> -->
</div> </div>
<div class="ui divider"></div> <div class="ui divider"></div>

View File

@ -1,32 +1,32 @@
{{if $.LatestCommitStatus}} {{if $.LatestCommitStatus}}
{{if not $.Issue.PullRequest.HasMerged}} {{if not $.Issue.PullRequest.HasMerged}}
<div class="ui top attached header"> <div class="ui top attached header">
{{if eq .LatestCommitStatus.State "pending"}} {{if eq .LatestCommitStatus.State "pending"}}
{{$.i18n.Tr "repo.pulls.status_checking"}} {{$.i18n.Tr "repo.pulls.status_checking"}}
{{else if eq .LatestCommitStatus.State "success"}} {{else if eq .LatestCommitStatus.State "success"}}
{{$.i18n.Tr "repo.pulls.status_checks_success"}} {{$.i18n.Tr "repo.pulls.status_checks_success"}}
{{else if eq .LatestCommitStatus.State "warning"}} {{else if eq .LatestCommitStatus.State "warning"}}
{{$.i18n.Tr "repo.pulls.status_checks_warning"}} {{$.i18n.Tr "repo.pulls.status_checks_warning"}}
{{else if eq .LatestCommitStatus.State "failure"}} {{else if eq .LatestCommitStatus.State "failure"}}
{{$.i18n.Tr "repo.pulls.status_checks_failure"}} {{$.i18n.Tr "repo.pulls.status_checks_failure"}}
{{else if eq .LatestCommitStatus.State "error"}} {{else if eq .LatestCommitStatus.State "error"}}
{{$.i18n.Tr "repo.pulls.status_checks_error"}} {{$.i18n.Tr "repo.pulls.status_checks_error"}}
{{else}} {{else}}
{{$.i18n.Tr "repo.pulls.status_checking"}} {{$.i18n.Tr "repo.pulls.status_checking"}}
{{end}} {{end}}
</div> </div>
{{end}} {{end}}
{{range $.LatestCommitStatuses}} {{range $.LatestCommitStatuses}}
<div class="ui attached segment"> <div class="ui attached segment">
<span>{{template "repo/commit_status" .}}</span> <span>{{template "repo/commit_status" .}}</span>
<span class="ui">{{.Context}} <span class="text grey">{{.Description}}</span></span> <span class="ui">{{.Context}} <span class="text grey">{{.Description}}</span></span>
<div class="ui right"> <div class="ui right">
{{if $.is_context_required}} {{if $.is_context_required}}
{{if (call $.is_context_required .Context)}}<div class="ui label">{{$.i18n.Tr "repo.pulls.status_checks_requested"}}</div>{{end}} {{if (call $.is_context_required .Context)}}<div class="ui label">{{$.i18n.Tr "repo.pulls.status_checks_requested"}}</div>{{end}}
{{end}} {{end}}
<span class="ui">{{if .TargetURL}}<a href="{{.TargetURL}}">{{$.i18n.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span> <span class="ui">{{if .TargetURL}}<a href="{{.TargetURL}}">{{$.i18n.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span>
</div> </div>
</div> </div>
{{end}} {{end}}
{{end}} {{end}}

View File

@ -9,37 +9,37 @@
{{.i18n.Tr "repo.settings.archive.branchsettings_unavailable"}} {{.i18n.Tr "repo.settings.archive.branchsettings_unavailable"}}
</div> </div>
{{else}} {{else}}
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.i18n.Tr "repo.default_branch"}} {{.i18n.Tr "repo.default_branch"}}
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<p> <p>
{{.i18n.Tr "repo.settings.default_branch_desc"}} {{.i18n.Tr "repo.settings.default_branch_desc"}}
</p> </p>
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<input type="hidden" name="action" value="default_branch"> <input type="hidden" name="action" value="default_branch">
{{if not .Repository.IsEmpty}} {{if not .Repository.IsEmpty}}
<div class="required inline field"> <div class="required inline field">
<div class="ui dropdown selection" tabindex="0"> <div class="ui dropdown selection" tabindex="0">
<select name="branch"> <select name="branch">
<option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option> <option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
{{range .Branches}} {{range .Branches}}
<option value="{{.}}">{{.}}</option> <option value="{{.}}">{{.}}</option>
{{end}} {{end}}
</select>{{svg "octicon-triangle-down" 14 "dropdown icon"}} </select>{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="default text">{{.Repository.DefaultBranch}}</div> <div class="default text">{{.Repository.DefaultBranch}}</div>
<div class="menu transition hidden" tabindex="-1" style="display: block !important;"> <div class="menu transition hidden" tabindex="-1" style="display: block !important;">
{{range .Branches}} {{range .Branches}}
<div class="item" data-value="{{.}}">{{.}}</div> <div class="item" data-value="{{.}}">{{.}}</div>
{{end}} {{end}}
</div> </div>
</div> </div>
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button> <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
</div> </div>
{{end}} {{end}}
</form> </form>
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.i18n.Tr "repo.settings.protected_branch"}} {{.i18n.Tr "repo.settings.protected_branch"}}

View File

@ -19,12 +19,12 @@
<div class="ui key list"> <div class="ui key list">
{{range .Deploykeys}} {{range .Deploykeys}}
<div class="item"> <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}}"> <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
{{$.i18n.Tr "settings.delete_key"}} {{$.i18n.Tr "settings.delete_key"}}
</button> </button>
</div> </div>
<div class="left floated content"> <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> <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>
<div class="content"> <div class="content">

View File

@ -7,25 +7,25 @@
<input id="homeserver_url" name="homeserver_url" type="url" value="{{.MatrixHook.HomeserverURL}}" autofocus required> <input id="homeserver_url" name="homeserver_url" type="url" value="{{.MatrixHook.HomeserverURL}}" autofocus required>
</div> </div>
<div class="required field {{if .Err_Room}}error{{end}}"> <div class="required field {{if .Err_Room}}error{{end}}">
<label for="room_id">{{.i18n.Tr "repo.settings.matrix.room_id"}}</label> <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> <input id="room_id" name="room_id" type="text" value="{{.MatrixHook.Room}}" required>
</div> </div>
<div class="required field {{if .Err_AccessToken}}error{{end}}"> <div class="required field {{if .Err_AccessToken}}error{{end}}">
<label for="access_token">{{.i18n.Tr "repo.settings.matrix.access_token"}}</label> <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> <input id="access_token" name="access_token" type="text" value="{{.MatrixHook.AccessToken}}" required>
</div> </div>
<div class="field"> <div class="field">
<label>{{.i18n.Tr "repo.settings.matrix.message_type"}}</label> <label>{{.i18n.Tr "repo.settings.matrix.message_type"}}</label>
<div class="ui selection dropdown"> <div class="ui selection dropdown">
<input type="hidden" id="message_type" name="message_type" value="{{if .MatrixHook.MessageType}}{{.MatrixHook.MessageType}}{{else}}1{{end}}"> <input type="hidden" id="message_type" name="message_type" value="{{if .MatrixHook.MessageType}}{{.MatrixHook.MessageType}}{{else}}1{{end}}">
<div class="default text"></div> <div class="default text"></div>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu"> <div class="menu">
<div class="item" data-value="1">m.notice</div> <div class="item" data-value="1">m.notice</div>
<div class="item" data-value="2">m.text</div> <div class="item" data-value="2">m.text</div>
</div> </div>
</div> </div>
</div> </div>
{{template "repo/settings/webhook/settings" .}} {{template "repo/settings/webhook/settings" .}}
</form> </form>
{{end}} {{end}}

View File

@ -6,10 +6,10 @@
<label for="bot_token">{{.i18n.Tr "repo.settings.bot_token"}}</label> <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> <input id="bot_token" name="bot_token" type="text" value="{{.TelegramHook.BotToken}}" autofocus required>
</div> </div>
<div class="required field {{if .Err_ChatID}}error{{end}}"> <div class="required field {{if .Err_ChatID}}error{{end}}">
<label for="chat_id">{{.i18n.Tr "repo.settings.chat_id"}}</label> <label for="chat_id">{{.i18n.Tr "repo.settings.chat_id"}}</label>
<input id="chat_id" name="chat_id" type="text" value="{{.TelegramHook.ChatID}}" required> <input id="chat_id" name="chat_id" type="text" value="{{.TelegramHook.ChatID}}" required>
</div> </div>
{{template "repo/settings/webhook/settings" .}} {{template "repo/settings/webhook/settings" .}}
</form> </form>
{{end}} {{end}}

View File

@ -128,10 +128,10 @@
<script> <script>
function submitDeleteForm() { function submitDeleteForm() {
var message = prompt("{{.i18n.Tr "repo.delete_confirm_message"}}\n\n{{.i18n.Tr "repo.delete_commit_summary"}}", "Delete '{{.TreeName}}'"); var message = prompt("{{.i18n.Tr "repo.delete_confirm_message"}}\n\n{{.i18n.Tr "repo.delete_commit_summary"}}", "Delete '{{.TreeName}}'");
if (message != null) { if (message != null) {
$("#delete-message").val(message); $("#delete-message").val(message);
$("#delete-file-form").submit() $("#delete-file-form").submit()
} }
} }
</script> </script>

View File

@ -29,7 +29,7 @@
</h4> </h4>
{{if and .Commits (gt .CommitCount 0)}} {{if and .Commits (gt .CommitCount 0)}}
{{template "repo/commits_list" .}} {{template "repo/commits_list" .}}
{{end}} {{end}}
{{template "base/paginate" .}} {{template "base/paginate" .}}

View File

@ -48,8 +48,8 @@
<div class="desc issue-item-bottom-row df ac fw my-1"> <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}}"> <a class="index ml-0 mr-2" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
{{if eq $.listType "dashboard"}} {{if eq $.listType "dashboard"}}
{{.Repo.FullName}}#{{.Index}} {{.Repo.FullName}}#{{.Index}}
{{else}} {{else}}
#{{.Index}} #{{.Index}}
{{end}} {{end}}
</a> </a>

View File

@ -10,4 +10,3 @@
{{end}} {{end}}
</div> </div>
</div> </div>

View File

@ -17,7 +17,7 @@
<div class="inline field"> <div class="inline field">
<label></label> <label></label>
<button class="ui green button">{{.i18n.Tr "auth.verify"}}</button> <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>
</div> </div>
</form> </form>

View File

@ -76,56 +76,56 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="milestone list"> <div class="milestone list">
{{range .Milestones}} {{range .Milestones}}
<li class="item"> <li class="item">
<div class="ui label">{{.Repo.FullName}}</div> <div class="ui label">{{.Repo.FullName}}</div>
{{svg "octicon-milestone"}} <a href="{{.Repo.Link }}/milestone/{{.ID}}">{{.Name}}</a> {{svg "octicon-milestone"}} <a href="{{.Repo.Link }}/milestone/{{.ID}}">{{.Name}}</a>
<div class="ui right green progress" data-percent="{{.Completeness}}"> <div class="ui right green progress" data-percent="{{.Completeness}}">
<div class="bar" {{if not .Completeness}}style="background-color: transparent"{{end}}> <div class="bar" {{if not .Completeness}}style="background-color: transparent"{{end}}>
<div class="progress"></div> <div class="progress"></div>
</div> </div>
</div> </div>
<div class="meta"> <div class="meta">
{{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.Lang }} {{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.Lang }}
{{if .IsClosed}} {{if .IsClosed}}
{{svg "octicon-clock"}} {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}} {{svg "octicon-clock"}} {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}}
{{else}} {{else}}
{{svg "octicon-calendar"}} {{svg "octicon-calendar"}}
{{if .DeadlineString}} {{if .DeadlineString}}
<span {{if .IsOverdue}}class="overdue"{{end}}>{{.DeadlineString}}</span> <span {{if .IsOverdue}}class="overdue"{{end}}>{{.DeadlineString}}</span>
{{else}} {{else}}
{{$.i18n.Tr "repo.milestones.no_due_date"}} {{$.i18n.Tr "repo.milestones.no_due_date"}}
{{end}} {{end}}
{{end}} {{end}}
<span class="issue-stats"> <span class="issue-stats">
{{svg "octicon-issue-opened"}} {{$.i18n.Tr "repo.milestones.open_tab" .NumOpenIssues}} {{svg "octicon-issue-opened"}} {{$.i18n.Tr "repo.milestones.open_tab" .NumOpenIssues}}
{{svg "octicon-issue-closed"}} {{$.i18n.Tr "repo.milestones.close_tab" .NumClosedIssues}} {{svg "octicon-issue-closed"}} {{$.i18n.Tr "repo.milestones.close_tab" .NumClosedIssues}}
{{if .TotalTrackedTime}}{{svg "octicon-clock"}} {{.TotalTrackedTime|Sec2Time}}{{end}} {{if .TotalTrackedTime}}{{svg "octicon-clock"}} {{.TotalTrackedTime|Sec2Time}}{{end}}
</span> </span>
</div> </div>
{{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}} {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}}
<div class="ui right operate"> <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> <a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-pencil"}} {{$.i18n.Tr "repo.issues.label_edit"}}</a>
{{if .IsClosed}} {{if .IsClosed}}
<a href="{{$.Link}}/{{.ID}}/open" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-check"}} {{$.i18n.Tr "repo.milestones.open"}}</a> <a href="{{$.Link}}/{{.ID}}/open" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-check"}} {{$.i18n.Tr "repo.milestones.open"}}</a>
{{else}} {{else}}
<a href="{{$.Link}}/{{.ID}}/close" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-x"}} {{$.i18n.Tr "repo.milestones.close"}}</a> <a href="{{$.Link}}/{{.ID}}/close" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-x"}} {{$.i18n.Tr "repo.milestones.close"}}</a>
{{end}} {{end}}
<a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.i18n.Tr "repo.issues.label_delete"}}</a> <a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.i18n.Tr "repo.issues.label_delete"}}</a>
</div> </div>
{{end}} {{end}}
{{if .Content}} {{if .Content}}
<div class="content"> <div class="content">
{{.RenderedContent|Str2html}} {{.RenderedContent|Str2html}}
</div> </div>
{{end}} {{end}}
</li> </li>
{{end}} {{end}}
{{template "base/paginate" .}} {{template "base/paginate" .}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,134 +1,134 @@
<div class="page-content user notification" id="notification_div" data-params="{{.Page.GetParams}}"> <div class="page-content user notification" id="notification_div" data-params="{{.Page.GetParams}}">
<div class="ui container"> <div class="ui container">
<h1 class="ui dividing header">{{.i18n.Tr "notification.notifications"}}</h1> <h1 class="ui dividing header">{{.i18n.Tr "notification.notifications"}}</h1>
<div class="ui top attached tabular menu"> <div class="ui top attached tabular menu">
{{ $notificationUnreadCount := call .NotificationUnreadCount}} {{ $notificationUnreadCount := call .NotificationUnreadCount}}
<a href="{{AppSubUrl}}/notifications?q=unread" class="{{if eq .Status 1}}active{{end}} item"> <a href="{{AppSubUrl}}/notifications?q=unread" class="{{if eq .Status 1}}active{{end}} item">
{{.i18n.Tr "notification.unread"}} {{.i18n.Tr "notification.unread"}}
<div class="ui label {{if not $notificationUnreadCount}}hidden{{end}}">{{$notificationUnreadCount}}</div> <div class="ui label {{if not $notificationUnreadCount}}hidden{{end}}">{{$notificationUnreadCount}}</div>
</a> </a>
<a href="{{AppSubUrl}}/notifications?q=read" class="{{if eq .Status 2}}active{{end}} item"> <a href="{{AppSubUrl}}/notifications?q=read" class="{{if eq .Status 2}}active{{end}} item">
{{.i18n.Tr "notification.read"}} {{.i18n.Tr "notification.read"}}
</a> </a>
{{if and (eq .Status 1)}} {{if and (eq .Status 1)}}
<form action="{{AppSubUrl}}/notifications/purge" method="POST" style="margin-left: auto;"> <form action="{{AppSubUrl}}/notifications/purge" method="POST" style="margin-left: auto;">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<div class="{{if not $notificationUnreadCount}}hide{{end}}"> <div class="{{if not $notificationUnreadCount}}hide{{end}}">
<button class="ui mini button primary" title='{{$.i18n.Tr "notification.mark_all_as_read"}}'> <button class="ui mini button primary" title='{{$.i18n.Tr "notification.mark_all_as_read"}}'>
{{svg "octicon-checklist"}} {{svg "octicon-checklist"}}
</button> </button>
</div> </div>
</form> </form>
{{end}} {{end}}
</div> </div>
<div class="ui bottom attached active tab segment"> <div class="ui bottom attached active tab segment">
{{if eq (len .Notifications) 0}} {{if eq (len .Notifications) 0}}
{{if eq .Status 1}} {{if eq .Status 1}}
{{.i18n.Tr "notification.no_unread"}} {{.i18n.Tr "notification.no_unread"}}
{{else}} {{else}}
{{.i18n.Tr "notification.no_read"}} {{.i18n.Tr "notification.no_read"}}
{{end}} {{end}}
{{else}} {{else}}
<table class="ui unstackable striped very compact small selectable table" id="notification_table"> <table class="ui unstackable striped very compact small selectable table" id="notification_table">
<tbody> <tbody>
{{range $notification := .Notifications}} {{range $notification := .Notifications}}
{{$issue := .Issue}} {{$issue := .Issue}}
{{$repo := .Repository}} {{$repo := .Repository}}
{{$repoOwner := $repo.MustOwner}} {{$repoOwner := $repo.MustOwner}}
<tr id="notification_{{.ID}}"> <tr id="notification_{{.ID}}">
<td class="collapsing" data-href="{{.HTMLURL}}"> <td class="collapsing" data-href="{{.HTMLURL}}">
{{if eq .Status 3}} {{if eq .Status 3}}
<span class="blue">{{svg "octicon-pin"}}</span> <span class="blue">{{svg "octicon-pin"}}</span>
{{else if not $issue}} {{else if not $issue}}
<span class="gray">{{svg "octicon-repo"}}</span> <span class="gray">{{svg "octicon-repo"}}</span>
{{else if $issue.IsPull}} {{else if $issue.IsPull}}
{{if $issue.IsClosed}} {{if $issue.IsClosed}}
{{if $issue.GetPullRequest.HasMerged}} {{if $issue.GetPullRequest.HasMerged}}
<span class="purple">{{svg "octicon-git-merge"}}</span> <span class="purple">{{svg "octicon-git-merge"}}</span>
{{else}} {{else}}
<span class="red">{{svg "octicon-git-pull-request"}}</span> <span class="red">{{svg "octicon-git-pull-request"}}</span>
{{end}} {{end}}
{{else}} {{else}}
<span class="green">{{svg "octicon-git-pull-request"}}</span> <span class="green">{{svg "octicon-git-pull-request"}}</span>
{{end}} {{end}}
{{else}} {{else}}
{{if $issue.IsClosed}} {{if $issue.IsClosed}}
<span class="red">{{svg "octicon-issue-closed"}}</span> <span class="red">{{svg "octicon-issue-closed"}}</span>
{{else}} {{else}}
<span class="green">{{svg "octicon-issue-opened"}}</span> <span class="green">{{svg "octicon-issue-opened"}}</span>
{{end}} {{end}}
{{end}} {{end}}
</td> </td>
<td class="eleven wide" data-href="{{.HTMLURL}}"> <td class="eleven wide" data-href="{{.HTMLURL}}">
<a class="item" href="{{.HTMLURL}}"> <a class="item" href="{{.HTMLURL}}">
{{if $issue}} {{if $issue}}
#{{$issue.Index}} - {{$issue.Title}} #{{$issue.Index}} - {{$issue.Title}}
{{else}} {{else}}
{{$repo.FullName}} {{$repo.FullName}}
{{end}} {{end}}
</a> </a>
</td> </td>
<td data-href="{{AppSubUrl}}/{{$repoOwner.Name}}/{{$repo.Name}}"> <td data-href="{{AppSubUrl}}/{{$repoOwner.Name}}/{{$repo.Name}}">
<a class="item" href="{{AppSubUrl}}/{{$repoOwner.Name}}/{{$repo.Name}}"> <a class="item" href="{{AppSubUrl}}/{{$repoOwner.Name}}/{{$repo.Name}}">
{{$repoOwner.Name}}/{{$repo.Name}} {{$repoOwner.Name}}/{{$repo.Name}}
</a> </a>
</td> </td>
<td class="collapsing"> <td class="collapsing">
{{if ne .Status 3}} {{if ne .Status 3}}
<form action="{{AppSubUrl}}/notifications/status" method="POST"> <form action="{{AppSubUrl}}/notifications/status" method="POST">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="notification_id" value="{{.ID}}" /> <input type="hidden" name="notification_id" value="{{.ID}}" />
<input type="hidden" name="status" value="pinned" /> <input type="hidden" name="status" value="pinned" />
<button class="ui mini button" title='{{$.i18n.Tr "notification.pin"}}' <button class="ui mini button" title='{{$.i18n.Tr "notification.pin"}}'
data-url="{{AppSubUrl}}/notifications/status" data-url="{{AppSubUrl}}/notifications/status"
data-status="pinned" data-status="pinned"
data-page="{{$.Page.Paginater.Current}}" data-page="{{$.Page.Paginater.Current}}"
data-notification-id="{{.ID}}" data-notification-id="{{.ID}}"
data-q="{{$.Keyword}}"> data-q="{{$.Keyword}}">
{{svg "octicon-pin"}} {{svg "octicon-pin"}}
</button> </button>
</form> </form>
{{end}} {{end}}
</td> </td>
<td class="collapsing"> <td class="collapsing">
{{if or (eq .Status 1) (eq .Status 3)}} {{if or (eq .Status 1) (eq .Status 3)}}
<form action="{{AppSubUrl}}/notifications/status" method="POST"> <form action="{{AppSubUrl}}/notifications/status" method="POST">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="notification_id" value="{{.ID}}" /> <input type="hidden" name="notification_id" value="{{.ID}}" />
<input type="hidden" name="status" value="read" /> <input type="hidden" name="status" value="read" />
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" /> <input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" />
<button class="ui mini button" title='{{$.i18n.Tr "notification.mark_as_read"}}' <button class="ui mini button" title='{{$.i18n.Tr "notification.mark_as_read"}}'
data-url="{{AppSubUrl}}/notifications/status" data-url="{{AppSubUrl}}/notifications/status"
data-status="read" data-status="read"
data-page="{{$.Page.Paginater.Current}}" data-page="{{$.Page.Paginater.Current}}"
data-notification-id="{{.ID}}" data-notification-id="{{.ID}}"
data-q="{{$.Keyword}}"> data-q="{{$.Keyword}}">
{{svg "octicon-check"}} {{svg "octicon-check"}}
</button> </button>
</form> </form>
{{else if eq .Status 2}} {{else if eq .Status 2}}
<form action="{{AppSubUrl}}/notifications/status" method="POST"> <form action="{{AppSubUrl}}/notifications/status" method="POST">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="notification_id" value="{{.ID}}" /> <input type="hidden" name="notification_id" value="{{.ID}}" />
<input type="hidden" name="status" value="unread" /> <input type="hidden" name="status" value="unread" />
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" /> <input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" />
<button class="ui mini button" title='{{$.i18n.Tr "notification.mark_as_unread"}}' <button class="ui mini button" title='{{$.i18n.Tr "notification.mark_as_unread"}}'
data-url="{{AppSubUrl}}/notifications/status" data-url="{{AppSubUrl}}/notifications/status"
data-status="unread" data-status="unread"
data-page="{{$.Page.Paginater.Current}}" data-page="{{$.Page.Paginater.Current}}"
data-notification-id="{{.ID}}" data-notification-id="{{.ID}}"
data-q="{{$.Keyword}}"> data-q="{{$.Keyword}}">
{{svg "octicon-bell"}} {{svg "octicon-bell"}}
</button> </button>
</form> </form>
{{end}} {{end}}
</td> </td>
</tr> </tr>
{{end}} {{end}}
</tbody> </tbody>
</table> </table>
{{end}} {{end}}
</div> </div>
{{template "base/paginate" .}} {{template "base/paginate" .}}
</div> </div>
</div> </div>

View 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> <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"> <div {{if not .HasGPGError}}class="hide"{{end}} id="add-gpg-key-panel">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.i18n.Tr "settings.add_new_gpg_key"}} {{.i18n.Tr "settings.add_new_gpg_key"}}
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">

View File

@ -35,7 +35,7 @@
{{else}} {{else}}
<span class="icon">{{svg "octicon-file-directory"}}</span> <span class="icon">{{svg "octicon-file-directory"}}</span>
<span class="name">{{$.Owner.Name}}/{{$dir}}</span> <span class="name">{{$.Owner.Name}}/{{$dir}}</span>
<div class="right floated content"> <div class="right floated content">
{{if $.allowAdopt}} {{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> <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}}"> <div class="ui basic modal" id="adopt-unadopted-modal-{{$dirI}}">

View File

@ -6,16 +6,16 @@
{{if .TwofaEnrolled}} {{if .TwofaEnrolled}}
<div class="ui key list"> <div class="ui key list">
{{range .U2FRegistrations}} {{range .U2FRegistrations}}
<div class="item"> <div class="item">
<div class="right floated content"> <div class="right floated content">
<button class="ui red tiny button delete-button" id="delete-registration" data-url="{{$.Link}}/u2f/delete" data-id="{{.ID}}"> <button class="ui red tiny button delete-button" id="delete-registration" data-url="{{$.Link}}/u2f/delete" data-id="{{.ID}}">
{{$.i18n.Tr "settings.delete_key"}} {{$.i18n.Tr "settings.delete_key"}}
</button> </button>
</div> </div>
<div class="content"> <div class="content">
<strong>{{.Name}}</strong> <strong>{{.Name}}</strong>
</div> </div>
</div> </div>
{{end}} {{end}}
</div> </div>
<div class="ui form"> <div class="ui form">
@ -53,4 +53,3 @@
</div> </div>
{{template "base/delete_modal_actions" .}} {{template "base/delete_modal_actions" .}}
</div> </div>