2014-03-12 22:15:58 -06:00
|
|
|
{{template "base/head" .}}
|
|
|
|
{{template "base/navbar" .}}
|
2014-03-13 00:08:49 -06:00
|
|
|
{{template "repo/nav" .}}
|
2014-03-12 22:15:58 -06:00
|
|
|
{{template "repo/toolbar" .}}
|
|
|
|
<div id="gogs-body" class="container">
|
2014-03-14 00:17:29 -06:00
|
|
|
<div id="gogs-source">
|
2014-03-17 15:00:35 -06:00
|
|
|
{{if .IsBareRepo}}
|
2014-03-20 06:12:31 -06:00
|
|
|
{{template "repo/single_bare" .}}
|
2014-03-17 15:00:35 -06:00
|
|
|
{{else}}
|
2014-03-16 08:29:23 -06:00
|
|
|
<div class="source-toolbar">
|
2014-03-19 23:31:24 -06:00
|
|
|
{{ $n := len .Treenames}}
|
2014-03-24 09:53:26 -06:00
|
|
|
{{if not .IsFile}}<button class="btn btn-default pull-right hidden"><i class="fa fa-plus-square"></i>Add File</button>{{end}}
|
2014-03-14 00:17:29 -06:00
|
|
|
<div class="dropdown branch-switch">
|
2014-03-19 23:31:24 -06:00
|
|
|
<a href="#" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chain"></i>{{.Branchname}}
|
2014-03-14 00:17:29 -06:00
|
|
|
<b class="caret"></b></a>
|
|
|
|
<ul class="dropdown-menu">
|
2014-03-16 21:43:22 -06:00
|
|
|
{{range .Branches}}
|
2014-03-20 23:09:22 -06:00
|
|
|
<li><a {{if eq . $.Branchname}}class="current" {{end}}href="/{{$.Username}}/{{$.Reponame}}/src/{{.}}">{{.}}</a></li>
|
2014-03-16 21:43:22 -06:00
|
|
|
{{end}}
|
2014-03-14 00:17:29 -06:00
|
|
|
</ul>
|
|
|
|
</div>
|
2014-03-14 09:54:16 -06:00
|
|
|
{{ $l := Subtract $n 1}}
|
2014-03-14 09:57:14 -06:00
|
|
|
<ol class="breadcrumb">
|
2014-03-17 03:14:31 -06:00
|
|
|
<li class="root dir">
|
2014-03-19 23:31:24 -06:00
|
|
|
<a href="{{.BranchLink}}">{{.Repository.Name}}</a></li>
|
|
|
|
{{range $i, $v := .Treenames}}
|
2014-03-14 09:54:16 -06:00
|
|
|
<li class="dir">
|
2014-03-17 03:14:31 -06:00
|
|
|
{{if eq $i $l}}{{$v}}
|
|
|
|
{{else}}
|
2014-03-19 23:31:24 -06:00
|
|
|
<a href="{{$.BranchLink}}/{{index $.Paths $i}}">{{$v}}</a>
|
2014-03-17 03:14:31 -06:00
|
|
|
{{end}}
|
|
|
|
</li>
|
2014-03-14 09:54:16 -06:00
|
|
|
{{end}}
|
2014-03-14 00:17:29 -06:00
|
|
|
</ol>
|
|
|
|
</div>
|
2014-03-19 23:31:24 -06:00
|
|
|
{{if .IsFile}}
|
|
|
|
{{template "repo/single_file" .}}
|
|
|
|
{{else}}
|
|
|
|
{{template "repo/single_list" .}}
|
2014-03-17 05:56:33 -06:00
|
|
|
{{end}}
|
2014-03-17 15:00:35 -06:00
|
|
|
{{end}}
|
2014-03-14 00:17:29 -06:00
|
|
|
</div>
|
2014-03-12 22:15:58 -06:00
|
|
|
</div>
|
|
|
|
{{template "base/footer" .}}
|