You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

commits_table.tmpl 1.7KB

123456789101112131415161718192021222324252627282930313233343536
  1. <h4 class="ui top attached header commits-table tw-flex tw-content-center tw-justify-between">
  2. <div class="commits-table-left tw-flex tw-content-center">
  3. {{if or .PageIsCommits (gt .CommitCount 0)}}
  4. {{.CommitCount}} {{ctx.Locale.Tr "repo.commits.commits"}}
  5. {{else if .IsNothingToCompare}}
  6. {{ctx.Locale.Tr "repo.commits.nothing_to_compare"}}
  7. {{else}}
  8. {{ctx.Locale.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}}
  9. {{end}}
  10. </div>
  11. {{if .IsDiffCompare}}
  12. <div class="commits-table-right tw-whitespace-nowrap">
  13. <a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID | PathEscape}}" class="ui green sha label gt-mx-0">{{if not .BaseIsCommit}}{{if .BaseIsBranch}}{{svg "octicon-git-branch"}}{{else if .BaseIsTag}}{{svg "octicon-tag"}}{{end}}{{.BaseBranch}}{{else}}{{ShortSha .BaseBranch}}{{end}}</a>
  14. ...
  15. <a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID | PathEscape}}" class="ui green sha label gt-mx-0">{{if not .HeadIsCommit}}{{if .HeadIsBranch}}{{svg "octicon-git-branch"}}{{else if .HeadIsTag}}{{svg "octicon-tag"}}{{end}}{{.HeadBranch}}{{else}}{{ShortSha .HeadBranch}}{{end}}</a>
  16. </div>
  17. {{end}}
  18. </h4>
  19. {{if .PageIsCommits}}
  20. <div class="ui attached segment">
  21. <form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/search">
  22. <div class="ui small fluid action input">
  23. {{template "shared/search/input" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.commit_kind")}}
  24. {{template "repo/commits_search_dropdown" .}}
  25. {{template "shared/search/button" dict "Tooltip" (ctx.Locale.Tr "repo.commits.search.tooltip")}}
  26. </div>
  27. </form>
  28. </div>
  29. {{end}}
  30. {{if and .Commits (gt .CommitCount 0)}}
  31. {{template "repo/commits_list" .}}
  32. {{end}}
  33. {{template "base/paginate" .}}