ui: fix go to citation button url (#4597)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4597
Reviewed-by: Ghost <twenty-panda@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Bram Hagens <bram@bramh.me>
Co-committed-by: Bram Hagens <bram@bramh.me>
This commit is contained in:
Bram Hagens 2024-08-22 15:36:12 +00:00 committed by 0ko
parent b670f111ff
commit 7f62acb4d9
4 changed files with 85 additions and 3 deletions

View file

@ -781,7 +781,8 @@ func checkCitationFile(ctx *context.Context, entry *git.TreeEntry) {
if content, err := entry.Blob().GetBlobContent(setting.UI.MaxDisplayFileSize); err != nil {
log.Error("checkCitationFile: GetBlobContent: %v", err)
} else {
ctx.Data["CitiationExist"] = true
ctx.Data["CitationExist"] = true
ctx.Data["CitationFile"] = entry.Name()
ctx.PageData["citationFileContent"] = content
break
}