Add pending tag to pending review comments

Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
Jonas Franz 2018-05-11 14:02:40 +02:00
parent 61cc13499a
commit 36d6631957
No known key found for this signature in database
GPG Key ID: 506AEEBE80BEDECD
3 changed files with 5 additions and 10 deletions

View File

@ -760,6 +760,7 @@ issues.due_date_overdue = "Overdue"
issues.review.approve = "approved these changes %s" issues.review.approve = "approved these changes %s"
issues.review.comment = "left review comments %s" issues.review.comment = "left review comments %s"
issues.review.reject = "rejected these changes %s" issues.review.reject = "rejected these changes %s"
issues.review.pending = Pending
pulls.desc = Enable merge requests and code reviews. pulls.desc = Enable merge requests and code reviews.
pulls.new = New Pull Request pulls.new = New Pull Request

View File

@ -707,7 +707,7 @@ func ViewIssue(ctx *context.Context) {
return return
} }
} else if comment.Type == models.CommentTypeCode || comment.Type == models.CommentTypeReview { } else if comment.Type == models.CommentTypeCode || comment.Type == models.CommentTypeReview {
if err = comment.LoadReview(); err != nil { if err = comment.LoadReview(); err != nil && !models.IsErrReviewNotExist(err) {
ctx.ServerError("LoadReview", err) ctx.ServerError("LoadReview", err)
return return
} }

View File

@ -9,15 +9,9 @@
<div class="ui top attached header"> <div class="ui top attached header">
<span class="text grey"><a {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.Name}}</a> {{$.root.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> {{$.root.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
<div class="ui right actions"> <div class="ui right actions">
{{if gt .ShowTag 0}} {{if eq .Review.Type 0}}
<div class="item tag"> <div class="item warning tag">
{{if eq .ShowTag 1}} {{$.root.i18n.Tr "repo.issues.review.pending"}}
{{$.root.i18n.Tr "repo.issues.poster"}}
{{else if eq .ShowTag 2}}
{{$.root.i18n.Tr "repo.issues.collaborator"}}
{{else if eq .ShowTag 3}}
{{$.root.i18n.Tr "repo.issues.owner"}}
{{end}}
</div> </div>
{{end}} {{end}}
{{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID) }} {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID) }}