create.tmpl 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. {{template "base/head" .}}
  2. <div class="repository new repo">
  3. <div class="ui middle very relaxed page grid">
  4. <div class="column">
  5. <form class="ui form" action="{{.Link}}" method="post">
  6. {{.CsrfTokenHtml}}
  7. <h3 class="ui top attached header">
  8. {{.i18n.Tr "new_repo"}}
  9. </h3>
  10. <div class="ui attached segment">
  11. {{template "base/alert" .}}
  12. <div class="inline required field {{if .Err_Owner}}error{{end}}">
  13. <label>{{.i18n.Tr "repo.owner"}}</label>
  14. <div class="ui selection owner dropdown">
  15. <input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
  16. <span class="text">
  17. <img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
  18. {{.ContextUser.Name}}
  19. </span>
  20. <i class="dropdown icon"></i>
  21. <div class="menu">
  22. <div class="item" data-value="{{.SignedUser.Id}}">
  23. <img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
  24. {{.SignedUser.Name}}
  25. </div>
  26. {{range .Orgs}}
  27. <div class="item" data-value="{{.Id}}">
  28. <img class="ui mini image" src="{{.AvatarLink}}">
  29. {{.Name}}
  30. </div>
  31. {{end}}
  32. </div>
  33. </div>
  34. </div>
  35. <div class="inline required field {{if .Err_RepoName}}error{{end}}">
  36. <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  37. <input id="repo_name" name="repo_name" value="{{.repo_name}}" autofocus required>
  38. <span class="help">{{.i18n.Tr "repo.repo_name_helper" | Safe}}</span>
  39. </div>
  40. <div class="inline field">
  41. <label>{{.i18n.Tr "repo.visibility"}}</label>
  42. <div class="ui checkbox">
  43. <input name="private" type="checkbox" {{if .private}}checked{{end}}>
  44. <label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
  45. </div>
  46. </div>
  47. <div class="inline field {{if .Err_Description}}error{{end}}">
  48. <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
  49. <textarea id="description" name="description">{{.description}}</textarea>
  50. </div>
  51. <div class="ui divider"></div>
  52. <div class="inline field">
  53. <label>{{.i18n.Tr "repo.repo_lang"}}</label>
  54. <div class="ui multiple search normal selection dropdown">
  55. <input type="hidden" name="gitignores" value="{{.gitignores}}">
  56. <div class="default text">{{.i18n.Tr "repo.repo_lang_helper"}}</div>
  57. <div class="menu">
  58. {{range .Gitignores}}
  59. <div class="item" data-value="{{.}}">{{.}}</div>
  60. {{end}}
  61. </div>
  62. </div>
  63. </div>
  64. <div class="inline field">
  65. <label>{{.i18n.Tr "repo.license"}}</label>
  66. <div class="ui selection dropdown">
  67. <input type="hidden" name="license" value="{{.license}}">
  68. <div class="default text">{{.i18n.Tr "repo.license_helper"}}</div>
  69. <div class="menu">
  70. {{range .Licenses}}
  71. <div class="item" data-value="{{.}}">{{.}}</div>
  72. {{end}}
  73. </div>
  74. </div>
  75. </div>
  76. <div class="inline field">
  77. <label>{{.i18n.Tr "repo.readme"}} <a target="_blank" href="https://github.com/gogits/go-gogs-client/wiki/Repositories#litte-notes-on-readme-template"><span class="octicon octicon-question"></span></a></label>
  78. <div class="ui selection dropdown">
  79. <input type="hidden" name="readme" value="{{.readme}}">
  80. <div class="default text">{{.i18n.Tr "repo.readme_helper"}}</div>
  81. <div class="menu">
  82. {{range .Readmes}}
  83. <div class="item" data-value="{{.}}">{{.}}</div>
  84. {{end}}
  85. </div>
  86. </div>
  87. </div>
  88. <div class="inline field">
  89. <div class="ui checkbox" id="auto-init">
  90. <input class="hidden" name="auto_init" type="checkbox" tabindex="0" {{if .auto_init}}checked{{end}}>
  91. <label>{{.i18n.Tr "repo.auto_init"}}</label>
  92. </div>
  93. </div>
  94. <div class="inline field">
  95. <label></label>
  96. <button class="ui green button">
  97. {{.i18n.Tr "repo.create_repo"}}
  98. </button>
  99. <a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
  100. </div>
  101. </div>
  102. </form>
  103. </div>
  104. </div>
  105. </div>
  106. {{template "base/footer" .}}