本站源代码
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

141 lines
5.7KB

  1. {{template "base/head" .}}
  2. <div class="repository new migrate">
  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_migrate"}}
  9. </h3>
  10. <div class="ui attached segment">
  11. {{template "base/alert" .}}
  12. <div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
  13. <label for="clone_addr">{{.i18n.Tr "repo.migrate.clone_address"}}</label>
  14. <input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
  15. <span class="help">
  16. {{.i18n.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.i18n.Tr "repo.migrate.clone_local_path"}}{{end}}
  17. <br/>{{.i18n.Tr "repo.migrate.migrate_items_options"}}
  18. {{if .LFSActive}}<br/>{{.i18n.Tr "repo.migrate.lfs_mirror_unsupported"}}{{end}}
  19. </span>
  20. </div>
  21. <div class="ui accordion optional field">
  22. <div class="title {{if .Err_Auth}}text red active{{end}}">
  23. <i class="icon dropdown"></i>
  24. {{.i18n.Tr "repo.need_auth"}}
  25. </div>
  26. <div class="content {{if .Err_Auth}}active{{end}}">
  27. <div class="inline field {{if .Err_Auth}}error{{end}}">
  28. <label for="auth_username">{{.i18n.Tr "username"}}</label>
  29. <input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
  30. </div>
  31. <input class="fake" type="password">
  32. <div class="inline field {{if .Err_Auth}}error{{end}}">
  33. <label for="auth_password">{{.i18n.Tr "password"}}</label>
  34. <input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
  35. </div>
  36. </div>
  37. </div>
  38. <div class="ui divider"></div>
  39. <div class="inline required field {{if .Err_Owner}}error{{end}}">
  40. <label>{{.i18n.Tr "repo.owner"}}</label>
  41. <div class="ui selection owner dropdown">
  42. <input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
  43. <span class="text" title="{{.ContextUser.Name}}">
  44. <img class="ui mini image" src="{{.ContextUser.RelAvatarLink}}">
  45. {{.ContextUser.ShortName 20}}
  46. </span>
  47. <i class="dropdown icon"></i>
  48. <div class="menu" title="{{.SignedUser.Name}}">
  49. <div class="item" data-value="{{.SignedUser.ID}}">
  50. <img class="ui mini image" src="{{.SignedUser.RelAvatarLink}}">
  51. {{.SignedUser.ShortName 20}}
  52. </div>
  53. {{range .Orgs}}
  54. <div class="item" data-value="{{.ID}}" title="{{.Name}}">
  55. <img class="ui mini image" src="{{.RelAvatarLink}}">
  56. {{.ShortName 20}}
  57. </div>
  58. {{end}}
  59. </div>
  60. </div>
  61. </div>
  62. <div class="inline required field {{if .Err_RepoName}}error{{end}}">
  63. <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  64. <input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
  65. </div>
  66. <div class="inline field">
  67. <label>{{.i18n.Tr "repo.visibility"}}</label>
  68. <div class="ui checkbox">
  69. {{if .IsForcedPrivate}}
  70. <input name="private" type="checkbox" checked readonly>
  71. <label>{{.i18n.Tr "repo.visibility_helper_forced" | Safe}}</label>
  72. {{else}}
  73. <input name="private" type="checkbox" {{if .private}}checked{{end}}>
  74. <label>{{.i18n.Tr "repo.visibility_helper" | Safe}}</label>
  75. {{end}}
  76. </div>
  77. </div>
  78. <div class="inline field">
  79. <label>{{.i18n.Tr "repo.migrate_type"}}</label>
  80. <div class="ui checkbox">
  81. <input id="mirror" name="mirror" type="checkbox" {{if .mirror}}checked{{end}}>
  82. <label>{{.i18n.Tr "repo.migrate_type_helper" | Safe}}</label>
  83. </div>
  84. </div>
  85. <div id="migrate_items" class="ui field">
  86. <div class="inline field">
  87. <label>{{.i18n.Tr "repo.migrate_items"}}</label>
  88. <div class="ui checkbox">
  89. <input name="wiki" type="checkbox" {{if .wiki}}checked{{end}}>
  90. <label>{{.i18n.Tr "repo.migrate_items_wiki" | Safe}}</label>
  91. </div>
  92. <div class="ui checkbox">
  93. <input name="milestones" type="checkbox" {{if .milestones}}checked{{end}}>
  94. <label>{{.i18n.Tr "repo.migrate_items_milestones" | Safe}}</label>
  95. </div>
  96. </div>
  97. <div class="inline field">
  98. <label></label>
  99. <div class="ui checkbox">
  100. <input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
  101. <label>{{.i18n.Tr "repo.migrate_items_labels" | Safe}}</label>
  102. </div>
  103. <div class="ui checkbox">
  104. <input name="issues" type="checkbox" {{if .issues}}checked{{end}}>
  105. <label>{{.i18n.Tr "repo.migrate_items_issues" | Safe}}</label>
  106. </div>
  107. </div>
  108. <div class="inline field">
  109. <label></label>
  110. <div class="ui checkbox">
  111. <input name="pull_requests" type="checkbox" {{if .pull_requests}}checked{{end}}>
  112. <label>{{.i18n.Tr "repo.migrate_items_pullrequests" | Safe}}</label>
  113. </div>
  114. <div class="ui checkbox">
  115. <input name="releases" type="checkbox" {{if .releases}}checked{{end}}>
  116. <label>{{.i18n.Tr "repo.migrate_items_releases" | Safe}}</label>
  117. </div>
  118. </div>
  119. </div>
  120. <div class="inline field {{if .Err_Description}}error{{end}}">
  121. <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
  122. <textarea id="description" name="description">{{.description}}</textarea>
  123. </div>
  124. <div class="inline field">
  125. <label></label>
  126. <button class="ui green button">
  127. {{.i18n.Tr "repo.migrate_repo"}}
  128. </button>
  129. <a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
  130. </div>
  131. </div>
  132. </form>
  133. </div>
  134. </div>
  135. </div>
  136. {{template "base/footer" .}}
上海开阖软件有限公司 沪ICP备12045867号-1