You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.6 KiB

{{template "base/head" .}}
{{template "base/navbar" .}}
{{template "repo/nav" .}}
{{template "repo/toolbar" .}}
<div id="gogs-body" class="container">
11 years ago
<div id="gogs-source">
<div id="gogs-source-toolbar">
<button class="btn btn-default pull-right"><i class="fa fa-plus-square"></i>Add File</button>
<div class="dropdown branch-switch">
<a href="#" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chain"></i>master&nbsp;&nbsp;
<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a class="current" href="/{{.RepositoryLink}}/branch/master">master</a></li>
<li><a href="//{{.RepositoryLink}}/branch/develop">develop</a></li>
</ul>
</div>
11 years ago
{{$paths := .Paths}}
11 years ago
{{ $username := .Username}}
{{ $reponame := .Reponame}}
{{ $branchname := .Branchname}}
{{ $treenames := .Treenames}}
{{ $n := len $treenames}}
{{ $l := Subtract $n 1}}
11 years ago
<ol class="breadcrumb">
<li class="root dir"><a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}">{{.Repository.Name}}</a></li>
11 years ago
{{range $i, $v := $treenames}}
<li class="dir">
{{if eq $i $l}}{{$v}}
{{else}}
<a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}/{{index $paths $i}}">{{$v}}</a>&nbsp;
{{end}}</li>
{{end}}
11 years ago
</ol>
</div>
<table id="gogs-source-table" class="table table-hover">
<thead class="hidden">
<tr>
<th class="name">Filename</th>
<th class="date">Date modified</th>
<th class="text">Message</th>
</tr>
11 years ago
</thead>
<tbody>
{{range .Files}}
<tr {{if .IsDir}}class="is-dir"{{end}}>
11 years ago
<td class="name"><i class="fa {{if .IsDir}}fa-folder{{else}}fa-file{{end}}"></i>
{{if .IsDir}}
<a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}/{{.Path}}">{{.Name}}</a>
{{else}}
<a href="#">{{.Name}} - {{FileSize .Size}}</a>
11 years ago
{{end}}</td>
<td class="date"><time datetime="{{.Created}}" data-title="true" title="{{.Created}}">{{TimeSince .Created}}</time></td>
<td class="text">{{.Message}}</td>
</tr>
{{end}}
11 years ago
</tbody>
</table>
</div>
</div>
{{template "base/footer" .}}