Backport #20577 There are several places in templates/repo/issue/view_content/comments.tmpl where links are made to Posters or Assignees who are Ghosts or have IDs <0. Fix #20559 Signed-off-by: Andrew Thornton <art27@cantab.net> Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
e3697efbb0
commit
2f0a1eb0d5
@ -32,9 +32,7 @@
|
||||
</div>
|
||||
<div class="ui attached segment members">
|
||||
{{range .Members}}
|
||||
<a href="{{.HomeLink}}" title="{{.Name}}">
|
||||
{{avatar .}}
|
||||
</a>
|
||||
{{template "shared/user/avatarlink" .}}
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui bottom attached header">
|
||||
|
@ -5,9 +5,7 @@
|
||||
{{if .OriginalAuthor }}
|
||||
<span class="avatar"><img src="{{AppSubUrl}}/assets/img/avatar_default.png"></span>
|
||||
{{else}}
|
||||
<a class="avatar" {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>
|
||||
{{avatar .Poster}}
|
||||
</a>
|
||||
{{template "shared/user/avatarlink" .Poster}}
|
||||
{{end}}
|
||||
<div class="content comment-container">
|
||||
<div class="ui top attached header comment-header df ac sb">
|
||||
@ -27,9 +25,7 @@
|
||||
</span>
|
||||
{{else}}
|
||||
<span class="text grey">
|
||||
<a {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>
|
||||
{{.Poster.GetDisplayName}}
|
||||
</a>
|
||||
{{template "shared/user/namelink" .Poster}}
|
||||
{{$.root.i18n.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}}
|
||||
</span>
|
||||
{{end}}
|
||||
|
@ -8,9 +8,7 @@
|
||||
<div class="twelve wide column">
|
||||
<div class="ui comments">
|
||||
<div class="comment">
|
||||
<a class="avatar" href="{{.SignedUser.HomeLink}}">
|
||||
{{avatar .SignedUser}}
|
||||
</a>
|
||||
{{template "shared/user/avatarlink" .SignedUser}}
|
||||
<div class="ui segment content">
|
||||
<div class="field">
|
||||
<input name="title" id="issue_title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{if .TitleQuery}}{{.TitleQuery}}{{else if .IssueTemplateTitle}}{{.IssueTemplateTitle}}{{else}}{{.title}}{{end}}" tabindex="3" autofocus required maxlength="255" autocomplete="off">
|
||||
|
File diff suppressed because it is too large
Load Diff
3
templates/shared/user/authorlink.tmpl
Normal file
3
templates/shared/user/authorlink.tmpl
Normal file
@ -0,0 +1,3 @@
|
||||
<a class="author"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>
|
||||
{{.GetDisplayName}}
|
||||
</a>
|
3
templates/shared/user/avatarlink.tmpl
Normal file
3
templates/shared/user/avatarlink.tmpl
Normal file
@ -0,0 +1,3 @@
|
||||
<a class="avatar"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>
|
||||
{{avatar .}}
|
||||
</a>
|
3
templates/shared/user/namelink.tmpl
Normal file
3
templates/shared/user/namelink.tmpl
Normal file
@ -0,0 +1,3 @@
|
||||
<a{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>
|
||||
{{.GetDisplayName}}
|
||||
</a>
|
Loading…
x
Reference in New Issue
Block a user