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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <table id="repo-files-table" class="ui fixed single line table">
  2. <thead>
  3. <tr>
  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. {{template "repo/commit_status" .LatestCommitStatus}}</span>
  32. </th>
  33. <th class="nine wide">
  34. </th>
  35. <th class="three wide text grey right age">{{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}}</th>
  36. </tr>
  37. </thead>
  38. <tbody>
  39. {{if .HasParentPath}}
  40. <tr class="has-parent">
  41. <td colspan="3"><i class="octicon octicon-mail-reply"></i><a href="{{EscapePound .BranchLink}}{{.ParentPath}}">..</a></td>
  42. </tr>
  43. {{end}}
  44. {{range $item := .Files}}
  45. {{$entry := index $item 0}}
  46. {{$commit := index $item 1}}
  47. <tr>
  48. {{if $entry.IsSubModule}}
  49. <td>
  50. <span class="octicon octicon-file-submodule"></span>
  51. {{$refURL := $commit.RefURL AppUrl $.BranchLink}}
  52. {{if $refURL}}
  53. <a href="{{$refURL}}">{{$entry.Name}}</a> @ <a href="{{$refURL}}/commit/{{$commit.RefID}}">{{ShortSha $commit.RefID}}</a>
  54. {{else}}
  55. {{$entry.Name}} @ {{ShortSha $commit.RefID}}
  56. {{end}}
  57. </td>
  58. {{else}}
  59. <td class="name">
  60. {{if $entry.IsDir}}
  61. {{$subJumpablePathName := $entry.GetSubJumpablePathName}}
  62. {{$subJumpablePath := SubJumpablePath $subJumpablePathName}}
  63. <span class="octicon octicon-file-directory"></span>
  64. <a href="{{EscapePound $.TreeLink}}/{{EscapePound $subJumpablePathName}}">
  65. {{if eq (len $subJumpablePath) 2}}
  66. <span class="jumpable-path">{{index $subJumpablePath 0}}</span>{{index $subJumpablePath 1}}
  67. {{else}}
  68. {{index $subJumpablePath 0}}
  69. {{end}}
  70. </a>
  71. {{else}}
  72. <span class="octicon octicon-file-text"></span>
  73. <a href="{{EscapePound $.TreeLink}}/{{EscapePound $entry.Name}}">{{$entry.Name}}</a>
  74. {{end}}
  75. </td>
  76. {{end}}
  77. <td class="message collapsing has-emoji">
  78. {{RenderCommitMessageLink $commit.Summary $.RepoLink (print $.RepoLink "/commit/" $commit.ID) $.Repository.ComposeMetas}}
  79. </td>
  80. <td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td>
  81. </tr>
  82. {{end}}
  83. </tbody>
  84. </table>
  85. {{if .ReadmeExist}}
  86. {{template "repo/view_file" .}}
  87. {{end}}