diff --git a/server/handler/site.go b/server/handler/site.go index 2e431aa1..393abd95 100644 --- a/server/handler/site.go +++ b/server/handler/site.go @@ -41,15 +41,14 @@ func (s *SiteHandler) GetIndex(w http.ResponseWriter, r *http.Request) error { Feed []*commit.CommitRepo }{u, feed} return s.render(w, "user_feed.html", &data) - /* - u := s.sess.User(r) - data := struct { - User *user.User - }{u} - return s.render(w, "index.html", &data) - */ } +// GetLogin serves the account login page +func (s *SiteHandler) GetLogin(w http.ResponseWriter, r *http.Request) error { + return s.render(w, "login.html", struct{ User *user.User }{nil}) +} + +// GetUser serves the account settings page. func (s *SiteHandler) GetUser(w http.ResponseWriter, r *http.Request) error { u := s.sess.User(r) if u == nil { @@ -58,10 +57,6 @@ func (s *SiteHandler) GetUser(w http.ResponseWriter, r *http.Request) error { return s.render(w, "user_conf.html", struct{ User *user.User }{u}) } -func (s *SiteHandler) GetLogin(w http.ResponseWriter, r *http.Request) error { - return s.render(w, "login.html", struct{ User *user.User }{nil}) -} - func (s *SiteHandler) GetUsers(w http.ResponseWriter, r *http.Request) error { u := s.sess.User(r) if u == nil || u.Admin == false { @@ -159,6 +154,7 @@ func (s *SiteHandler) GetRepoAdmin(w http.ResponseWriter, r *http.Request) error return s.render(w, "repo_conf.html", &data) } +// GetRepos serves a page that lists all user repositories. func (s *SiteHandler) GetRepos(w http.ResponseWriter, r *http.Request) error { u := s.sess.User(r) if u == nil || u.Admin == false { diff --git a/server/template/html/repo_commit.html b/server/template/html/repo_commit.html index 28b53049..66837138 100644 --- a/server/template/html/repo_commit.html +++ b/server/template/html/repo_commit.html @@ -79,7 +79,7 @@ $(document).ready(function() { $(".timeago").timeago(); }); - {{$__amber_38 := .Build.Status}}{{$__amber_39 := __amber_eql $__amber_38 "Pending"}}{{$__amber_40 := .Build.Status}}{{$__amber_41 := __amber_eql $__amber_40 "Started"}}{{$__amber_42 := or $__amber_41 $__amber_39}}{{if $__amber_42}} + {{$__amber_38 := .Commit.Status}}{{$__amber_39 := __amber_eql $__amber_38 "Pending"}}{{$__amber_40 := .Commit.Status}}{{$__amber_41 := __amber_eql $__amber_40 "Started"}}{{$__amber_42 := or $__amber_41 $__amber_39}}{{if $__amber_42}}