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.

53 lines
2.0 KiB

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.Oid.String}}">{{.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 .Files}}
  27. <tr
  28. {{if .IsDir}}class="is-dir"{{end}}>
  29. <td class="icon">
  30. <i class="fa {{if .IsDir}}fa-folder{{else}}fa-file-text-o{{end}}"></i>
  31. </td>
  32. <td class="name">
  33. <span class="wrap">
  34. {{if .IsDir}}
  35. <a href="{{$.BranchLink}}/{{.Path}}">{{.Name}}</a>
  36. {{else}}
  37. <a href="{{$.BranchLink}}/{{.Path}}">{{.Name}}</a>
  38. {{end}}
  39. </span>
  40. </td>
  41. <td class="text">
  42. <span class="wrap"><a href="/{{$.Username}}/{{$.Reponame}}/commit/{{.Commit.Oid}}">{{.Commit.Message}}</a></span>
  43. </td>
  44. <td class="date">
  45. <span class="wrap">{{TimeSince .Commit.Committer.When}}</span>
  46. </td>
  47. </tr>
  48. {{end}}
  49. </tbody>
  50. </table>
  51. </div>
  52. {{if .ReadmeExist}}
  53. {{template "repo/single_file" .}}
  54. {{end}}