本站源代码
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

52 rindas
2.2KB

  1. {{range .comments}}
  2. {{ $createdStr:= TimeSinceUnix .CreatedUnix $.root.Lang }}
  3. <div class="comment" id="{{.HashTag}}">
  4. <a class="avatar" {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>
  5. <img src="{{.Poster.RelAvatarLink}}">
  6. </a>
  7. <div class="content">
  8. <div class="ui top attached header">
  9. <span class="text grey"><a {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a> {{$.root.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
  10. <div class="ui right actions">
  11. {{if and .Review}}
  12. {{if eq .Review.Type 0}}
  13. <div class="item tag pending">
  14. {{$.root.i18n.Tr "repo.issues.review.pending"}}
  15. </div>
  16. {{else}}
  17. <div class="item tag">
  18. {{$.root.i18n.Tr "repo.issues.review.review"}}
  19. </div>
  20. {{end}}
  21. {{end}}
  22. {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID) }}
  23. {{if or $.root.Permission.IsAdmin (eq .Poster.ID $.root.SignedUserID)}}
  24. <div class="item action">
  25. <a class="edit-content" href="#"><i class="octicon octicon-pencil"></i></a>
  26. <a class="delete-comment" href="#" data-comment-id={{.HashTag}} data-url="{{$.root.RepoLink}}/comments/{{.ID}}/delete" data-locale="{{$.root.i18n.Tr "repo.issues.delete_comment_confirm"}}"><i class="octicon octicon-x"></i></a>
  27. </div>
  28. {{end}}
  29. </div>
  30. </div>
  31. <div class="ui attached segment">
  32. <div class="render-content markdown has-emoji">
  33. {{if .RenderedContent}}
  34. {{.RenderedContent|Str2html}}
  35. {{else}}
  36. <span class="no-content">{{$.root.i18n.Tr "repo.issues.no_content"}}</span>
  37. {{end}}
  38. </div>
  39. <div class="raw-content hide">{{.Content}}</div>
  40. <div class="edit-content-zone hide" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.root.RepoLink}}/comments/{{.ID}}" data-context="{{$.root.RepoLink}}"></div>
  41. </div>
  42. {{$reactions := .Reactions.GroupByType}}
  43. {{if $reactions}}
  44. <div class="ui attached segment reactions">
  45. {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID) "Reactions" $reactions }}
  46. </div>
  47. {{end}}
  48. </div>
  49. </div>
  50. {{end}}
上海开阖软件有限公司 沪ICP备12045867号-1