gitlin/views/branches.html

54 行
1.9 KiB
HTML
Raw 通常表示 履歴

2023-06-27 10:40:13 +09:00
{{ template "header" . }}
<main>
<div class="user-profile">
<h1>
<a href="/{{.username}}">{{.username}}</a>
/
<a href="/{{.username}}/{{.reponame}}">{{.reponame}}</a>
</h1>
{{.branches}}
{{range $key, $value := .branches}}
<h3>{{$value.Name}}</h3>
<div class="">
<a href="/{{$.username}}/{{$.reponame}}/branches" class="button">詳細</a>
<a href="/{{$.username}}/{{$.reponame}}/branches/active" class="button">アクティブ</a>
<a href="/{{$.username}}/{{$.reponame}}/branches/stale" class="button">中止</a>
<a href="/{{$.username}}/{{$.reponame}}/branches/all" class="button">ずべて</a>
</div>
<table class="user-readme-text file-table">
<tbody>
{{range $k, $v := $value.Branch}}
<tr class="file-u-list">
<td>
<a href="/{{$.username}}/{{$.reponame}}/tree/{{$v.Name}}">{{$v.Name}}</a>,
<a href="/{{$v.Username}}">{{$v.Username}}</a> @ {{$v.LastCommit}}
</td>
<td>
<div class="count-half">
{{$value.CommitsBehind.Count}}
{{$value.CommitsAhead.Count}}
</div>
</td>
<td>
{{if $value.Issue}}<a href="/{{$.username}}/{{$.reponame}}/pull/#{{$value.Issue}}">{{$value.Issue}}</a>{{end}}
{{if $value.Compare}}<a href="/{{$.username}}/{{$.reponame}}/compare/{{$value.Compare}}">比較</a>{{end}}
{{if $value.Status}}{{$value.Status}}{{end}}
</td>
</tr>
{{end}}
{{if ne "default" $value.Id}}
<tr>
<td colspan="3" style="text-align: center;">
<a href="/{{$.username}}/{{$.reponame}}/branches/{{$value.Id}}">他の{{$value.Id}}ブランチを表示</a>
</td>
</tr>
{{end}}
</tbody>
</table>
{{end}}
</div>
</main>
{{ template "footer" . }}