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

Closed
opened 2025-11-02 07:13:34 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @floemker on GitHub (Mar 17, 2021).

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>
Originally created by @floemker on GitHub (Mar 17, 2021). 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](https://user-images.githubusercontent.com/27075192/111552390-9b75ea00-8758-11eb-90b0-d39e78a10672.jpg) 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>
GiteaMirror added the type/bug label 2025-11-02 07:13:34 -06:00
Author
Owner

@noerw commented on GitHub (Mar 18, 2021):

@floemker thanks for the patch! It probably won't make it into 1.14.0-rc1 which is about to be released

@noerw commented on GitHub (Mar 18, 2021): @floemker thanks for the patch! It probably won't make it into 1.14.0-rc1 which is about to be released
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7015