2014-03-13 00:15:58 -04:00
|
|
|
{{template "base/head" .}}
|
|
|
|
{{template "base/navbar" .}}
|
2014-03-13 02:08:49 -04:00
|
|
|
{{template "repo/nav" .}}
|
2014-03-13 00:15:58 -04:00
|
|
|
{{template "repo/toolbar" .}}
|
|
|
|
<div id="gogs-body" class="container">
|
2014-03-14 02:17:29 -04:00
|
|
|
<div id="gogs-source">
|
2014-03-16 10:29:23 -04:00
|
|
|
<div class="source-toolbar">
|
2014-03-16 23:43:22 -04:00
|
|
|
{{ $username := .Username}}
|
|
|
|
{{ $reponame := .Reponame}}
|
|
|
|
{{ $branchname := .Branchname}}
|
|
|
|
{{ $treenames := .Treenames}}
|
|
|
|
{{ $repoLink := .RepositoryLink}}
|
|
|
|
{{ $n := len $treenames}}
|
2014-03-14 02:17:29 -04:00
|
|
|
<button class="btn btn-default pull-right"><i class="fa fa-plus-square"></i>Add File</button>
|
|
|
|
<div class="dropdown branch-switch">
|
2014-03-16 23:43:22 -04:00
|
|
|
<a href="#" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chain"></i>{{$branchname}}
|
2014-03-14 02:17:29 -04:00
|
|
|
<b class="caret"></b></a>
|
|
|
|
<ul class="dropdown-menu">
|
2014-03-16 23:43:22 -04:00
|
|
|
{{range .Branches}}
|
|
|
|
<li><a {{if eq . $branchname}}class="current" {{end}}href="/{{$repoLink}}/tree/{{.}}">{{.}}</a></li>
|
|
|
|
{{end}}
|
2014-03-14 02:17:29 -04:00
|
|
|
</ul>
|
|
|
|
</div>
|
2014-03-14 11:57:14 -04:00
|
|
|
{{$paths := .Paths}}
|
2014-03-14 11:54:16 -04:00
|
|
|
{{ $l := Subtract $n 1}}
|
2014-03-14 11:57:14 -04:00
|
|
|
<ol class="breadcrumb">
|
|
|
|
<li class="root dir"><a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}">{{.Repository.Name}}</a></li>
|
2014-03-14 11:54:16 -04:00
|
|
|
{{range $i, $v := $treenames}}
|
|
|
|
<li class="dir">
|
|
|
|
{{if eq $i $l}}{{$v}}
|
|
|
|
{{else}}
|
|
|
|
<a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}/{{index $paths $i}}">{{$v}}</a>
|
|
|
|
{{end}}</li>
|
|
|
|
{{end}}
|
2014-03-14 02:17:29 -04:00
|
|
|
</ol>
|
|
|
|
</div>
|
2014-03-16 10:29:23 -04:00
|
|
|
<div class="panel panel-default info-box">
|
|
|
|
<div class="panel-heading info-head">
|
2014-03-17 00:57:18 -04:00
|
|
|
<a href="/{{$username}}/{{$reponame}}/commit/{{.LatestCommit.SHA}}">{{.LatestCommit.Message}}</a>
|
2014-03-16 10:29:23 -04:00
|
|
|
</div>
|
|
|
|
<div class="panel-body info-content">
|
2014-03-17 00:57:18 -04:00
|
|
|
<a href="/user/{{.LatestCommit.Author}}">{{.LatestCommit.Author}}</a> <span class="text-muted">{{TimeSince .LatestCommit.Date}}</span>
|
2014-03-16 10:29:23 -04:00
|
|
|
</div>
|
|
|
|
<table class="panel-footer table file-list">
|
|
|
|
<thead class="hidden">
|
|
|
|
<tr>
|
|
|
|
<th class="icon"></th>
|
|
|
|
<th class="name">Filename</th>
|
|
|
|
<th class="text">Message</th>
|
|
|
|
<th class="date">Date modified</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{range .Files}}
|
|
|
|
<tr {{if .IsDir}}class="is-dir"{{end}}>
|
|
|
|
<td class="icon">
|
|
|
|
<i class="fa {{if .IsDir}}fa-folder{{else}}fa-file-text-o{{end}}"></i>
|
|
|
|
</td>
|
|
|
|
<td class="name">
|
|
|
|
<span class="wrap">
|
|
|
|
{{if .IsDir}}
|
|
|
|
<a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}/{{.Path}}">{{.Name}}</a>
|
|
|
|
{{else}}
|
|
|
|
<a href="/{{$username}}/{{$reponame}}/blob/{{$branchname}}/{{.Name}}">{{.Name}}</a>
|
|
|
|
{{end}}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td class="text">
|
|
|
|
<span class="wrap">
|
|
|
|
{{.Message}}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td class="date">
|
|
|
|
<span class="wrap">
|
|
|
|
{{TimeSince .Created}}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div class="panel panel-default file-content">
|
2014-03-16 11:25:01 -04:00
|
|
|
<div class="panel-heading file-head">
|
|
|
|
<i class="icon fa fa-book"></i> README.md
|
2014-03-16 10:29:23 -04:00
|
|
|
</div>
|
2014-03-16 11:25:01 -04:00
|
|
|
<div class="panel-body file-body markdown">
|
|
|
|
markdown content
|
2014-03-16 10:29:23 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-14 02:17:29 -04:00
|
|
|
</div>
|
2014-03-13 00:15:58 -04:00
|
|
|
</div>
|
|
|
|
{{template "base/footer" .}}
|