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.

126 lines
6.0 KiB

10 years ago
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. <div class="container" id="body">
  4. <form action="/repo/migrate" method="post" class="form-horizontal card" id="repo-create">
  5. {{.CsrfTokenHtml}}
  6. <h3>Repository Migration</h3>
  7. {{template "base/alert" .}}
  8. <!-- <div class="form-group">
  9. <label class="col-md-2 control-label">From<strong class="text-danger">*</strong></label>
  10. <div class="col-md-8">
  11. <select class="form-control" name="from">
  12. <option value="github">GitHub</option>
  13. </select>
  14. </div>
  15. </div> -->
  16. <div class="form-group">
  17. <label class="col-md-2 control-label">HTTPS URL<strong class="text-danger">*</strong></label>
  18. <div class="col-md-8">
  19. <input name="url" type="text" class="form-control" placeholder="Type your migration repository HTTPS URL" value="{{.url}}" required="required" >
  20. </div>
  21. </div>
  22. <div class="form-group">
  23. <div class="col-md-offset-2 col-md-8">
  24. <a class="btn btn-default" data-toggle="collapse" data-target="#repo-import-auth">Need Authorization</a>
  25. </div>
  26. <div id="repo-import-auth" class="collapse">
  27. <div class="form-group">
  28. <label class="col-md-2 control-label">Username</label>
  29. <div class="col-md-8">
  30. <input name="auth_username" type="text" class="form-control" placeholder="Type your user name" value="{{.auth_username}}" >
  31. </div>
  32. </div>
  33. <div class="form-group">
  34. <label class="col-md-2 control-label">Password</label>
  35. <div class="col-md-8">
  36. <input name="auth_password" type="password" class="form-control" placeholder="Type your password" value="{{.auth_password}}" >
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. <hr/>
  42. <div class="form-group">
  43. <label class="col-md-2 control-label">Owner<strong class="text-danger">*</strong></label>
  44. <div class="col-md-8">
  45. <div class="btn-group" id="repo-owner-switch">
  46. <button type="button" class="btn btn-default" id="repo-owner-current">
  47. <img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username" id="repo-owner-avatar">
  48. <span id="repo-owner-name">{{.SignedUser.Name}}</span>
  49. </button>
  50. <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
  51. <span class="caret"></span>
  52. </button>
  53. <div class="dropdown-menu clone-group-btn no-propagation">
  54. <ul id="dashboard-switch-menu" class="list-unstyled">
  55. <li data-uid="{{.SignedUser.Id}}" class="checked">
  56. <a>
  57. <i class="fa fa-check"></i>
  58. <img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username">
  59. {{.SignedUser.Name}}
  60. </a>
  61. </li>
  62. {{range .Orgs}}
  63. <li data-uid="{{.Id}}">
  64. <a>
  65. <i class="fa fa-check"></i>
  66. <img src="{{.AvatarLink}}?s=28" alt="user-avatar" title="username">
  67. {{.Name}}
  68. </a>
  69. </li>
  70. {{end}}
  71. </ul>
  72. </div>
  73. </div>
  74. </div>
  75. <input type="hidden" value="{{.SignedUserId}}" name="uid" id="repo-owner-id"/>
  76. </div>
  77. <div class="form-group {{if .Err_RepoName}}has-error has-feedback{{end}}">
  78. <label class="col-md-2 control-label">Repository<strong class="text-danger">*</strong></label>
  79. <div class="col-md-8">
  80. <input name="repo" type="text" class="form-control" placeholder="Type your repository name" value="{{.repo}}" required="required">
  81. <span class="help-block">Great repository names are short and memorable. </span>
  82. </div>
  83. </div>
  84. <div class="form-group">
  85. <label class="col-md-2 control-label">Migration Type</label>
  86. <div class="col-md-8">
  87. <div class="checkbox">
  88. <label>
  89. <input type="checkbox" name="mirror" {{if .mirror}}checked{{end}}>
  90. <strong>This repository is a mirror</strong>
  91. </label>
  92. </div>
  93. </div>
  94. </div>
  95. <div class="form-group">
  96. <label class="col-md-2 control-label">Visibility</label>
  97. <div class="col-md-8">
  98. <div class="checkbox">
  99. <label>
  100. <input type="checkbox" name="private" {{if .private}}checked{{end}}>
  101. <strong>This repository is private</strong>
  102. </label>
  103. </div>
  104. </div>
  105. </div>
  106. <div class="form-group {{if .Err_Description}}has-error has-feedback{{end}}">
  107. <label class="col-md-2 control-label">Description</label>
  108. <div class="col-md-8">
  109. <textarea name="desc" class="form-control" placeholder="Type your repository description">{{.desc}}</textarea>
  110. </div>
  111. </div>
  112. <div class="form-group">
  113. <div class="col-md-offset-2 col-md-8">
  114. <button type="submit" class="btn btn-lg btn-primary">Migrate repository</button>
  115. <a href="/" class="text-danger">Cancel</a>
  116. </div>
  117. </div>
  118. </form>
  119. </div>
  120. {{template "base/footer" .}}