diff options
Diffstat (limited to 'lib/waev_web/templates/exports/show.html.eex')
-rw-r--r-- | lib/waev_web/templates/exports/show.html.eex | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/waev_web/templates/exports/show.html.eex b/lib/waev_web/templates/exports/show.html.eex index 2d72e2e..77727a8 100644 --- a/lib/waev_web/templates/exports/show.html.eex +++ b/lib/waev_web/templates/exports/show.html.eex @@ -20,8 +20,12 @@ ID: <%= @id %> <div class="column wa-message column-50 column-offset-25"> <% end %> <%= case message.attachment do %> - <% %Waev.Export.Message.File{filename: filename} -> %> - <a href="#"><%= filename %></a> + <% %Waev.Export.Message.File{filename: filename} = file -> %> + <%= if file.available do %> + <a href="<%= Routes.exports_path(@conn, :get_attachment, @id, filename) %>"><%= filename %></a> + <% else %> + <i><%= filename %></i> (fichero adjunto no disponible) + <% end %> <% nil -> %> <% end %> <%= message.text %> |