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

issues.tmpl 4.2KB

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