{{- $template := .block.template -}} {{- $position := .block.position -}} {{- $title := .block.title -}} {{- with .block.data -}} {{- $with_link := .with_link -}} {{- $with_photo := .with_photo -}}
{{ if (or $title .description) -}}
{{- if not $title -}} {{ partial "blocks/default_title.html" $template }} {{ else }}

{{ partial "PrepareHTML" $title }}

{{ end -}} {{- if .description }}
{{ partial "PrepareHTML" .description }}
{{ end -}}
{{- end }}
{{- range .persons -}} {{ $person := site.GetPage (printf "/persons/%s" .slug) }}

{{ if $with_link }} {{ end }} {{- partial "PrepareHTML" $person.Title -}} {{ if $with_link }} {{ end }}

{{- if (partial "GetTextFromHTML" .role) }} {{ partial "PrepareHTML" .role }} {{- else if partial "GetTextFromHTML" $person.Params.summary }} {{- partial "PrepareHTML" $person.Params.summary -}} {{ else if (partial "GetTextFromHTML" $person.Content) }} {{- partial "GetTruncateContent" ( dict "text" $person.Content ) -}} {{ end -}}

{{- if $with_photo }}
{{- if $person.Params.image }} {{ partial "commons/image.html" (dict "image" $person.Params.image "sizes" site.Params.image_sizes.blocks.organization_chart )}} {{ end -}}
{{ end -}}
{{- end -}}
{{- end -}}