Skip to content

Commit d43597f

Browse files
committed
add ctx
1 parent 8edc4de commit d43597f

File tree

7 files changed

+10
-2
lines changed

7 files changed

+10
-2
lines changed

routers/web/repo/compare.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,8 @@ func CompareDiff(ctx *context.Context) {
826826
ctx.Data["AllowMaintainerEdit"] = false
827827
}
828828

829+
ctx.Data["isShowFullName"] = setting.UI.DefaultShowFullName
830+
829831
ctx.HTML(http.StatusOK, tplCompare)
830832
}
831833

routers/web/repo/issue.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ func Issues(ctx *context.Context) {
455455
}
456456

457457
ctx.Data["CanWriteIssuesOrPulls"] = ctx.Repo.CanWriteIssuesOrPulls(isPullList)
458+
ctx.Data["isShowFullName"] = setting.UI.DefaultShowFullName
458459

459460
ctx.HTML(http.StatusOK, tplIssues)
460461
}
@@ -906,6 +907,7 @@ func NewIssue(ctx *context.Context) {
906907
}
907908

908909
ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWrite(unit.TypeIssues)
910+
ctx.Data["isShowFullName"] = setting.UI.DefaultShowFullName
909911

910912
ctx.HTML(http.StatusOK, tplIssueNew)
911913
}

routers/web/repo/milestone.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,5 +294,7 @@ func MilestoneIssuesAndPulls(ctx *context.Context) {
294294
ctx.Data["CanWriteIssues"] = ctx.Repo.CanWriteIssuesOrPulls(false)
295295
ctx.Data["CanWritePulls"] = ctx.Repo.CanWriteIssuesOrPulls(true)
296296

297+
ctx.Data["isShowFullName"] = setting.UI.DefaultShowFullName
298+
297299
ctx.HTML(http.StatusOK, tplMilestoneIssues)
298300
}

routers/web/repo/setting_protected_branch.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ func ProtectedBranchRules(ctx *context.Context) {
4040
return
4141
}
4242
ctx.Data["ProtectedBranches"] = rules
43+
ctx.Data["isShowFullName"] = setting.UI.DefaultShowFullName
4344

4445
ctx.HTML(http.StatusOK, tplBranches)
4546
}

routers/web/repo/tag.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ func Tags(ctx *context.Context) {
2424
if setTagsContext(ctx) != nil {
2525
return
2626
}
27+
ctx.Data["isShowFullName"] = setting.UI.DefaultShowFullName
2728

2829
ctx.HTML(http.StatusOK, tplTags)
2930
}

templates/repo/issue/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}">{{.locale.Tr "repo.issues.filter_poster_no_select"}}</a>
135135
{{range .Posters}}
136136
<a class="{{if eq $.PosterID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{.ID}}">
137-
{{avatar $.Context .}} {{.GetDisplayName}} <span class="gt-hidden">{{if $.isShowFullName}}{{.Name}}{{else}}{{.FullName}}{{end}}</span>
137+
{{avatar $.Context .}} {{.GetDisplayName}} <span class="gt-hidden">{{if $.isShowFullName}}{{.Name}}{{else}}{{$.isShowFullName}}{{.FullName}}{{end}}</span>
138138
</a>
139139
{{end}}
140140
</div>

templates/repo/issue/view_content/sidebar.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
{{avatar $.Context . 28 "gt-mr-3"}}
265265
{{.GetDisplayName}}
266266
</span>
267-
<span class="text gt-hidden">
267+
<span class="text" style="color: var(--color-text-light-2);">
268268
{{if $.isShowFullName}}{{.Name}}{{else}}{{.FullName}}{{end}}
269269
</span>
270270
</a>

0 commit comments

Comments
 (0)