{{define "title"}}{{copy "task.plan"}}{{end}} {{define "up"}}/tasks/{{.Plan.Task.ID}}{{end}} {{define "content"}}
{{with .Plan}}

{{.Task.Description}}

{{copy "plan.revision"}} {{.Plan.Revision}} {{if eq .Task.ApprovalRevision .Plan.Revision}}{{copy "plan.approved"}}{{else}}{{copy "plan.proposed"}}{{end}}

{{copy "conversation.thread_link"}} {{if .Task.ReplacementID}}{{copy "plan.replacement"}}{{end}} {{if eq .Plan.Kind "investigation"}}

{{copy "plan.investigation_checkpoint"}}

{{end}}

{{copy "plan.playbook"}}: {{if .Plan.PlaybookID}}{{.PlaybookName}} {{.Plan.PlaybookRevision}}{{else}}{{copy "plan.custom"}}{{end}}

{{if .PlaybookChanges}}

{{copy "plan.changes"}}

{{end}} {{if .CanEdit}}
{{range .Steps}}
{{copy (printf "plan.action.%s" .Action)}}{{copy (printf "step.%s" .State)}} {{if .Locked}}

{{copy "plan.locked_step"}}

{{end}} {{if .Required}}{{copy "plan.required_step"}}{{end}} {{if .Locked}}{{.Account}}{{else}}{{end}} {{if .Pick}}{{if .Pick.Stale}}

{{copy "connections.selection_changed"}}

{{end}}

{{copy "connections.reason"}}: {{copy .Pick.Reason}}

{{.Pick.Model}} {{.Pick.Account}}{{if not .Pick.AllowanceRemaining}}

{{copy "connections.remaining_unknown"}}

{{end}}{{end}} {{if .Actual}}

{{copy "task.actual"}}: {{.Actual}}

{{end}} {{if and (not .Locked) (not .Required)}}{{end}}
{{end}} {{if lt (len .Steps) 16}}
{{copy "plan.add_step"}}
{{$i := len .Steps}}
{{end}}
{{if .CanSelect}}{{range .Steps}}{{if and .Specialist (not .Locked)}}
{{end}}{{end}}{{end}}

{{copy "plan.project"}}

{{else}}
    {{range .Steps}}
  1. {{copy (printf "plan.action.%s" .Action)}}{{copy (printf "step.%s" .State)}}

    {{.Instructions}}

    {{.Model}} {{.Account}}{{.SelectionReason}}
  2. {{end}}
{{end}}

{{copy "plan.approval_settings"}}

{{.Task.Requester}}: {{copy (printf "plan.%s" .Effective)}}

{{copy "plan.project"}}: {{if .ProjectSetting.Mode}}{{copy (printf "plan.%s" .ProjectSetting.Mode)}}{{else}}{{copy "plan.immediate"}}{{end}}

{{if .Owner}}
{{end}} {{if .CanEdit}}
{{end}}
{{end}}
{{end}}