diff options
author | Unknwon <u@gogs.io> | 2015-08-15 02:48:05 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-15 02:48:05 +0800 |
commit | 30b428bf0eabb9f6cd73894d776502e1b7e351b7 (patch) | |
tree | c7e51f33011d5813374f9d90c6e4c5fef3f79cbb /templates/repo | |
parent | e4d6b5d488981d78417e9c85eda8226ebb8b7e37 (diff) | |
download | gitea-30b428bf0eabb9f6cd73894d776502e1b7e351b7.tar.gz gitea-30b428bf0eabb9f6cd73894d776502e1b7e351b7.zip |
#1419: 500 when visit a issue with issue/comments of deleted user
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/issue/view_content.tmpl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index d368027591..fc84d101bc 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -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> |