Skip to content

Commit

Permalink
Fix navbar on project view (go-gitea#17749)
Browse files Browse the repository at this point in the history
- Shows that the project nav item is active when you're viewing a project.
  • Loading branch information
Gusted authored and Stelios Malathouras committed Mar 28, 2022
1 parent 181f586 commit 73c07be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/web/repo/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ func EditProjectPost(ctx *context.Context) {

// ViewProject renders the project board for a project
func ViewProject(ctx *context.Context) {

project, err := models.GetProjectByID(ctx.ParamsInt64(":id"))
if err != nil {
if models.IsErrProjectNotExist(err) {
Expand Down Expand Up @@ -332,6 +331,7 @@ func ViewProject(ctx *context.Context) {
return
}

ctx.Data["IsProjectsPage"] = true
ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(unit.TypeProjects)
ctx.Data["Project"] = project
ctx.Data["Boards"] = boards
Expand Down

0 comments on commit 73c07be

Please sign in to comment.