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.

setting.tmpl 4.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 option 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">Description</label>
  25. <div class="col-md-9">
  26. <textarea class="form-control" name="desc" id="repo-desc" rows="3">{{.Repository.Description}}</textarea>
  27. </div>
  28. </div>
  29. <div class="form-group">
  30. <label class="col-md-3 text-right">Official Site</label>
  31. <div class="col-md-9">
  32. <input type="url" class="form-control" name="site" value="{{.Repository.Website}}" />
  33. </div>
  34. </div>
  35. <!-- <div class="form-group">
  36. <label class="col-md-3 text-right">Default Branch</label>
  37. <div class="col-md-9">
  38. <select name="branch" id="repo-default-branch" class="form-control">
  39. <option value="">Branch</option>
  40. </select>
  41. </div>
  42. </div> -->
  43. <div class="form-group">
  44. <div class="col-md-9 col-md-offset-3">
  45. <button class="btn btn-primary" type="submit">Save Options</button>
  46. </div>
  47. </div>
  48. </form>
  49. </div>
  50. </div>
  51. <div class="panel panel-warning">
  52. <div class="panel-heading">
  53. Danger Zone
  54. </div>
  55. <div class="panel-body">
  56. <button type="button" class="btn btn-default pull-right" href="#delete-repository-modal" data-toggle="modal">
  57. Delete this repository
  58. </button>
  59. <dd>
  60. <dt>Delete this repository.</dt>
  61. <dl>Once you delete a repository, there is no going back. Please be certain.</dl>
  62. </dd>
  63. <div class="modal fade" id="delete-repository-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  64. <div class="modal-dialog">
  65. <form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post" class="modal-content">
  66. {{.CsrfTokenHtml}}
  67. <input type="hidden" name="action" value="delete">
  68. <div class="modal-header">
  69. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  70. <h4 class="modal-title" id="myModalLabel">Delete repository</h4>
  71. </div>
  72. <div class="modal-body">
  73. <div class="form-group">
  74. <label>Please enter your repository name "<strong class="text-danger">{{.Repository.Name}}</strong>"</label>
  75. <input name="repository" class="form-control" type="text" placeholder="Type your repository name" required="required">
  76. </div>
  77. </div>
  78. <div class="modal-footer">
  79. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  80. <button class="btn btn-danger btn-lg">I understand the consequences, delete this repository</button>
  81. </div>
  82. </form>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. {{template "base/footer" .}}