use partials for data rows in organisation timelines
This commit is contained in:
parent
88b685cf2e
commit
1da4c591d2
7 changed files with 233 additions and 58 deletions
35
layouts/partials/cv/organisation/get_role_role_string.html
Normal file
35
layouts/partials/cv/organisation/get_role_role_string.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
<!--
|
||||
Renders a role's role.
|
||||
|
||||
@params sc Site context.
|
||||
@params pc Page context.
|
||||
-->
|
||||
|
||||
<!-- Validation -->
|
||||
|
||||
{{- if ( not ( isset . "sc" ) ) -}}
|
||||
{{- errorf "No site context passed" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if ( not ( isset . "pc" ) ) -}}
|
||||
{{- errorf "No page context passed" -}}
|
||||
{{- end -}}
|
||||
|
||||
<!-- Variable Assignment -->
|
||||
|
||||
{{- $role_text := "" -}}
|
||||
|
||||
<!-- Rendering -->
|
||||
|
||||
{{- if ( and ( .pc.Params.redact ) ( ne .sc.Site.Params.redact "show" ) ) -}}
|
||||
{{- if ( eq .sc.Site.Params.redact "black" ) -}}
|
||||
{{- $role_text = "███████████████" -}}
|
||||
|
||||
{{- end -}}
|
||||
|
||||
{{- else -}}
|
||||
{{- $role_text = .pc.Title | htmlUnescape | plainify -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- return $role_text -}}
|
Loading…
Add table
Add a link
Reference in a new issue