A fork of Gitea (see branch `mj`) adding Majority Judgment Polls 𐄷 over Issues and Merge Requests. https://git.mieuxvoter.fr
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.

225 lines
8.6 KiB

  1. {{template "base/head" .}}
  2. <div class="page-content repository">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <div class="ui three column stackable grid">
  6. <div class="column">
  7. {{template "repo/issue/navbar" .}}
  8. </div>
  9. <div class="column center aligned">
  10. {{template "repo/issue/search" .}}
  11. </div>
  12. <div class="column right aligned">
  13. {{if and .CanWriteProjects (not .Repository.IsArchived) .PageIsProjects}}
  14. <a class="ui green button show-modal item" data-modal="#new-board-item">{{.i18n.Tr "new_project_board"}}</a>
  15. {{end}}
  16. <div class="ui small modal" id="new-board-item">
  17. <div class="header">
  18. {{$.i18n.Tr "repo.projects.board.new"}}
  19. </div>
  20. <div class="content">
  21. <form class="ui form">
  22. <div class="required field">
  23. <label for="new_board">{{$.i18n.Tr "repo.projects.board.new_title"}}</label>
  24. <input class="new-board" id="new_board" name="title" required>
  25. </div>
  26. <div class="text right actions">
  27. <div class="ui cancel button">{{$.i18n.Tr "settings.cancel"}}</div>
  28. <button data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}" class="ui green button" id="new_board_submit">{{$.i18n.Tr "repo.projects.board.new_submit"}}</button>
  29. </div>
  30. </form>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. <div class="ui divider"></div>
  36. <div class="ui two column stackable grid">
  37. <div class="column">
  38. <h2 class="project-title">{{$.Project.Title}}</h2>
  39. <div class="content project-description">{{$.Project.RenderedContent|Str2html}}</div>
  40. </div>
  41. {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}}
  42. <div class="column right aligned">
  43. <div class="ui compact right small menu">
  44. <a class="item" href="{{$.RepoLink}}/projects/{{.Project.ID}}/edit" data-id={{$.Project.ID}} data-title={{$.Project.Title}}>
  45. {{svg "octicon-pencil"}}
  46. <span class="mx-3">{{$.i18n.Tr "repo.issues.label_edit"}}</span>
  47. </a>
  48. {{if .Project.IsClosed}}
  49. <a class="item link-action" href data-url="{{$.RepoLink}}/projects/{{.Project.ID}}/open">
  50. {{svg "octicon-check"}}
  51. <span class="mx-3">{{$.i18n.Tr "repo.projects.open"}}</span>
  52. </a>
  53. {{else}}
  54. <a class="item link-action" href data-url="{{$.RepoLink}}/projects/{{.Project.ID}}/close">
  55. {{svg "octicon-skip"}}
  56. <span class="mx-3">{{$.i18n.Tr "repo.projects.close"}}</span>
  57. </a>
  58. {{end}}
  59. <a class="item delete-button" href="#" data-url="{{$.RepoLink}}/projects/{{.Project.ID}}/delete" data-id="{{.Project.ID}}">
  60. {{svg "octicon-trashcan"}}
  61. <span class="mx-3">{{$.i18n.Tr "repo.issues.label_delete"}}</span>
  62. </a>
  63. </div>
  64. </div>
  65. {{end}}
  66. </div>
  67. <div class="ui divider"></div>
  68. </div>
  69. <div class="ui container fluid padded" id="project-board">
  70. <div class="board">
  71. {{ range $board := .Boards }}
  72. <div class="ui segment board-column" data-id="{{.ID}}" data-sorting="{{.Sorting}}" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}">
  73. <div class="board-column-header">
  74. <div class="ui large label board-label">{{.Title}}</div>
  75. {{if and $.CanWriteProjects (not $.Repository.IsArchived) $.PageIsProjects (ne .ID 0)}}
  76. <div class="ui dropdown jump item poping up right" data-variation="tiny inverted">
  77. <span class="ui text">
  78. <span class="fitted not-mobile" tabindex="-1">{{svg "octicon-kebab-horizontal" 24}}</span>
  79. </span>
  80. <div class="menu user-menu" tabindex="-1">
  81. <a class="item show-modal button" data-modal="#edit-project-board-modal-{{.ID}}">
  82. {{svg "octicon-pencil"}}
  83. {{$.i18n.Tr "repo.projects.board.edit"}}
  84. </a>
  85. {{if not .Default}}
  86. <a class="item show-modal button" data-modal="#set-default-project-board-modal-{{.ID}}">
  87. {{svg "octicon-pin"}}
  88. {{$.i18n.Tr "repo.projects.board.set_default"}}
  89. </a>
  90. {{end}}
  91. <a class="item show-modal button" data-modal="#delete-board-modal-{{.ID}}">
  92. {{svg "octicon-trashcan"}}
  93. {{$.i18n.Tr "repo.projects.board.delete"}}
  94. </a>
  95. <div class="ui small modal edit-project-board" id="edit-project-board-modal-{{.ID}}">
  96. <div class="header">
  97. {{$.i18n.Tr "repo.projects.board.edit"}}
  98. </div>
  99. <div class="content">
  100. <form class="ui form">
  101. <div class="required field">
  102. <label for="new_board_title">{{$.i18n.Tr "repo.projects.board.edit_title"}}</label>
  103. <input class="project-board-title" id="new_board_title" name="title" value="{{.Title}}" required>
  104. </div>
  105. <div class="text right actions">
  106. <div class="ui cancel button">{{$.i18n.Tr "settings.cancel"}}</div>
  107. <button data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}" class="ui red button">{{$.i18n.Tr "repo.projects.board.edit"}}</button>
  108. </div>
  109. </form>
  110. </div>
  111. </div>
  112. <div class="ui basic modal" id="set-default-project-board-modal-{{.ID}}">
  113. <div class="ui icon header">
  114. {{$.i18n.Tr "repo.projects.board.set_default"}}
  115. </div>
  116. <div class="content center">
  117. <label>
  118. {{$.i18n.Tr "repo.projects.board.set_default_desc"}}
  119. </label>
  120. </div>
  121. <div class="text right actions">
  122. <div class="ui cancel button">{{$.i18n.Tr "settings.cancel"}}</div>
  123. <button class="ui red button set-default-project-board" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}/default">{{$.i18n.Tr "repo.projects.board.set_default"}}</button>
  124. </div>
  125. </div>
  126. <div class="ui basic modal" id="delete-board-modal-{{.ID}}">
  127. <div class="ui icon header">
  128. {{$.i18n.Tr "repo.projects.board.delete"}}
  129. </div>
  130. <div class="content center">
  131. <label>
  132. {{$.i18n.Tr "repo.projects.board.deletion_desc"}}
  133. </label>
  134. </div>
  135. <div class="text right actions">
  136. <div class="ui cancel button">{{$.i18n.Tr "settings.cancel"}}</div>
  137. <button class="ui red button delete-project-board" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}">{{$.i18n.Tr "repo.projects.board.delete"}}</button>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. {{ end }}
  143. </div>
  144. <div class="ui divider"></div>
  145. <div class="ui cards board" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}" data-project="{{$.Project.ID}}" data-board="{{.ID}}" id="board_{{.ID}}">
  146. {{ range .Issues }}
  147. <!-- start issue card -->
  148. <div class="card board-card" data-issue="{{.ID}}">
  149. <div class="content">
  150. <div class="header">
  151. <span class="{{if .IsClosed}}red{{else}}green{{end}}">
  152. {{if .IsPull}}{{svg "octicon-git-merge"}}
  153. {{else if .IsClosed}}{{svg "octicon-issue-closed"}}
  154. {{else}}{{svg "octicon-issue-opened"}}
  155. {{end}}
  156. </span>
  157. <a class="project-board-title" href="{{$.RepoLink}}/issues/{{.Index}}">#{{.Index}} {{.Title}}</a>
  158. </div>
  159. {{- if .MilestoneID }}
  160. <div class="meta">
  161. <a class="milestone" href="{{$.RepoLink}}/milestone/{{ .MilestoneID}}">
  162. {{svg "octicon-milestone"}} {{ .Milestone.Name }}
  163. </a>
  164. </div>
  165. {{- end }}
  166. {{- range index $.LinkedPRs .ID }}
  167. <div class="meta">
  168. <a href="{{$.RepoLink}}/pulls/{{ .Index }}">
  169. <span class="{{if .PullRequest.HasMerged}}purple{{else if .IsClosed}}red{{else}}green{{end}}">{{svg "octicon-git-merge"}}</span>
  170. {{ .Title}} (#{{ .Index }})
  171. </a>
  172. </div>
  173. {{- end }}
  174. </div>
  175. <div class="extra content">
  176. {{ range .Labels }}
  177. <a class="ui label" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}; margin-bottom: 3px;" title="{{.Description | RenderEmojiPlain}}">{{.Name | RenderEmoji}}</a>
  178. {{ end }}
  179. </div>
  180. </div>
  181. <!-- stop issue card -->
  182. {{ end }}
  183. </div>
  184. </div>
  185. {{ end }}
  186. </div>
  187. </div>
  188. </div>
  189. {{if or .CanWriteIssues .CanWritePulls}}
  190. <div class="ui small basic delete modal">
  191. <div class="ui icon header">
  192. {{svg "octicon-trashcan"}}
  193. {{.i18n.Tr "repo.projects.deletion"}}
  194. </div>
  195. <div class="content">
  196. <p>{{.i18n.Tr "repo.projects.deletion_desc"}}</p>
  197. </div>
  198. <div class="actions">
  199. <div class="ui red basic inverted cancel button">
  200. <i class="remove icon"></i>
  201. {{.i18n.Tr "modal.no"}}
  202. </div>
  203. <div class="ui green basic inverted ok button">
  204. <i class="checkmark icon"></i>
  205. {{.i18n.Tr "modal.yes"}}
  206. </div>
  207. </div>
  208. </div>
  209. {{end}}
  210. {{template "base/footer" .}}