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.

gogs.tmpl 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. {{template "base/head" .}}
  2. <div role="main" aria-label="{{.Title}}" class="page-content 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. {{.locale.Tr "repo.migrate.migrate" .service.Title}}
  9. <input id="service_type" type="hidden" name="service" value="{{.service}}">
  10. </h3>
  11. <div class="ui attached segment">
  12. {{template "base/alert" .}}
  13. <div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
  14. <label for="clone_addr">{{.locale.Tr "repo.migrate.clone_address"}}</label>
  15. <input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
  16. <span class="help">
  17. {{.locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate.clone_local_path"}}{{end}}
  18. </span>
  19. </div>
  20. <div class="inline field {{if .Err_Auth}}error{{end}}">
  21. <label for="auth_token">{{.locale.Tr "access_token"}}</label>
  22. <input id="auth_token" name="auth_token" type="password" autocomplete="new-password" value="{{.auth_token}}" {{if not .auth_token}} data-need-clear="true" {{end}}>
  23. <!-- <a target="_blank" href="https://docs.gitea.com/development/api-usage">{{svg "octicon-question"}}</a> -->
  24. </div>
  25. {{template "repo/migrate/options" .}}
  26. <div class="inline field">
  27. <label>{{.locale.Tr "repo.migrate_items"}}</label>
  28. <div class="ui checkbox">
  29. <input name="wiki" type="checkbox" {{if .wiki}} checked{{end}}>
  30. <label>{{.locale.Tr "repo.migrate_items_wiki" | Safe}}</label>
  31. </div>
  32. </div>
  33. <div id="migrate_items">
  34. <span class="help">{{.locale.Tr "repo.migrate.migrate_items_options"}}</span>
  35. <div class="inline field">
  36. <label></label>
  37. <div class="ui checkbox">
  38. <input name="labels" type="checkbox" {{if .labels}} checked{{end}}>
  39. <label>{{.locale.Tr "repo.migrate_items_labels" | Safe}}</label>
  40. </div>
  41. <div class="ui checkbox">
  42. <input name="issues" type="checkbox" {{if .issues}} checked{{end}}>
  43. <label>{{.locale.Tr "repo.migrate_items_issues" | Safe}}</label>
  44. </div>
  45. </div>
  46. <div class="inline field">
  47. <label></label>
  48. <div class="ui checkbox">
  49. <input name="milestones" type="checkbox" {{if .milestones}} checked{{end}}>
  50. <label>{{.locale.Tr "repo.migrate_items_milestones" | Safe}}</label>
  51. </div>
  52. </div>
  53. <!-- Gogs do not support it
  54. <div class="inline field">
  55. <label></label>
  56. <div class="ui checkbox">
  57. <input name="pull_requests" type="checkbox" {{if .pull_requests}} checked{{end}}>
  58. <label>{{.locale.Tr "repo.migrate_items_merge_requests" | Safe}}</label>
  59. </div>
  60. <div class="ui checkbox">
  61. <input name="releases" type="checkbox" {{if .releases}} checked{{end}}>
  62. <label>{{.locale.Tr "repo.migrate_items_releases" | Safe}}</label>
  63. </div>
  64. </div>
  65. -->
  66. </div>
  67. <div class="divider"></div>
  68. <div class="inline required field {{if .Err_Owner}}error{{end}}">
  69. <label>{{.locale.Tr "repo.owner"}}</label>
  70. <div class="ui selection owner dropdown">
  71. <input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
  72. <span class="text truncated-item-container" title="{{.ContextUser.Name}}">
  73. {{ctx.AvatarUtils.Avatar .ContextUser}}
  74. <span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
  75. </span>
  76. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  77. <div class="menu" title="{{.SignedUser.Name}}">
  78. <div class="item truncated-item-container" data-value="{{.SignedUser.ID}}">
  79. {{ctx.AvatarUtils.Avatar .SignedUser}}
  80. <span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
  81. </div>
  82. {{range .Orgs}}
  83. <div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
  84. {{ctx.AvatarUtils.Avatar .}}
  85. <span class="truncated-item-name">{{.ShortName 40}}</span>
  86. </div>
  87. {{end}}
  88. </div>
  89. </div>
  90. </div>
  91. <div class="inline required field {{if .Err_RepoName}}error{{end}}">
  92. <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
  93. <input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
  94. </div>
  95. <div class="inline field">
  96. <label>{{.locale.Tr "repo.visibility"}}</label>
  97. <div class="ui checkbox">
  98. {{if .IsForcedPrivate}}
  99. <input name="private" type="checkbox" checked readonly>
  100. <label>{{.locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
  101. {{else}}
  102. <input name="private" type="checkbox" {{if .private}} checked{{end}}>
  103. <label>{{.locale.Tr "repo.visibility_helper" | Safe}}</label>
  104. {{end}}
  105. </div>
  106. </div>
  107. <div class="inline field {{if .Err_Description}}error{{end}}">
  108. <label for="description">{{.locale.Tr "repo.repo_desc"}}</label>
  109. <textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
  110. </div>
  111. <div class="inline field">
  112. <label></label>
  113. <button class="ui green button">
  114. {{.locale.Tr "repo.migrate_repo"}}
  115. </button>
  116. </div>
  117. </div>
  118. </form>
  119. </div>
  120. </div>
  121. </div>
  122. {{template "base/footer" .}}