overview.tmpl 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {{template "base/head" .}}
  2. <div class="repository branches overview">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <div class="navbar">
  6. {{template "repo/branches/navbar" .}}
  7. </div>
  8. <div class="ui top attached header">
  9. {{.i18n.Tr "repo.settings.default_branch"}}
  10. </div>
  11. <div class="ui attached segment list">
  12. <div class="item ui grid">
  13. <div class="ui eleven wide column">
  14. {{if .DefaultBranch.IsProtected}}<i class="octicon octicon-shield"></i> {{end}}<a class="markdown" href="{{$.RepoLink}}/src/{{EscapePound .DefaultBranch.Name}}"><code>{{.DefaultBranch.Name}}</code></a>
  15. {{$timeSince := TimeSince .DefaultBranch.Commit.Committer.When $.Lang}}
  16. <span class="ui text light grey">{{$.i18n.Tr "repo.branches.updated_by" $timeSince .DefaultBranch.Commit.Committer.Name | Safe}}</span>
  17. </div>
  18. {{if and $.IsRepositoryAdmin (not $.Repository.IsMirror)}}
  19. <div class="ui four wide column">
  20. <a class="ui basic blue button" href="{{$.RepoLink}}/settings/branches">{{.i18n.Tr "repo.branches.change_default_branch"}}</a>
  21. </div>
  22. {{end}}
  23. </div>
  24. </div>
  25. {{if .ActiveBranches}}
  26. <div class="ui top attached header">
  27. {{.i18n.Tr "repo.branches.active_branches"}}
  28. </div>
  29. <div class="ui attached segment list">
  30. {{range .ActiveBranches}}
  31. <div class="item ui grid">
  32. <div class="ui eleven wide column">
  33. {{if .IsProtected}}<i class="octicon octicon-shield"></i> {{end}}<a class="markdown" href="{{$.RepoLink}}/src/{{EscapePound .Name}}"><code>{{.Name}}</code></a>
  34. {{$timeSince := TimeSince .Commit.Committer.When $.Lang}}
  35. <span class="ui text light grey">{{$.i18n.Tr "repo.branches.updated_by" $timeSince .Commit.Committer.Name | Safe}}</span>
  36. </div>
  37. {{if and $.IsRepositoryWriter $.AllowPullRequest}}
  38. <div class="ui four wide column">
  39. <a class="ui basic button" href="{{$.RepoLink}}/compare/{{EscapePound $.BranchName}}...{{EscapePound .Name}}"><i class="octicon octicon-git-pull-request"></i> {{$.i18n.Tr "repo.pulls.new"}}</a>
  40. </div>
  41. {{end}}
  42. </div>
  43. {{end}}
  44. </div>
  45. {{end}}
  46. {{if .StaleBranches}}
  47. <div class="ui top attached header">
  48. {{.i18n.Tr "repo.branches.stale_branches"}}
  49. </div>
  50. <div class="ui attached segment list">
  51. {{range .StaleBranches}}
  52. <div class="item ui grid">
  53. <div class="ui eleven wide column">
  54. {{if .IsProtected}}<i class="octicon octicon-shield"></i> {{end}}<a class="markdown" href="{{$.RepoLink}}/src/{{EscapePound .Name}}"><code>{{.Name}}</code></a>
  55. {{$timeSince := TimeSince .Commit.Committer.When $.Lang}}
  56. <span class="ui text light grey">{{$.i18n.Tr "repo.branches.updated_by" $timeSince .Commit.Committer.Name | Safe}}</span>
  57. </div>
  58. {{if and $.IsRepositoryWriter $.AllowPullRequest}}
  59. <div class="ui four wide column">
  60. <a class="ui basic button" href="{{$.RepoLink}}/compare/{{EscapePound $.BranchName}}...{{EscapePound .Name}}"><i class="octicon octicon-git-pull-request"></i> {{$.i18n.Tr "repo.pulls.new"}}</a>
  61. </div>
  62. {{end}}
  63. </div>
  64. {{end}}
  65. </div>
  66. {{end}}
  67. </div>
  68. </div>
  69. {{template "base/footer" .}}