issues.tmpl 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {{template "base/head" .}}
  2. <div class="dashboard issues">
  3. {{template "user/dashboard/navbar" .}}
  4. <div class="ui container">
  5. <div class="ui grid">
  6. <div class="four wide column">
  7. <div class="ui secondary vertical filter menu">
  8. <a class="{{if eq .ViewType "all"}}active{{end}} item" href="{{.Link}}?repo={{.RepoID}}&state={{.State}}">
  9. {{.i18n.Tr "home.issues.in_your_repos"}}
  10. <strong class="ui right">{{.IssueStats.AllCount}}</strong>
  11. </a>
  12. <a class="{{if eq .ViewType "assigned"}}active{{end}} item" href="{{.Link}}?type=assigned&repo={{.RepoID}}&state={{.State}}">
  13. {{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}
  14. <strong class="ui right">{{.IssueStats.AssignCount}}</strong>
  15. </a>
  16. <a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="{{.Link}}?type=created_by&repo={{.RepoID}}&state={{.State}}">
  17. {{.i18n.Tr "repo.issues.filter_type.created_by_you"}}
  18. <strong class="ui right">{{.IssueStats.CreateCount}}</strong>
  19. </a>
  20. <div class="ui divider"></div>
  21. {{range .Repos}}
  22. <a class="{{if eq $.RepoID .ID}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}{{if not (eq $.RepoID .ID)}}&repo={{.ID}}{{end}}&state={{$.State}}">{{$.SignedUser.Name}}/{{.Name}} <strong class="ui right">{{if $.IsShowClosed}}{{.NumClosedIssues}}{{else}}{{.NumOpenIssues}}{{end}}</strong></a>
  23. {{end}}
  24. </div>
  25. </div>
  26. <div class="twelve wide column content">
  27. <div class="ui tiny buttons">
  28. <a class="ui green basic button {{if not .IsShowClosed}}active{{end}}" href="{{.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&state=open">
  29. <i class="octicon octicon-issue-opened"></i>
  30. {{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
  31. </a>
  32. <a class="ui red basic button {{if .IsShowClosed}}active{{end}}" href="{{.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&state=closed">
  33. <i class="octicon octicon-issue-closed"></i>
  34. {{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
  35. </a>
  36. </div>
  37. <div class="issue list">
  38. {{range .Issues}}
  39. {{ $timeStr:= TimeSince .Created $.Lang }}
  40. <li class="item">
  41. <div class="ui label">#{{.ID}}</div>
  42. <a class="title" href="{{AppSubUrl}}/{{.Repo.Owner.Name}}/{{.Repo.Name}}/issues/{{.Index}}">{{.Name}}</a>
  43. {{if .NumComments}}
  44. <span class="comment ui right"><i class="octicon octicon-comment"></i> {{.NumComments}}</span>
  45. {{end}}
  46. <p class="desc">
  47. {{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.Name | Safe}}
  48. {{if .Assignee}}
  49. <a class="ui right assignee poping up" href="{{.Assignee.HomeLink}}" data-content="{{.Assignee.Name}}" data-variation="inverted" data-position="left center">
  50. <img class="ui avatar image" src="{{.Assignee.AvatarLink}}">
  51. </a>
  52. {{end}}
  53. </p>
  54. </li>
  55. {{end}}
  56. {{with .Page}}
  57. {{if gt .TotalPages 1}}
  58. <div class="center page buttons">
  59. <div class="ui borderless pagination menu">
  60. <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&page={{.Previous}}"{{end}}>
  61. <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
  62. </a>
  63. {{range .Pages}}
  64. {{if eq .Num -1}}
  65. <a class="disabled item">...</a>
  66. {{else}}
  67. <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&page={{.Num}}"{{end}}>{{.Num}}</a>
  68. {{end}}
  69. {{end}}
  70. <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&page={{.Next}}"{{end}}>
  71. {{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
  72. </a>
  73. </div>
  74. </div>
  75. {{end}}
  76. {{end}}
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. {{template "base/footer" .}}