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
21
layouts/partials/cv/organisation/get_role_end_date.html
Normal file
21
layouts/partials/cv/organisation/get_role_end_date.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<!--
|
||||
Renders a role's end date, or today if none is set.
|
||||
|
||||
@params . Role start date. Can be undefined.
|
||||
@return Date
|
||||
-->
|
||||
|
||||
<!-- Variable Initialisation -->
|
||||
|
||||
{{- $end_date := "" -}}
|
||||
|
||||
|
||||
<!-- Rendering -->
|
||||
|
||||
{{- if . -}}
|
||||
{{- $end_date = . -}}
|
||||
{{- else -}}
|
||||
{{- $end_date = ( now.Format "2006-01-02" ) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- return ( printf "new Date('%s')" $end_date ) -}}
|
Loading…
Add table
Add a link
Reference in a new issue