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.9KB

123456789101112131415161718192021222324252627282930313233343536
  1. <h4 class="ui top attached header commits-table gt-df gt-ac gt-sb">
  2. <div class="commits-table-left gt-df gt-ac">
  3. {{if or .PageIsCommits (gt .CommitCount 0)}}
  4. {{.CommitCount}} {{.locale.Tr "repo.commits.commits"}} {{if .RefName}}({{.RefName}}){{end}}
  5. {{else if .IsNothingToCompare}}
  6. {{.locale.Tr "repo.commits.nothing_to_compare"}} {{if .RefName}}({{.RefName}}){{end}}
  7. {{else}}
  8. {{.locale.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}} {{if .RefName}}({{.RefName}}){{end}}
  9. {{end}}
  10. </div>
  11. <div class="commits-table-right gt-whitespace-nowrap">
  12. {{if .PageIsCommits}}
  13. <form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/search">
  14. <div class="ui tiny search input">
  15. <input name="q" placeholder="{{.locale.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus>
  16. </div>
  17. <div class="ui tiny checkbox">
  18. <input type="checkbox" name="all" value="true" {{.All}}>
  19. <label>{{.locale.Tr "repo.commits.search_all"}}</label>
  20. </div>
  21. <button class="ui primary tiny button gt-mr-0" data-panel="#add-deploy-key-panel" data-tooltip-content={{.locale.Tr "repo.commits.search.tooltip"}}>{{.locale.Tr "repo.commits.find"}}</button>
  22. </form>
  23. {{else if .IsDiffCompare}}
  24. <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>
  25. ...
  26. <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>
  27. {{end}}
  28. </div>
  29. </h4>
  30. {{if and .Commits (gt .CommitCount 0)}}
  31. {{template "repo/commits_list" .}}
  32. {{end}}
  33. {{template "base/paginate" .}}