From 2019983e77895b4e41724bfa3297f5dd730ff37d Mon Sep 17 00:00:00 2001 From: "oscar.lofwenhamn" <44643697+oscarlofwenhamn@users.noreply.github.com> Date: Wed, 27 Mar 2019 23:22:39 +0100 Subject: Make "Ghost" not link to 404 page (#6410) * Make Ghost not link to 404 page * Make correct localization label show * Create and use GetLastEventLabelFake for when a Ghost user has made the action, thus not linking to a user profile * Add corresponding _fake entries to locale_en-US * Make Ghost avatar not link to 404 page * Make Ghost on milestone_issues not link to 404 page --- templates/repo/issue/list.tmpl | 7 ++++++- templates/repo/issue/milestone_issues.tmpl | 6 +++++- templates/repo/issue/view_content/sidebar.tmpl | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'templates/repo/issue') diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index deed251cda..78352acb50 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -220,7 +220,12 @@

{{ $timeStr := TimeSinceUnix .GetLastEventTimestamp $.Lang }} - {{$.i18n.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.Name | Safe}} + + {{if gt .Poster.ID 0}} + {{$.i18n.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.Name | Safe}} + {{else}} + {{$.i18n.Tr .GetLastEventLabelFake $timeStr .Poster.Name | Safe}} + {{end}} {{$tasks := .GetTasks}} {{if gt $tasks 0}} diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl index f2298dfdab..c81f6adf8b 100644 --- a/templates/repo/issue/milestone_issues.tmpl +++ b/templates/repo/issue/milestone_issues.tmpl @@ -203,7 +203,11 @@ {{end}}

- {{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}} + {{if gt .Poster.ID 0}} + {{$.i18n.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.Name | Safe}} + {{else}} + {{$.i18n.Tr .GetLastEventLabelFake $timeStr .Poster.Name | Safe}} + {{end}} {{$tasks := .GetTasks}} {{if gt $tasks 0}} {{$tasksDone := .GetTasksDone}} diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 47bf67f903..1f5481530a 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -112,7 +112,7 @@ {{.i18n.Tr "repo.issues.num_participants" .NumParticipants}}

{{range .Participants}} - + {{end}} -- cgit v1.2.3