Browse Source

Add pending tag to pending review comments

Signed-off-by: Jonas Franz <info@jonasfranz.software>
pull/3748/head
Jonas Franz 7 years ago
parent
commit
36d6631957
No known key found for this signature in database
GPG Key ID: 506AEEBE80BEDECD
  1. 1
      options/locale/locale_en-US.ini
  2. 2
      routers/repo/issue.go
  3. 12
      templates/repo/diff/comments.tmpl

1
options/locale/locale_en-US.ini

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

2
routers/repo/issue.go

@ -707,7 +707,7 @@ func ViewIssue(ctx *context.Context) {
return
}
} 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)
return
}

12
templates/repo/diff/comments.tmpl

@ -9,15 +9,9 @@
<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>
<div class="ui right actions">
{{if gt .ShowTag 0}}
<div class="item tag">
{{if eq .ShowTag 1}}
{{$.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}}
{{if eq .Review.Type 0}}
<div class="item warning tag">
{{$.root.i18n.Tr "repo.issues.review.pending"}}
</div>
{{end}}
{{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID) }}

Loading…
Cancel
Save