gitea源码

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {{template "base/head" .}}
  2. <div role="main" aria-label="{{.Title}}" class="page-content repository commits">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <div id="git-graph-container" class="ui segment {{if eq .Mode "monochrome"}}monochrome{{end}}">
  6. <h2 class="ui header dividing">
  7. {{ctx.Locale.Tr "repo.commit_graph"}}
  8. <div class="ui icon buttons tiny color-buttons">
  9. <div class="ui multiple selection search dropdown" id="flow-select-refs-dropdown">
  10. <input type="hidden" name="flow">
  11. <div class="default text">{{ctx.Locale.Tr "repo.commit_graph.select"}}</div>
  12. <div class="menu">
  13. <div class="item" data-value="...flow-hide-pr-refs">
  14. {{svg "octicon-eye-closed"}}
  15. <span class="gt-ellipsis" title="{{ctx.Locale.Tr "repo.commit_graph.hide_pr_refs"}}">{{ctx.Locale.Tr "repo.commit_graph.hide_pr_refs"}}</span>
  16. </div>
  17. {{range .AllRefs}}
  18. {{$refGroup := .RefGroup}}
  19. {{if eq $refGroup "pull"}}
  20. <div class="item" data-value="{{.Name}}">
  21. {{svg "octicon-git-pull-request"}}
  22. <span class="gt-ellipsis" title="{{.ShortName}}">#{{.ShortName}}</span>
  23. </div>
  24. {{else if eq $refGroup "tags"}}
  25. <div class="item" data-value="{{.Name}}">
  26. {{svg "octicon-tag"}}
  27. <span class="gt-ellipsis" title="{{.ShortName}}">{{.ShortName}}</span>
  28. </div>
  29. {{else if eq $refGroup "remotes"}}
  30. <div class="item" data-value="{{.Name}}">
  31. {{svg "octicon-cross-reference"}}
  32. <span class="gt-ellipsis" title="{{.ShortName}}">{{.ShortName}}</span>
  33. </div>
  34. {{else if eq $refGroup "heads"}}
  35. <div class="item" data-value="{{.Name}}">
  36. {{svg "octicon-git-branch"}}
  37. <span class="gt-ellipsis" title="{{.ShortName}}">{{.ShortName}}</span>
  38. </div>
  39. {{end}}
  40. {{end}}
  41. </div>
  42. </div>
  43. <button id="flow-color-monochrome" class="ui icon button{{if eq .Mode "monochrome"}} active{{end}}" title="{{ctx.Locale.Tr "repo.commit_graph.monochrome"}}">{{svg "material-invert-colors" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.commit_graph.monochrome"}}</button>
  44. <button id="flow-color-colored" class="ui icon button{{if ne .Mode "monochrome"}} active{{end}}" title="{{ctx.Locale.Tr "repo.commit_graph.color"}}">{{svg "material-palette" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.commit_graph.color"}}</button>
  45. </div>
  46. </h2>
  47. <div id="git-graph-body">
  48. {{template "repo/graph/svgcontainer" .}}
  49. {{template "repo/graph/commits" .}}
  50. {{template "base/paginate" .}}
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. {{template "base/footer" .}}