branch_dropdown.tmpl 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <div class="fitted item choose reference">
  2. <div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
  3. <div class="ui basic small button">
  4. <span class="text">
  5. <i class="octicon octicon-git-branch"></i>
  6. {{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}:
  7. <strong>{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</strong>
  8. </span>
  9. <i class="dropdown icon"></i>
  10. </div>
  11. <div class="menu">
  12. <div class="ui icon search input">
  13. <i class="filter icon"></i>
  14. <input name="search" placeholder="{{.i18n.Tr "repo.filter_branch_and_tag"}}...">
  15. </div>
  16. <div class="header">
  17. <div class="ui grid">
  18. <div class="two column row">
  19. <a class="reference column" href="#" data-target="#branch-list">
  20. <span class="text {{if not .IsViewTag}}black{{end}}">
  21. <i class="octicon octicon-git-branch"></i> {{.i18n.Tr "repo.branches"}}
  22. </span>
  23. </a>
  24. <a class="reference column" href="#" data-target="#tag-list">
  25. <span class="text {{if .IsViewTag}}black{{end}}">
  26. <i class="reference tags icon"></i> {{.i18n.Tr "repo.tags"}}
  27. </span>
  28. </a>
  29. </div>
  30. </div>
  31. </div>
  32. <div id="branch-list" class="scrolling menu" {{if .IsViewTag}}style="display: none"{{end}}>
  33. {{range .Branches}}
  34. <div class="item {{if eq $.BranchName .}}selected{{end}}" data-url="{{$.RepoLink}}/{{if $.PageIsCommits}}commits{{else}}src{{end}}/{{EscapePound .}}">{{.}}</div>
  35. {{end}}
  36. </div>
  37. <div id="tag-list" class="scrolling menu" {{if not .IsViewTag}}style="display: none"{{end}}>
  38. {{range .Tags}}
  39. <div class="item {{if eq $.BranchName .}}selected{{end}}" data-url="{{$.RepoLink}}/{{if $.PageIsCommits}}commits{{else}}src{{end}}/{{EscapePound .}}">{{.}}</div>
  40. {{end}}
  41. </div>
  42. </div>
  43. </div>
  44. </div>