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

branches.tmpl 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. {{.i18n.Tr "settings.default_branch_desc"}}
  18. </div>
  19. {{if not .Repository.IsBare}}
  20. <div class="ui grid padded">
  21. <div class="eight wide column">
  22. <div class="ui fluid dropdown selection visible" tabindex="0">
  23. <select name="branch">
  24. <option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
  25. {{range .Branches}}
  26. <option value="{{.}}">{{.}}</option>
  27. {{end}}
  28. </select><i class="dropdown icon"></i>
  29. <div class="default text">{{.Repository.DefaultBranch}}</div>
  30. <div class="menu transition hidden" tabindex="-1" style="display: block !important;">
  31. {{range .Branches}}
  32. <div class="item" data-value="{{.}}">{{.}}</div>
  33. {{end}}
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. {{end}}
  39. <div class="item field">
  40. <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
  41. </div>
  42. </form>
  43. </div>
  44. <h4 class="ui top attached header">
  45. {{.i18n.Tr "repo.settings.protected_branch"}}
  46. </h4>
  47. <div class="ui attached table segment">
  48. <div class="ui grid padded">
  49. <div class="eight wide column">
  50. <div class="ui fluid dropdown selection visible" tabindex="0">
  51. <select id="protectedBranch" name="branch" data-url="{{.Repository.Link}}/settings/branches?action=protected_branch">
  52. {{range .LeftBranches}}
  53. <option value="">{{.i18n.Tr "settings.choose_branch"}}</option>
  54. <option value="{{.}}">{{.}}</option>
  55. {{end}}
  56. </select><i class="dropdown icon"></i>
  57. <div class="default text">{{.i18n.Tr "settings.choose_branch"}}</div>
  58. <div class="menu transition hidden" tabindex="-1" style="display: block !important;">
  59. {{range .LeftBranches}}
  60. <div class="item" data-value="{{.}}">{{.}}</div>
  61. {{end}}
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. <div class="ui grid padded">
  67. <div class="sixteen wide column">
  68. <table class="ui single line table padded">
  69. <tbody>
  70. {{range .ProtectedBranches}}
  71. <tr>
  72. <td><div class="ui large label">{{.BranchName}}</div></td>
  73. <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>
  74. </tr>
  75. {{else}}
  76. <tr class="center aligned"><td>{{.i18n.Tr "settings.no_protected_branch"}}</td></tr>
  77. {{end}}
  78. </tbody>
  79. </table>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. {{template "base/footer" .}}