Skip to content

Labels in the Issues sidebar don't include the RepoLink #15021

@floemker

Description

@floemker

Gitea version 1.14.0+dev-836-g91ee3be

Assigned labels which are shown directly in the sidebar of the Issue page
from a repository don't include the RepoLink.

LabelLink

The following patch seems to fix that:

diff --git a/templates/repo/issue/labels/labels_sidebar.tmpl b/templates/repo/issue/labels/labels_sidebar.tmpl
index 1d61ecf3d..77f9a5035 100644
--- a/templates/repo/issue/labels/labels_sidebar.tmpl
+++ b/templates/repo/issue/labels/labels_sidebar.tmpl
@@ -2,10 +2,10 @@
        <span class="no-select item {{if .ctx.HasSelectedLabel}}hide{{end}}">{{.ctx.i18n.Tr "repo.issues.new.no_label"}}</span>
        <span class="labels-list">
                {{range .ctx.Labels}}
-                       {{template "repo/issue/labels/label" dict "root" $ "label" .}}
+                       {{template "repo/issue/labels/label" dict "root" $.root "label" .}}
                {{end}}
                {{range .ctx.OrgLabels}}
-                       {{template "repo/issue/labels/label" dict "root" $ "label" .}}
+                       {{template "repo/issue/labels/label" dict "root" $.root "label" .}}
                {{end}}
        </span>
 </div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions