gitea源码

issueicon.tmpl 794B

123456789101112131415161718192021222324252627
  1. {{/* the logic should be kept the same as getIssueIcon/getIssueColor in JS code */}}
  2. {{- if .IsPull -}}
  3. {{- if not .PullRequest -}}
  4. No PullRequest
  5. {{- else -}}
  6. {{- if .IsClosed -}}
  7. {{- if .PullRequest.HasMerged -}}
  8. {{- svg "octicon-git-merge" 16 "text purple" -}}
  9. {{- else -}}
  10. {{- svg "octicon-git-pull-request-closed" 16 "text red" -}}
  11. {{- end -}}
  12. {{- else -}}
  13. {{- if .PullRequest.IsWorkInProgress ctx -}}
  14. {{- svg "octicon-git-pull-request-draft" 16 "text grey" -}}
  15. {{- else -}}
  16. {{- svg "octicon-git-pull-request" 16 "text green" -}}
  17. {{- end -}}
  18. {{- end -}}
  19. {{- end -}}
  20. {{- else -}}
  21. {{- if .IsClosed -}}
  22. {{- svg "octicon-issue-closed" 16 "text red" -}}
  23. {{- else -}}
  24. {{- svg "octicon-issue-opened" 16 "text green" -}}
  25. {{- end -}}
  26. {{- end -}}