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.

view_list.tmpl 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. <span class="grey has-emoji commit-summary" title="{{.LatestCommit.Summary}}">{{RenderCommitMessage .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}
  32. {{if IsMultilineCommitMessage .LatestCommit.Message}}
  33. <button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
  34. <pre class="commit-body" style="display: none;">{{RenderCommitBody .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
  35. {{end}}
  36. </span>
  37. </th>
  38. <th class="text grey right age">{{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}}</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. {{if .HasParentPath}}
  43. <tr class="has-parent">
  44. <td colspan="3"><i class="octicon octicon-mail-reply"></i><a href="{{EscapePound .BranchLink}}{{.ParentPath}}">..</a></td>
  45. </tr>
  46. {{end}}
  47. {{range $item := .Files}}
  48. {{$entry := index $item 0}}
  49. {{$commit := index $item 1}}
  50. <tr>
  51. {{if $entry.IsSubModule}}
  52. <td>
  53. <span class="truncate">
  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. </span>
  62. </td>
  63. {{else}}
  64. <td class="name">
  65. <span class="truncate">
  66. {{if $entry.IsDir}}
  67. {{$subJumpablePathName := $entry.GetSubJumpablePathName}}
  68. {{$subJumpablePath := SubJumpablePath $subJumpablePathName}}
  69. <span class="octicon octicon-file-directory"></span>
  70. <a href="{{EscapePound $.TreeLink}}/{{EscapePound $subJumpablePathName}}" title="{{$subJumpablePathName}}">
  71. {{if eq (len $subJumpablePath) 2}}
  72. <span class="jumpable-path">{{index $subJumpablePath 0}}</span>{{index $subJumpablePath 1}}
  73. {{else}}
  74. {{index $subJumpablePath 0}}
  75. {{end}}
  76. </a>
  77. {{else}}
  78. <span class="octicon octicon-{{EntryIcon $entry}}"></span>
  79. <a href="{{EscapePound $.TreeLink}}/{{EscapePound $entry.Name}}" title="{{$entry.Name}}">{{$entry.Name}}</a>
  80. {{end}}
  81. </span>
  82. </td>
  83. {{end}}
  84. <td class="message">
  85. <span class="truncate has-emoji">
  86. <a href="{{$.RepoLink}}/commit/{{$commit.ID}}" title="{{$commit.Summary}}">{{$commit.Summary}}</a>
  87. </span>
  88. </td>
  89. <td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td>
  90. </tr>
  91. {{end}}
  92. </tbody>
  93. </table>
  94. {{if .ReadmeExist}}
  95. {{template "repo/view_file" .}}
  96. {{end}}