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.

111 lines
5.1 KiB

10 years ago
10 years ago
10 years ago
10 years ago
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. <div class="container" id="body">
  4. <form action="/repo/create" method="post" class="form-horizontal card" id="repo-create">
  5. {{.CsrfTokenHtml}}
  6. <h3>Create New Repository</h3>
  7. {{template "base/alert" .}}
  8. <div class="form-group">
  9. <label class="col-md-2 control-label">Owner<strong class="text-danger">*</strong></label>
  10. <div class="col-md-8">
  11. <div class="btn-group" id="repo-owner-switch">
  12. <button type="button" class="btn btn-default" id="repo-owner-current">
  13. <img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username" id="repo-owner-avatar">
  14. <span id="repo-owner-name">{{.SignedUser.Name}}</span>
  15. </button>
  16. <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
  17. <span class="caret"></span>
  18. </button>
  19. <div class="dropdown-menu clone-group-btn no-propagation">
  20. <ul id="dashboard-switch-menu" class="list-unstyled">
  21. <li data-uid="{{.SignedUser.Id}}" class="checked">
  22. <a>
  23. <i class="fa fa-check"></i>
  24. <img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username">
  25. {{.SignedUser.Name}}
  26. </a>
  27. </li>
  28. {{range .Orgs}}
  29. <li data-uid="{{.Id}}">
  30. <a>
  31. <i class="fa fa-check"></i>
  32. <img src="{{.AvatarLink}}?s=28" alt="user-avatar" title="username">
  33. {{.Name}}
  34. </a>
  35. </li>
  36. {{end}}
  37. </ul>
  38. </div>
  39. </div>
  40. </div>
  41. <input type="hidden" value="{{.SignedUserId}}" name="uid" id="repo-owner-id"/>
  42. </div>
  43. <div class="form-group {{if .Err_RepoName}}has-error has-feedback{{end}}">
  44. <label class="col-md-2 control-label">Repository<strong class="text-danger">*</strong></label>
  45. <div class="col-md-8">
  46. <input name="repo" type="text" class="form-control" placeholder="Type your repository name" value="{{.repo}}" required="required">
  47. <span class="help-block">Great repository names are short and memorable. </span>
  48. </div>
  49. </div>
  50. <div class="form-group">
  51. <label class="col-md-2 control-label">Visibility</label>
  52. <div class="col-md-8">
  53. <div class="checkbox">
  54. <label>
  55. <input type="checkbox" name="private" {{if .private}}checked{{end}}>
  56. <strong>This repository is private</strong>
  57. </label>
  58. </div>
  59. </div>
  60. </div>
  61. <div class="form-group {{if .Err_Description}}has-error has-feedback{{end}}">
  62. <label class="col-md-2 control-label">Description</label>
  63. <div class="col-md-8">
  64. <textarea name="desc" class="form-control" placeholder="Type your repository description">{{.desc}}</textarea>
  65. </div>
  66. </div>
  67. <div class="form-group">
  68. <label class="col-md-2 control-label">Language</label>
  69. <div class="col-md-8">
  70. <select class="form-control" name="language">
  71. <option value="">Select a language</option>
  72. {{range .LanguageIgns}}<option value="{{.}}">{{.}}</option>{{end}}
  73. </select>
  74. <br>
  75. <div>Need more .gitignore? Go <a href="http://www.gitignore.io/">gitignore.io</a>.</div>
  76. </div>
  77. </div>
  78. <div class="form-group">
  79. <label class="col-md-2 control-label">License</label>
  80. <div class="col-md-8">
  81. <select class="form-control" name="license">
  82. <option value="">Select a license</option>
  83. {{range .Licenses}}<option value="{{.}}">{{.}}</option>{{end}}
  84. </select>
  85. </div>
  86. </div>
  87. <div class="form-group">
  88. <div class="col-md-8 col-md-offset-2">
  89. <div class="checkbox">
  90. <label>
  91. <input type="checkbox" name="initReadme" {{if .initReadme}}checked{{end}}>
  92. <strong>Initialize this repository with a README</strong>
  93. </label>
  94. </div>
  95. </div>
  96. </div>
  97. <div class="form-group">
  98. <div class="col-md-offset-2 col-md-8">
  99. <button type="submit" class="btn btn-lg btn-primary">Create repository</button>
  100. <a href="/" class="text-danger">Cancel</a>
  101. </div>
  102. </div>
  103. </form>
  104. </div>
  105. {{template "base/footer" .}}