diff options
author | Willem van Dreumel <willemvd@users.noreply.github.com> | 2017-05-01 15:26:53 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-05-01 21:26:53 +0800 |
commit | 950f2e207413551b868252a1bced6ce9263d16d4 (patch) | |
tree | b01a330af11c7f8b9e2d1461685d9afb2ae9e485 /templates/user/auth | |
parent | 2368bbb6727ea5497743c0fdade723b49693cb4c (diff) | |
download | gitea-950f2e207413551b868252a1bced6ce9263d16d4.tar.gz gitea-950f2e207413551b868252a1bced6ce9263d16d4.zip |
Additional OAuth2 providers (#1010)
* add google+
* sort signin oauth2 providers based on the name so order is always the same
* update auth tip for google+
* add gitlab provider
* add bitbucket provider (and some go fmt)
* add twitter provider
* add facebook provider
* add dropbox provider
* add openid connect provider incl. new format of tips section in "Add New Source"
* lower the amount of disk storage for each session to prevent issues while building cross platform (and disk overflow)
* imports according to goimport and code style
* make it possible to set custom urls to gitlab and github provider (only these could have a different host)
* split up oauth2 into multiple files
* small typo in comment
* fix indention
* fix indentation
* fix new line before external import
* fix layout of signin part
* update "broken" dependency
Diffstat (limited to 'templates/user/auth')
-rw-r--r-- | templates/user/auth/link_account.tmpl | 2 | ||||
-rw-r--r-- | templates/user/auth/signin_inner.tmpl | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/templates/user/auth/link_account.tmpl b/templates/user/auth/link_account.tmpl index 5dc54ca5a4..73aafd6feb 100644 --- a/templates/user/auth/link_account.tmpl +++ b/templates/user/auth/link_account.tmpl @@ -8,6 +8,8 @@ </div> </div> </div> +<div class="ui user signin container icon"> {{template "user/auth/signin_inner" .}} +</div> {{template "user/auth/signup_inner" .}} {{template "base/footer" .}} diff --git a/templates/user/auth/signin_inner.tmpl b/templates/user/auth/signin_inner.tmpl index c89f2f358d..0dfd6c7f16 100644 --- a/templates/user/auth/signin_inner.tmpl +++ b/templates/user/auth/signin_inner.tmpl @@ -38,11 +38,14 @@ </div> {{end}} - {{if .OAuth2Providers}} + {{if and .OrderedOAuth2Names .OAuth2Providers}} <div class="ui attached segment"> <div class="oauth2 center"> <div> - <p>{{.i18n.Tr "sign_in_with"}}</p>{{range $key, $value := .OAuth2Providers}}<a href="{{AppSubUrl}}/user/oauth2/{{$key}}"><img alt="{{$value.DisplayName}}" title="{{$value.DisplayName}}" src="{{AppSubUrl}}{{$value.Image}}"></a>{{end}} + <p>{{.i18n.Tr "sign_in_with"}}</p>{{range $key := .OrderedOAuth2Names}} + {{$provider := index $.OAuth2Providers $key}} + <a href="{{AppSubUrl}}/user/oauth2/{{$key}}"><img alt="{{$provider.DisplayName}}{{if eq $provider.Name "openidConnect"}} ({{$key}}){{end}}" title="{{$provider.DisplayName}}{{if eq $provider.Name "openidConnect"}} ({{$key}}){{end}}" class="{{$provider.Name}}" src="{{AppSubUrl}}{{$provider.Image}}"></a> + {{end}} </div> </div> </div> |