2014-07-26 12:24:27 +08:00
|
|
|
{{template "ng/base/head" .}}
|
|
|
|
{{template "ng/base/header" .}}
|
|
|
|
<div id="repo-wrapper">
|
2015-07-24 04:50:05 +08:00
|
|
|
{{template "repo/header_old" .}}
|
2014-07-26 12:24:27 +08:00
|
|
|
<div id="repo-content" class="clear container">
|
2014-09-27 17:08:57 +08:00
|
|
|
<div id="repo-main" class="left grid-5-6">
|
2014-07-26 12:24:27 +08:00
|
|
|
<p id="repo-desc">
|
2014-09-28 13:54:25 +08:00
|
|
|
{{if .Repository.DescriptionHtml}}<span class="description">{{.Repository.DescriptionHtml}}</span>{{else}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
|
2014-07-26 12:24:27 +08:00
|
|
|
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
|
|
|
|
</p>
|
|
|
|
<ul id="repo-file-nav" class="clear menu menu-line">
|
2015-08-08 22:43:14 +08:00
|
|
|
{{if and .IsRepositoryAdmin .Repository.BaseRepo}}
|
|
|
|
{{ $baseRepo := .Repository.BaseRepo}}
|
2015-08-10 14:42:50 +08:00
|
|
|
<!-- <li>
|
2015-08-08 22:43:14 +08:00
|
|
|
<a href="{{AppSubUrl}}/{{$baseRepo.Owner.Name}}/{{$baseRepo.Name}}/compare/{{$.BaseDefaultBranch}}...{{$.Owner.Name}}:{{$.BranchName}}">
|
2014-07-26 12:24:27 +08:00
|
|
|
<button class="btn btn-green btn-small btn-radius" id="repo-compare-btn"><i class="octicon octicon-git-compare"></i></button>
|
|
|
|
</a>
|
2015-08-10 14:42:50 +08:00
|
|
|
</li> -->
|
2015-08-08 22:43:14 +08:00
|
|
|
{{end}}
|
2014-07-26 12:24:27 +08:00
|
|
|
<li id="repo-branch-switch" class="down drop">
|
2014-09-24 01:47:54 +08:00
|
|
|
<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}}:
|
2014-07-27 06:37:18 +08:00
|
|
|
<strong id="repo-branch-current">{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</strong>
|
2014-07-26 12:24:27 +08:00
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
<div class="drop-down panel">
|
2014-09-24 01:47:54 +08:00
|
|
|
<p class="panel-header text-bold">{{.i18n.Tr "repo.branch_and_tags"}}</p>
|
2014-09-01 00:33:40 +08:00
|
|
|
<!-- <input id="repo-branch-filter-ipt" class="ipt ipt-large" type="text" placeholder="find branches / tags"/> -->
|
2014-07-26 12:24:27 +08:00
|
|
|
<div id="repo-branch-tag">
|
|
|
|
<ul class="menu menu-line tab-nav clear" id="repo-branch-tab-nav">
|
2014-09-24 01:47:54 +08:00
|
|
|
<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>
|
2014-07-26 12:24:27 +08:00
|
|
|
</ul>
|
2014-09-24 01:47:54 +08:00
|
|
|
<ul class="menu menu-vertical switching-list {{if .IsTag}}hide{{end}}" id="repo-branch-list">
|
2014-07-26 12:24:27 +08:00
|
|
|
{{range .Branches}}
|
2014-11-08 05:44:25 +08:00
|
|
|
<li {{if eq . $.BranchName}}class="checked"{{end}}><a href="{{$.RepoLink}}/src/{{EscapePound .}}"><i class="octicon octicon-check"></i>{{.}}</a></li>
|
2014-07-26 12:24:27 +08:00
|
|
|
{{end}}
|
|
|
|
</ul>
|
2014-09-24 01:47:54 +08:00
|
|
|
<ul class="menu menu-vertical switching-list {{if not .IsTag}}hide{{end}}" id="repo-tag-list">
|
|
|
|
{{range .Tags}}
|
2014-11-08 05:44:25 +08:00
|
|
|
<li {{if eq . $.BranchName}}class="checked"{{end}}><a href="{{$.RepoLink}}/src/{{EscapePound .}}"><i class="octicon octicon-check"></i>{{.}}</a></li>
|
2014-09-24 01:47:54 +08:00
|
|
|
{{end}}
|
|
|
|
</ul>
|
2014-07-26 12:24:27 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li id="repo-bread" class="breads">
|
2014-11-08 05:44:25 +08:00
|
|
|
<a class="title bread" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{.Repository.Name}}</a>
|
2014-07-26 12:24:27 +08:00
|
|
|
{{ $n := len .Treenames}}
|
|
|
|
{{ $l := Subtract $n 1}}
|
|
|
|
{{range $i, $v := .Treenames}}
|
|
|
|
{{if eq $i $l}}
|
2015-07-28 16:42:06 +08:00
|
|
|
<span class="bread">{{$v}}</span>
|
2014-07-26 12:24:27 +08:00
|
|
|
{{else}}
|
2015-07-29 00:51:40 +08:00
|
|
|
{{ $p := index $.Paths $i}}
|
|
|
|
<span class="bread"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{$v}}</a></span>
|
2014-07-26 12:24:27 +08:00
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</li>
|
2014-11-07 11:06:41 +08:00
|
|
|
<!-- <li id="repo-commits-jump" class="repo-jump right">
|
2014-07-26 12:24:27 +08:00
|
|
|
<a href="#">
|
2014-08-11 11:11:18 +08:00
|
|
|
<button class="btn btn-small btn-gray btn-right-radius"><i class="octicon octicon-git-commit"></i></button>
|
2014-07-26 12:24:27 +08:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li id="repo-find-jump" class="repo-jump right">
|
|
|
|
<a href="#">
|
2014-12-11 05:37:54 +08:00
|
|
|
<button class="btn btn-small btn-gray btn-left-radius"><i class="octicon octicon-list-unordered"></i></button>
|
2014-07-26 12:24:27 +08:00
|
|
|
</a>
|
2014-11-07 11:06:41 +08:00
|
|
|
</li> -->
|
2014-07-26 12:24:27 +08:00
|
|
|
</ul>
|
|
|
|
{{if .IsFile}}
|
|
|
|
{{template "repo/view_file" .}}
|
|
|
|
{{else}}
|
|
|
|
{{template "repo/view_list" .}}
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2014-08-03 01:47:33 +08:00
|
|
|
{{template "repo/sidebar" .}}
|
2014-07-26 12:24:27 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-09-03 08:31:32 +08:00
|
|
|
{{template "ng/base/footer" .}}
|