fork.tmpl 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. <div class="item" data-value="{{.SignedUser.ID}}">
  23. <img class="ui mini image" src="{{.SignedUser.RelAvatarLink}}">
  24. {{.SignedUser.ShortName 20}}
  25. </div>
  26. {{range .Orgs}}
  27. {{if .IsOwnedBy $.SignedUser.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. <span class="help">{{.i18n.Tr "repo.fork_visiblity_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" .}}