gitea源码

codebase.tmpl 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 id="migrate_items">
  30. <div class="inline field">
  31. <label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
  32. <div class="ui checkbox">
  33. <input name="milestones" type="checkbox" {{if .milestones}}checked{{end}}>
  34. <label>{{ctx.Locale.Tr "repo.migrate_items_milestones"}}</label>
  35. </div>
  36. <div class="ui checkbox">
  37. <input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
  38. <label>{{ctx.Locale.Tr "repo.migrate_items_labels"}}</label>
  39. </div>
  40. </div>
  41. <div class="inline field">
  42. <label></label>
  43. <div class="ui checkbox">
  44. <input name="issues" type="checkbox" {{if .issues}}checked{{end}}>
  45. <label>{{ctx.Locale.Tr "repo.migrate_items_issues"}}</label>
  46. </div>
  47. <div class="ui checkbox">
  48. <input name="pull_requests" type="checkbox" {{if .pull_requests}}checked{{end}}>
  49. <label>{{ctx.Locale.Tr "repo.migrate_items_merge_requests"}}</label>
  50. </div>
  51. </div>
  52. </div>
  53. <div class="divider"></div>
  54. <div class="inline required field {{if .Err_Owner}}error{{end}}">
  55. <label>{{ctx.Locale.Tr "repo.owner"}}</label>
  56. <div class="ui selection owner dropdown ellipsis-text-items">
  57. <input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
  58. <span class="text" title="{{.ContextUser.Name}}">
  59. {{ctx.AvatarUtils.Avatar .ContextUser 28 "mini"}}
  60. {{.ContextUser.ShortName 40}}
  61. </span>
  62. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  63. <div class="menu" title="{{.SignedUser.Name}}">
  64. <div class="item" data-value="{{.SignedUser.ID}}">
  65. {{ctx.AvatarUtils.Avatar .SignedUser 28 "mini"}}
  66. {{.SignedUser.ShortName 40}}
  67. </div>
  68. {{range .Orgs}}
  69. <div class="item" data-value="{{.ID}}" title="{{.Name}}">
  70. {{ctx.AvatarUtils.Avatar . 28 "mini"}}
  71. {{.ShortName 40}}
  72. </div>
  73. {{end}}
  74. </div>
  75. </div>
  76. </div>
  77. <div class="inline required field {{if .Err_RepoName}}error{{end}}">
  78. <label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
  79. <input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
  80. </div>
  81. <div class="inline field">
  82. <label>{{ctx.Locale.Tr "repo.visibility"}}</label>
  83. <div class="ui checkbox">
  84. {{if .IsForcedPrivate}}
  85. <input name="private" type="checkbox" checked disabled>
  86. <label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
  87. {{else}}
  88. <input name="private" type="checkbox" {{if .private}}checked{{end}}>
  89. <label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
  90. {{end}}
  91. </div>
  92. </div>
  93. <div class="inline field {{if .Err_Description}}error{{end}}">
  94. <label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
  95. <textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
  96. </div>
  97. <div class="inline field">
  98. <label></label>
  99. <button class="ui primary button">
  100. {{ctx.Locale.Tr "repo.migrate_repo"}}
  101. </button>
  102. </div>
  103. </form>
  104. </div>
  105. </div>
  106. </div>
  107. {{template "base/footer" .}}