forked from gitea/gitea
1
0
Fork 0
gitea/templates/repo/home.tmpl

82 lines
4.9 KiB
Cheetah

{{template "ng/base/head" .}}
{{template "ng/base/header" .}}
<div id="repo-wrapper">
{{template "repo/header_old" .}}
<div id="repo-content" class="clear container">
<div id="repo-main" class="left grid-5-6">
<p id="repo-desc">
{{if .Repository.DescriptionHtml}}<span class="description">{{.Repository.DescriptionHtml}}</span>{{else}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
</p>
<ul id="repo-file-nav" class="clear menu menu-line">
{{if and .IsRepositoryAdmin .Repository.BaseRepo}}
{{ $baseRepo := .Repository.BaseRepo}}
<li>
<a href="{{AppSubUrl}}/{{$baseRepo.Owner.Name}}/{{$baseRepo.Name}}/compare/{{$.BaseDefaultBranch}}...{{$.Owner.Name}}:{{$.BranchName}}">
<button class="btn btn-green btn-small btn-radius" id="repo-compare-btn"><i class="octicon octicon-git-compare"></i></button>
</a>
</li>
{{end}}
<li id="repo-branch-switch" class="down drop">
<a>
<button class="btn btn-gray btn-medium btn-radius">
<i class="octicon octicon-git-branch"></i> {{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}:
<strong id="repo-branch-current">{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</strong>
</button>
</a>
<div class="drop-down panel">
<p class="panel-header text-bold">{{.i18n.Tr "repo.branch_and_tags"}}</p>
<!-- <input id="repo-branch-filter-ipt" class="ipt ipt-large" type="text" placeholder="find branches / tags"/> -->
<div id="repo-branch-tag">
<ul class="menu menu-line tab-nav clear" id="repo-branch-tab-nav">
<li class="js-tab-nav {{if not .IsTag}}js-tab-nav-show{{end}} left" data-tab-target="#repo-branch-list"><a>{{.i18n.Tr "repo.branches"}}</a></li>
<li class="js-tab-nav {{if .IsTag}}js-tab-nav-show{{end}} left" data-tab-target="#repo-tag-list"><a>{{.i18n.Tr "repo.tags"}}</a></li>
</ul>
<ul class="menu menu-vertical switching-list {{if .IsTag}}hide{{end}}" id="repo-branch-list">
{{range .Branches}}
<li {{if eq . $.BranchName}}class="checked"{{end}}><a href="{{$.RepoLink}}/src/{{EscapePound .}}"><i class="octicon octicon-check"></i>{{.}}</a></li>
{{end}}
</ul>
<ul class="menu menu-vertical switching-list {{if not .IsTag}}hide{{end}}" id="repo-tag-list">
{{range .Tags}}
<li {{if eq . $.BranchName}}class="checked"{{end}}><a href="{{$.RepoLink}}/src/{{EscapePound .}}"><i class="octicon octicon-check"></i>{{.}}</a></li>
{{end}}
</ul>
</div>
</div>
</li>
<li id="repo-bread" class="breads">
<a class="title bread" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{.Repository.Name}}</a>
{{ $n := len .Treenames}}
{{ $l := Subtract $n 1}}
{{range $i, $v := .Treenames}}
{{if eq $i $l}}
<span class="bread">{{$v}}</span>
{{else}}
{{ $p := index $.Paths $i}}
<span class="bread"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{$v}}</a></span>
{{end}}
{{end}}
</li>
<!-- <li id="repo-commits-jump" class="repo-jump right">
<a href="#">
<button class="btn btn-small btn-gray btn-right-radius"><i class="octicon octicon-git-commit"></i></button>
</a>
</li>
<li id="repo-find-jump" class="repo-jump right">
<a href="#">
<button class="btn btn-small btn-gray btn-left-radius"><i class="octicon octicon-list-unordered"></i></button>
</a>
</li> -->
</ul>
{{if .IsFile}}
{{template "repo/view_file" .}}
{{else}}
{{template "repo/view_list" .}}
{{end}}
</div>
{{template "repo/sidebar" .}}
</div>
</div>
{{template "ng/base/footer" .}}