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.

51 lines
2.2 KiB

10 years ago
10 years ago
10 years ago
  1. <div class="panel panel-default info-box">
  2. <div class="panel-heading info-head">
  3. <a href="/{{.Username}}/{{.Reponame}}/commit/{{.LastCommit.Id}}">{{.LastCommit.Message}}</a>
  4. </div>
  5. <div class="panel-body info-content">
  6. <a href="/user/{{.LastCommit.Author.Name}}">{{.LastCommit.Author.Name}}</a> <span class="text-muted">{{TimeSince .LastCommit.Author.When}}</span>
  7. </div>
  8. <table class="panel-footer table file-list">
  9. <thead class="hidden">
  10. <tr>
  11. <th class="icon"></th>
  12. <th class="name">Filename</th>
  13. <th class="text">Message</th>
  14. <th class="date">Date modified</th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. {{if .HasParentPath}}
  19. <tr class="has-parent">
  20. <td class="icon"><a href="{{.BranchLink}}{{.ParentPath}}"><i class="fa fa-reply"></i></a></td>
  21. <td class="name"><a href="{{.BranchLink}}{{.ParentPath}}">..</a></td>
  22. <td class="text"></td>
  23. <td class="date"></td>
  24. </tr>
  25. {{end}}
  26. {{range $item := .Files}}
  27. {{$entry := index $item 0}}
  28. {{$commit := index $item 1}}
  29. <tr {{if $entry.IsDir}}class="is-dir"{{end}}>
  30. <td class="icon">
  31. <i class="fa {{if $entry.IsDir}}fa-folder{{else}}fa-file-text-o{{end}}"></i>
  32. </td>
  33. <td class="name">
  34. <span class="wrap">
  35. <a href="{{$.BranchLink}}/{{$.TreePath}}{{$entry.Name}}">{{$entry.Name}}</a>
  36. </span>
  37. </td>
  38. <td class="text">
  39. <span class="wrap"><a rel="nofollow" href="/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.Id}}">{{$commit.Message}}</a></span>
  40. </td>
  41. <td class="date">
  42. <span class="wrap">{{TimeSince $commit.Committer.When}}</span>
  43. </td>
  44. </tr>
  45. {{end}}
  46. </tbody>
  47. </table>
  48. </div>
  49. {{if .ReadmeExist}}
  50. {{template "repo/single_file" .}}
  51. {{end}}