diff options
author | Guillermo Ramos | 2020-02-05 14:17:41 +0100 |
---|---|---|
committer | Guillermo Ramos | 2020-02-05 14:17:41 +0100 |
commit | a0eec8eadae94a71974868ac8d48820e0662857b (patch) | |
tree | f85dad657a8f7bea59fbb96e39a7e506986b8ed5 /lib/waev_web/templates | |
parent | 01143da6e79f26cfacefa0c17f225ccc88d15186 (diff) | |
download | waev-a0eec8eadae94a71974868ac8d48820e0662857b.tar.gz |
Download attachments
Diffstat (limited to 'lib/waev_web/templates')
-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 %> |