setting.tmpl 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. {{template "repo/nav" .}}
  4. {{template "repo/toolbar" .}}
  5. <div id="body" class="container">
  6. {{template "repo/setting_nav" .}}
  7. <div id="repo-setting-container" class="col-md-10">
  8. {{template "base/alert" .}}
  9. <div class="panel panel-default">
  10. <div class="panel-heading">
  11. Repository Options
  12. </div>
  13. <div class="panel-body">
  14. <form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post" class="form-horizontal">
  15. {{.CsrfTokenHtml}}
  16. <input type="hidden" name="action" value="update">
  17. <div class="form-group">
  18. <label class="col-md-3 text-right" for="repo-setting-name">Name</label>
  19. <div class="col-md-9">
  20. <input class="form-control" name="name" value="{{.Repository.Name}}" title="{{.Repository.Name}}" id="repo-setting-name"/>
  21. <p class="help-block hidden"><span class="text-danger">Cautious : </span>your repository name is changing !</p>
  22. </div>
  23. </div>
  24. <div class="form-group">
  25. <label class="col-md-3 text-right">Description</label>
  26. <div class="col-md-9">
  27. <textarea class="form-control" name="desc" id="repo-desc" rows="3">{{.Repository.Description}}</textarea>
  28. </div>
  29. </div>
  30. <div class="form-group">
  31. <label class="col-md-3 text-right">Official Site</label>
  32. <div class="col-md-9">
  33. <input type="url" class="form-control" name="site" value="{{.Repository.Website}}" />
  34. </div>
  35. </div>
  36. <hr>
  37. <div class="form-group">
  38. <label class="col-md-3 text-right">Default Branch</label>
  39. <div class="col-md-3">
  40. <select name="branch" id="repo-default-branch" class="form-control">
  41. {{if .Repository.DefaultBranch}}<option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>{{end}}
  42. {{range .Branches}}
  43. {{if eq . $.Repository.DefaultBranch}}{{else}}<option value="{{.}}">{{.}}</option>{{end}}
  44. {{end}}
  45. </select>
  46. </div>
  47. </div>
  48. {{if .Repository.IsMirror}}<div class="form-group">
  49. <label class="col-md-3 text-right">Mirror Interval(hours)</label>
  50. <div class="col-md-3">
  51. <input class="form-control" name="interval" value="{{.MirrorInterval}}"/>
  52. </div>
  53. </div>{{end}}
  54. <div class="form-group">
  55. <div class="col-md-offset-3 col-md-9">
  56. <div class="checkbox">
  57. <label style="line-height: 15px;">
  58. <input type="checkbox" name="private" {{if .Repository.IsPrivate}}checked{{end}}>
  59. <strong>Make this repository private</strong>
  60. </label>
  61. </div>
  62. <div class="checkbox">
  63. <label style="line-height: 15px;">
  64. <input type="checkbox" name="goget" {{if .Repository.IsGoget}}checked{{end}}>
  65. <strong>Enable 'go get' meta</strong>
  66. </label>
  67. </div>
  68. </div>
  69. </div>
  70. <div class="form-group">
  71. <div class="col-md-9 col-md-offset-3">
  72. <button class="btn btn-primary" type="submit">Save Options</button>
  73. </div>
  74. </div>
  75. </form>
  76. </div>
  77. </div>
  78. <div class="panel panel-warning">
  79. <div class="panel-heading">
  80. Danger Zone
  81. </div>
  82. {{if not .Repository.IsMirror}}
  83. <div class="panel-body">
  84. <button type="button" class="btn btn-default pull-right" href="#transfer-repository-modal" data-toggle="modal">
  85. Transfer ownership
  86. </button>
  87. <dd>
  88. <dt>Transfer ownership</dt>
  89. <dl>Transfer this repo to another user or to an organization where you have admin rights.</dl>
  90. </dd>
  91. <div class="modal fade" id="transfer-repository-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  92. <div class="modal-dialog">
  93. <form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post" class="modal-content">
  94. {{.CsrfTokenHtml}}
  95. <input type="hidden" name="action" value="transfer">
  96. <div class="modal-header">
  97. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  98. <h4 class="modal-title" id="myModalLabel">Do you really want to transfer this repo?</h4>
  99. </div>
  100. <div class="modal-body">
  101. <div class="alert alert-warning">This is important, pay attention.</div>
  102. <ul>
  103. <!-- <li>Transferring may be delayed until the new owner approves the transfer.</li> -->
  104. <!-- <li>If you are transferring into an org, teams <strong>will not be set</strong>. An owner on the org will need to set teams for the repo.</li> -->
  105. <li>Admin rights will be transferred to the new owner, you <strong>will lose admin rights</strong>.</li>
  106. <!-- <li>Admin rights will be transferred to the new owner, you <strong>may lose admin rights</strong> if you are transferring into an organization account.</li> -->
  107. <li>Redirect entries <strong>will NOT be</strong> set up from the previous location.</li>
  108. <li>Git access <strong>will NOT continue</strong> to work from the previous location.</li>
  109. </ul>
  110. <div class="form-group">
  111. <label>Please type the name of the repository to confirm "<strong class="text-danger">{{.Repository.Name}}</strong>"</label>
  112. <input name="repository" class="form-control" type="text" placeholder="Type your repository name" required="required">
  113. </div>
  114. <div class="form-group">
  115. <label>Please type the name of the new owner:</label>
  116. <input name="owner" class="form-control" type="text" placeholder="Type new owner's name" required="required">
  117. </div>
  118. </div>
  119. <div class="modal-footer">
  120. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  121. <button class="btn btn-danger btn-lg">I understand the consequences, transfer this repository</button>
  122. </div>
  123. </form>
  124. </div>
  125. </div>
  126. </div>
  127. {{end}}
  128. <hr>
  129. <div class="panel-body">
  130. <button type="button" class="btn btn-default pull-right" href="#delete-repository-modal" data-toggle="modal">
  131. Delete this repository
  132. </button>
  133. <dd>
  134. <dt>Delete this repository</dt>
  135. <dl>Once you delete a repository, there is no going back. Please be certain.</dl>
  136. </dd>
  137. <div class="modal fade" id="delete-repository-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  138. <div class="modal-dialog">
  139. <form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post" class="modal-content">
  140. {{.CsrfTokenHtml}}
  141. <input type="hidden" name="action" value="delete">
  142. <div class="modal-header">
  143. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  144. <h4 class="modal-title" id="myModalLabel">Delete repository</h4>
  145. </div>
  146. <div class="modal-body">
  147. <div class="form-group">
  148. <label>Please enter your repository name "<strong class="text-danger">{{.Repository.Name}}</strong>"</label>
  149. <input name="repository" class="form-control" type="text" placeholder="Type your repository name" required="required">
  150. </div>
  151. </div>
  152. <div class="modal-footer">
  153. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  154. <button class="btn btn-danger btn-lg">I understand the consequences, delete this repository</button>
  155. </div>
  156. </form>
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. {{template "base/footer" .}}