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 3.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <h4 class="ui top attached header">
  2. <div class="ui stackable grid">
  3. <div class="six wide column">
  4. {{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}}
  5. </div>
  6. <div class="ten wide right aligned column">
  7. {{if .PageIsCommits}}
  8. <form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL | EscapePound}}/search">
  9. <div class="ui tiny search input">
  10. <input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus>
  11. </div>
  12. &nbsp;
  13. <div class="ui checkbox">
  14. <input type="checkbox" name="all" id="all" value="true" {{.All}}>
  15. <label for="all">{{.i18n.Tr "repo.commits.search_all"}} &nbsp;&nbsp;</label>
  16. </div>
  17. <button class="ui black tiny button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.commits.find"}}</button>
  18. </form>
  19. {{else if .IsDiffCompare}}
  20. <a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID}}" class="ui green sha label">{{ShortSha .BeforeCommitID}}</a> ... <a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID}}" class="ui green sha label">{{ShortSha .AfterCommitID}}</a>
  21. {{end}}
  22. </div>
  23. </div>
  24. </h4>
  25. {{if .Commits}}
  26. <div class="ui attached table segment">
  27. <table class="ui very basic striped fixed table single line" id="commits-table">
  28. <thead>
  29. <tr>
  30. <th class="four wide">{{.i18n.Tr "repo.commits.author"}}</th>
  31. <th class="two wide sha">SHA1</th>
  32. <th class="seven wide message">{{.i18n.Tr "repo.commits.message"}}</th>
  33. <th class="three wide right aligned">{{.i18n.Tr "repo.commits.date"}}</th>
  34. </tr>
  35. </thead>
  36. <tbody class="commit-list">
  37. {{ $r:= List .Commits}}
  38. {{range $r}}
  39. <tr>
  40. <td class="author">
  41. {{if .User}}
  42. {{if .User.FullName}}
  43. <img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/>&nbsp;&nbsp;<a href="{{AppSubUrl}}/{{.User.Name}}">{{.User.FullName}}</a>
  44. {{else}}
  45. <img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/>&nbsp;&nbsp;<a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a>
  46. {{end}}
  47. {{else}}
  48. <img class="ui avatar image" src="{{AvatarLink .Author.Email}}" alt=""/>&nbsp;&nbsp;{{.Author.Name}}
  49. {{end}}
  50. </td>
  51. <td class="sha">
  52. <a rel="nofollow" class="ui sha label {{if .Signature}} isSigned {{if .Verification.Verified }} isVerified {{end}}{{end}}" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">
  53. {{ShortSha .ID.String}}
  54. {{if .Signature}}
  55. <div class="ui detail icon button">
  56. {{if .Verification.Verified}}
  57. <i title="{{.Verification.Reason}}" class="lock green icon"></i>
  58. {{else}}
  59. <i title="{{$.i18n.Tr .Verification.Reason}}" class="unlock icon"></i>
  60. {{end}}
  61. </div>
  62. {{end}}
  63. </a>
  64. </td>
  65. <td class="message collapsing">
  66. <span class="has-emoji{{if gt .ParentCount 1}} grey text{{end}}">{{RenderCommitMessage .Summary $.RepoLink $.Repository.ComposeMetas}}</span>
  67. {{if IsMultilineCommitMessage .Message}}
  68. <button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
  69. <pre class="commit-body" style="display: none;">{{RenderCommitBody .Message $.RepoLink $.Repository.ComposeMetas}}</pre>
  70. {{end}}
  71. {{template "repo/commit_status" .Status}}
  72. </td>
  73. <td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td>
  74. </tr>
  75. {{end}}
  76. </tbody>
  77. </table>
  78. </div>
  79. {{end}}
  80. {{template "base/paginate" .}}