retrogit/app/templates/repos-admin.html
Mihai Parparita 6b8e347a72 Stop looking up repos for all users on the admin page.
Takes too long to load. Move repos instead into a per-user page.

Also adds basic redacting of repo information.
2014-12-27 21:53:38 -08:00

58 lines
1.3 KiB
HTML

{{define "title"}}Repos Admin{{end}}
{{define "repo"}}
<li class="repo {{.TypeAsClassName}}">
<span class="glyph octicon octicon-{{.TypeAsOcticonName}}"></span>
<a href="{{.HTMLURL}}">{{.FullName}}</a>
<span class="vintage">{{.DisplayVintage}}</span>
</li>
{{end}}
{{define "body"}}
{{if .ReposError}}
{{.ReposError}}
{{else}}
{{len .Repos.AllRepos}} from {{len .Repos.OtherUserRepos}} other users and {{len .Repos.OrgRepos}} organizations
<div class="repos">
<h2>
<a href="https://github.com/{{.User.Login}}">
<img src="{{.User.AvatarURL}}" class="avatar">{{.User.Login}}</a>
</h2>
<ul>
{{range .Repos.UserRepos}}
{{template "repo" .}}
{{end}}
</ul>
</div>
{{range .Repos.OtherUserRepos}}
<div class="repos">
<h2>
<a href="https://github.com/{{.User.Login}}">{{.User.Login}}</a>
</h2>
<ul>
{{range .Repos}}
{{template "repo" .}}
{{end}}
</ul>
</div>
{{end}}
{{range .Repos.OrgRepos}}
<div class="repos">
<h2>
<a href="https://github.com/{{.Org.Login}}">{{.Org.Login}}</a>
</h2>
<ul>
{{range .Repos}}
{{template "repo" .}}
{{end}}
</ul>
</div>
{{end}}
{{end}}
{{end}}