Git with a cup of tea, painless self-hosted git service Mirror for internal git.with.parts use https://git.with.parts
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.
gitea/templates/repo/single.tmpl

45 lines
1.8 KiB

{{template "base/head" .}}
{{template "base/navbar" .}}
{{template "repo/nav" .}}
{{template "repo/toolbar" .}}
<div id="body" class="container">
<div id="source">
11 years ago
{{if .IsBareRepo}}
{{template "repo/single_bare" .}}
11 years ago
{{else}}
11 years ago
<div class="source-toolbar">
11 years ago
{{ $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}}
11 years ago
<div class="dropdown branch-switch">
<a href="#" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chain"></i>{{if .CommitId}}{{SubStr .CommitId 0 10}}{{else}}{{.Branchname}}{{end}}&nbsp;&nbsp;
11 years ago
<b class="caret"></b></a>
<ul class="dropdown-menu">
{{range .Branches}}
11 years ago
<li><a {{if eq . $.Branchname}}class="current" {{end}}href="/{{$.Username}}/{{$.Reponame}}/src/{{.}}">{{.}}</a></li>
{{end}}
11 years ago
</ul>
</div>
11 years ago
{{ $l := Subtract $n 1}}
11 years ago
<ol class="breadcrumb">
<li class="root dir">
11 years ago
<a href="{{.BranchLink}}">{{.Repository.Name}}</a></li>
{{range $i, $v := .Treenames}}
11 years ago
<li class="dir">
{{if eq $i $l}}{{$v}}
{{else}}
11 years ago
<a href="{{$.BranchLink}}/{{index $.Paths $i}}">{{$v}}</a>&nbsp;
{{end}}
</li>
11 years ago
{{end}}
11 years ago
</ol>
</div>
11 years ago
{{if .IsFile}}
{{template "repo/single_file" .}}
{{else}}
{{template "repo/single_list" .}}
11 years ago
{{end}}
11 years ago
{{end}}
11 years ago
</div>
</div>
{{template "base/footer" .}}