From 60ae59c784a36bb2abc01d4aa78b9f4f377a7778 Mon Sep 17 00:00:00 2001 From: Gusted Date: Sun, 21 Nov 2021 22:07:51 +0100 Subject: [PATCH] Fix navbar on project view - Shows that the project nav item is active when you're viewing a project. --- routers/web/repo/projects.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/repo/projects.go b/routers/web/repo/projects.go index 437da14d45dc..bea9b7e4191e 100644 --- a/routers/web/repo/projects.go +++ b/routers/web/repo/projects.go @@ -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) { @@ -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