diff --git a/layouts/partials/papers/actions.html b/layouts/partials/papers/actions.html
index 2a2f7ed9e72583e0cc069a478a9c8cce8f63761d..ab2ecaf76f87eb50a821157503255402b7ef8913 100644
--- a/layouts/partials/papers/actions.html
+++ b/layouts/partials/papers/actions.html
@@ -1,18 +1,12 @@
 {{ $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 }}