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.

91 lines
3.9 KiB

  1. <table id="repo-files-table" class="ui fixed single line table">
  2. <thead>
  3. <tr class="commit-list">
  4. <th class="four wide">
  5. {{if .LatestCommitUser}}
  6. <img class="ui avatar image img-12" src="{{.LatestCommitUser.RelAvatarLink}}" />
  7. {{if .LatestCommitUser.FullName}}
  8. <a href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{.LatestCommitUser.FullName}}</strong></a>
  9. {{else}}
  10. <a href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}</strong></a>
  11. {{end}}
  12. {{else}}
  13. {{if .LatestCommit.Author}}
  14. <img class="ui avatar image img-12" src="{{AvatarLink .LatestCommit.Author.Email}}" />
  15. <strong>{{.LatestCommit.Author.Name}}</strong>
  16. {{end}}
  17. {{end}}
  18. <a rel="nofollow" class="ui sha label {{if .LatestCommit.Signature}} isSigned {{if .LatestCommitVerification.Verified }} isVerified {{end}}{{end}}" href="{{.RepoLink}}/commit/{{.LatestCommit.ID}}">
  19. {{ShortSha .LatestCommit.ID.String}}
  20. {{if .LatestCommit.Signature}}
  21. <div class="ui detail icon button">
  22. {{if .LatestCommitVerification.Verified}}
  23. <i title="{{.LatestCommitVerification.Reason}}" class="lock green icon"></i>
  24. {{else}}
  25. <i title="{{$.i18n.Tr .LatestCommitVerification.Reason}}" class="unlock icon"></i>
  26. {{end}}
  27. </div>
  28. {{end}}
  29. </a>
  30. <span class="grey has-emoji">{{RenderCommitMessage .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas}}
  31. {{if IsMultilineCommitMessage .LatestCommit.Message}}
  32. <button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
  33. <pre class="commit-body" style="display: none;">{{RenderCommitBody .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
  34. {{end}}
  35. {{template "repo/commit_status" .LatestCommitStatus}}</span>
  36. </th>
  37. <th class="nine wide">
  38. </th>
  39. <th class="three wide text grey right age">{{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}}</th>
  40. </tr>
  41. </thead>
  42. <tbody>
  43. {{if .HasParentPath}}
  44. <tr class="has-parent">
  45. <td colspan="3"><i class="octicon octicon-mail-reply"></i><a href="{{EscapePound .BranchLink}}{{.ParentPath}}">..</a></td>
  46. </tr>
  47. {{end}}
  48. {{range $item := .Files}}
  49. {{$entry := index $item 0}}
  50. {{$commit := index $item 1}}
  51. <tr>
  52. {{if $entry.IsSubModule}}
  53. <td>
  54. <span class="octicon octicon-file-submodule"></span>
  55. {{$refURL := $commit.RefURL AppUrl $.BranchLink}}
  56. {{if $refURL}}
  57. <a href="{{$refURL}}">{{$entry.Name}}</a> @ <a href="{{$refURL}}/commit/{{$commit.RefID}}">{{ShortSha $commit.RefID}}</a>
  58. {{else}}
  59. {{$entry.Name}} @ {{ShortSha $commit.RefID}}
  60. {{end}}
  61. </td>
  62. {{else}}
  63. <td class="name">
  64. {{if $entry.IsDir}}
  65. {{$subJumpablePathName := $entry.GetSubJumpablePathName}}
  66. {{$subJumpablePath := SubJumpablePath $subJumpablePathName}}
  67. <span class="octicon octicon-file-directory"></span>
  68. <a href="{{EscapePound $.TreeLink}}/{{EscapePound $subJumpablePathName}}">
  69. {{if eq (len $subJumpablePath) 2}}
  70. <span class="jumpable-path">{{index $subJumpablePath 0}}</span>{{index $subJumpablePath 1}}
  71. {{else}}
  72. {{index $subJumpablePath 0}}
  73. {{end}}
  74. </a>
  75. {{else}}
  76. <span class="octicon octicon-{{EntryIcon $entry}}"></span>
  77. <a href="{{EscapePound $.TreeLink}}/{{EscapePound $entry.Name}}">{{$entry.Name}}</a>
  78. {{end}}
  79. </td>
  80. {{end}}
  81. <td class="message collapsing has-emoji">
  82. {{RenderCommitMessageLink $commit.Summary $.RepoLink (print $.RepoLink "/commit/" $commit.ID) $.Repository.ComposeMetas}}
  83. </td>
  84. <td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td>
  85. </tr>
  86. {{end}}
  87. </tbody>
  88. </table>
  89. {{if .ReadmeExist}}
  90. {{template "repo/view_file" .}}
  91. {{end}}