{{define "content"}}
{{template "team-panel" .Team}}
{{end}} {{/* One specialist's drawer: GET /team/{specialist} renders it as a page (no script, the phone's index), and team-panel.js lifts the same section into a drawer over the page the person is on. */}} {{define "team-panel"}}

{{copy .CopyKey}}

{{if .Task}}{{template "mark" "s"}}{{with .Step}}{{template "elapsed" .StartedAt}}{{end}}{{else}}{{copy "nav.idle"}}{{end}}

{{with .Task}}

{{copy "team.working_on"}}

{{.Title}}

{{.Project}}{{$.Stage}}{{with $.Step}}{{if gt .Attempt 1}}{{printf (copy "nav.attempt") .Attempt}}{{end}}{{end}}{{if $.More}}{{printf (copy "nav.more") $.More}}{{end}}

{{copy "team.activity"}}

    {{range $i, $l := $.Lines}}

    {{.Text}} {{.Ago}}

    {{with .Command}}
    {{icon "chevron-right"}}{{copy "team.command"}}{{.}}
    {{end}}
    {{else}}
  1. {{copy "work.activity.working"}}

  2. {{end}}
{{with $.Files}}

{{copy "team.files"}}

{{end}}

{{copy "team.runs_on"}}

{{if $.Provider}}
{{copy "team.connection"}}
{{with $.Connection}}{{template "conn-label" .}}{{else}}{{$.Provider}}{{end}}
{{end}}
{{copy "team.model"}}
{{if $.Model}}{{$.Model}}{{else}}{{copy "team.model_pending"}}{{end}}
{{end}} {{with .Ask}}

{{printf (copy "team.ask") .Name}}

{{printf (copy "team.ask_about") ""}}{{.Title}}

{{if .Waits}}

{{printf (copy "team.ask_waits") .Name}}

{{end}} {{with .Questions}}
    {{range .}}
  1. {{.Text}}

    {{if .Answered}}
    {{chatMarkdown .Answer}}
    {{else if .Waiting}}

    {{.Waiting}}

    {{else}}

    {{.Ended}}

    {{end}}
  2. {{end}}
{{end}}
{{end}} {{with .Queue}}

{{printf (copy "nav.queue") (len .)}} {{(index . 0).Title}}

{{end}}

{{copy "team.recent"}}

{{with .Recent}}{{else}}

{{copy "team.recent_empty"}}

{{end}}
{{end}}