gitea源码

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. {{template "base/head" .}}
  2. <div role="main" aria-label="{{.Title}}" class="page-content repository new fork">
  3. <div class="ui container medium-width">
  4. <h3 class="ui top attached header">
  5. {{ctx.Locale.Tr "new_fork"}}
  6. </h3>
  7. <div class="ui attached segment">
  8. {{template "base/alert" .}}
  9. <form class="ui form form-fetch-action left-right-form" action="{{.Link}}" method="post">
  10. {{.CsrfTokenHtml}}
  11. <div class="inline required field {{if .Err_Owner}}error{{end}}">
  12. <label>{{ctx.Locale.Tr "repo.owner"}}</label>
  13. <div class="ui selection owner dropdown ellipsis-text-items">
  14. <input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
  15. <span class="text" title="{{.ContextUser.Name}}">
  16. {{ctx.AvatarUtils.Avatar .ContextUser 28 "mini"}}
  17. {{.ContextUser.ShortName 40}}
  18. </span>
  19. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  20. <div class="menu">
  21. {{if .CanForkToUser}}
  22. <div class="item" data-value="{{.SignedUser.ID}}" title="{{.SignedUser.Name}}">
  23. {{ctx.AvatarUtils.Avatar .SignedUser 28 "mini"}}
  24. {{.SignedUser.ShortName 40}}
  25. </div>
  26. {{end}}
  27. {{range .Orgs}}
  28. <div class="item" data-value="{{.ID}}" title="{{.Name}}">
  29. {{ctx.AvatarUtils.Avatar . 28 "mini"}}
  30. {{.ShortName 40}}
  31. </div>
  32. {{end}}
  33. </div>
  34. </div>
  35. </div>
  36. <div class="inline field">
  37. <label>{{ctx.Locale.Tr "repo.fork_from"}}</label>
  38. <a href="{{.ForkRepo.Link}}" class="tw-inline-block">{{.ForkRepo.FullName}}</a>
  39. </div>
  40. <div class="inline required field {{if .Err_RepoName}}error{{end}}">
  41. <label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
  42. <input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
  43. </div>
  44. <div class="inline field">
  45. <label>{{ctx.Locale.Tr "repo.visibility"}}</label>
  46. <div class="ui disabled checkbox">
  47. <input type="checkbox" disabled {{if .IsPrivate}}checked{{end}}>
  48. <label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
  49. </div>
  50. <span class="help">{{ctx.Locale.Tr "repo.fork_visibility_helper"}}</span>
  51. </div>
  52. <div class="inline field">
  53. <label>{{ctx.Locale.Tr "repo.fork_branch"}}</label>
  54. <div class="ui selection dropdown ellipsis-text-items">
  55. <input type="hidden" id="fork_single_branch" name="fork_single_branch" value="" required>
  56. <div class="text" title="{{ctx.Locale.Tr "repo.all_branches"}}">
  57. {{ctx.Locale.Tr "repo.all_branches"}}
  58. </div>
  59. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  60. <div class="menu">
  61. <div class="item" data-value="" title="{{ctx.Locale.Tr "repo.all_branches"}}">
  62. {{ctx.Locale.Tr "repo.all_branches"}}
  63. </div>
  64. {{range .Branches}}
  65. <div class="item" data-value="{{.}}" title="{{.}}">{{.}}</div>
  66. {{end}}
  67. </div>
  68. </div>
  69. </div>
  70. <div class="inline field {{if .Err_Description}}error{{end}}">
  71. <label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
  72. <textarea id="description" name="description">{{.description}}</textarea>
  73. </div>
  74. <div class="inline field">
  75. <label></label>
  76. <button class="ui primary button{{if not .CanForkRepoInNewOwner}} disabled{{end}}">
  77. {{ctx.Locale.Tr "repo.fork_repo"}}
  78. </button>
  79. </div>
  80. </form>
  81. </div>
  82. </div>
  83. </div>
  84. {{template "base/footer" .}}