From 709a376c518d0cfde10bb911b32fd0ea82c67b52 Mon Sep 17 00:00:00 2001 From: JakobDev Date: Mon, 27 Nov 2023 06:59:56 +0100 Subject: [PATCH] Fix link to `Code` tab on wiki commits (#28041) Fixes https://codeberg.org/forgejo/forgejo/issues/1759 If you are bowing another branch than the default branch and click n the Code tab, it will take you to the root of the branch. The `BranchName` variable is also set when viewing a Wiki commit, so we also need to check if we are on a Wiki. --- templates/repo/header.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 895d18d6f..f30643540 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -142,7 +142,7 @@ {{if not (or .Repository.IsBeingCreated .Repository.IsBroken)}}