gitea源码

git.tmpl 3.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {{template "base/head" .}}
  2. <div role="main" aria-label="{{.Title}}" class="page-content repository new migrate">
  3. <div class="ui container medium-width">
  4. <h3 class="ui top attached header">
  5. {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
  6. </h3>
  7. <div class="ui attached segment">
  8. {{template "base/alert" .}}
  9. <form class="ui form left-right-form" action="{{.Link}}" method="post">
  10. {{template "base/disable_form_autofill"}}
  11. {{.CsrfTokenHtml}}
  12. <input id="service_type" type="hidden" name="service" value="{{.service}}">
  13. <div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
  14. <label for="clone_addr">{{ctx.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. {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.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_username">{{ctx.Locale.Tr "username"}}</label>
  22. <input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
  23. </div>
  24. <div class="inline field {{if .Err_Auth}}error{{end}}">
  25. <label for="auth_password">{{ctx.Locale.Tr "password"}}</label>
  26. <input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
  27. </div>
  28. {{template "repo/migrate/options" .}}
  29. <div class="divider"></div>
  30. <div class="inline required field {{if .Err_Owner}}error{{end}}">
  31. <label>{{ctx.Locale.Tr "repo.owner"}}</label>
  32. <div class="ui selection owner dropdown ellipsis-text-items">
  33. <input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
  34. <span class="text" title="{{.ContextUser.Name}}">
  35. {{ctx.AvatarUtils.Avatar .ContextUser}}
  36. {{.ContextUser.ShortName 40}}
  37. </span>
  38. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  39. <div class="menu" title="{{.SignedUser.Name}}">
  40. <div class="item" data-value="{{.SignedUser.ID}}">
  41. {{ctx.AvatarUtils.Avatar .SignedUser}}
  42. {{.SignedUser.ShortName 40}}
  43. </div>
  44. {{range .Orgs}}
  45. <div class="item" data-value="{{.ID}}" title="{{.Name}}">
  46. {{ctx.AvatarUtils.Avatar .}}
  47. {{.ShortName 40}}
  48. </div>
  49. {{end}}
  50. </div>
  51. </div>
  52. </div>
  53. <div class="inline required field {{if .Err_RepoName}}error{{end}}">
  54. <label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
  55. <input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
  56. </div>
  57. <div class="inline field">
  58. <label>{{ctx.Locale.Tr "repo.visibility"}}</label>
  59. <div class="ui checkbox">
  60. {{if .IsForcedPrivate}}
  61. <input name="private" type="checkbox" checked disabled>
  62. <label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
  63. {{else}}
  64. <input name="private" type="checkbox" {{if .private}}checked{{end}}>
  65. <label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
  66. {{end}}
  67. </div>
  68. </div>
  69. <div class="inline field {{if .Err_Description}}error{{end}}">
  70. <label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
  71. <textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
  72. </div>
  73. <div class="inline field">
  74. <label></label>
  75. <button class="ui primary button">
  76. {{ctx.Locale.Tr "repo.migrate_repo"}}
  77. </button>
  78. </div>
  79. </form>
  80. </div>
  81. </div>
  82. </div>
  83. {{template "base/footer" .}}