| @@ -653,8 +653,9 @@ func (repo *Repository) getReviewersPrivate(e Engine, doerID, posterID int64) (u | |||||
| users = make([]*User, 0, 20) | users = make([]*User, 0, 20) | ||||
| if err = e. | if err = e. | ||||
| SQL("SELECT * FROM `user` WHERE id in (SELECT user_id FROM `access` WHERE repo_id = ? AND mode >= ? AND user_id NOT IN ( ?, ?)) ORDER BY name", | |||||
| repo.ID, AccessModeRead, | |||||
| SQL("SELECT * FROM `user` WHERE id in (SELECT user_id FROM `access` WHERE repo_id = ? AND mode >= ? "+ | |||||
| " UNION SELECT owner_id FROM `repository` WHERE id = ?) AND id NOT IN ( ?, ?) ORDER BY name", | |||||
| repo.ID, AccessModeWrite, repo.ID, | |||||
| doerID, posterID). | doerID, posterID). | ||||
| Find(&users); err != nil { | Find(&users); err != nil { | ||||
| return nil, err | return nil, err | ||||
| @@ -668,11 +669,14 @@ func (repo *Repository) getReviewersPublic(e Engine, doerID, posterID int64) (_ | |||||
| users := make([]*User, 0) | users := make([]*User, 0) | ||||
| const SQLCmd = "SELECT * FROM `user` WHERE id IN ( " + | const SQLCmd = "SELECT * FROM `user` WHERE id IN ( " + | ||||
| "SELECT user_id FROM `access` WHERE repo_id = ? AND mode >= ? AND user_id NOT IN ( ?, ?) ) ORDER BY name " | |||||
| "SELECT user_id FROM `access` WHERE repo_id = ? AND mode >= ? " + | |||||
| " UNION" + | |||||
| " SELECT owner_id FROM `repository` WHERE id = ?)" + | |||||
| " AND id NOT IN ( ?, ?) ORDER BY name " | |||||
| if err = e. | if err = e. | ||||
| SQL(SQLCmd, | SQL(SQLCmd, | ||||
| repo.ID, AccessModeWrite, doerID, posterID). | |||||
| repo.ID, AccessModeWrite, repo.ID, doerID, posterID). | |||||
| Find(&users); err != nil { | Find(&users); err != nil { | ||||
| return nil, err | return nil, err | ||||
| } | } | ||||
| @@ -19,8 +19,8 @@ | |||||
| {{if .IsSigned}} | {{if .IsSigned}} | ||||
| <div class=" item edge"> | <div class=" item edge"> | ||||
| <div class="dropdown-menu"> | <div class="dropdown-menu"> | ||||
| <a class=" item" href="/dashboard"> | |||||
| <span > {{.i18n.Tr "index"}}   <i class="dropdown icon"></i></span> | |||||
| <a class=" item lfpd" href="/dashboard" > | |||||
| {{.i18n.Tr "index"}} <i class="dropdown icon mglf" ></i> | |||||
| </a> | </a> | ||||
| <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | ||||
| @@ -49,8 +49,8 @@ | |||||
| {{else if .IsLandingPageHome}} | {{else if .IsLandingPageHome}} | ||||
| <div class="item edge"> | <div class="item edge"> | ||||
| <div class="dropdown-menu"> | <div class="dropdown-menu"> | ||||
| <a class=" item" href="/user/login"> | |||||
| <span > {{.i18n.Tr "home"}}   <i class="dropdown icon"></i></span> | |||||
| <a class=" item lfpd" href="/user/login"> | |||||
| {{.i18n.Tr "home"}} <i class="dropdown icon mglf"></i> | |||||
| </a> | </a> | ||||
| <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | ||||
| @@ -19,8 +19,8 @@ | |||||
| {{if .IsSigned}} | {{if .IsSigned}} | ||||
| <div class="item edge" > | <div class="item edge" > | ||||
| <div class="dropdown-menu"> | <div class="dropdown-menu"> | ||||
| <a class=" item" href="/dashboard"> | |||||
| <span > {{.i18n.Tr "index"}}   <i class="dropdown icon"></i></span> | |||||
| <a class=" item lfpd" href="/dashboard"> | |||||
| {{.i18n.Tr "index"}} <i class="dropdown icon mglf"></i> | |||||
| </a> | </a> | ||||
| <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | ||||
| @@ -48,8 +48,8 @@ | |||||
| {{else if .IsLandingPageHome}} | {{else if .IsLandingPageHome}} | ||||
| <div class="item edge" > | <div class="item edge" > | ||||
| <div class="dropdown-menu"> | <div class="dropdown-menu"> | ||||
| <a class=" item" href="/user/login"> | |||||
| <span > {{.i18n.Tr "home"}}   <i class="dropdown icon"></i></span> | |||||
| <a class=" item lfpd" href="/user/login"> | |||||
| {{.i18n.Tr "home"}} <i class="dropdown icon mglf"></i> | |||||
| </a> | </a> | ||||
| <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | ||||
| @@ -11,8 +11,8 @@ | |||||
| {{if .IsSigned}} | {{if .IsSigned}} | ||||
| <div class="item edge" > | <div class="item edge" > | ||||
| <div class="dropdown-menu"> | <div class="dropdown-menu"> | ||||
| <a class=" item" href="/dashboard"> | |||||
| <span > {{.i18n.Tr "index"}}   <i class="dropdown icon"></i></span> | |||||
| <a class=" item lfpd" href="/dashboard"> | |||||
| {{.i18n.Tr "index"}} <i class="dropdown icon mglf"></i> | |||||
| </a> | </a> | ||||
| <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | ||||
| @@ -40,8 +40,8 @@ | |||||
| {{else if .IsLandingPageHome}} | {{else if .IsLandingPageHome}} | ||||
| <div class="item edge" > | <div class="item edge" > | ||||
| <div class="dropdown-menu"> | <div class="dropdown-menu"> | ||||
| <a class=" item" href="/user/login"> | |||||
| <span > {{.i18n.Tr "home"}}   <i class="dropdown icon"></i></span> | |||||
| <a class=" item lfpd" href="/user/login"> | |||||
| {{.i18n.Tr "home"}} <i class="dropdown icon mglf"></i> | |||||
| </a> | </a> | ||||
| <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | ||||
| @@ -20,8 +20,8 @@ | |||||
| <div class=" item edge" > | <div class=" item edge" > | ||||
| <div class="dropdown-menu"> | <div class="dropdown-menu"> | ||||
| <a class=" item" href="/dashboard"> | |||||
| <span > {{.i18n.Tr "index"}}   <i class="dropdown icon"></i></span> | |||||
| <a class=" item lfpd" href="/dashboard"> | |||||
| {{.i18n.Tr "index"}} <i class="dropdown icon mglf"></i> | |||||
| </a> | </a> | ||||
| <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | ||||
| @@ -51,7 +51,7 @@ | |||||
| <div class="item edge"> | <div class="item edge"> | ||||
| <div class="dropdown-menu"> | <div class="dropdown-menu"> | ||||
| <a class=" item" href="/user/login"> | <a class=" item" href="/user/login"> | ||||
| <span > {{.i18n.Tr "home"}}   <i class="dropdown icon"></i></span> | |||||
| {{.i18n.Tr "home"}} <i class="dropdown icon mglf"></i> | |||||
| </a> | </a> | ||||
| <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | ||||
| @@ -116,16 +116,15 @@ | |||||
| <!-- <a class='{{if and (ne .TabName "datasets") (ne .TabName "activity") (ne .TabName "following") (ne .TabName "followers") (ne .TabName "stars")}}active{{end}} item' href="{{.Owner.HomeLink}}"> | <!-- <a class='{{if and (ne .TabName "datasets") (ne .TabName "activity") (ne .TabName "following") (ne .TabName "followers") (ne .TabName "stars")}}active{{end}} item' href="{{.Owner.HomeLink}}"> | ||||
| {{svg "octicon-repo" 16}} {{.i18n.Tr "user.repositories"}} | {{svg "octicon-repo" 16}} {{.i18n.Tr "user.repositories"}} | ||||
| </a> --> | </a> --> | ||||
| <a class='{{if eq .TabName "activity"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=activity"> | |||||
| {{svg "octicon-rss" 16}} {{.i18n.Tr "user.activity"}} | |||||
| </a> | |||||
| <a class='{{if eq .TabName "repository" }}active{{end}} item' href="{{.Owner.HomeLink}}?tab=repository"> | <a class='{{if eq .TabName "repository" }}active{{end}} item' href="{{.Owner.HomeLink}}?tab=repository"> | ||||
| {{svg "octicon-repo" 16}} {{.i18n.Tr "user.repositories"}} | {{svg "octicon-repo" 16}} {{.i18n.Tr "user.repositories"}} | ||||
| </a> | </a> | ||||
| <a class='{{if eq .TabName "datasets"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=datasets"> | <a class='{{if eq .TabName "datasets"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=datasets"> | ||||
| {{svg "octicon-inbox" 16}} {{.i18n.Tr "user.datasets"}} | {{svg "octicon-inbox" 16}} {{.i18n.Tr "user.datasets"}} | ||||
| </a> | </a> | ||||
| <a class='{{if eq .TabName "activity"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=activity"> | |||||
| {{svg "octicon-rss" 16}} {{.i18n.Tr "user.activity"}} | |||||
| </a> | |||||
| <a class='{{if eq .TabName "stars"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=stars"> | <a class='{{if eq .TabName "stars"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=stars"> | ||||
| {{svg "octicon-star" 16}} {{.i18n.Tr "user.starred"}} | {{svg "octicon-star" 16}} {{.i18n.Tr "user.starred"}} | ||||
| <div class="ui label">{{.Owner.NumStars}}</div> | <div class="ui label">{{.Owner.NumStars}}</div> | ||||
| @@ -571,3 +571,10 @@ display: block; | |||||
| padding-left:0 !important; | padding-left:0 !important; | ||||
| padding-right:0 !important; | padding-right:0 !important; | ||||
| } | } | ||||
| .lfpd { | |||||
| padding-left:0 !important; | |||||
| padding-right: 0 !important; | |||||
| } | |||||
| .mglf{ | |||||
| margin-left:0.5em !important; | |||||
| } | |||||