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 {
990
990
return "repo.issues.opened_by"
991
991
}
992
992
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
+
993
1004
// NewIssueOptions represents the options of a new issue.
994
1005
type NewIssueOptions struct {
995
1006
Repo * Repository
Original file line number Diff line number Diff line change @@ -770,8 +770,10 @@ issues.action_assignee = Assignee
770
770
issues.action_assignee_no_select = No assignee
771
771
issues.opened_by = opened %[1]s by <a href="%[2]s">%[3]s</a>
772
772
pulls.merged_by = merged %[1]s by <a href="%[2]s">%[3]s</a>
773
+ pulls.merged_by_fake = merged %[1]s by %[2]s
773
774
issues.closed_by = closed %[1]s by <a href="%[2]s">%[3]s</a>
774
775
issues.opened_by_fake = opened %[1]s by %[2]s
776
+ issues.closed_by_fake = closed %[1]s by %[2]s
775
777
issues.previous = Previous
776
778
issues.next = Next
777
779
issues.open_title = Open
Original file line number Diff line number Diff line change 220
220
221
221
<p class="desc">
222
222
{{ $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}}
224
229
225
230
{{$tasks := .GetTasks}}
226
231
{{if gt $tasks 0}}
Original file line number Diff line number Diff line change 203
203
{{end}}
204
204
205
205
<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}}
207
211
{{$tasks := .GetTasks}}
208
212
{{if gt $tasks 0}}
209
213
{{$tasksDone := .GetTasksDone}}
Original file line number Diff line number Diff line change 112
112
<span class="text"><strong>{{.i18n.Tr "repo.issues.num_participants" .NumParticipants}}</strong></span>
113
113
<div>
114
114
{{range .Participants}}
115
- <a href="{{.HomeLink}}">
115
+ <a {{if gt .ID 0}} href="{{.HomeLink}}"{{end}} >
116
116
<img class="ui avatar image poping up" src="{{.RelAvatarLink}}" data-content="{{.DisplayName}}" data-position="top center" data-variation="small inverted">
117
117
</a>
118
118
{{end}}
Original file line number Diff line number Diff line change 7
7
<div class="ui fourteen wide column">
8
8
<div class="{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}push news{{end}}">
9
9
<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}}
11
15
{{if eq .GetOpType 1}}
12
16
{{$.i18n.Tr "action.create_repo" .GetRepoLink .ShortRepoPath | Str2html}}
13
17
{{else if eq .GetOpType 2}}
Original file line number Diff line number Diff line change 86
86
{{end}}
87
87
88
88
<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}}
90
94
{{if .Assignee}}
91
95
<a class="ui right assignee poping up" href="{{.Assignee.HomeLink}}" data-content="{{.Assignee.Name}}" data-variation="inverted" data-position="left center">
92
96
<img class="ui avatar image" src="{{.Assignee.RelAvatarLink}}">
You can’t perform that action at this time.
0 commit comments