milestone_new.tmpl 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {{template "base/head" .}}
  2. <div class="repository new milestone">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <div class="navbar">
  6. {{template "repo/issue/navbar" .}}
  7. {{if and .IsRepositoryWriter .PageIsEditMilestone}}
  8. <div class="ui right floated secondary menu">
  9. <a class="ui green button" href="{{$.RepoLink}}/milestones/new">{{.i18n.Tr "repo.milestones.new"}}</a>
  10. </div>
  11. {{end}}
  12. </div>
  13. <div class="ui divider"></div>
  14. <h2 class="ui dividing header">
  15. {{if .PageIsEditMilestone}}
  16. {{.i18n.Tr "repo.milestones.edit"}}
  17. <div class="sub header">{{.i18n.Tr "repo.milestones.edit_subheader"}}</div>
  18. {{else}}
  19. {{.i18n.Tr "repo.milestones.new"}}
  20. <div class="sub header">{{.i18n.Tr "repo.milestones.new_subheader"}}</div>
  21. {{end}}
  22. </h2>
  23. {{template "base/alert" .}}
  24. <form class="ui form grid" action="{{.Link}}" method="post">
  25. {{.CsrfTokenHtml}}
  26. <div class="eleven wide column">
  27. <div class="field {{if .Err_Title}}error{{end}}">
  28. <label>{{.i18n.Tr "repo.milestones.title"}}</label>
  29. <input name="title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{.title}}" autofocus required>
  30. </div>
  31. <div class="field">
  32. <label>{{.i18n.Tr "repo.milestones.desc"}}</label>
  33. <textarea name="content">{{.content}}</textarea>
  34. </div>
  35. </div>
  36. <div class="four wide column">
  37. <div class="field {{if .Err_Deadline}}error{{end}}">
  38. <label>
  39. {{.i18n.Tr "repo.milestones.due_date"}}
  40. <a id="clear-date" href="#">{{.i18n.Tr "repo.milestones.clear"}}</a>
  41. </label>
  42. <input id="deadline" name="deadline" value="{{.deadline}}">
  43. </div>
  44. <div class="field">
  45. <input class="milestone datepicker" data-lang="{{.DateLang}}" data-start-date="{{.deadline}}">
  46. </div>
  47. </div>
  48. <div class="ui container">
  49. <div class="ui divider"></div>
  50. <div class="ui right">
  51. {{if .PageIsEditMilestone}}
  52. <a class="ui blue basic button" href="{{.RepoLink}}/milestones">
  53. {{.i18n.Tr "repo.milestones.cancel"}}
  54. </a>
  55. <button class="ui green button">
  56. {{.i18n.Tr "repo.milestones.modify"}}
  57. </button>
  58. {{else}}
  59. <button class="ui green button">
  60. {{.i18n.Tr "repo.milestones.create"}}
  61. </button>
  62. {{end}}
  63. </div>
  64. </div>
  65. </form>
  66. </div>
  67. </div>
  68. {{template "base/footer" .}}