Skip to content

Commit 80da646

Browse files
committed
add homelink into context data
1 parent d8da967 commit 80da646

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

routers/web/org/projects.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ func EditProject(ctx *context.Context) {
249249
ctx.Data["title"] = p.Title
250250
ctx.Data["content"] = p.Description
251251
ctx.Data["redirect"] = ctx.FormString("redirect")
252+
ctx.Data["HomeLink"] = ctx.ContextUser.HomeLink()
252253

253254
ctx.HTML(http.StatusOK, tplProjectsNew)
254255
}

templates/projects/new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<div class="ui divider"></div>
5151
<div class="ui left">
5252
{{if .PageIsEditProjects}}
53-
<a class="ui cancel button" href="{{AppSubUrl}}/{{.Org.Name}}/-/projects{{if eq .redirect "project"}}/{{.projectID}}{{end}}">
53+
<a class="ui cancel button" href="{{$.HomeLink}}/-/projects{{if eq .redirect "project"}}/{{.projectID}}{{end}}">
5454
{{.locale.Tr "repo.milestones.cancel"}}
5555
</a>
5656
<button class="ui primary button">

0 commit comments

Comments
 (0)