| 1 | {{define "team"}}{{template "top" .}} |
| 2 | {{if .Flash}}<p class="banner">{{.Flash}}</p>{{end}} |
| 3 | {{if .FlashErr}}<p class="banner error">{{.FlashErr}}</p>{{end}} |
| 4 | <div class="pagehead"> |
| 5 | <p class="eyebrow">Account · {{.Account.Name}}</p> |
| 6 | <h1>Team</h1> |
| 7 | <p class="lede">The people who can see and ship this account's apps.</p> |
| 8 | </div> |
| 9 | <div class="tablewrap"> |
| 10 | <table> |
| 11 | <tr><th>Address</th><th>Role</th>{{if .IsOwner}}<th></th>{{end}}</tr> |
| 12 | {{range .Members}}<tr> |
| 13 | <td>{{.Name}}</td> |
| 14 | <td>{{.Role}}</td> |
| 15 | {{if $.IsOwner}}<td> |
| 16 | {{if ne .Name $.Address}} |
| 17 | <form method="post" action="{{$.Base}}/members/transfer"> |
| 18 | <input type="hidden" name="csrf" value="{{$.CSRF}}"> |
| 19 | <input type="hidden" name="address" value="{{.Name}}"> |
| 20 | <button class="linkish" type="submit">Hand over ownership</button> |
| 21 | </form> |
| 22 | <form method="post" action="{{$.Base}}/members/remove"> |
| 23 | <input type="hidden" name="csrf" value="{{$.CSRF}}"> |
| 24 | <input type="hidden" name="address" value="{{.Name}}"> |
| 25 | <button class="linkish danger" type="submit">Remove</button> |
| 26 | </form> |
| 27 | {{end}} |
| 28 | </td>{{end}} |
| 29 | </tr>{{end}} |
| 30 | </table> |
| 31 | </div> |
| 32 | {{if .IsOwner}} |
| 33 | <p class="small">{{.ConfirmNote}}</p> |
| 34 | <h2>Invite a teammate</h2> |
| 35 | <form class="signin" method="post" action="{{.Base}}/invite"> |
| 36 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 37 | <input type="text" name="address" placeholder="{{.InvitePlaceholder}}"> |
| 38 | <button type="submit">Send invitation</button> |
| 39 | </form> |
| 40 | <p class="small">{{.InviteNote}}</p> |
| 41 | {{if .Invites}} |
| 42 | <div class="tablewrap"> |
| 43 | <table> |
| 44 | <tr><th>Invited</th><th>By</th><th>Expires</th><th></th></tr> |
| 45 | {{range .Invites}} |
| 46 | <tr> |
| 47 | <td>{{.Address}}</td> |
| 48 | <td>{{.InvitedBy}}</td> |
| 49 | <td>{{fmtTime .ExpiresAt}}</td> |
| 50 | <td> |
| 51 | <form method="post" action="{{$.Base}}/invite/revoke"> |
| 52 | <input type="hidden" name="csrf" value="{{$.CSRF}}"> |
| 53 | <input type="hidden" name="token" value="{{.Token}}"> |
| 54 | <button class="linkish danger" type="submit">Revoke</button> |
| 55 | </form> |
| 56 | </td> |
| 57 | </tr> |
| 58 | {{end}} |
| 59 | </table> |
| 60 | </div> |
| 61 | {{end}} |
| 62 | {{end}} |
| 63 | {{template "bottom" .}}{{end}} |
| 64 | |