Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

commits.tmpl 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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="{{.RepoLink}}/commits/{{.BranchName}}/search" method="get" id="commits-search-form">
  10. <div class="input-group">
  11. <input class="form-control search" type="search" placeholder="search commit" name="q" value="{{.Keyword}}" />
  12. <div class="input-group-btn">
  13. <button type="submit" 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">SHA1</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 .Author.Email}}" alt=""/><a href="/user/email2user?email={{.Author.Email}}">{{.Author.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 .Author.When}}</td>
  38. </tr>
  39. {{end}}
  40. </tbody>
  41. </table>
  42. </div>
  43. {{if not .IsSearchPage}}<ul class="pagination" id="commits-pager">
  44. {{if .LastPageNum}}<li><a href="{{.RepoLink}}/commits/{{.BranchName}}?p={{.LastPageNum}}">&laquo; Newer</a></li>{{end}}
  45. {{if .NextPageNum}}<li><a href="{{.RepoLink}}/commits/{{.BranchName}}?p={{.NextPageNum}}">&raquo; Older</a></li>{{end}}
  46. </ul>{{end}}
  47. </div>
  48. </div>
  49. {{template "base/footer" .}}