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.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <div role="main" aria-label="{{.Title}}" class="page-content repository projects edit-project new milestone">
  2. <div class="ui container">
  3. <div class="navbar">
  4. {{if and .CanWriteProjects .PageIsEditProject}}
  5. <div class="ui right floated secondary menu">
  6. <a class="ui green button" href="{{$.HomeLink}}/-/projects/new">{{.locale.Tr "repo.milestones.new"}}</a>
  7. </div>
  8. {{end}}
  9. </div>
  10. <div class="ui divider"></div>
  11. <h2 class="ui dividing header">
  12. {{if .PageIsEditProjects}}
  13. {{.locale.Tr "repo.projects.edit"}}
  14. <div class="sub header">{{.locale.Tr "repo.projects.edit_subheader"}}</div>
  15. {{else}}
  16. {{.locale.Tr "repo.projects.new"}}
  17. <div class="sub header">{{.locale.Tr "repo.projects.new_subheader"}}</div>
  18. {{end}}
  19. </h2>
  20. {{template "base/alert" .}}
  21. <form class="ui form grid" action="{{.Link}}" method="post">
  22. {{.CsrfTokenHtml}}
  23. <div class="eleven wide column">
  24. <div class="field {{if .Err_Title}}error{{end}}">
  25. <label>{{.locale.Tr "repo.projects.title"}}</label>
  26. <input name="title" placeholder="{{.locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required>
  27. </div>
  28. <div class="field">
  29. <label>{{.locale.Tr "repo.projects.description"}}</label>
  30. <textarea name="content" placeholder="{{.locale.Tr "repo.projects.description_placeholder"}}">{{.content}}</textarea>
  31. </div>
  32. {{if not .PageIsEditProjects}}
  33. <label>{{.locale.Tr "repo.projects.template.desc"}}</label>
  34. <div class="ui selection dropdown">
  35. <input type="hidden" name="board_type" value="{{.type}}">
  36. <div class="default text">{{.locale.Tr "repo.projects.template.desc_helper"}}</div>
  37. <div class="menu">
  38. {{range $element := .ProjectTypes}}
  39. <div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.locale.Tr $element.Translation}}</div>
  40. {{end}}
  41. </div>
  42. </div>
  43. {{end}}
  44. </div>
  45. <div class="ui container">
  46. <div class="ui divider"></div>
  47. <div class="ui left">
  48. {{if .PageIsEditProjects}}
  49. <a class="ui primary basic button" href="{{.RepoLink}}/projects">
  50. {{.locale.Tr "repo.milestones.cancel"}}
  51. </a>
  52. <button class="ui green button">
  53. {{.locale.Tr "repo.projects.modify"}}
  54. </button>
  55. {{else}}
  56. <button class="ui green button">
  57. {{.locale.Tr "repo.projects.create"}}
  58. </button>
  59. {{end}}
  60. </div>
  61. </div>
  62. </form>
  63. </div>
  64. </div>