oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1{{define "content"}}
2<div rst-stack><h1>{{copy "nav.people"}}</h1>
3{{range .Members}}<section equipo-card rst-stack><h2>{{.Address}}</h2>
4{{if $.Owner}}<form method="post" action="/team/members" equipo-form>
5<input type="hidden" name="address" value="{{.Address}}"><input type="hidden" name="revision" value="{{.Revision}}">
6<label>{{copy "people.role"}}<select rst-input name="role"><option value="owner"{{if eq .Role "owner"}} selected{{end}}>{{copy "role.owner"}}</option><option value="member"{{if eq .Role "member"}} selected{{end}}>{{copy "role.member"}}</option></select></label>
7<label>{{copy "people.active"}}<select rst-input name="active"><option value="true"{{if .Active}} selected{{end}}>{{copy "people.active"}}</option><option value="false"{{if not .Active}} selected{{end}}>{{copy "people.inactive"}}</option></select></label>
8<button rst-btn type="submit">{{copy "form.save"}}</button></form>
9{{else}}<p>{{copy (roleKey .Role)}} · {{if .Active}}{{copy "people.active"}}{{else}}{{copy "people.inactive"}}{{end}}</p>{{end}}
10</section>{{end}}
11{{if .Owner}}<section equipo-card rst-stack><h2>{{copy "people.add"}}</h2><form method="post" action="/team/members" equipo-form>
12<input type="hidden" name="revision" value="0"><input type="hidden" name="active" value="true">
13<label>{{copy "people.address"}}<input rst-input type="email" name="address" required></label>
14<label>{{copy "people.role"}}<select rst-input name="role"><option value="member">{{copy "role.member"}}</option><option value="owner">{{copy "role.owner"}}</option></select></label>
15<button rst-btn="primary" type="submit">{{copy "form.save"}}</button></form></section>{{end}}
16{{if .Owner}}<h2>{{copy "invite.pending"}}</h2>
17{{range .Invitations}}<section equipo-card rst-stack><p>{{.Address}} · <span equipo-badge>{{copy (printf "role.%s" .Role)}}</span></p><form method="post" action="/invites/{{.ID}}/revoke"><input type="hidden" name="request_id" value="{{$.RequestID}}"><input type="hidden" name="revision" value="{{.Revision}}"><button rst-btn type="submit">{{copy "invite.revoke"}}</button></form></section>{{end}}
18<a rst-btn="primary" href="/invites/new">{{copy "invite.create"}}</a>{{end}}</div>
19{{end}}
20