本站源代码
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

84 行
3.4KB

  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. {{if .Repository.IsArchived}}
  8. <div class="ui warning message">
  9. {{.i18n.Tr "repo.settings.archive.branchsettings_unavailable"}}
  10. </div>
  11. {{else}}
  12. <h4 class="ui top attached header">
  13. {{.i18n.Tr "repo.default_branch"}}
  14. </h4>
  15. <div class="ui attached segment">
  16. <p>
  17. {{.i18n.Tr "repo.settings.default_branch_desc"}}
  18. </p>
  19. <form class="ui form" action="{{.Link}}" method="post">
  20. {{.CsrfTokenHtml}}
  21. <input type="hidden" name="action" value="default_branch">
  22. {{if not .Repository.IsEmpty}}
  23. <div class="required inline field">
  24. <div class="ui dropdown selection" 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. <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
  39. </div>
  40. {{end}}
  41. </form>
  42. </div>
  43. <h4 class="ui top attached header">
  44. {{.i18n.Tr "repo.settings.protected_branch"}}
  45. </h4>
  46. <div class="ui attached table segment">
  47. <div class="ui grid padded">
  48. <div class="eight wide column">
  49. <div class="ui fluid dropdown selection" tabindex="0">
  50. <i class="dropdown icon"></i>
  51. <div class="default text">{{.i18n.Tr "repo.settings.choose_branch"}}</div>
  52. <div class="menu transition hidden" tabindex="-1" style="display: block !important;">
  53. {{range .LeftBranches}}
  54. <a class="item" href="{{$.Repository.Link}}/settings/branches/{{. | EscapePound}}">{{.}}</a>
  55. {{end}}
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. <div class="ui grid padded">
  61. <div class="sixteen wide column">
  62. <table class="ui single line table padded">
  63. <tbody>
  64. {{range .ProtectedBranches}}
  65. <tr>
  66. <td><div class="ui basic label blue">{{.BranchName}}</div></td>
  67. <td class="right aligned"><a class="rm ui button" href="{{$.Repository.Link}}/settings/branches/{{.BranchName | EscapePound}}">{{$.i18n.Tr "repo.settings.edit_protected_branch"}}</a></td>
  68. </tr>
  69. {{else}}
  70. <tr class="center aligned"><td>{{.i18n.Tr "repo.settings.no_protected_branch"}}</td></tr>
  71. {{end}}
  72. </tbody>
  73. </table>
  74. </div>
  75. </div>
  76. </div>
  77. {{end}}
  78. </div>
  79. </div>
  80. {{template "base/footer" .}}
上海开阖软件有限公司 沪ICP备12045867号-1