removed reference to Build in commit template
This commit is contained in:
parent
d0dd308523
commit
88ee774d8d
3 changed files with 9 additions and 13 deletions
|
@ -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 {
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
$(document).ready(function() {
|
||||
$(".timeago").timeago();
|
||||
});
|
||||
</script>{{$__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}}
|
||||
</script>{{$__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}}
|
||||
<script>
|
||||
var ws = new WebSocket((window.location.protocol=='http:'?'ws':'wss')+'://'+window.location.host+'/feed?token={{.Channel}}');
|
||||
ws.onmessage = function (e) {
|
||||
|
|
|
@ -50,7 +50,7 @@ block append scripts
|
|||
$(".timeago").timeago();
|
||||
});
|
||||
|
||||
if Build.Status == "Started" || Build.Status == "Pending"
|
||||
if Commit.Status == "Started" || Commit.Status == "Pending"
|
||||
script
|
||||
var ws = new WebSocket((window.location.protocol=='http:'?'ws':'wss')+'://'+window.location.host+'/feed?token=#{Channel}');
|
||||
ws.onmessage = function (e) {
|
||||
|
|
Loading…
Reference in a new issue