From d2b53dd43b3bc9719985033bc92b76abb9515b4d Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 13 Apr 2014 21:00:12 -0400 Subject: Add weibo oauth --- templates/admin/config.tmpl | 26 ++++++++++++++++++++++++-- templates/repo/toolbar.tmpl | 2 +- templates/user/publickey.tmpl | 4 ++-- templates/user/setting_nav.tmpl | 1 + templates/user/signin.tmpl | 5 +++-- templates/user/social.tmpl | 17 +++++++++++++++++ 6 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 templates/user/social.tmpl (limited to 'templates') diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 31cfb77bad..757a800c20 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -88,12 +88,34 @@
Enabled
-
Name
+ {{if .MailerEnabled}}
Name
{{.Mailer.Name}}
Host
{{.Mailer.Host}}
User
-
{{.Mailer.User}}
+
{{.Mailer.User}}
{{end}} +
+ + + +
+
+ OAuth Configuration +
+ +
+
+
Enabled
+
+ {{if .OauthEnabled}}
GitHub
+
+
Google
+
+
Tencent QQ
+
+
Weibo
+
+
{{.Mailer.User}}
{{end}}
diff --git a/templates/repo/toolbar.tmpl b/templates/repo/toolbar.tmpl index 9c137e5179..bde5bc29e1 100644 --- a/templates/repo/toolbar.tmpl +++ b/templates/repo/toolbar.tmpl @@ -13,7 +13,7 @@
  • {{if .IsRepoToolbarIssuesList}} {{end}}
  • {{end}} -
  • {{if .Repository.NumReleases}}{{.Repository.NumReleases}} {{end}}Releases
  • +
  • {{if .Repository.NumTags}}{{.Repository.NumTags}} {{end}}Releases
  • {{if .IsRepoToolbarReleases}}
  • {{if not .IsRepoReleaseNew}}{{end}}
  • {{end}} diff --git a/templates/user/publickey.tmpl b/templates/user/publickey.tmpl index ecdeb035d2..29cfd8f0eb 100644 --- a/templates/user/publickey.tmpl +++ b/templates/user/publickey.tmpl @@ -4,8 +4,8 @@ {{template "user/setting_nav" .}}
    -

    SSH Keys

    {{if .AddSSHKeySuccess}} -

    New SSH Key has been added !

    {{else if .HasError}}

    {{.ErrorMsg}}

    {{end}} +

    SSH Keys

    + {{template "base/alert" .}}
    • SSH Key's name
    • {{range .Keys}} diff --git a/templates/user/setting_nav.tmpl b/templates/user/setting_nav.tmpl index c0f2ae03dd..9c7ae5208f 100644 --- a/templates/user/setting_nav.tmpl +++ b/templates/user/setting_nav.tmpl @@ -2,6 +2,7 @@

      Account Setting

      • Account Profile
      • +
      • Social Account
      • Password
      • SSH Keys
      • diff --git a/templates/user/signin.tmpl b/templates/user/signin.tmpl index d402c29238..955c82f430 100644 --- a/templates/user/signin.tmpl +++ b/templates/user/signin.tmpl @@ -61,8 +61,9 @@ --> {{if .OauthService.GitHub}}GitHub{{end}} {{if .OauthService.Google}}Google{{end}} - {{if .OauthService.Tencent}}Twitter{{end}} - {{if .OauthService.Tencent}}QQ{{end}} + {{if .OauthService.Twitter}}Twitter{{end}} + {{if .OauthService.Tencent}}Tencent QQ{{end}} + {{if .OauthService.Weibo}}Weibo{{end}}
    {{end}}{{end}} diff --git a/templates/user/social.tmpl b/templates/user/social.tmpl new file mode 100644 index 0000000000..f0b1132385 --- /dev/null +++ b/templates/user/social.tmpl @@ -0,0 +1,17 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +
    + {{template "user/setting_nav" .}} +
    +
    +

    Social Account

    + {{template "base/alert" .}} +
      + {{range .Socials}} + + {{end}} +
    +
    +
    +
    +{{template "base/footer" .}} \ No newline at end of file -- cgit v1.2.3