2015-07-23 15:50:05 -05:00
|
|
|
{{with .Repository}}
|
|
|
|
<div id="repo-header" class="clear">
|
|
|
|
<div class="container clear">
|
|
|
|
<h1 id="repo-header-name" class="left public">
|
|
|
|
<i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
|
|
|
|
<a class="author" href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
|
|
|
|
<span class="divider">/</span>
|
|
|
|
<a class="repo text-bold" href="{{$.RepoLink}}">{{.Name}}</a>
|
|
|
|
{{if .IsMirror}}<span class="label label-gray">{{$.i18n.Tr "mirror"}}</span>{{end}}
|
2015-08-08 09:43:14 -05:00
|
|
|
{{if .IsFork}}<span class="fork-flag">forked from <a href="{{.BaseRepo.RepoLink}}">{{SubStr .BaseRepo.RepoLink 1 -1}}</a></span>{{end}}
|
2015-07-23 15:50:05 -05:00
|
|
|
</h1>
|
|
|
|
<ul id="repo-header-meta" class="right menu menu-line">
|
|
|
|
<li id="repo-header-watch">
|
|
|
|
<a id="repo-header-watch-btn" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch">
|
|
|
|
<button class="btn btn-gray text-bold btn-radius">
|
|
|
|
<i class="octicon octicon-eye-watch"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}<span class="num">{{.NumWatches}}</span>
|
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li id="repo-header-star">
|
|
|
|
<a id="repo-header-star-btn" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star">
|
|
|
|
<button class="btn btn-gray text-bold btn-radius">
|
|
|
|
<i class="octicon octicon-star"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
|
|
|
|
<span class="num">{{.NumStars}}</span>
|
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
</li>
|
2015-09-05 13:31:52 -05:00
|
|
|
{{if .CanBeForked}}
|
2015-07-23 15:50:05 -05:00
|
|
|
<li id="repo-header-fork">
|
2015-08-08 09:43:14 -05:00
|
|
|
<a id="repo-header-fork-btn" {{if or (not $.IsRepositoryAdmin) $.Owner.IsOrganization}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{end}}>
|
2015-07-23 15:50:05 -05:00
|
|
|
<button class="btn btn-gray text-bold btn-radius">
|
|
|
|
<i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
|
|
|
|
<span class="num">{{.NumForks}}</span>
|
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
2015-09-01 10:57:02 -05:00
|
|
|
{{end}}
|
2015-07-23 15:50:05 -05:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|