all.tmpl 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. {{template "base/head" .}}
  2. <div class="repository branches all">
  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.branches.all"}}
  10. </div>
  11. <div class="ui attached segment list">
  12. {{range .Branches}}
  13. <div class="item ui grid">
  14. <div class="ui eleven wide column">
  15. {{if .IsProtected}}<i class="octicon octicon-shield"></i> {{end}}<a class="markdown" href="{{$.RepoLink}}/src/{{.Name}}"><code>{{.Name}}</code></a>
  16. {{$timeSince := TimeSince .Commit.Committer.When $.Lang}}
  17. <span class="ui text light grey">{{$.i18n.Tr "repo.branches.updated_by" $timeSince .Commit.Committer.Name | Safe}}</span>
  18. </div>
  19. <div class="ui four wide column">
  20. {{if and (eq $.BranchName .Name) $.IsRepositoryWriter}}
  21. <a class="ui basic blue button" href="{{$.RepoLink}}/settings/branches">{{$.i18n.Tr "repo.branches.change_default_branch"}}</a>
  22. {{else if $.IsRepositoryAdmin}}
  23. <a class="ui basic button" href="{{$.RepoLink}}/compare/{{$.DefaultBranch.Name}}...{{.Name}}"><i class="octicon octicon-git-pull-request"></i> {{$.i18n.Tr "repo.pulls.new"}}</a>
  24. {{end}}
  25. </div>
  26. </div>
  27. {{end}}
  28. </div>
  29. </div>
  30. </div>
  31. {{template "base/footer" .}}