options.tmpl 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div id="repo-wrapper">
  4. {{template "repo/header" .}}
  5. <div id="setting-wrapper" class="main-wrapper">
  6. <div id="repo-setting" class="container clear">
  7. {{template "repo/settings/nav" .}}
  8. <div class="grid-4-5 left">
  9. <div class="setting-content">
  10. {{template "ng/base/alert" .}}
  11. <div id="setting-content">
  12. <div class="panel panel-radius">
  13. <div class="panel-header">
  14. <strong>{{.i18n.Tr "repo.settings.basic_settings"}}</strong>
  15. </div>
  16. <form class="form form-align panel-body" id="repo-setting-form" action="{{.RepoLink}}/settings" method="post">
  17. {{.CsrfTokenHtml}}
  18. <input type="hidden" name="action" value="update">
  19. <div class="field">
  20. <label class="req" for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  21. <input class="ipt ipt-large ipt-radius {{if .Err_RepoName}}ipt-error{{end}}" id="repo_name" name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" required />
  22. </div>
  23. <div class="white-popup-block mfp-hide" id="change-reponame-modal">
  24. <h1 class="text-red">{{.i18n.Tr "repo.settings.change_reponame"}}</h1>
  25. <p>{{.i18n.Tr "repo.settings.change_reponame_desc"}}</p>
  26. <br>
  27. <button class="btn btn-red btn-large btn-radius" id="change-reponame-submit">{{.i18n.Tr "settings.continue"}}</button>
  28. <button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
  29. </div>
  30. <div class="field clear">
  31. <label class="left" for="desc">{{.i18n.Tr "repo.repo_desc"}}</label>
  32. <textarea class="ipt ipt-large ipt-radius {{if .Err_Description}}ipt-error{{end}}" id="desc" name="desc">{{.Repository.Description}}</textarea>
  33. </div>
  34. <div class="field">
  35. <label for="website">{{.i18n.Tr "repo.settings.site"}}</label>
  36. <input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="site" type="url" value="{{.Repository.Website}}" />
  37. </div>
  38. <hr>
  39. <br>
  40. {{if not .Repository.IsBare}}
  41. <div class="field">
  42. <label>{{.i18n.Tr "repo.default_branch"}}</label>
  43. <select name="branch">
  44. {{if .Repository.DefaultBranch}}<option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>{{end}}
  45. {{range .Branches}}
  46. {{if not (eq . $.Repository.DefaultBranch)}}<option value="{{.}}">{{.}}</option>{{end}}
  47. {{end}}
  48. </select>
  49. </div>
  50. {{end}}
  51. {{if .Repository.IsMirror}}
  52. <div class="field">
  53. <label for="interval">{{.i18n.Tr "repo.mirror_interval"}}</label>
  54. <input class="ipt ipt-large ipt-radius {{if .Err_Interval}}ipt-error{{end}}" id="interval" name="interval" type="number" value="{{.MirrorInterval}}" />
  55. </div>
  56. {{end}}
  57. <div class="field">
  58. <label for="visibility">{{.i18n.Tr "repo.visibility"}}</label>
  59. <input class="ipt-chk" id="visibility" name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}} />
  60. <span>{{.i18n.Tr "repo.visiblity_helper" | Str2html}}</span>
  61. </div>
  62. <div class="field">
  63. <span class="form-label"></span>
  64. <button class="btn btn-green btn-large btn-radius" id="change-reponame-btn" href="#change-reponame-modal">{{.i18n.Tr "repo.settings.update_settings"}}</button>
  65. </div>
  66. </form>
  67. </div>
  68. </div>
  69. </div>
  70. <br>
  71. <div class="setting-content">
  72. <div id="setting-content">
  73. <div id="user-profile-setting-content" class="panel panel-warning panel-radius">
  74. <div class="panel-header">
  75. <strong>{{.i18n.Tr "repo.settings.danger_zone"}}</strong>
  76. </div>
  77. <div class="panel-body">
  78. <div class="repo-setting-zone">
  79. <button class="btn btn-gray btn-large btn-radius right" id="transfer-repo-btn" href="#transfer-repo-modal">{{.i18n.Tr "repo.settings.transfer"}}</button>
  80. <dt>{{.i18n.Tr "repo.settings.transfer"}}</dt>
  81. <dl>{{.i18n.Tr "repo.settings.transfer_desc"}}</dl>
  82. <div class="white-popup-block mfp-hide" id="transfer-repo-modal">
  83. <h1 class="text-red">{{.i18n.Tr "repo.settings.transfer"}}</h1>
  84. {{.i18n.Tr "repo.settings.transfer_notices" | Str2html}}
  85. <br>
  86. <form class="form-align form panel container panel-radius" id="transfer-repo-form" action="{{.RepoLink}}/settings" method="post">
  87. {{.CsrfTokenHtml}}
  88. <input type="hidden" name="action" value="transfer">
  89. <div class="panel-content">
  90. <div class="field">
  91. <label class="req" for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  92. <input class="ipt ipt-large ipt-radius" id="repo_name" name="repo_name" required />
  93. </div>
  94. <div class="field">
  95. <label class="req" for="new_owner_name">{{.i18n.Tr "repo.settings.transfer_owner"}}</label>
  96. <input class="ipt ipt-large ipt-radius" id="new_owner_name" name="new_owner_name" required/>
  97. </div>
  98. <div class="field">
  99. <label class="req" for="password">{{.i18n.Tr "password"}}</label>
  100. <input class="ipt ipt-large ipt-radius" id="password" name="password" type="password" required/>
  101. </div>
  102. </div>
  103. </form>
  104. <br>
  105. <button class="btn btn-large btn-red btn-radius" id="transfer-repo-submit">{{.i18n.Tr "repo.settings.make_transfer"}}</button>
  106. <button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
  107. </div>
  108. </div>
  109. <hr>
  110. <div class="repo-setting-zone">
  111. <button class="btn btn-gray btn-large btn-radius pull-right" id="delete-repo-btn" href="#delete-repo-modal">{{.i18n.Tr "repo.settings.delete"}}</button>
  112. <dt>{{.i18n.Tr "repo.settings.delete"}}</dt>
  113. <dl>{{.i18n.Tr "repo.settings.delete_desc"}}</dl>
  114. <div class="white-popup-block mfp-hide" id="delete-repo-modal">
  115. <h1 class="text-red">{{.i18n.Tr "repo.settings.delete"}}</h1>
  116. <br>
  117. <form class="form-align form panel container panel-radius" id="delete-repo-form" action="{{.RepoLink}}/settings" method="post">
  118. {{.CsrfTokenHtml}}
  119. <input type="hidden" name="action" value="delete">
  120. <div class="panel-content">
  121. <div class="field">
  122. <label class="req" for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  123. <input class="ipt ipt-large ipt-radius" id="repo_name" name="repo_name" required />
  124. </div>
  125. <div class="field">
  126. <label class="req" for="password">{{.i18n.Tr "password"}}</label>
  127. <input class="ipt ipt-large ipt-radius" id="password" name="password" type="password" required/>
  128. </div>
  129. </div>
  130. </form>
  131. <br>
  132. <button class="btn btn-large btn-red btn-radius" id="delete-repo-submit">{{.i18n.Tr "repo.settings.confirm_delete"}}</button>
  133. <button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. </div>
  144. {{template "ng/base/footer" .}}