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.

155 lines
8.9 KiB

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