Handle display of repositories from explore/repo and when viewing an organization
This commit is contained in:
parent
90ec0302a3
commit
8eaddfc86b
|
|
@ -1,5 +1,6 @@
|
||||||
<div class="ui repository list">
|
<div class="ui repository list">
|
||||||
{{range .Repos}}
|
{{range .Repos}}
|
||||||
|
{{if .Owner}}
|
||||||
{{if (or (eq .Owner.Visibility 1) (and ($.SignedUser) (or (eq .Owner.Visibility 2) (and (.Owner.IsUserOrgPartOf $.SignedUserID) (eq .Owner.Visibility 3)) ($.IsAdmin))))}}
|
{{if (or (eq .Owner.Visibility 1) (and ($.SignedUser) (or (eq .Owner.Visibility 2) (and (.Owner.IsUserOrgPartOf $.SignedUserID) (eq .Owner.Visibility 3)) ($.IsAdmin))))}}
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="ui header">
|
<div class="ui header">
|
||||||
|
|
@ -21,6 +22,51 @@
|
||||||
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
|
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{else if $.Org}}
|
||||||
|
{{if (or (eq $.Org.Visibility 1) (and ($.SignedUser) (or (eq $.Org.Visibility 2) (and ($.Org.IsUserOrgPartOf $.SignedUserID) (eq $.Org.Visibility 3)) ($.IsAdmin))))}}
|
||||||
|
<div class="item">
|
||||||
|
<div class="ui header">
|
||||||
|
<a class="name" href="{{AppSubUrl}}/{{if .Owner}}{{.Owner.Name}}{{else if $.Org}}{{$.Org.Name}}{{else}}{{$.Owner.Name}}{{end}}/{{.Name}}">{{if or $.PageIsExplore $.PageIsProfileStarList }}{{.Owner.Name}} / {{end}}{{.Name}}</a>
|
||||||
|
{{if .IsPrivate}}
|
||||||
|
<span class="text gold"><i class="octicon octicon-lock"></i></span>
|
||||||
|
{{else if .IsFork}}
|
||||||
|
<span><i class="octicon octicon-repo-forked"></i></span>
|
||||||
|
{{else if .IsMirror}}
|
||||||
|
<span><i class="octicon octicon-repo-clone"></i></span>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
<div class="ui right metas">
|
||||||
|
<span class="text grey"><i class="octicon octicon-star"></i> {{.NumStars}}</span>
|
||||||
|
<span class="text grey"><i class="octicon octicon-git-branch"></i> {{.NumForks}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{if .DescriptionHTML}}<p class="has-emoji">{{.DescriptionHTML}}</p>{{end}}
|
||||||
|
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
{{else}}
|
||||||
|
{{if (or (eq $.Owner.Visibility 1) (and ($.SignedUser) (or (eq $.Owner.Visibility 2) (and ($.Owner.IsUserOrgPartOf $.SignedUserID) (eq $.Owner.Visibility 3)) ($.IsAdmin))))}}
|
||||||
|
<div class="item">
|
||||||
|
<div class="ui header">
|
||||||
|
<a class="name" href="{{AppSubUrl}}/{{if .Owner}}{{.Owner.Name}}{{else if $.Org}}{{$.Org.Name}}{{else}}{{$.Owner.Name}}{{end}}/{{.Name}}">{{if or $.PageIsExplore $.PageIsProfileStarList }}{{.Owner.Name}} / {{end}}{{.Name}}</a>
|
||||||
|
{{if .IsPrivate}}
|
||||||
|
<span class="text gold"><i class="octicon octicon-lock"></i></span>
|
||||||
|
{{else if .IsFork}}
|
||||||
|
<span><i class="octicon octicon-repo-forked"></i></span>
|
||||||
|
{{else if .IsMirror}}
|
||||||
|
<span><i class="octicon octicon-repo-clone"></i></span>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
<div class="ui right metas">
|
||||||
|
<span class="text grey"><i class="octicon octicon-star"></i> {{.NumStars}}</span>
|
||||||
|
<span class="text grey"><i class="octicon octicon-git-branch"></i> {{.NumForks}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{if .DescriptionHTML}}<p class="has-emoji">{{.DescriptionHTML}}</p>{{end}}
|
||||||
|
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<div>
|
<div>
|
||||||
{{$.i18n.Tr "explore.repo_no_results"}}
|
{{$.i18n.Tr "explore.repo_no_results"}}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user