{{/* The first tab of the people page: the tree, and everyone in it. */}} {{define "people_body"}} {{if .Error}}
{{.Error}}
{{end}} {{if .Message}}{{.Message}}
{{end}} {{if .Pending}}| {{t "users.col.email"}} | {{t "users.col.name"}} | {{t "users.col.signed_up"}} | {{t "users.col.approve_into"}} | |
|---|---|---|---|---|
| {{.Email}} | {{.Name}} | {{ago .CreatedAt}} | {{if $.Edit}}{{end}} | {{if $.Edit}}{{end}} |
{{if .HasQuotas}}{{th "users.tree.note_quotas"}}{{else}}{{t "users.tree.note"}}{{end}}
{{if not .Tree}}{{t "users.empty"}}
{{end}} {{range $org := .Tree}}| {{t "users.col.member"}} | {{t "users.col.state"}} | {{t "users.col.last_sign_in"}} |
|---|
{{t "users.no_members"}}
{{end}} {{template "add-member" (dict "Kind" "project" "ID" $p.ID "D" $ "Open" $p.ID)}} {{with index $.Keys $p.ID}}| {{t "users.col.key"}} | {{t "users.col.owner"}} | {{t "users.col.state"}} | {{t "users.col.last_used"}} | |
|---|---|---|---|---|
{{.Name}} {{.Prefix}} |
{{or .OwnerEmail (t "users.issued_by_operator")}} | {{t (print "users.key_state." .State)}} | {{ago .LastUsedAt}} | {{if eq .State "active"}} {{if $.Edit}}{{end}}{{end}} |
| {{t "users.col.person"}} | {{t "users.col.state"}} | {{t "users.col.member_of"}} | {{t "users.col.last_sign_in"}} | {{t "users.col.add_to"}} |
|---|
{{t "users.alone_note"}}
{{else}}{{t "users.no_accounts"}}
{{end}}{{th "users.shell_note"}}
{{end}} {{/* The actions every account row carries: suspend or reinstate, remove. */}} {{define "state-actions"}}{{$u := .U}}{{$d := .D}} {{if ne $u.ID $d.AdminID}} {{/* In a menu: two red links on every row made the list look alarmed, and they are the two things done least often. */}} {{else}}{{t "users.you"}}{{end}} {{end}} {{/* A person in the list of every account: where they are, and where else they could be. */}} {{define "account-row"}}{{$u := .U}}{{$d := .D}}{{t "users.nobody_in" .Name}}
{{end}} {{template "add-member" (dict "Kind" .Kind "ID" .ID "D" $d "Open" "")}}