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.

new.tmpl 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <h2 class="ui dividing header">
  2. {{if .PageIsEditProjects}}
  3. {{ctx.Locale.Tr "repo.projects.edit"}}
  4. <div class="sub header">{{ctx.Locale.Tr "repo.projects.edit_subheader"}}</div>
  5. {{else}}
  6. {{ctx.Locale.Tr "repo.projects.new"}}
  7. <div class="sub header">{{ctx.Locale.Tr "repo.projects.new_subheader"}}</div>
  8. {{end}}
  9. </h2>
  10. {{template "base/alert" .}}
  11. <form class="ui form" action="{{.Link}}" method="post">
  12. {{.CsrfTokenHtml}}
  13. <div>
  14. <input type="hidden" id="redirect" name="redirect" value="{{.redirect}}">
  15. <div class="field {{if .Err_Title}}error{{end}}">
  16. <label>{{ctx.Locale.Tr "repo.projects.title"}}</label>
  17. <input name="title" placeholder="{{ctx.Locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required>
  18. </div>
  19. <div class="field">
  20. <label>{{ctx.Locale.Tr "repo.projects.description"}}</label>
  21. <textarea name="content" placeholder="{{ctx.Locale.Tr "repo.projects.description_placeholder"}}">{{.content}}</textarea>
  22. </div>
  23. {{if not .PageIsEditProjects}}
  24. <div class="field">
  25. <label>{{ctx.Locale.Tr "repo.projects.template.desc"}}</label>
  26. <div class="ui selection dropdown">
  27. <input type="hidden" name="board_type" value="{{.type}}">
  28. <div class="default text">{{ctx.Locale.Tr "repo.projects.template.desc_helper"}}</div>
  29. <div class="menu">
  30. {{range $element := .BoardTypes}}
  31. <div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{ctx.Locale.Tr $element.Translation}}</div>
  32. {{end}}
  33. </div>
  34. </div>
  35. </div>
  36. {{end}}
  37. <div class="field">
  38. <label>{{ctx.Locale.Tr "repo.projects.card_type.desc"}}</label>
  39. <div class="ui selection dropdown">
  40. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  41. {{range $element := .CardTypes}}
  42. {{if or (eq $.card_type $element.CardType) (and (not $.PageIsEditProjects) (eq $element.CardType 1))}}
  43. <input type="hidden" name="card_type" value="{{$element.CardType}}">
  44. <div class="default text">{{ctx.Locale.Tr $element.Translation}}</div>
  45. {{end}}
  46. {{end}}
  47. <div class="menu">
  48. {{range $element := .CardTypes}}
  49. <div class="item" data-id="{{$element.CardType}}" data-value="{{$element.CardType}}">{{ctx.Locale.Tr $element.Translation}}</div>
  50. {{end}}
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. <div class="divider"></div>
  56. <div class="gt-text-right">
  57. <a class="ui cancel button" href="{{$.CancelLink}}">
  58. {{ctx.Locale.Tr "repo.milestones.cancel"}}
  59. </a>
  60. <button class="ui primary button">
  61. {{if .PageIsEditProjects}}{{ctx.Locale.Tr "repo.projects.modify"}}{{else}}{{ctx.Locale.Tr "repo.projects.create"}}{{end}}
  62. </button>
  63. </div>
  64. </form>