Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

commits_table.tmpl 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <div id="commits-list">
  2. <div class="panel panel-radius">
  3. <div class="panel-header">
  4. <form class="search pull-right" action="{{.RepoLink}}/commits/{{.BranchName}}/search" method="get" id="commits-search-form">
  5. <input class="ipt ipt-radius" type="search" name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" />
  6. <button class="btn btn-black btn-small btn-radius">{{.i18n.Tr "repo.commits.find"}}</button>
  7. </form>
  8. <h4>{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}}</h4>
  9. </div>
  10. <table class="panel-body table commit-list table-striped">
  11. <thead>
  12. <tr>
  13. <th class="author">{{.i18n.Tr "repo.commits.author"}}</th>
  14. <th class="sha">SHA1</th>
  15. <th class="message">{{.i18n.Tr "repo.commits.message"}}</th>
  16. <th class="date">{{.i18n.Tr "repo.commits.date"}}</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. {{ $username := .Username}}
  21. {{ $reponame := .Reponame}}
  22. {{$r := List .Commits}}
  23. {{range $r}}
  24. <tr>
  25. <td class="author"><img class="avatar-20" src="{{AvatarLink .Author.Email}}" alt=""/>&nbsp;&nbsp;&nbsp;{{if .UserName}}<a href="{{AppSubUrl}}/{{.UserName}}">{{.Author.Name}}</a>{{else}}{{.Author.Name}}{{end}}</td>
  26. <td class="sha"><a rel="nofollow" class="label label-green" href="{{AppSubUrl}}/{{$username}}/{{$reponame}}/commit/{{.Id}} ">{{SubStr .Id.String 0 10}} </a></td>
  27. <td class="message">{{.Summary}} </td>
  28. <td class="date">{{TimeSince .Author.When $.Lang}}</td>
  29. </tr>
  30. {{end}}
  31. </tbody>
  32. </table>
  33. </div>
  34. {{if not .IsSearchPage}}
  35. <ul class="pagination">
  36. {{if .LastPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{.RepoLink}}/commits/{{.BranchName}}{{if .FileName}}/{{.FileName}}{{end}}?p={{.LastPageNum}}" rel="nofollow">&laquo; {{.i18n.Tr "repo.commits.newer"}}</a></li>{{end}}
  37. {{if .NextPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{.RepoLink}}/commits/{{.BranchName}}{{if .FileName}}/{{.FileName}}{{end}}?p={{.NextPageNum}}" rel="nofollow">&raquo; {{.i18n.Tr "repo.commits.older"}}</a></li>{{end}}
  38. </ul>
  39. {{end}}
  40. </div>