setting.tmpl 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. {{template "repo/nav" .}}
  4. {{template "repo/toolbar" .}}
  5. <div id="body" class="container">
  6. <div id="user-setting-nav" class="col-md-3">
  7. <ul class="list-group">
  8. <li class="list-group-item active"><a href="/{{.Owner.Name}}/{{.Repository.Name}}/settings">Options</a></li>
  9. <!--<li class="list-group-item"><a href="#">Collaborators</a></li>
  10. <li class="list-group-item"><a href="#">Notifications</a></li>-->
  11. </ul>
  12. </div>
  13. <div id="repo-setting-container" class="col-md-9">
  14. {{if .IsSuccess}}<p class="alert alert-success">Repository options has been successfully updated.</p>{{else if .HasError}}<p class="alert alert-danger form-error">{{.ErrorMsg}}</p>{{end}}
  15. <div class="panel panel-default">
  16. <div class="panel-heading">
  17. Repository Options
  18. </div>
  19. <div class="panel-body">
  20. <form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post" class="form-horizontal">
  21. {{.CsrfTokenHtml}}
  22. <input type="hidden" name="action" value="update">
  23. <div class="form-group">
  24. <label class="col-md-3 text-right">Name</label>
  25. <div class="col-md-9">
  26. <input class="form-control" name="name" value="{{.Repository.Name}}" title="{{.Repository.Name}}" />
  27. </div>
  28. </div>
  29. <div class="form-group">
  30. <label class="col-md-3 text-right">Description</label>
  31. <div class="col-md-9">
  32. <textarea class="form-control" name="desc" id="repo-desc" rows="3">{{.Repository.Description}}</textarea>
  33. </div>
  34. </div>
  35. <div class="form-group">
  36. <label class="col-md-3 text-right">Official Site</label>
  37. <div class="col-md-9">
  38. <input type="url" class="form-control" name="site" value="{{.Repository.Website}}" />
  39. </div>
  40. </div>
  41. <!-- <div class="form-group">
  42. <label class="col-md-3 text-right">Default Branch</label>
  43. <div class="col-md-9">
  44. <select name="branch" id="repo-default-branch" class="form-control">
  45. <option value="">Branch</option>
  46. </select>
  47. </div>
  48. </div> -->
  49. <div class="form-group">
  50. <div class="col-md-9 col-md-offset-3">
  51. <button class="btn btn-primary" type="submit">Save Options</button>
  52. </div>
  53. </div>
  54. </form>
  55. </div>
  56. </div>
  57. <div class="panel panel-warning">
  58. <div class="panel-heading">
  59. Danger Zone
  60. </div>
  61. <div class="panel-body">
  62. <button type="button" class="btn btn-default pull-right" href="#transfer-repository-modal" data-toggle="modal">
  63. Transfer ownership
  64. </button>
  65. <dd>
  66. <dt>Transfer ownership</dt>
  67. <dl>Transfer this repo to another user or to an organization where you have admin rights.</dl>
  68. </dd>
  69. <div class="modal fade" id="transfer-repository-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  70. <div class="modal-dialog">
  71. <form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post" class="modal-content">
  72. {{.CsrfTokenHtml}}
  73. <input type="hidden" name="action" value="transfer">
  74. <div class="modal-header">
  75. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  76. <h4 class="modal-title" id="myModalLabel">Do you really want to transfer this repo?</h4>
  77. </div>
  78. <div class="modal-body">
  79. <div class="alert alert-warning">This is important, pay attention.</div>
  80. <ul>
  81. <!-- <li>Transferring may be delayed until the new owner approves the transfer.</li> -->
  82. <!-- <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> -->
  83. <li>Admin rights will be transferred to the new owner, you <strong>will lose admin rights</strong>.</li>
  84. <!-- <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> -->
  85. <li>Redirect entries <strong>will NOT be</strong> set up from the previous location.</li>
  86. <li>Git access <strong>will NOT continue</strong> to work from the previous location.</li>
  87. </ul>
  88. <div class="form-group">
  89. <label>Please type the name of the repository to confirm "<strong class="text-danger">{{.Repository.Name}}</strong>"</label>
  90. <input name="repository" class="form-control" type="text" placeholder="Type your repository name" required="required">
  91. </div>
  92. <div class="form-group">
  93. <label>Please type the name of the new owner:</label>
  94. <input name="owner" class="form-control" type="text" placeholder="Type new owner's name" required="required">
  95. </div>
  96. </div>
  97. <div class="modal-footer">
  98. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  99. <button class="btn btn-danger btn-lg">I understand the consequences, transfer this repository</button>
  100. </div>
  101. </form>
  102. </div>
  103. </div>
  104. </div>
  105. <hr>
  106. <div class="panel-body">
  107. <button type="button" class="btn btn-default pull-right" href="#delete-repository-modal" data-toggle="modal">
  108. Delete this repository
  109. </button>
  110. <dd>
  111. <dt>Delete this repository</dt>
  112. <dl>Once you delete a repository, there is no going back. Please be certain.</dl>
  113. </dd>
  114. <div class="modal fade" id="delete-repository-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  115. <div class="modal-dialog">
  116. <form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post" class="modal-content">
  117. {{.CsrfTokenHtml}}
  118. <input type="hidden" name="action" value="delete">
  119. <div class="modal-header">
  120. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  121. <h4 class="modal-title" id="myModalLabel">Delete repository</h4>
  122. </div>
  123. <div class="modal-body">
  124. <div class="form-group">
  125. <label>Please enter your repository name "<strong class="text-danger">{{.Repository.Name}}</strong>"</label>
  126. <input name="repository" class="form-control" type="text" placeholder="Type your repository name" required="required">
  127. </div>
  128. </div>
  129. <div class="modal-footer">
  130. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  131. <button class="btn btn-danger btn-lg">I understand the consequences, delete this repository</button>
  132. </div>
  133. </form>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. {{template "base/footer" .}}