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.

fork.tmpl 3.8KB

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