Skip to content
Snippets Groups Projects
Commit ed38c3f8 authored by alexisben's avatar alexisben
Browse files

fix publi modal

parent e713a533
No related branches found
No related tags found
No related merge requests found
{{ $only_file := .only_file | default false }}
{{ $with_modal := and (not $only_file) .paper.Params.abstract }}
{{ $modalId := printf "modal-%s" .paper.Slug }}
{{ with .paper }}
{{ $modalId := printf "modal-%s" .Slug }}
<div class="paper-actions" role="group">
{{ if not $only_file }}
{{- if .Params.abstract -}}
<button class="squared-button" type="button" data-open-modal="{{ $modalId }}">{{ i18n "volumes.abstract" }}</button>
{{ partial "papers/modal.html"
(dict
"modalId" $modalId
"title" .Title
"abstract" .Params.abstract
) }}
{{- end -}}
{{- end -}}
{{- if $with_modal }}
<button class="squared-button" type="button" data-open-modal="{{ $modalId }}">{{ i18n "volumes.abstract" }}</button>
{{ end -}}
{{- if .Params.pdf -}}
{{- $file := partial "GetMedia" .Params.pdf -}}
{{- $size := partial "GetHumanSize" $file.size -}}
......@@ -35,4 +29,14 @@
{{ end }}
{{- end -}}
</div>
{{ end }}
\ No newline at end of file
{{- if $with_modal }}
{{ partial "papers/modal.html"
(dict
"modalId" $modalId
"title" .Title
"abstract" .Params.abstract
) }}
{{ end -}}
{{ end }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment