diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-13 18:12:07 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-13 18:12:07 -0400 |
commit | 4b9b8024ba59b5b84d92dca650761b35ebf6408a (patch) | |
tree | f40ed3d56e5df158168cb38a5f3b479c17903362 /templates | |
parent | 8c266f2df5848b230c6fbb0bc4578a8907edc725 (diff) | |
download | gitea-4b9b8024ba59b5b84d92dca650761b35ebf6408a.tar.gz gitea-4b9b8024ba59b5b84d92dca650761b35ebf6408a.zip |
Clean oauth code
Diffstat (limited to 'templates')
-rw-r--r-- | templates/user/dashboard.tmpl | 2 | ||||
-rw-r--r-- | templates/user/profile.tmpl | 8 | ||||
-rw-r--r-- | templates/user/signin.tmpl | 39 | ||||
-rw-r--r-- | templates/user/signup.tmpl | 6 |
4 files changed, 24 insertions, 31 deletions
diff --git a/templates/user/dashboard.tmpl b/templates/user/dashboard.tmpl index 167ae9abbd..bc363ddaab 100644 --- a/templates/user/dashboard.tmpl +++ b/templates/user/dashboard.tmpl @@ -44,7 +44,7 @@ <ul class="list-group">{{range .MyRepos}} <li class="list-group-item"><a href="/{{$.SignedUserName}}/{{.Name}}"> <!-- <span class="stars pull-right"><i class="fa fa-star"></i>{{.NumStars}}</span> --> - <i class="fa fa-book"></i>{{.Name}}</a> + <i class="fa fa-book"></i>{{.Name}}{{if .IsPrivate}} <span class="label label-default">Private</span>{{end}}</a> </li>{{end}} </ul> </div> diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index 255eb71cb2..a336bfb2fb 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -20,8 +20,8 @@ <li class="list-group-item"><i class="fa fa-link"></i><a target="_blank" href="{{.Owner.Website}}">{{.Owner.Website}}</a></li> {{end}} <li class="list-group-item"><i class="fa fa-clock-o"></i>Joined on {{DateFormat .Owner.Created "M d, Y"}}</li> - <hr> - <li class="list-group-item" style="padding-top: 5px;"> + <!-- <hr> --> + <!-- <li class="list-group-item" style="padding-top: 5px;"> <div class="profile-rel"> <div class="col-md-6 followers"> <strong>123</strong> @@ -33,7 +33,7 @@ </div> </div> </li> - <hr> + <hr> --> </ul> </div> </div> @@ -65,7 +65,7 @@ <li> <div class="meta pull-right"><!-- <i class="fa fa-star"></i> {{.NumStars}} --> <i class="fa fa-code-fork"></i> {{.NumForks}}</div> <h4> - <a href="/{{$owner.Name}}/{{.Name}}">{{.Name}}</a> + <a href="/{{$owner.Name}}/{{.Name}}">{{.Name}}{{if .IsPrivate}} <span class="label label-default">Private</span>{{end}}</a> </h4> <p class="desc">{{.Description}}</p> <div class="info">Last updated {{.Updated|TimeSince}}</div> diff --git a/templates/user/signin.tmpl b/templates/user/signin.tmpl index 4ea4173801..d402c29238 100644 --- a/templates/user/signin.tmpl +++ b/templates/user/signin.tmpl @@ -3,15 +3,11 @@ <div class="container" id="body" data-page="user-signin"> <form action="/user/login" method="post" class="form-horizontal card" id="login-card"> {{.CsrfTokenHtml}} - <h3>Log in - <!--{{if .OauthEnabled}} - <small class="pull-right">social login: - {{if .OauthGitHubEnabled}} - <a href="/user/login/github?next=/user/sign_up"><i class="fa fa-github-square fa-2x"></i></a> - {{end}} - </small> - {{end}}--> - </h3> + {{if .IsSocialLogin}} + <h3>Social login: 2nd step <small>associate account</small></h3> + {{else}} + <h3>Log in</h3> + {{end}} {{template "base/alert" .}} <div class="form-group {{if .Err_UserName}}has-error has-feedback{{end}}"> <label class="col-md-4 control-label">Username: </label> @@ -26,8 +22,8 @@ <input name="passwd" type="password" class="form-control" placeholder="Type your password" required="required"> </div> </div> - - <div class="form-group"> + + {{if not .IsSocialLogin}}<div class="form-group"> <div class="col-md-6 col-md-offset-4"> <div class="checkbox"> <label> @@ -36,16 +32,16 @@ </label> </div> </div> - </div> + </div>{{end}} <div class="form-group"> <div class="col-md-offset-4 col-md-6"> <button type="submit" class="btn btn-lg btn-primary">Log In</button> - <a href="/user/forget_password/">Forgot your password?</a> + {{if not .IsSocialLogin}}<a href="/user/forget_password/">Forgot your password?</a>{{end}} </div> </div> - <div class="form-group"> + {{if not .IsSocialLogin}}<div class="form-group"> <div class="col-md-offset-4 col-md-6"> <a href="/user/sign_up">Need an account? Sign up now.</a> </div> @@ -54,10 +50,7 @@ {{if .OauthEnabled}} <div class="form-group text-center" id="social-login"> <h4><span>or</span></h4> - <!--<a href="/user/login/github?next=/user/sign_up" class="btn btn-default google"> - <i class="fa fa-google-plus-square fa-2x"></i> - <span>Google</span> - </a> + <!-- <a href="/user/login/github?next=/user/sign_up" class="btn btn-default facebbok"> <i class="fa fa-facebook-square fa-2x"></i> <span>Facebook</span> @@ -66,12 +59,12 @@ <i class="fa fa-weibo fa-2x"></i> <span>Weibo</span> </a>--> - {{if .OauthGitHubEnabled}}<a href="/user/login/github?next=/user/sign_up" class="github btn btn-default"> - <i class="fa fa-github-square fa-2x"></i> - <span>GitHub</span> - </a>{{end}} + {{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}} </div> - {{end}} + {{end}}{{end}} </form> </div> {{template "base/footer" .}} diff --git a/templates/user/signup.tmpl b/templates/user/signup.tmpl index 6cf48a4d80..0295159943 100644 --- a/templates/user/signup.tmpl +++ b/templates/user/signup.tmpl @@ -1,15 +1,15 @@ {{template "base/head" .}} {{template "base/navbar" .}} -<div class="container" id="body" data-page="user-signup"> +<div class="container" id="body"> <form action="/user/sign_up" method="post" class="form-horizontal card" id="login-card"> {{.CsrfTokenHtml}} {{if .DisenableRegisteration}} Sorry, registeration has been disenabled, you can only get account from administrator. {{else}} {{if .IsSocialLogin}} - <h3>Social login: 2nd step <small>complete information</small></h3> + <h3>Social login: 2nd step <small>complete information</small></h3> {{else}} - <h3>Sign Up</h3> + <h3>Sign Up</h3> {{end}} {{template "base/alert" .}} <div class="form-group {{if .Err_UserName}}has-error has-feedback{{end}}"> |