parent
d7c3c79c00
commit
aa65761d81
File diff suppressed because one or more lines are too long
@ -1,9 +1,8 @@ |
|||||||
{{template "ng/base/head" .}} |
{{template "base/head" .}} |
||||||
{{template "ng/base/header" .}} |
<div class="repository commits"> |
||||||
<div id="repo-wrapper"> |
{{template "repo/header" .}} |
||||||
{{template "repo/header_old" .}} |
<div class="ui container"> |
||||||
<div class="container clear"> |
{{template "repo/commits_table" .}} |
||||||
{{template "repo/commits_table" .}} |
</div> |
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
{{template "ng/base/footer" .}} |
{{template "base/footer" .}} |
||||||
|
@ -1,48 +1,66 @@ |
|||||||
<div id="commits-list"> |
<h4 class="ui top attached header"> |
||||||
<div class="panel panel-radius"> |
{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} |
||||||
<div class="panel-header"> |
{{if .PageIsCommits}} |
||||||
{{if not .IsDiffCompare}} |
<div class="ui right"> |
||||||
<form class="search pull-right" action="{{.RepoLink}}/commits/{{.BranchName}}/search" method="get" id="commits-search-form"> |
<form action="{{.RepoLink}}/commits/{{.BranchName}}/search"> |
||||||
<input class="ipt ipt-radius" type="search" name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" /> |
<div class="ui tiny search input"> |
||||||
<button class="btn btn-black btn-small btn-radius">{{.i18n.Tr "repo.commits.find"}}</button> |
<input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus> |
||||||
</form> |
</div> |
||||||
{{end}} |
<button class="ui black tiny button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.commits.find"}}</button> |
||||||
<h4>{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}}</h4> |
</form> |
||||||
</div> |
</div> |
||||||
<table class="panel-body table commit-list table-striped"> |
{{end}} |
||||||
<thead> |
</h4> |
||||||
<tr> |
<div class="ui attached table segment"> |
||||||
<th class="author">{{.i18n.Tr "repo.commits.author"}}</th> |
<table class="ui very basic striped commits table"> |
||||||
<th class="sha">SHA1</th> |
<thead> |
||||||
<th class="message">{{.i18n.Tr "repo.commits.message"}}</th> |
<tr> |
||||||
<th class="date">{{.i18n.Tr "repo.commits.date"}}</th> |
<th>{{.i18n.Tr "repo.commits.author"}}</th> |
||||||
</tr> |
<th>SHA1</th> |
||||||
</thead> |
<th>{{.i18n.Tr "repo.commits.message"}}</th> |
||||||
<tbody> |
<th>{{.i18n.Tr "repo.commits.date"}}</th> |
||||||
{{ $username := .Username}} |
</tr> |
||||||
{{ $reponame := .Reponame}} |
</thead> |
||||||
{{$r := List .Commits}} |
<tbody> |
||||||
{{range $r}} |
{{ $username := .Username}} |
||||||
<tr> |
{{ $reponame := .Reponame}} |
||||||
<td class="author"> |
{{ $r:= List .Commits}} |
||||||
{{if .User}} |
{{range $r}} |
||||||
<img class="avatar-20" src="{{.User.AvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a> |
<tr> |
||||||
{{else}} |
<td class="author"> |
||||||
<img class="avatar-20" src="{{AvatarLink .Author.Email}}" alt=""/> {{.Author.Name}} |
{{if .User}} |
||||||
{{end}} |
<img class="ui avatar image" src="{{.User.AvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a> |
||||||
</td> |
{{else}} |
||||||
<td class="sha"><a rel="nofollow" class="label label-green" href="{{AppSubUrl}}/{{$username}}/{{$reponame}}/commit/{{.Id}} ">{{SubStr .Id.String 0 10}} </a></td> |
<img class="ui avatar image" src="{{AvatarLink .Author.Email}}" alt=""/> {{.Author.Name}} |
||||||
<td class="message"><span class="text-truncate">{{RenderCommitMessage .Summary $.RepoLink}}</span></td> |
{{end}} |
||||||
<td class="date">{{TimeSince .Author.When $.Lang}}</td> |
</td> |
||||||
</tr> |
<td class="sha"><a rel="nofollow" class="ui green label" href="{{AppSubUrl}}/{{$username}}/{{$reponame}}/commit/{{.Id}} ">{{SubStr .Id.String 0 10}} </a></td> |
||||||
{{end}} |
<td class="message"><span class="text truncate">{{RenderCommitMessage .Summary $.RepoLink}}</span></td> |
||||||
</tbody> |
<td class="date">{{TimeSince .Author.When $.Lang}}</td> |
||||||
</table> |
</tr> |
||||||
</div> |
|
||||||
{{if and (not .IsSearchPage) (not .IsDiffCompare)}} |
|
||||||
<ul class="pagination"> |
|
||||||
{{if .LastPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{.RepoLink}}/commits/{{.BranchName}}{{if .FileName}}/{{.FileName}}{{end}}?p={{.LastPageNum}}" rel="nofollow">« {{.i18n.Tr "repo.commits.newer"}}</a></li>{{end}} |
|
||||||
{{if .NextPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{.RepoLink}}/commits/{{.BranchName}}{{if .FileName}}/{{.FileName}}{{end}}?p={{.NextPageNum}}" rel="nofollow">» {{.i18n.Tr "repo.commits.older"}}</a></li>{{end}} |
|
||||||
</ul> |
|
||||||
{{end}} |
{{end}} |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
</div> |
</div> |
||||||
|
|
||||||
|
{{with .Page}} |
||||||
|
{{if gt .TotalPages 1}} |
||||||
|
<div class="center page buttons"> |
||||||
|
<div class="ui borderless pagination menu"> |
||||||
|
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Previous}}"{{end}}> |
||||||
|
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}} |
||||||
|
</a> |
||||||
|
{{range .Pages}} |
||||||
|
{{if eq .Num -1}} |
||||||
|
<a class="disabled item">...</a> |
||||||
|
{{else}} |
||||||
|
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Num}}"{{end}}>{{.Num}}</a> |
||||||
|
{{end}} |
||||||
|
{{end}} |
||||||
|
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Next}}"{{end}}> |
||||||
|
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i> |
||||||
|
</a> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{{end}} |
||||||
|
{{end}} |
Loading…
Reference in new issue