summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2021-11-22 10:57:05 +0000
committerGitHub <noreply@github.com>2021-11-22 18:57:05 +0800
commit8244cfb8eb97abced2705adbe33ae0173bb7499f (patch)
tree1f031b0c1a9dcd2b1146e710685df36642122c29
parent58ff86ed4d79e22a2a17bcd852ed4faffd73a069 (diff)
downloadgitea-8244cfb8eb97abced2705adbe33ae0173bb7499f.tar.gz
gitea-8244cfb8eb97abced2705adbe33ae0173bb7499f.zip
Fix navbar on project view (#17749)
- Shows that the project nav item is active when you're viewing a project.
-rw-r--r--routers/web/repo/projects.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/projects.go b/routers/web/repo/projects.go
index 437da14d45..bea9b7e419 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