diff --git a/routers/web/user/home.go b/routers/web/user/home.go
index 648269980472e..f338c525b4d3e 100644
--- a/routers/web/user/home.go
+++ b/routers/web/user/home.go
@@ -618,6 +618,12 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
shownIssues += int(issueCountByRepo[repoID])
}
}
+ if len(repoIDs) == 1 {
+ repo := showReposMap[repoIDs[0]]
+ if repo != nil {
+ ctx.Data["SingleRepoLink"] = repo.Link()
+ }
+ }
ctx.Data["IsShowClosed"] = isShowClosed
diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl
index b2f4863d6c926..b6dc002154b67 100644
--- a/templates/user/dashboard/issues.tmpl
+++ b/templates/user/dashboard/issues.tmpl
@@ -99,6 +99,9 @@
{{.locale.Tr "repo.issues.filter_sort.farduedate"}}
+ {{if .SingleRepoLink}}
+ {{.locale.Tr "repo.issues.new"}}
+ {{end}}
{{template "shared/issuelist" mergeinto . "listType" "dashboard"}}