1{{define "title"}}{{t "home.account.title"}}{{end}}
2{{define "content"}}{{template "account-header" .}}<h1>{{t "home.account.title"}}</h1>
3<p>{{tr "session.signed_in_as" .Data.Username}}</p>
4{{if .Data.Admin}}<p><a href="{{.Data.Admin}}">{{t "account.admin_link"}}</a></p>
5{{end}}<h2>{{t "account.profile"}}</h2>
6<dl>
7<dt>{{t "account.username"}}</dt><dd>{{id .Data.Username}}</dd>
8<dt>{{t "account.display_name"}}</dt><dd>{{.Data.DisplayName}} <a href="/profile">{{t "account.profile.link"}}</a></dd>
9</dl>
10<h2>{{t "account.groups"}}</h2>
11<p>{{range $i, $g := .Data.Groups}}<span class="badge">{{id $g}}</span>{{if and (eq $i 0) $.Data.Primary}} <small>{{t "account.groups.primary"}}</small>{{end}} {{end}}{{if .Data.More}}<small>+{{.Data.More}} {{t "account.badges.more"}}</small>{{end}}</p>
12<h2>{{t "ssh_keys.heading"}}</h2>
13<p class="small">{{t "ssh_keys.intro"}}</p>
14{{template "ssh-keys" .Data.SSHKeys}}{{if or .Data.Google .Data.Portdistrict}}<h2>{{t "account.credentials"}}</h2>
15{{end}}{{if .Data.Google}}<h3>{{t "account.google"}}</h3>
16{{if .Data.GoogleLinked}}<p>{{t "account.google.linked"}} {{t "account.google.since"}} {{.Data.GoogleSince}}</p>
17<form method="get" action="/google/unlink"><button type="submit">{{t "account.google.unlink_button"}}</button></form>
18{{else}}<p>{{t "account.google.none"}}</p>
19<form method="get" action="/google/link"><button type="submit">{{t "account.google.link_button"}}</button></form>
20{{end}}{{end}}{{if .Data.Portdistrict}}<h3>{{t "account.portdistrict"}}</h3>
21<p class="small">{{t "account.portdistrict.placeholder"}}</p>
22{{end}}{{end}}