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 3.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
  2. <div class="gt-text-right">
  3. <a class="ui small green button" href="{{$.Link}}/new">{{.locale.Tr "repo.projects.new"}}</a>
  4. </div>
  5. <div class="divider"></div>
  6. {{end}}
  7. {{template "base/alert" .}}
  8. <div class="small-menu-items ui compact tiny menu">
  9. <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{$.Link}}?state=open">
  10. {{svg "octicon-project-symlink" 16 "gt-mr-3"}}
  11. {{.locale.PrettyNumber .OpenCount}}&nbsp;{{.locale.Tr "repo.issues.open_title"}}
  12. </a>
  13. <a class="item{{if .IsShowClosed}} active{{end}}" href="{{$.Link}}?state=closed">
  14. {{svg "octicon-check" 16 "gt-mr-3"}}
  15. {{.locale.PrettyNumber .ClosedCount}}&nbsp;{{.locale.Tr "repo.issues.closed_title"}}
  16. </a>
  17. </div>
  18. <div class="ui right floated secondary filter menu">
  19. <!-- Sort -->
  20. <div class="ui dropdown type jump item">
  21. <span class="text">
  22. {{.locale.Tr "repo.issues.filter_sort"}}
  23. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  24. </span>
  25. <div class="menu">
  26. <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>
  27. <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>
  28. <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>
  29. </div>
  30. </div>
  31. </div>
  32. <div class="milestone-list">
  33. {{range .Projects}}
  34. <li class="milestone-card">
  35. <h3 class="flex-text-block gt-m-0">
  36. {{svg .IconName 16}}
  37. <a class="muted" href="{{.Link}}">{{.Title}}</a>
  38. </h3>
  39. <div class="milestone-toolbar">
  40. <div class="group">
  41. <div class="flex-text-block">
  42. {{svg "octicon-issue-opened" 14}}
  43. {{$.locale.PrettyNumber .NumOpenIssues}}&nbsp;{{$.locale.Tr "repo.issues.open_title"}}
  44. </div>
  45. <div class="flex-text-block">
  46. {{svg "octicon-check" 14}}
  47. {{$.locale.PrettyNumber .NumClosedIssues}}&nbsp;{{$.locale.Tr "repo.issues.closed_title"}}
  48. </div>
  49. </div>
  50. {{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
  51. <div class="group">
  52. <a class="flex-text-inline" href="{{.Link}}/edit">{{svg "octicon-pencil" 14}}{{$.locale.Tr "repo.issues.label_edit"}}</a>
  53. {{if .IsClosed}}
  54. <a class="link-action flex-text-inline" href data-url="{{.Link}}/open">{{svg "octicon-check" 14}}{{$.locale.Tr "repo.projects.open"}}</a>
  55. {{else}}
  56. <a class="link-action flex-text-inline" href data-url="{{.Link}}/close">{{svg "octicon-skip" 14}}{{$.locale.Tr "repo.projects.close"}}</a>
  57. {{end}}
  58. <a class="delete-button flex-text-inline" href="#" data-url="{{.Link}}/delete">{{svg "octicon-trash" 14}}{{$.locale.Tr "repo.issues.label_delete"}}</a>
  59. </div>
  60. {{end}}
  61. </div>
  62. {{if .Description}}
  63. <div class="content">
  64. {{.RenderedContent|Str2html}}
  65. </div>
  66. {{end}}
  67. </li>
  68. {{end}}
  69. {{template "base/paginate" .}}
  70. </div>
  71. {{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
  72. <div class="ui g-modal-confirm delete modal">
  73. <div class="header">
  74. {{svg "octicon-trash"}}
  75. {{.locale.Tr "repo.projects.deletion"}}
  76. </div>
  77. <div class="content">
  78. <p>{{.locale.Tr "repo.projects.deletion_desc"}}</p>
  79. </div>
  80. {{template "base/modal_actions_confirm" .}}
  81. </div>
  82. {{end}}