fork.tmpl 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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="user_id" name="user_id" 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. <div class="item" data-value="{{.LoggedUser.ID}}">
  23. <img class="ui mini image" src="{{.LoggedUser.RelAvatarLink}}">
  24. {{.LoggedUser.ShortName 20}}
  25. </div>
  26. {{range .Orgs}}
  27. {{if .IsOwnedBy $.LoggedUser.ID}}
  28. <div class="item" data-value="{{.ID}}">
  29. <img class="ui mini image" src="{{.RelAvatarLink}}">
  30. {{.ShortName 20}}
  31. </div>
  32. {{end}}
  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.visiblity_helper" | Safe}}</label>
  50. </div>
  51. </div>
  52. <div class="inline field">
  53. <label></label>
  54. <div class="ui read-only checkbox">
  55. <input type="checkbox" {{if .IsUnlisted}}checked{{end}}>
  56. <label>{{.i18n.Tr "repo.unlisted_helper" | Safe}}</label>
  57. </div>
  58. <span class="help">{{.i18n.Tr "repo.fork_visiblity_helper"}}</span>
  59. </div>
  60. <div class="inline field {{if .Err_Description}}error{{end}}">
  61. <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
  62. <textarea id="description" name="description">{{.description}}</textarea>
  63. </div>
  64. <div class="inline field">
  65. <label></label>
  66. <button class="ui green button">
  67. {{.i18n.Tr "repo.fork_repo"}}
  68. </button>
  69. <a class="ui button" href="{{AppSubURL}}/{{.ForkFrom}}">{{.i18n.Tr "cancel"}}</a>
  70. </div>
  71. </div>
  72. </form>
  73. </div>
  74. </div>
  75. </div>
  76. {{template "base/footer" .}}