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.

77 lines
2.6 KiB

  1. {{template "base/head" .}}
  2. <div class="repository settings edit">
  3. {{template "repo/header" .}}
  4. {{template "repo/settings/navbar" .}}
  5. <div class="ui container">
  6. {{template "base/alert" .}}
  7. <h4 class="ui top attached header">
  8. {{.i18n.Tr "repo.default_branch"}}
  9. </h4>
  10. <div class="ui attached segment">
  11. <p>
  12. {{.i18n.Tr "repo.settings.default_branch_desc"}}
  13. </p>
  14. <form class="ui form" action="{{.Link}}" method="post">
  15. {{.CsrfTokenHtml}}
  16. <input type="hidden" name="action" value="default_branch">
  17. {{if not .Repository.IsBare}}
  18. <div class="required inline field">
  19. <div class="ui dropdown selection" tabindex="0">
  20. <select name="branch">
  21. <option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
  22. {{range .Branches}}
  23. <option value="{{.}}">{{.}}</option>
  24. {{end}}
  25. </select><i class="dropdown icon"></i>
  26. <div class="default text">{{.Repository.DefaultBranch}}</div>
  27. <div class="menu transition hidden" tabindex="-1" style="display: block !important;">
  28. {{range .Branches}}
  29. <div class="item" data-value="{{.}}">{{.}}</div>
  30. {{end}}
  31. </div>
  32. </div>
  33. <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
  34. </div>
  35. {{end}}
  36. </form>
  37. </div>
  38. <h4 class="ui top attached header">
  39. {{.i18n.Tr "repo.settings.protected_branch"}}
  40. </h4>
  41. <div class="ui attached table segment">
  42. <div class="ui grid padded">
  43. <div class="eight wide column">
  44. <div class="ui fluid dropdown selection" tabindex="0">
  45. <i class="dropdown icon"></i>
  46. <div class="default text">{{.i18n.Tr "repo.settings.choose_branch"}}</div>
  47. <div class="menu transition hidden" tabindex="-1" style="display: block !important;">
  48. {{range .LeftBranches}}
  49. <a class="item" href="{{$.Repository.Link}}/settings/branches/{{.}}">{{.}}</a>
  50. {{end}}
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. <div class="ui grid padded">
  56. <div class="sixteen wide column">
  57. <table class="ui single line table padded">
  58. <tbody>
  59. {{range .ProtectedBranches}}
  60. <tr>
  61. <td><div class="ui basic label blue">{{.BranchName}}</div></td>
  62. <td class="right aligned"><a class="rm ui button" href="{{$.Repository.Link}}/settings/branches/{{.BranchName}}">Edit</a></td>
  63. </tr>
  64. {{else}}
  65. <tr class="center aligned"><td>{{.i18n.Tr "repo.settings.no_protected_branch"}}</td></tr>
  66. {{end}}
  67. </tbody>
  68. </table>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. {{template "base/footer" .}}