Fork to maintain patches against the official gitea for https://code.ceondo.com https://github.com/go-gitea/gitea

branches.tmpl 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {{template "base/head" .}}
  2. <div class="repository settings edit">
  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.default_branch"}}
  11. </h4>
  12. <div class="ui attached table segment">
  13. <form class="ui hook list form" action="{{.Link}}" method="post">
  14. {{.CsrfTokenHtml}}
  15. <input type="hidden" name="action" value="default_branch">
  16. <div class="item">
  17. The default branch is considered the "base" branch in your repository,
  18. against which all pull requests and code commits are automatically made,
  19. unless you specify a different branch.
  20. </div>
  21. {{if not .Repository.IsBare}}
  22. <div class="ui grid padded">
  23. <div class="eight wide column">
  24. <div class="ui fluid dropdown selection visible" tabindex="0">
  25. <select name="branch">
  26. <option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
  27. {{range .Branches}}
  28. <option value="{{.}}">{{.}}</option>
  29. {{end}}
  30. </select><i class="dropdown icon"></i>
  31. <div class="default text">{{.Repository.DefaultBranch}}</div>
  32. <div class="menu transition hidden" tabindex="-1" style="display: block !important;">
  33. {{range .Branches}}
  34. <div class="item" data-value="{{.}}">{{.}}</div>
  35. {{end}}
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. {{end}}
  41. <div class="item field">
  42. <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
  43. </div>
  44. </form>
  45. </div>
  46. <h4 class="ui top attached header">
  47. {{.i18n.Tr "repo.settings.protected_branch"}}
  48. </h4>
  49. <div class="ui attached table segment">
  50. <div class="ui grid padded">
  51. <div class="eight wide column">
  52. <div class="ui fluid dropdown selection visible" tabindex="0">
  53. <select id="protectedBranch" name="branch" data-url="{{.Repository.Link}}/settings/branches?action=protected_branch">
  54. {{range .LeftBranches}}
  55. <option value="">Choose a branch...</option>
  56. <option value="{{.}}">{{.}}</option>
  57. {{end}}
  58. </select><i class="dropdown icon"></i>
  59. <div class="default text">Choose a branch...</div>
  60. <div class="menu transition hidden" tabindex="-1" style="display: block !important;">
  61. {{range .LeftBranches}}
  62. <div class="item" data-value="{{.}}">{{.}}</div>
  63. {{end}}
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="ui grid padded">
  69. <div class="sixteen wide column">
  70. <table class="ui single line table padded">
  71. <tbody>
  72. {{range .ProtectedBranches}}
  73. <tr>
  74. <td><div class="ui large label">{{.BranchName}}</div></td>
  75. <td class="right aligned"><button class="rm ui red button" data-url="{{$.Repository.Link}}/settings/branches?action=protected_branch&id={{.ID}}" data-val="{{.BranchName}}">Delete</button></td>
  76. </tr>
  77. {{else}}
  78. <tr class="center aligned"><td>There is no protected branch</td></tr>
  79. {{end}}
  80. </tbody>
  81. </table>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. {{template "base/footer" .}}