summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/config.tmpl26
-rw-r--r--templates/repo/toolbar.tmpl2
-rw-r--r--templates/user/publickey.tmpl4
-rw-r--r--templates/user/setting_nav.tmpl1
-rw-r--r--templates/user/signin.tmpl5
-rw-r--r--templates/user/social.tmpl17
6 files changed, 48 insertions, 7 deletions
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 @@
<dl class="dl-horizontal admin-dl-horizontal">
<dt>Enabled</dt>
<dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
- <dt>Name</dt>
+ {{if .MailerEnabled}}<dt>Name</dt>
<dd>{{.Mailer.Name}}</dd>
<dt>Host</dt>
<dd>{{.Mailer.Host}}</dd>
<dt>User</dt>
- <dd>{{.Mailer.User}}</dd>
+ <dd>{{.Mailer.User}}</dd>{{end}}
+ </dl>
+ </div>
+ </div>
+
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ OAuth Configuration
+ </div>
+
+ <div class="panel-body">
+ <dl class="dl-horizontal admin-dl-horizontal">
+ <dt>Enabled</dt>
+ <dd><i class="fa fa{{if .OauthEnabled}}-check{{end}}-square-o"></i></dd>
+ {{if .OauthEnabled}}<dt>GitHub</dt>
+ <dd><i class="fa fa{{if .Oauther.GitHub}}-check{{end}}-square-o"></i></dd>
+ <dt>Google</dt>
+ <dd><i class="fa fa{{if .Oauther.Google}}-check{{end}}-square-o"></i></dd>
+ <dt>Tencent QQ</dt>
+ <dd><i class="fa fa{{if .Oauther.Tencent}}-check{{end}}-square-o"></i></dd>
+ <dt>Weibo</dt>
+ <dd><i class="fa fa{{if .Oauther.Weibo}}-check{{end}}-square-o"></i></dd>
+ <dd>{{.Mailer.User}}</dd>{{end}}
</dl>
</div>
</div>
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 @@
<li class="tmp">{{if .IsRepoToolbarIssuesList}}<a href="{{.RepoLink}}/issues/new"><button class="btn btn-primary btn-sm">New Issue</button>
</a>{{end}}</li>
{{end}}
- <li class="{{if .IsRepoToolbarReleases}}active{{end}}"><a href="{{.RepoLink}}/releases">{{if .Repository.NumReleases}}<span class="badge">{{.Repository.NumReleases}}</span> {{end}}Releases</a></li>
+ <li class="{{if .IsRepoToolbarReleases}}active{{end}}"><a href="{{.RepoLink}}/releases">{{if .Repository.NumTags}}<span class="badge">{{.Repository.NumTags}}</span> {{end}}Releases</a></li>
{{if .IsRepoToolbarReleases}}
<li class="tmp">{{if not .IsRepoReleaseNew}}<a href="{{.RepoLink}}/releases/new"><button class="btn btn-primary btn-sm">New Release</button></a>{{end}}</li>
{{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" .}}
<div id="user-setting-container" class="col-md-9">
<div id="ssh-keys">
- <h4>SSH Keys</h4>{{if .AddSSHKeySuccess}}
- <p class="alert alert-success">New SSH Key has been added !</p>{{else if .HasError}}<p class="alert alert-danger">{{.ErrorMsg}}</p>{{end}}
+ <h4>SSH Keys</h4>
+ {{template "base/alert" .}}
<ul id="ssh-keys-list" class="list-group">
<li class="list-group-item"><span class="name">SSH Key's name</span></li>
{{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 @@
<h4>Account Setting</h4>
<ul class="list-group">
<li class="list-group-item{{if .IsUserPageSetting}} list-group-item-success{{end}}"><a href="/user/setting">Account Profile</a></li>
+ <li class="list-group-item{{if .IsUserPageSettingSocial}} list-group-item-success{{end}}"><a href="/user/setting/social">Social Account</a></li>
<li class="list-group-item{{if .IsUserPageSettingPasswd}} list-group-item-success{{end}}"><a href="/user/setting/password">Password</a></li>
<!-- <li class="list-group-item{{if .IsUserPageSettingNotify}} list-group-item-success{{end}}"><a href="/user/setting/notification">Notifications</a></li> -->
<li class="list-group-item{{if .IsUserPageSettingSSH}} list-group-item-success{{end}}"><a href="/user/setting/ssh/">SSH Keys</a></li>
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 @@
</a>-->
{{if .OauthService.GitHub}}<a href="/user/login/github?next=/user/sign_up" class="btn btn-default"><i class="fa fa-github-square fa-2x"></i><span>GitHub</span></a>{{end}}
{{if .OauthService.Google}}<a href="/user/login/google?next=/user/sign_up" class="btn btn-default"><i class="fa fa-google-plus-square fa-2x"></i><span>Google</span></a>{{end}}
- {{if .OauthService.Tencent}}<a href="/user/login/twitter?next=/user/sign_up" class="btn btn-default"><i class="fa fa-twitter-square fa-2x"></i><span>Twitter</span></a>{{end}}
- {{if .OauthService.Tencent}}<a href="/user/login/qq?next=/user/sign_up" class="btn btn-default"><i class="fa fa-linux fa-2x"></i><span>QQ</span></a>{{end}}
+ {{if .OauthService.Twitter}}<a href="/user/login/twitter?next=/user/sign_up" class="btn btn-default"><i class="fa fa-twitter-square fa-2x"></i><span>Twitter</span></a>{{end}}
+ {{if .OauthService.Tencent}}<a href="/user/login/qq?next=/user/sign_up" class="btn btn-default"><i class="fa fa-linux fa-2x"></i><span>Tencent QQ</span></a>{{end}}
+ {{if .OauthService.Weibo}}<a href="/user/login/weibo?next=/user/sign_up" class="btn btn-default"><i class="fa fa-weibo fa-2x"></i><span>Weibo</span></a>{{end}}
</div>
{{end}}{{end}}
</form>
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" .}}
+<div id="body" class="container" data-page="user">
+ {{template "user/setting_nav" .}}
+ <div id="user-setting-container" class="col-md-9">
+ <div id="ssh-keys">
+ <h4>Social Account</h4>
+ {{template "base/alert" .}}
+ <ul id="ssh-keys-list" class="list-group">
+ {{range .Socials}}
+ <i class="fa {{Oauth2Icon .Type}} fa-3x"></i>
+ {{end}}
+ </ul>
+ </div>
+ </div>
+</div>
+{{template "base/footer" .}} \ No newline at end of file