retrogit/app/templates/settings.html
2014-08-25 22:39:27 -07:00

75 lines
1.7 KiB
HTML

{{define "title"}}GitHop - Settings{{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"}}
<p>
<form method="POST" action="{{routeUrl "set-timezone"}}">
<select name="timezone_name">
{{$accountTimezoneName := .Account.TimezoneName}}
{{range .Timezones}}
{{if .LocationName}}
<option value={{.LocationName}} {{if eq .LocationName $accountTimezoneName}}selected{{end}}>{{.LocationName}} (GMT {{.DisplayUTCOffset}})</option>
{{else}}
<option disabled></option>
{{end}}
{{end}}
</select>
<input type="submit" value="Set Timezone">
</form>
</p>
<p>
You have {{len .Repos.AllRepos}} repositories:
</p>
<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}}">
<img src="{{.User.AvatarURL}}" class="avatar">{{.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}}">
<img src="{{.Org.AvatarURL}}" class="avatar">{{.Org.Login}}</a>
</h2>
<ul>
{{range .Repos}}
{{template "repo" .}}
{{end}}
</ul>
</div>
{{end}}
{{end}}