File tree Expand file tree Collapse file tree 7 files changed +35
-5
lines changed
Expand file tree Collapse file tree 7 files changed +35
-5
lines changed Original file line number Diff line number Diff line change @@ -990,6 +990,17 @@ func (issue *Issue) GetLastEventLabel() string {
990990 return "repo.issues.opened_by"
991991}
992992
993+ // GetLastEventLabelFake returns the localization label for the current issue without providing a link in the username.
994+ func (issue * Issue ) GetLastEventLabelFake () string {
995+ if issue .IsClosed {
996+ if issue .IsPull && issue .PullRequest .HasMerged {
997+ return "repo.pulls.merged_by_fake"
998+ }
999+ return "repo.issues.closed_by_fake"
1000+ }
1001+ return "repo.issues.opened_by_fake"
1002+ }
1003+
9931004// NewIssueOptions represents the options of a new issue.
9941005type NewIssueOptions struct {
9951006 Repo * Repository
Original file line number Diff line number Diff line change @@ -770,8 +770,10 @@ issues.action_assignee = Assignee
770770issues.action_assignee_no_select = No assignee
771771issues.opened_by = opened %[1]s by <a href="%[2]s">%[3]s</a>
772772pulls.merged_by = merged %[1]s by <a href="%[2]s">%[3]s</a>
773+ pulls.merged_by_fake = merged %[1]s by %[2]s
773774issues.closed_by = closed %[1]s by <a href="%[2]s">%[3]s</a>
774775issues.opened_by_fake = opened %[1]s by %[2]s
776+ issues.closed_by_fake = closed %[1]s by %[2]s
775777issues.previous = Previous
776778issues.next = Next
777779issues.open_title = Open
Original file line number Diff line number Diff line change 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 .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.Name | Safe}}
226+ {{else}}
227+ {{$.i18n.Tr .GetLastEventLabelFake $timeStr .Poster.Name | Safe}}
228+ {{end}}
224229
225230 {{$tasks := .GetTasks}}
226231 {{if gt $tasks 0}}
Original file line number Diff line number Diff line change 203203 {{end}}
204204
205205 <p class="desc">
206- {{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}
206+ {{if gt .Poster.ID 0}}
207+ {{$.i18n.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.Name | Safe}}
208+ {{else}}
209+ {{$.i18n.Tr .GetLastEventLabelFake $timeStr .Poster.Name | Safe}}
210+ {{end}}
207211 {{$tasks := .GetTasks}}
208212 {{if gt $tasks 0}}
209213 {{$tasksDone := .GetTasksDone}}
Original file line number Diff line number Diff line change 112112 <span class="text"><strong>{{.i18n.Tr "repo.issues.num_participants" .NumParticipants}}</strong></span>
113113 <div>
114114 {{range .Participants}}
115- <a href="{{.HomeLink}}">
115+ <a {{if gt .ID 0}} href="{{.HomeLink}}"{{end}} >
116116 <img class="ui avatar image poping up" src="{{.RelAvatarLink}}" data-content="{{.DisplayName}}" data-position="top center" data-variation="small inverted">
117117 </a>
118118 {{end}}
Original file line number Diff line number Diff line change 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}}
Original file line number Diff line number Diff line change 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 .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.Name | Safe}}
91+ {{else}}
92+ {{$.i18n.Tr .GetLastEventLabelFake $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}}">
You can’t perform that action at this time.
0 commit comments