#1419: 500 when visit a issue with issue/comments of deleted user

This commit is contained in:
Unknwon
2015-08-15 02:48:05 +08:00
parent e4d6b5d488
commit 30b428bf0e
5 changed files with 28 additions and 7 deletions

View File

@ -56,12 +56,12 @@
<!-- 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE_REF, 4 = COMMIT_REF, 5 = COMMENT_REF, 6 = PULL_REF -->
{{if eq .Type 0}}
<div class="comment">
<a class="avatar" href="{{.Poster.HomeLink}}">
<a class="avatar" {{if gt .Poster.Id 0}}href="{{.Poster.HomeLink}}"{{end}}>
<img src="{{.Poster.AvatarLink}}">
</a>
<div class="content">
<div class="ui top attached header">
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
<span class="text grey"><a {{if gt .Poster.Id 0}}href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
<div class="ui right actions">
{{if gt .ShowTag 0}}
<div class="tag">
@ -125,6 +125,7 @@
{{.CsrfTokenHtml}}
<input id="status" name="status" type="hidden">
<div class="text right">
{{if .IsIssueOwner}}
{{if .Issue.IsClosed}}
<div id="status-button" class="ui green basic button" data-status="{{.i18n.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.reopen_comment_issue"}}" data-status-val="reopen">
{{.i18n.Tr "repo.issues.reopen_issue"}}
@ -134,6 +135,7 @@
{{.i18n.Tr "repo.issues.close_issue"}}
</div>
{{end}}
{{end}}
<button class="ui green button">
{{.i18n.Tr "repo.issues.create_comment"}}
</button>