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

123456789101112131415161718192021222324252627282930313233343536
  1. <h4 class="ui top attached header">
  2. <div class="ui stackable grid">
  3. <div class="five wide column">
  4. {{if or .PageIsCommits (gt .CommitCount 0)}}
  5. {{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}}
  6. {{else}}
  7. {{.i18n.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch }} {{if .Branch}}({{.Branch}}){{end}}
  8. {{end}}
  9. </div>
  10. <div class="eleven wide right aligned column">
  11. {{if .PageIsCommits}}
  12. <form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL | EscapePound}}/search">
  13. <div class="ui tiny search input">
  14. <input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus>
  15. </div>
  16. &nbsp;
  17. <div class="ui checkbox">
  18. <input type="checkbox" name="all" id="all" value="true" {{.All}}>
  19. <label for="all">{{.i18n.Tr "repo.commits.search_all"}} &nbsp;&nbsp;</label>
  20. </div>
  21. <button class="ui blue tiny button" data-panel="#add-deploy-key-panel" data-tooltip={{.i18n.Tr "repo.commits.search.tooltip"}}>{{.i18n.Tr "repo.commits.find"}}</button>
  22. </form>
  23. {{else if .IsDiffCompare}}
  24. <a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID}}" class="ui green sha label">{{if not .BaseIsCommit}}{{if .BaseIsBranch}}{{svg "octicon-git-branch" 16}}{{else if .BaseIsTag}}{{svg "octicon-tag" 16}}{{end}}{{.BaseBranch}}{{else}}{{ShortSha .BaseBranch}}{{end}}</a>
  25. ...
  26. <a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID}}" class="ui green sha label">{{if not .HeadIsCommit}}{{if .HeadIsBranch}}{{svg "octicon-git-branch" 16}}{{else if .HeadIsTag}}{{svg "octicon-tag" 16}}{{end}}{{.HeadBranch}}{{else}}{{ShortSha .HeadBranch}}{{end}}</a>
  27. {{end}}
  28. </div>
  29. </div>
  30. </h4>
  31. {{if and .Commits (gt .CommitCount 0)}}
  32. {{template "repo/commits_list" .}}
  33. {{end}}
  34. {{template "base/paginate" .}}