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.

64 lines
3.6 KiB

  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div id="repo-wrapper">
  4. <form id="repo-create-form" class="form form-align panel panel-radius" action="{{AppSubUrl}}/repo/fork?fork_id={{.ForkId}}" method="post">
  5. {{.CsrfTokenHtml}}
  6. <div class="panel-header">
  7. <h2>{{.i18n.Tr "new_fork"}}</h2>
  8. </div>
  9. <div class="panel-content">
  10. {{template "ng/base/alert" .}}
  11. <div class="field">
  12. <label for="owner" class="req">{{.i18n.Tr "repo.owner"}}</label>
  13. <input id="repo-owner-id" type="hidden" name="uid" value="{{.ContextUser.Id}}" />
  14. <div class="inline-block drop">
  15. <a class="drop-bottom">
  16. <img class="avatar" src="{{.ContextUser.AvatarLink}}" id="repo-owner-avatar" alt="user-avatar">
  17. <strong id="repo-owner-name">{{.ContextUser.Name}}</strong>
  18. </a>
  19. <ul class="drop-down menu menu-vertical menu-radius switching-list" id="repo-create-owner-list">
  20. <li {{if eq $.ContextUser.Id .SignedUser.Id}}class="checked"{{end}} data-uid="{{.SignedUser.Id}}">
  21. <a>
  22. <i class="octicon octicon-check"></i>
  23. <img class="avatar" src="{{.SignedUser.AvatarLink}}" alt="user-avatar">
  24. <strong>{{.SignedUser.Name}}</strong>
  25. </a>
  26. </li>
  27. {{range .Orgs}}
  28. <li {{if eq $.ContextUser.Id .Id}}class="checked"{{end}} data-uid="{{.Id}}">
  29. <a>
  30. <i class="octicon octicon-check"></i>
  31. <img class="avatar" src="{{.AvatarLink}}" alt="user-avatar">
  32. <strong>{{.Name}}</strong>
  33. </a>
  34. </li>
  35. {{end}}
  36. </ul>
  37. </div>
  38. </div>
  39. <div class="field">
  40. <label>{{.i18n.Tr "repo.fork_from"}}</label>
  41. <span><a target="_blank" href="{{AppSubUrl}}/{{.ForkFrom}}">{{.ForkFrom}}</a></span>
  42. </div>
  43. <div class="field">
  44. <label class="req" for="repo-name">{{.i18n.Tr "repo.repo_name"}}</label>
  45. <input class="ipt ipt-large ipt-radius {{if .Err_RepoName}}ipt-error{{end}}" id="repo-name" name="repo_name" type="text" value="{{.repo_name}}" required />
  46. <span class="form-label"></span>
  47. <span class="help">{{.i18n.Tr "repo.repo_name_helper" | Str2html}}</span>
  48. </div>
  49. <div class="field">
  50. <label for="visibility">{{.i18n.Tr "repo.visibility"}}</label>
  51. <span>{{.i18n.Tr "repo.fork_visiblity_helper"}}</span>
  52. </div>
  53. <div class="field clear">
  54. <label class="left" for="desc">{{.i18n.Tr "repo.repo_desc"}}</label>
  55. <textarea class="ipt ipt-large ipt-radius {{if .Err_Description}}ipt-error{{end}}" id="desc" name="desc">{{.desc}}</textarea>
  56. </div>
  57. <div class="field">
  58. <label></label>
  59. <button class="btn btn-large btn-blue btn-radius">{{.i18n.Tr "repo.fork_repo"}}</button>
  60. <a class="btn btn-small btn-gray btn-radius" id="repo-create-cancel" href="{{AppSubUrl}}/"><strong>{{.i18n.Tr "cancel"}}</strong></a>
  61. </div>
  62. </div>
  63. </form>
  64. </div>
  65. {{template "ng/base/footer" .}}