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.

74 lines
3.0 KiB

  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>{{.LatestCommit.Author.Name}}</strong></a>
  11. {{end}}
  12. {{else}}
  13. <img class="ui avatar image img-12" src="{{AvatarLink .LatestCommit.Author.Email}}" />
  14. <strong>{{.LatestCommit.Author.Name}}</strong>
  15. {{end}}
  16. <a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.LatestCommit.ID}}" rel="nofollow">{{ShortSha .LatestCommit.ID.String}}</a>
  17. <span class="grey has-emoji">{{RenderCommitMessage false .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas}}</span>
  18. </th>
  19. <th class="nine wide">
  20. </th>
  21. <th class="three wide text grey right age">{{TimeSince .LatestCommit.Author.When $.Lang}}</th>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. {{if .HasParentPath}}
  26. <tr class="has-parent">
  27. <td colspan="3"><i class="octicon octicon-mail-reply"></i><a href="{{EscapePound .BranchLink}}{{.ParentPath}}">..</a></td>
  28. </tr>
  29. {{end}}
  30. {{range $item := .Files}}
  31. {{$entry := index $item 0}}
  32. {{$commit := index $item 1}}
  33. <tr>
  34. {{if $entry.IsSubModule}}
  35. <td>
  36. <span class="octicon octicon-file-submodule"></span>
  37. {{$refURL := $commit.RefURL AppUrl $.BranchLink}}
  38. {{if $refURL}}
  39. <a href="{{$refURL}}">{{$entry.Name}}</a> @ <a href="{{$refURL}}/commit/{{$commit.RefID}}">{{ShortSha $commit.RefID}}</a>
  40. {{else}}
  41. {{$entry.Name}} @ {{ShortSha $commit.RefID}}
  42. {{end}}
  43. </td>
  44. {{else}}
  45. <td class="name">
  46. {{if $entry.IsDir}}
  47. {{$subJumpablePathName := $entry.GetSubJumpablePathName}}
  48. {{$subJumpablePath := SubJumpablePath $subJumpablePathName}}
  49. <span class="octicon octicon-file-directory"></span>
  50. <a href="{{EscapePound $.TreeLink}}/{{EscapePound $subJumpablePathName}}">
  51. {{if eq (len $subJumpablePath) 2}}
  52. <span class="jumpable-path">{{index $subJumpablePath 0}}</span>{{index $subJumpablePath 1}}
  53. {{else}}
  54. {{index $subJumpablePath 0}}
  55. {{end}}
  56. </a>
  57. {{else}}
  58. <span class="octicon octicon-file-text"></span>
  59. <a href="{{EscapePound $.TreeLink}}/{{EscapePound $entry.Name}}">{{$entry.Name}}</a>
  60. {{end}}
  61. </td>
  62. {{end}}
  63. <td class="message collapsing has-emoji">
  64. <a rel="nofollow" class="ui sha label" href="{{$.RepoLink}}/commit/{{$commit.ID}}">{{ShortSha $commit.ID.String}}</a>
  65. {{RenderCommitMessage false $commit.Summary $.RepoLink $.Repository.ComposeMetas}}
  66. </td>
  67. <td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td>
  68. </tr>
  69. {{end}}
  70. </tbody>
  71. </table>
  72. {{if .ReadmeExist}}
  73. {{template "repo/view_file" .}}
  74. {{end}}