view_list.tmpl 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <table id="repo-files-table" class="ui unstackable 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.AvatarURLPath}}" />
  7. <a href="{{AppSubURL}}/{{.LatestCommitUser.Name}}"><strong>{{.LatestCommit.Author.Name}}</strong></a>
  8. {{else}}
  9. <img class="ui avatar image img-12" src="{{AvatarLink .LatestCommit.Author.Email}}" />
  10. <strong>{{.LatestCommit.Author.Name}}</strong>
  11. {{end}}
  12. <a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.LatestCommit.ID}}" rel="nofollow">{{ShortSHA1 .LatestCommit.ID.String}}</a>
  13. <span class="grey has-emoji">{{RenderCommitMessage false .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas | Str2HTML}}</span>
  14. </th>
  15. <th class="nine wide">
  16. </th>
  17. <th class="three wide text grey right age">{{TimeSince .LatestCommit.Author.When $.Lang}}</th>
  18. </tr>
  19. </thead>
  20. <tbody>
  21. {{if .HasParentPath}}
  22. <tr class="has-parent">
  23. <td colspan="3"><i class="octicon octicon-mail-reply"></i><a href="{{EscapePound .BranchLink}}{{.ParentPath}}">..</a></td>
  24. </tr>
  25. {{end}}
  26. {{range .Files}}
  27. <tr>
  28. {{if .Submodule}}
  29. <td>
  30. <span class="octicon octicon-file-submodule"></span>
  31. <a href="{{InferSubmoduleURL $.RepoLink .Submodule}}">{{.Entry.Name}} {{if .Submodule.Commit}}@ {{ShortSHA1 .Submodule.Commit}}{{end}}</a>
  32. </td>
  33. {{else}}
  34. <td class="name">
  35. {{if .Entry.IsSymlink}}
  36. <span class="octicon octicon-file-symlink-file"></span>
  37. {{else}}
  38. <span class="octicon octicon-file-{{if or .Entry.IsTree}}directory{{else}}text{{end}}"></span>
  39. {{end}}
  40. <a href="{{EscapePound $.TreeLink}}/{{EscapePound .Entry.Name}}">{{.Entry.Name}}</a>
  41. </td>
  42. {{end}}
  43. <td class="message collapsing has-emoji">
  44. <a rel="nofollow" class="ui sha label" href="{{$.RepoLink}}/commit/{{.Commit.ID}}">{{ShortSHA1 .Commit.ID.String}}</a>
  45. {{RenderCommitMessage false .Commit.Summary $.RepoLink $.Repository.ComposeMetas | Str2HTML}}
  46. </td>
  47. <td class="text grey right age">{{TimeSince .Commit.Committer.When $.Lang}}</td>
  48. </tr>
  49. {{end}}
  50. </tbody>
  51. </table>
  52. {{if and .ReadmeExist .IsTextFile}}
  53. {{template "repo/view_file" .}}
  54. {{end}}