{{ $is_list := .is_list }}
{{ $ := .content }}
{{ with $.Params.url_preprint }}
{{ i18n "btn_preprint" }}
{{ end }}
{{ with $.Params.url_pdf }}
{{ i18n "btn_pdf" }}
{{ end }}
{{ $directory := "static/files/citations/" }}
{{ $filename := printf "%s%s.bib" $directory $.File.TranslationBaseName }}
{{ if fileExists $filename }}
{{ end }}
{{ with $.Params.url_code }}
{{ i18n "btn_code" }}
{{ end }}
{{ with $.Params.url_dataset }}
{{ i18n "btn_dataset" }}
{{ end }}
{{ if $.Params.projects }}
{{ range $.Params.projects }}
{{ with ($.Site.GetPage "page" "project" .) }}
{{ i18n "btn_project" }}
{{ else }}
{{ errorf "Please check that the `projects` parameter in the front matter of content in `content/publication/` refers to an existing filename (without .md extension) of a published project." }}
{{ end }}
{{ end }}
{{ else }}
{{ with $.Params.url_project }}
{{ i18n "btn_project" }}
{{ end }}
{{ end }}
{{ with $.Params.url_poster }}
{{ i18n "btn_poster" }}
{{ end }}
{{ with $.Params.url_slides }}
{{ i18n "btn_slides" }}
{{ end }}
{{ with $.Params.url_video }}
{{ i18n "btn_video" }}
{{ end }}
{{ with $.Params.url_source }}
{{ i18n "btn_source" }}
{{ end }}
{{ range $.Params.url_custom }}
{{ .name }}
{{ end }}