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.

list.tmpl 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. {{template "base/head" .}}
  2. <div role="main" aria-label="{{.Title}}" class="page-content repository projects milestones">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <div class="navbar">
  6. {{template "repo/issue/navbar" .}}
  7. {{if and .CanWriteProjects (not .Repository.IsArchived)}}
  8. <div class="ui right">
  9. <a class="ui green button" href="{{$.Link}}/new">{{.locale.Tr "repo.projects.new"}}</a>
  10. </div>
  11. {{end}}
  12. </div>
  13. <div class="ui divider"></div>
  14. {{template "base/alert" .}}
  15. <div class="ui compact tiny menu">
  16. <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/projects?state=open">
  17. {{svg "octicon-project" 16 "gt-mr-3"}}
  18. {{JsPrettyNumber .OpenCount}}&nbsp;{{.locale.Tr "repo.issues.open_title"}}
  19. </a>
  20. <a class="item{{if .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/projects?state=closed">
  21. {{svg "octicon-check" 16 "gt-mr-3"}}
  22. {{JsPrettyNumber .ClosedCount}}&nbsp;{{.locale.Tr "repo.issues.closed_title"}}
  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. {{.locale.Tr "repo.issues.filter_sort"}}
  30. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  31. </span>
  32. <div class="menu">
  33. <a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=oldest&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
  34. <a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=recentupdate&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
  35. <a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=leastupdate&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="milestone list">
  40. {{range .Projects}}
  41. <li class="item">
  42. {{svg "octicon-project"}} <a href="{{.Link}}">{{.Title}}</a>
  43. <div class="meta">
  44. {{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}}
  45. {{if .IsClosed}}
  46. {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate|Str2html}}
  47. {{end}}
  48. <span class="issue-stats">
  49. {{svg "octicon-issue-opened" 16 "gt-mr-3"}}
  50. {{JsPrettyNumber .NumOpenIssues}}&nbsp;{{$.locale.Tr "repo.issues.open_title"}}
  51. {{svg "octicon-check" 16 "gt-mr-3"}}
  52. {{JsPrettyNumber .NumClosedIssues}}&nbsp;{{$.locale.Tr "repo.issues.closed_title"}}
  53. </span>
  54. </div>
  55. {{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
  56. <div class="ui right operate">
  57. <a href="{{.Link}}/edit" data-id={{.ID}} data-title={{.Title}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a>
  58. {{if .IsClosed}}
  59. <a class="link-action" href data-url="{{.Link}}/open">{{svg "octicon-check"}} {{$.locale.Tr "repo.projects.open"}}</a>
  60. {{else}}
  61. <a class="link-action" href data-url="{{.Link}}/close">{{svg "octicon-skip"}} {{$.locale.Tr "repo.projects.close"}}</a>
  62. {{end}}
  63. <a class="delete-button" href="#" data-url="{{.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a>
  64. </div>
  65. {{end}}
  66. {{if .Description}}
  67. <div class="content">
  68. {{.RenderedContent|Str2html}}
  69. </div>
  70. {{end}}
  71. </li>
  72. {{end}}
  73. {{template "base/paginate" .}}
  74. </div>
  75. </div>
  76. </div>
  77. {{if .CanWriteProjects}}
  78. <div class="ui small basic delete modal">
  79. <div class="ui icon header">
  80. {{svg "octicon-trash"}}
  81. {{.locale.Tr "repo.projects.deletion"}}
  82. </div>
  83. <div class="content">
  84. <p>{{.locale.Tr "repo.projects.deletion_desc"}}</p>
  85. </div>
  86. <div class="actions">
  87. <div class="ui red basic inverted cancel button">
  88. <i class="remove icon"></i>
  89. {{.locale.Tr "modal.no"}}
  90. </div>
  91. <div class="ui green basic inverted ok button">
  92. <i class="checkmark icon"></i>
  93. {{.locale.Tr "modal.yes"}}
  94. </div>
  95. </div>
  96. </div>
  97. {{end}}
  98. {{template "base/footer" .}}