{{define "dossier_v2"}}

{{.TargetDossier.Name}}

{{if .ShowDetails}}

{{if .TargetDossier.DateOfBirth}}{{.T.born}}: {{printf "%.10s" .TargetDossier.DateOfBirth}}{{end}} {{if .TargetDossier.Sex}} · {{sexT .TargetDossier.Sex .Lang}}{{end}}

{{end}}
← {{.T.back_to_dossiers}}
{{if .Error}}
{{.Error}}
{{end}} {{if .Success}}
{{.Success}}
{{end}} {{/* Render all sections using unified template */}} {{range .Sections}} {{template "section_block" .}} {{end}} {{/* Privacy section - special structure */}}
{{$.T.section_privacy}} {{len $.AccessList}} {{$.T.people_with_access_count}}
{{range $.AccessList}}
{{.Name}}{{if .IsSelf}} ({{$.T.you}}){{else if .IsPending}} ({{$.T.pending}}){{end}} {{.Relation}}{{if .CanEdit}} · {{$.T.can_edit}}{{end}}
{{if and $.CanManageAccess (not .IsSelf)}}
Edit
{{end}}
{{end}} {{if not $.AccessList}}
{{$.T.no_access_yet}}
{{end}}
{{$.T.share_access}} {{if $.CanManageAccess}}{{$.T.manage_permissions}}{{end}} {{$.T.view_audit_log}} {{if or (eq $.Dossier.DossierID $.TargetDossier.DossierID) $.CanManageAccess}}{{$.T.export_data}}{{end}}
{{template "footer"}}
{{/* Genetics Warning Modal */}} {{end}} {{/* Unified section block template */}} {{define "section_block"}} {{end}}