view_list.tmpl 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <table id="repo-files-table" class="ui fixed single line table">
  2. <thead>
  3. <tr>
  4. <th class="four wide">
  5. {{if .LastCommitUser}}
  6. <img class="ui avatar image img-12" src="{{.LastCommitUser.AvatarLink}}" />
  7. <a href="{{AppSubUrl}}/{{.LastCommitUser.Name}}"><strong>{{.LastCommit.Author.Name}}</strong></a>
  8. {{else}}
  9. <img class="ui avatar image img-12" src="{{AvatarLink .LastCommit.Author.Email}}" />
  10. <strong>{{.LastCommit.Author.Name}}</strong>
  11. {{end}}
  12. <a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.LastCommit.ID}}" rel="nofollow">{{ShortSha .LastCommit.ID.String}}</a>
  13. <span class="grey">{{RenderCommitMessage false .LastCommit.Summary .RepoLink $.Repository.ComposeMetas}}</span>
  14. </th>
  15. <th class="nine wide">
  16. </th>
  17. <th class="three wide text grey right age">{{TimeSince .LastCommit.Author.When $.Lang}}</th>
  18. </tr>
  19. </thead>
  20. <tbody>
  21. {{if .HasParentPath}}
  22. <tr class="has-parent">
  23. <td colspan="3"><i class="icon octicon octicon-mail-reply"></i><a href="{{EscapePound .BranchLink}}{{.ParentPath}}">..</a></td>
  24. </tr>
  25. {{end}}
  26. {{range $item := .Files}}
  27. {{$entry := index $item 0}}
  28. {{$commit := index $item 1}}
  29. <tr>
  30. {{if $entry.IsSubModule}}
  31. <td>
  32. <span class="icon octicon octicon-file-submodule"></span>
  33. {{if $commit.RefUrl}}
  34. <a href="{{$commit.RefUrl}}">{{$entry.Name}}</a> @ <a href="{{$commit.RefUrl}}/commit/{{$commit.RefId}}">{{ShortSha $commit.RefId}}</a>
  35. {{else}}
  36. {{$entry.Name}} @ {{ShortSha $commit.RefId}}
  37. {{end}}
  38. </td>
  39. {{else}}
  40. <td class="name">
  41. <span class="icon octicon octicon-file-{{if or $entry.IsDir}}directory{{else}}text{{end}}"></span>
  42. <a href="{{EscapePound $.BranchLink}}/{{EscapePound $.TreePath}}{{EscapePound $entry.Name}}">{{$entry.Name}}</a>
  43. </td>
  44. {{end}}
  45. <td class="message collapsing">
  46. <a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.ID}}">{{ShortSha $commit.ID.String}}</a>
  47. {{RenderCommitMessage false $commit.Summary $.RepoLink $.Repository.ComposeMetas}}
  48. </td>
  49. <td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td>
  50. </tr>
  51. {{end}}
  52. </tbody>
  53. </table>
  54. {{if .ReadmeExist}}
  55. {{template "repo/view_file" .}}
  56. {{end}}