branches.tmpl 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {{template "base/head" .}}
  2. <div class="repository settings branches">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <div class="ui grid">
  6. {{template "repo/settings/navbar" .}}
  7. <div class="twelve wide column content">
  8. {{template "base/alert" .}}
  9. <h4 class="ui top attached header">
  10. {{.i18n.Tr "repo.settings.default_branch"}}
  11. </h4>
  12. <div class="ui attached segment default-branch">
  13. <p>{{.i18n.Tr "repo.settings.default_branch_desc"}}</p>
  14. <form class="ui form" action="{{.Link}}/default_branch" method="post">
  15. {{.CSRFTokenHTML}}
  16. <div class="required inline field {{if .Repository.IsBare}}disabled{{end}}">
  17. <div class="ui selection dropdown">
  18. <input type="hidden" id="branch" name="branch" value="{{.Repository.DefaultBranch}}">
  19. <div class="text">{{.Repository.DefaultBranch}}</div>
  20. <i class="dropdown icon"></i>
  21. <div class="menu">
  22. {{range .Branches}}
  23. <div class="item" data-value="{{.}}">{{.}}</div>
  24. {{end}}
  25. </div>
  26. </div>
  27. <button class="ui green button">{{$.i18n.Tr "repo.settings.update"}}</button>
  28. </div>
  29. </form>
  30. </div>
  31. <h4 class="ui top attached header">
  32. {{.i18n.Tr "repo.settings.protected_branches"}}
  33. </h4>
  34. <div class="ui attached segment protected-branches">
  35. <p>{{.i18n.Tr "repo.settings.protected_branches_desc"}}</p>
  36. <div class="ui form">
  37. <div class="required inline field {{if .Repository.IsBare}}disabled{{end}}">
  38. <div class="ui selection dropdown">
  39. <div class="text">{{.i18n.Tr "repo.settings.choose_a_branch"}}</div>
  40. <i class="dropdown icon"></i>
  41. <div class="menu">
  42. {{range .Branches}}
  43. <div class="item" data-url="{{$.Link}}/{{EscapePound .}}">{{.}}</div>
  44. {{end}}
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. <div class="ui protected-branches list">
  50. {{range .ProtectBranches}}
  51. <div class="item">
  52. <a href="{{$.Link}}/{{EscapePound .}}"><code>{{.}}</code></a>
  53. </div>
  54. {{end}}
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. {{template "base/footer" .}}