commits.tmpl 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. {{template "repo/nav" .}}
  4. {{template "repo/toolbar" .}}
  5. <div id="body" class="container">
  6. <div id="commits">
  7. <div class="panel panel-default commit-box info-box">
  8. <div class="panel-heading info-head">
  9. <form class="search pull-right col-md-3" action="" method="post" id="commits-search-form">
  10. <div class="input-group">
  11. <input class="form-control search" type="search" placeholder="search commit" name="q"/>
  12. <div class="input-group-btn">
  13. <button type="button" class="btn btn-default">Find</button>
  14. </div>
  15. </div>
  16. </form>
  17. <h4>{{.CommitCount}} Commits</h4>
  18. </div>
  19. <table class="panel-footer table commit-list table table-striped">
  20. <thead>
  21. <tr>
  22. <th class="author">Author</th>
  23. <th class="sha">Commit</th>
  24. <th class="message">Message</th>
  25. <th class="date">Date</th>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. {{ $username := .Username}}
  30. {{ $reponame := .Reponame}}
  31. {{$r := List .Commits}}
  32. {{range $r}}
  33. <tr>
  34. <td class="author"><img class="avatar" src="{{AvatarLink .Committer.Email}}" alt=""/><a href="/user/{{.Committer.Name}}">{{.Committer.Name}}</a></td>
  35. <td class="sha"><a class="label label-success" href="/{{$username}}/{{$reponame}}/commit/{{.Id}} ">{{SubStr .Id.String 0 10}} </a></td>
  36. <td class="message">{{.Message}} </td>
  37. <td class="date">{{TimeSince .Committer.When}}</td>
  38. </tr>
  39. {{end}}
  40. </tbody>
  41. </table>
  42. </div>
  43. <ul class="pagination" id="commits-pager">
  44. <li><a href="#">&laquo;</a></li>
  45. <li><a href="#">1</a></li>
  46. <li><a href="#">2</a></li>
  47. <li><a href="#">3</a></li>
  48. <li><a href="#">4</a></li>
  49. <li><a href="#">5</a></li>
  50. <li><a href="#">&raquo;</a></li>
  51. </ul>
  52. </div>
  53. </div>
  54. {{template "base/footer" .}}