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.

83 lines
3.5 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. <p class="form-control-static">{{.SignedUserName}}</p>
  12. <input type="hidden" value="{{.SignedUserId}}" name="userId"/>
  13. </div>
  14. </div>
  15. <div class="form-group {{if .Err_RepoName}}has-error has-feedback{{end}}">
  16. <label class="col-md-2 control-label">Repository<strong class="text-danger">*</strong></label>
  17. <div class="col-md-8">
  18. <input name="repo" type="text" class="form-control" placeholder="Type your repository name" value="{{.repo}}" required="required">
  19. <span class="help-block">Great repository names are short and memorable. </span>
  20. </div>
  21. </div>
  22. <div class="form-group">
  23. <label class="col-md-2 control-label">Visibility</label>
  24. <div class="col-md-8">
  25. <div class="checkbox">
  26. <label>
  27. <input type="checkbox" name="private" {{if .private}}checked{{end}}>
  28. <strong>This repository is private</strong>
  29. </label>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="form-group {{if .Err_Description}}has-error has-feedback{{end}}">
  34. <label class="col-md-2 control-label">Description</label>
  35. <div class="col-md-8">
  36. <textarea name="desc" class="form-control" placeholder="Type your repository description">{{.desc}}</textarea>
  37. </div>
  38. </div>
  39. <div class="form-group">
  40. <label class="col-md-2 control-label">Language</label>
  41. <div class="col-md-8">
  42. <select class="form-control" name="language">
  43. <option value="">Select a language</option>
  44. {{range .LanguageIgns}}<option value="{{.}}">{{.}}</option>{{end}}
  45. </select>
  46. <br>
  47. <div>Need more .gitignore? Go <a href="http://www.gitignore.io/">gitignore.io</a>.</div>
  48. </div>
  49. </div>
  50. <div class="form-group">
  51. <label class="col-md-2 control-label">License</label>
  52. <div class="col-md-8">
  53. <select class="form-control" name="license">
  54. <option value="">Select a license</option>
  55. {{range .Licenses}}<option value="{{.}}">{{.}}</option>{{end}}
  56. </select>
  57. </div>
  58. </div>
  59. <div class="form-group">
  60. <div class="col-md-8 col-md-offset-2">
  61. <div class="checkbox">
  62. <label>
  63. <input type="checkbox" name="initReadme" {{if .initReadme}}checked{{end}}>
  64. <strong>Initialize this repository with a README</strong>
  65. </label>
  66. </div>
  67. </div>
  68. </div>
  69. <div class="form-group">
  70. <div class="col-md-offset-2 col-md-8">
  71. <button type="submit" class="btn btn-lg btn-primary">Create repository</button>
  72. <a href="/" class="text-danger">Cancel</a>
  73. </div>
  74. </div>
  75. </form>
  76. </div>
  77. {{template "base/footer" .}}