diff options
author | silverwind <me@silverwind.io> | 2021-04-11 05:46:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-10 23:46:37 -0400 |
commit | d848098f60f78e6b4a72ae7f769fd66399a8ba82 (patch) | |
tree | ee6e769196f546c8a0c7d85c82eecccd0bf67e1e /templates/admin | |
parent | 0c77e0791c079ea8c01e03f636f22a0ff7e9d22b (diff) | |
download | gitea-d848098f60f78e6b4a72ae7f769fd66399a8ba82.tar.gz gitea-d848098f60f78e6b4a72ae7f769fd66399a8ba82.zip |
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>
Diffstat (limited to 'templates/admin')
-rw-r--r-- | templates/admin/auth/edit.tmpl | 10 | ||||
-rw-r--r-- | templates/admin/auth/new.tmpl | 4 | ||||
-rw-r--r-- | templates/admin/auth/source/ldap.tmpl | 4 | ||||
-rw-r--r-- | templates/admin/auth/source/oauth.tmpl | 6 | ||||
-rw-r--r-- | templates/admin/base/search.tmpl | 4 | ||||
-rw-r--r-- | templates/admin/repo/list.tmpl | 2 | ||||
-rw-r--r-- | templates/admin/repo/unadopted.tmpl | 180 |
7 files changed, 105 insertions, 105 deletions
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index da1ea42a74..e14c3be761 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -96,8 +96,8 @@ <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"> @@ -215,9 +215,9 @@ <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}}"> diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index c252f7d3f2..36a5d2c632 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -119,8 +119,8 @@ <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> diff --git a/templates/admin/auth/source/ldap.tmpl b/templates/admin/auth/source/ldap.tmpl index dbadd31f14..584538f53b 100644 --- a/templates/admin/auth/source/ldap.tmpl +++ b/templates/admin/auth/source/ldap.tmpl @@ -68,8 +68,8 @@ <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"> diff --git a/templates/admin/auth/source/oauth.tmpl b/templates/admin/auth/source/oauth.tmpl index 1489ab8394..787e29873d 100644 --- a/templates/admin/auth/source/oauth.tmpl +++ b/templates/admin/auth/source/oauth.tmpl @@ -21,9 +21,9 @@ <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}}"> diff --git a/templates/admin/base/search.tmpl b/templates/admin/base/search.tmpl index 8a7af53da5..e4e7e2d462 100644 --- a/templates/admin/base/search.tmpl +++ b/templates/admin/base/search.tmpl @@ -17,7 +17,7 @@ </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> diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl index aff30ab510..dbd1ad6921 100644 --- a/templates/admin/repo/list.tmpl +++ b/templates/admin/repo/list.tmpl @@ -7,7 +7,7 @@ {{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}}) <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" .}} diff --git a/templates/admin/repo/unadopted.tmpl b/templates/admin/repo/unadopted.tmpl index 481d77dfd2..b1f172720a 100644 --- a/templates/admin/repo/unadopted.tmpl +++ b/templates/admin/repo/unadopted.tmpl @@ -5,98 +5,98 @@ {{template "base/alert" .}} <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" .}} |