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.

71 lines
2.5 KiB

  1. {{template "base/head" .}}
  2. <div class="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. {{.i18n.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>{{.i18n.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">
  17. <img class="ui mini image" src="{{.ContextUser.RelAvatarLink}}">
  18. {{.ContextUser.ShortName 20}}
  19. </span>
  20. <i class="dropdown icon"></i>
  21. <div class="menu">
  22. {{if .CanForkToUser}}
  23. <div class="item" data-value="{{.SignedUser.ID}}">
  24. <img class="ui mini image" src="{{.SignedUser.RelAvatarLink}}">
  25. {{.SignedUser.ShortName 20}}
  26. </div>
  27. {{end}}
  28. {{range .Orgs}}
  29. <div class="item" data-value="{{.ID}}">
  30. <img class="ui mini image" src="{{.RelAvatarLink}}">
  31. {{.ShortName 20}}
  32. </div>
  33. {{end}}
  34. </div>
  35. </div>
  36. </div>
  37. <div class="inline field">
  38. <label>{{.i18n.Tr "repo.fork_from"}}</label>
  39. <a href="{{AppSubUrl}}/{{.ForkFrom}}">{{.ForkFrom}}</a>
  40. </div>
  41. <div class="inline required field {{if .Err_RepoName}}error{{end}}">
  42. <label for="repo_name">{{.i18n.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>{{.i18n.Tr "repo.visibility"}}</label>
  47. <div class="ui read-only checkbox">
  48. <input type="checkbox" {{if .IsPrivate}}checked{{end}}>
  49. <label>{{.i18n.Tr "repo.visibility_helper" | Safe}}</label>
  50. </div>
  51. <span class="help">{{.i18n.Tr "repo.fork_visibility_helper"}}</span>
  52. </div>
  53. <div class="inline field {{if .Err_Description}}error{{end}}">
  54. <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
  55. <textarea id="description" name="description">{{.description}}</textarea>
  56. </div>
  57. <div class="inline field">
  58. <label></label>
  59. <button class="ui green button">
  60. {{.i18n.Tr "repo.fork_repo"}}
  61. </button>
  62. <a class="ui button" href="{{AppSubUrl}}/{{.ForkFrom}}">{{.i18n.Tr "cancel"}}</a>
  63. </div>
  64. </div>
  65. </form>
  66. </div>
  67. </div>
  68. </div>
  69. {{template "base/footer" .}}