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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. {{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
  2. <div class="gt-df gt-sb gt-mb-4">
  3. <div class="small-menu-items ui compact tiny menu list-header-toggle">
  4. <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{$.Link}}?state=open&q={{$.Keyword}}">
  5. {{svg "octicon-project-symlink" 16 "gt-mr-3"}}
  6. {{ctx.Locale.PrettyNumber .OpenCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.open_title"}}
  7. </a>
  8. <a class="item{{if .IsShowClosed}} active{{end}}" href="{{$.Link}}?state=closed&q={{$.Keyword}}">
  9. {{svg "octicon-check" 16 "gt-mr-3"}}
  10. {{ctx.Locale.PrettyNumber .ClosedCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.closed_title"}}
  11. </a>
  12. </div>
  13. <div class="gt-text-right">
  14. <a class="ui small primary button" href="{{$.Link}}/new">{{ctx.Locale.Tr "repo.projects.new"}}</a>
  15. </div>
  16. </div>
  17. {{end}}
  18. {{template "base/alert" .}}
  19. <div class="list-header">
  20. <!-- Search -->
  21. <form class="list-header-search ui form ignore-dirty">
  22. <div class="ui small search fluid action input">
  23. <input type="hidden" name="state" value="{{$.State}}">
  24. {{template "shared/searchinput" dict "Value" .Keyword}}
  25. <button class="ui small icon button" type="submit" aria-label="{{ctx.Locale.Tr "explore.search"}}">
  26. {{svg "octicon-search"}}
  27. </button>
  28. </div>
  29. </form>
  30. <!-- Sort -->
  31. <div class="list-header-sort ui small dropdown type jump item">
  32. <span class="text">
  33. {{ctx.Locale.Tr "repo.issues.filter_sort"}}
  34. </span>
  35. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  36. <div class="menu">
  37. <a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=oldest&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</a>
  38. <a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=recentupdate&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
  39. <a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=leastupdate&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
  40. </div>
  41. </div>
  42. </div>
  43. <div class="milestone-list">
  44. {{range .Projects}}
  45. <li class="milestone-card">
  46. <h3 class="flex-text-block gt-m-0">
  47. {{svg .IconName 16}}
  48. <a class="muted" href="{{.Link ctx}}">{{.Title}}</a>
  49. </h3>
  50. <div class="milestone-toolbar">
  51. <div class="group">
  52. <div class="flex-text-block">
  53. {{svg "octicon-issue-opened" 14}}
  54. {{ctx.Locale.PrettyNumber (.NumOpenIssues ctx)}}&nbsp;{{ctx.Locale.Tr "repo.issues.open_title"}}
  55. </div>
  56. <div class="flex-text-block">
  57. {{svg "octicon-check" 14}}
  58. {{ctx.Locale.PrettyNumber (.NumClosedIssues ctx)}}&nbsp;{{ctx.Locale.Tr "repo.issues.closed_title"}}
  59. </div>
  60. </div>
  61. {{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
  62. <div class="group">
  63. <a class="flex-text-inline" href="{{.Link ctx}}/edit">{{svg "octicon-pencil" 14}}{{ctx.Locale.Tr "repo.issues.label_edit"}}</a>
  64. {{if .IsClosed}}
  65. <a class="link-action flex-text-inline" href data-url="{{.Link ctx}}/open">{{svg "octicon-check" 14}}{{ctx.Locale.Tr "repo.projects.open"}}</a>
  66. {{else}}
  67. <a class="link-action flex-text-inline" href data-url="{{.Link ctx}}/close">{{svg "octicon-skip" 14}}{{ctx.Locale.Tr "repo.projects.close"}}</a>
  68. {{end}}
  69. <a class="delete-button flex-text-inline" href="#" data-url="{{.Link ctx}}/delete">{{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}}</a>
  70. </div>
  71. {{end}}
  72. </div>
  73. {{if .Description}}
  74. <div class="content">
  75. {{.RenderedContent|Str2html}}
  76. </div>
  77. {{end}}
  78. </li>
  79. {{end}}
  80. {{template "base/paginate" .}}
  81. </div>
  82. {{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
  83. <div class="ui g-modal-confirm delete modal">
  84. <div class="header">
  85. {{svg "octicon-trash"}}
  86. {{ctx.Locale.Tr "repo.projects.deletion"}}
  87. </div>
  88. <div class="content">
  89. <p>{{ctx.Locale.Tr "repo.projects.deletion_desc"}}</p>
  90. </div>
  91. {{template "base/modal_actions_confirm" .}}
  92. </div>
  93. {{end}}