本站源代码
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

116 linhas
5.2KB

  1. {{template "base/head" .}}
  2. <div class="repository milestones">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <div class="navbar">
  6. {{template "repo/issue/navbar" .}}
  7. {{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
  8. <div class="ui right">
  9. <a class="ui green button" href="{{$.Link}}/new">{{.i18n.Tr "repo.milestones.new"}}</a>
  10. </div>
  11. {{end}}
  12. </div>
  13. <div class="ui divider"></div>
  14. {{template "base/alert" .}}
  15. <div class="ui tiny basic buttons">
  16. <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{.RepoLink}}/milestones?state=open">
  17. <i class="octicon octicon-milestone"></i>
  18. {{.i18n.Tr "repo.milestones.open_tab" .OpenCount}}
  19. </a>
  20. <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{.RepoLink}}/milestones?state=closed">
  21. <i class="octicon octicon-milestone"></i>
  22. {{.i18n.Tr "repo.milestones.close_tab" .ClosedCount}}
  23. </a>
  24. </div>
  25. <div class="ui right floated secondary filter menu">
  26. <!-- Sort -->
  27. <div class="ui dropdown type jump item">
  28. <span class="text">
  29. {{.i18n.Tr "repo.issues.filter_sort"}}
  30. <i class="dropdown icon"></i>
  31. </span>
  32. <div class="menu">
  33. <a class="{{if or (eq .SortType "closestduedate") (not .SortType)}}active{{end}} item" href="{{$.Link}}?sort=closestduedate&state={{$.State}}">{{.i18n.Tr "repo.milestones.filter_sort.closest_due_date"}}</a>
  34. <a class="{{if eq .SortType "furthestduedate"}}active{{end}} item" href="{{$.Link}}?sort=furthestduedate&state={{$.State}}">{{.i18n.Tr "repo.milestones.filter_sort.furthest_due_date"}}</a>
  35. <a class="{{if eq .SortType "leastcomplete"}}active{{end}} item" href="{{$.Link}}?sort=leastcomplete&state={{$.State}}">{{.i18n.Tr "repo.milestones.filter_sort.least_complete"}}</a>
  36. <a class="{{if eq .SortType "mostcomplete"}}active{{end}} item" href="{{$.Link}}?sort=mostcomplete&state={{$.State}}">{{.i18n.Tr "repo.milestones.filter_sort.most_complete"}}</a>
  37. <a class="{{if eq .SortType "mostissues"}}active{{end}} item" href="{{$.Link}}?sort=mostissues&state={{$.State}}">{{.i18n.Tr "repo.milestones.filter_sort.most_issues"}}</a>
  38. <a class="{{if eq .SortType "leastissues"}}active{{end}} item" href="{{$.Link}}?sort=leastissues&state={{$.State}}">{{.i18n.Tr "repo.milestones.filter_sort.least_issues"}}</a>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="milestone list">
  43. {{range .Milestones}}
  44. <li class="item">
  45. <i class="octicon octicon-milestone"></i> <a href="{{$.RepoLink}}/milestone/{{.ID}}">{{.Name}}</a>
  46. <div class="ui right green progress" data-percent="{{.Completeness}}">
  47. <div class="bar" {{if not .Completeness}}style="background-color: transparent"{{end}}>
  48. <div class="progress"></div>
  49. </div>
  50. </div>
  51. <div class="meta">
  52. {{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.Lang }}
  53. {{if .IsClosed}}
  54. <span class="octicon octicon-clock"></span> {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}}
  55. {{else}}
  56. <span class="octicon octicon-calendar"></span>
  57. {{if .DeadlineString}}
  58. <span {{if .IsOverdue}}class="overdue"{{end}}>{{.DeadlineString}}</span>
  59. {{else}}
  60. {{$.i18n.Tr "repo.milestones.no_due_date"}}
  61. {{end}}
  62. {{end}}
  63. <span class="issue-stats">
  64. <i class="octicon octicon-issue-opened"></i> {{$.i18n.Tr "repo.issues.open_tab" .NumOpenIssues}}
  65. <i class="octicon octicon-issue-closed"></i> {{$.i18n.Tr "repo.issues.close_tab" .NumClosedIssues}}
  66. {{if .TotalTrackedTime}}<i class="octicon octicon-clock"></i> {{.TotalTrackedTime|Sec2Time}}{{end}}
  67. </span>
  68. </div>
  69. {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}}
  70. <div class="ui right operate">
  71. <a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a>
  72. {{if .IsClosed}}
  73. <a href="{{$.Link}}/{{.ID}}/open" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-check"></i> {{$.i18n.Tr "repo.milestones.open"}}</a>
  74. {{else}}
  75. <a href="{{$.Link}}/{{.ID}}/close" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-x"></i> {{$.i18n.Tr "repo.milestones.close"}}</a>
  76. {{end}}
  77. <a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a>
  78. </div>
  79. {{end}}
  80. {{if .Content}}
  81. <div class="content">
  82. {{.RenderedContent|Str2html}}
  83. </div>
  84. {{end}}
  85. </li>
  86. {{end}}
  87. {{template "base/paginate" .}}
  88. </div>
  89. </div>
  90. </div>
  91. {{if or .CanWriteIssues .CanWritePulls}}
  92. <div class="ui small basic delete modal">
  93. <div class="ui icon header">
  94. <i class="trash icon"></i>
  95. {{.i18n.Tr "repo.milestones.deletion"}}
  96. </div>
  97. <div class="content">
  98. <p>{{.i18n.Tr "repo.milestones.deletion_desc"}}</p>
  99. </div>
  100. <div class="actions">
  101. <div class="ui red basic inverted cancel button">
  102. <i class="remove icon"></i>
  103. {{.i18n.Tr "modal.no"}}
  104. </div>
  105. <div class="ui green basic inverted ok button">
  106. <i class="checkmark icon"></i>
  107. {{.i18n.Tr "modal.yes"}}
  108. </div>
  109. </div>
  110. </div>
  111. {{end}}
  112. {{template "base/footer" .}}
上海开阖软件有限公司 沪ICP备12045867号-1