Skip to content

Commit f8e5ee7

Browse files
author
Oscar Löfwenhamn
committed
Make Ghost not link to 404 page
1 parent 03e4db4 commit f8e5ee7

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

templates/repo/issue/list.tmpl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,12 @@
220220

221221
<p class="desc">
222222
{{ $timeStr := TimeSinceUnix .GetLastEventTimestamp $.Lang }}
223-
{{$.i18n.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.Name | Safe}}
223+
224+
{{if gt .Poster.ID 0}}
225+
{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}
226+
{{else}}
227+
{{$.i18n.Tr "repo.issues.opened_by_fake" $timeStr .Poster.Name | Safe}}
228+
{{end}}
224229

225230
{{$tasks := .GetTasks}}
226231
{{if gt $tasks 0}}

templates/user/dashboard/feeds.tmpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
<div class="ui fourteen wide column">
88
<div class="{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}push news{{end}}">
99
<p>
10-
<a href="{{AppSubUrl}}/{{.GetActUserName}}" title="{{.GetActFullName}}">{{.ShortActUserName}}</a>
10+
{{if gt .ActUser.ID 0}}
11+
<a href="{{AppSubUrl}}/{{.GetActUserName}}" title="{{.GetActFullName}}">{{.ShortActUserName}}</a>
12+
{{else}}
13+
{{.ShortActUserName}}
14+
{{end}}
1115
{{if eq .GetOpType 1}}
1216
{{$.i18n.Tr "action.create_repo" .GetRepoLink .ShortRepoPath | Str2html}}
1317
{{else if eq .GetOpType 2}}

templates/user/dashboard/issues.tmpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@
8686
{{end}}
8787

8888
<p class="desc">
89-
{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}
89+
{{if gt .Poster.ID 0}}
90+
{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}
91+
{{else}}
92+
{{$.i18n.Tr "repo.issues.opened_by_fake" $timeStr .Poster.Name | Safe}}
93+
{{end}}
9094
{{if .Assignee}}
9195
<a class="ui right assignee poping up" href="{{.Assignee.HomeLink}}" data-content="{{.Assignee.Name}}" data-variation="inverted" data-position="left center">
9296
<img class="ui avatar image" src="{{.Assignee.RelAvatarLink}}">

0 commit comments

Comments
 (0)