本站源代码
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.

98 line
4.2KB

  1. <table id="repo-files-table" class="ui single line table fixed">
  2. <thead>
  3. <tr class="commit-list">
  4. <th colspan="2">
  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. {{template "repo/commit_status" .LatestCommitStatus}}
  31. {{ $commitLink:= printf "%s/commit/%s" .RepoLink .LatestCommit.ID }}
  32. <span class="grey has-emoji commit-summary" title="{{.LatestCommit.Summary}}">{{RenderCommitMessageLinkSubject .LatestCommit.Message $.RepoLink $commitLink $.Repository.ComposeMetas}}
  33. {{if IsMultilineCommitMessage .LatestCommit.Message}}
  34. <button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
  35. <pre class="commit-body" style="display: none;">{{RenderCommitBody .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
  36. {{end}}
  37. </span>
  38. </th>
  39. <th class="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="truncate">
  55. <span class="octicon octicon-file-submodule"></span>
  56. {{$refURL := $commit.RefURL AppUrl $.BranchLink}}
  57. {{if $refURL}}
  58. <a href="{{$refURL}}">{{$entry.Name}}</a> @ <a href="{{$refURL}}/commit/{{$commit.RefID}}">{{ShortSha $commit.RefID}}</a>
  59. {{else}}
  60. {{$entry.Name}} @ {{ShortSha $commit.RefID}}
  61. {{end}}
  62. </span>
  63. </td>
  64. {{else}}
  65. <td class="name">
  66. <span class="truncate">
  67. {{if $entry.IsDir}}
  68. {{$subJumpablePathName := $entry.GetSubJumpablePathName}}
  69. {{$subJumpablePath := SubJumpablePath $subJumpablePathName}}
  70. <span class="octicon octicon-file-directory"></span>
  71. <a href="{{EscapePound $.TreeLink}}/{{EscapePound $subJumpablePathName}}" title="{{$subJumpablePathName}}">
  72. {{if eq (len $subJumpablePath) 2}}
  73. <span class="jumpable-path">{{index $subJumpablePath 0}}</span>{{index $subJumpablePath 1}}
  74. {{else}}
  75. {{index $subJumpablePath 0}}
  76. {{end}}
  77. </a>
  78. {{else}}
  79. <span class="octicon octicon-{{EntryIcon $entry}}"></span>
  80. <a href="{{EscapePound $.TreeLink}}/{{EscapePound $entry.Name}}" title="{{$entry.Name}}">{{$entry.Name}}</a>
  81. {{end}}
  82. </span>
  83. </td>
  84. {{end}}
  85. <td class="message">
  86. <span class="truncate has-emoji">
  87. <a href="{{$.RepoLink}}/commit/{{$commit.ID}}" title="{{$commit.Summary}}">{{$commit.Summary}}</a>
  88. </span>
  89. </td>
  90. <td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td>
  91. </tr>
  92. {{end}}
  93. </tbody>
  94. </table>
  95. {{if .ReadmeExist}}
  96. {{template "repo/view_file" .}}
  97. {{end}}
上海开阖软件有限公司 沪ICP备12045867号-1