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.

45 lines
1.9 KiB

  1. <table id="repo-files-table" class="table-border table-block table-radius">
  2. <thead>
  3. <tr>
  4. <th colspan="4" class="clear">
  5. <span class="author left">
  6. <img class="avatar-24 radius" src="{{AvatarLink .LastCommit.Author.Email}}" />
  7. <a href="/user/email2user?email={{Md5 .LastCommit.Author.Email}}"><strong>{{.LastCommit.Author.Name}}</strong>:</a>
  8. </span>
  9. <span class="last-commit"><a href="{{.RepoLink}}/commit/{{.LastCommit.Id}}" rel="nofollow">
  10. <strong>{{ShortSha .LastCommit.Id.String}}</strong></a>
  11. <span class="text-truncate">{{.LastCommit.Summary}}</span>
  12. </span>
  13. <span class="age right">{{TimeSince .LastCommit.Author.When .i18n.Lang}}</span>
  14. </th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. {{if .HasParentPath}}
  19. <tr class="has-parent">
  20. <td class="icon"></td>
  21. <td class="name"><a href="{{.BranchLink}}{{.ParentPath}}">..</a></td>
  22. <td class="msg"></td>
  23. <td class="age"></td>
  24. </tr>
  25. {{end}}
  26. {{range $item := .Files}}
  27. {{$entry := index $item 0}}
  28. {{$commit := index $item 1}}
  29. <tr>
  30. <td class="icon">
  31. <span class="octicon octicon-file-{{if $entry.IsDir}}directory{{else}}text{{end}}"></span>
  32. </td>
  33. <td class="name">
  34. <a href="{{$.BranchLink}}/{{$.TreePath}}{{$entry.Name}}" class="text-truncate">{{$entry.Name}}</a>
  35. </td>
  36. <td class="msg">
  37. <a class="text-truncate" href="/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.Id}}" rel="nofollow">{{$commit.Summary}}</a>
  38. </td>
  39. <td class="age">{{TimeSince $commit.Committer.When $.i18n.Lang}}</td>
  40. </tr>
  41. {{end}}
  42. </tbody>
  43. </table>
  44. {{if .ReadmeExist}}
  45. {{template "repo/view_file" .}}
  46. {{end}}