You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

notification.tmpl 2.0 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {{template "base/head" .}}
  2. <div class="user notification">
  3. <div class="ui container">
  4. <h1 class="ui header">{{.i18n.Tr "notification.notifications"}}</h1>
  5. <div class="ui top attached tabular menu">
  6. <a href="/notifications?q=unread">
  7. <div class="{{if eq .Status 1}}active{{end}} item">
  8. {{.i18n.Tr "notification.unread"}}
  9. {{if eq .Status 1}}
  10. <div class="ui label">{{len .Notifications}}</div>
  11. {{end}}
  12. </div>
  13. </a>
  14. <a href="/notifications?q=read">
  15. <div class="{{if eq .Status 2}}active{{end}} item">
  16. {{.i18n.Tr "notification.read"}}
  17. {{if eq .Status 2}}
  18. <div class="ui label">{{len .Notifications}}</div>
  19. {{end}}
  20. </div>
  21. </a>
  22. </div>
  23. <div class="ui bottom attached active tab segment">
  24. {{if eq (len .Notifications) 0}}
  25. {{if eq .Status 1}}
  26. {{.i18n.Tr "notification.no_unread"}}
  27. {{else}}
  28. {{.i18n.Tr "notification.no_read"}}
  29. {{end}}
  30. {{else}}
  31. <div class="ui relaxed divided list">
  32. {{range $notification := .Notifications}}
  33. {{$issue := $notification.GetIssue}}
  34. {{$repo := $notification.GetRepo}}
  35. {{$repoOwner := $repo.MustOwner}}
  36. <div class="item">
  37. <a href="{{$.AppSubUrl}}/{{$repoOwner.Name}}/{{$repo.Name}}/issues/{{$issue.Index}}">
  38. {{if and $issue.IsPull}}
  39. {{if $issue.IsClosed}}
  40. <i class="octicon octicon-git-merge"></i>
  41. {{else}}
  42. <i class="octicon octicon-git-pull-request"></i>
  43. {{end}}
  44. {{else}}
  45. {{if $issue.IsClosed}}
  46. <i class="octicon octicon-issue-closed"></i>
  47. {{else}}
  48. <i class="octicon octicon-issue-opened"></i>
  49. {{end}}
  50. {{end}}
  51. <div class="content">
  52. <div class="header">{{$repoOwner.Name}}/{{$repo.Name}}</div>
  53. <div class="description">#{{$issue.Index}} - {{$issue.Title}}</div>
  54. </div>
  55. </a>
  56. </div>
  57. {{end}}
  58. </div>
  59. {{end}}
  60. </div>
  61. {{template "base/paginate" .}}
  62. </div>
  63. </div>
  64. {{template "base/footer" .}}