bench-forgejo/templates/repo/single.tmpl

41 lines
1.6 KiB
Cheetah
Raw Normal View History

2014-03-13 09:45:58 +05:30
{{template "base/head" .}}
{{template "base/navbar" .}}
2014-03-13 11:38:49 +05:30
{{template "repo/nav" .}}
2014-03-13 09:45:58 +05:30
{{template "repo/toolbar" .}}
2014-03-25 16:14:37 +05:30
<div id="body" class="container">
<div id="source">
2014-03-16 19:59:23 +05:30
<div class="source-toolbar">
2014-03-20 11:01:24 +05:30
{{ $n := len .Treenames}}
{{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 11:47:29 +05:30
<div class="dropdown branch-switch">
2014-03-30 14:39:19 +05:30
<a href="#" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chain"></i>{{if .IsBranch}}{{.BranchName}}{{else}}{{ShortSha .CommitId}}{{end}}&nbsp;&nbsp;
2014-03-14 11:47:29 +05:30
<b class="caret"></b></a>
<ul class="dropdown-menu">
2014-03-17 09:13:22 +05:30
{{range .Branches}}
2014-03-30 07:43:02 +05:30
<li><a {{if eq . $.BranchName}}class="current" {{end}}href="/{{$.Username}}/{{$.Reponame}}/src/{{.}}">{{.}}</a></li>
2014-03-17 09:13:22 +05:30
{{end}}
2014-03-14 11:47:29 +05:30
</ul>
</div>
2014-03-14 21:24:16 +05:30
{{ $l := Subtract $n 1}}
2014-03-14 21:27:14 +05:30
<ol class="breadcrumb">
2014-03-17 14:44:31 +05:30
<li class="root dir">
2014-03-20 11:01:24 +05:30
<a href="{{.BranchLink}}">{{.Repository.Name}}</a></li>
{{range $i, $v := .Treenames}}
2014-03-14 21:24:16 +05:30
<li class="dir">
2014-03-17 14:44:31 +05:30
{{if eq $i $l}}{{$v}}
{{else}}
2014-03-20 11:01:24 +05:30
<a href="{{$.BranchLink}}/{{index $.Paths $i}}">{{$v}}</a>&nbsp;
2014-03-17 14:44:31 +05:30
{{end}}
</li>
2014-03-14 21:24:16 +05:30
{{end}}
2014-03-14 11:47:29 +05:30
</ol>
</div>
2014-03-20 11:01:24 +05:30
{{if .IsFile}}
{{template "repo/single_file" .}}
{{else}}
{{template "repo/single_list" .}}
2014-03-17 17:26:33 +05:30
{{end}}
2014-03-14 11:47:29 +05:30
</div>
2014-03-13 09:45:58 +05:30
</div>
2014-03-27 21:37:22 +05:30
{{template "base/footer" .}}