about summary refs log tree commit diff
path: root/app/views/stream_entries/_attachment_list.html.haml
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-01-13 10:23:54 +0100
committerEugen Rochko <eugen@zeonfederated.com>2019-01-13 09:23:54 +0000
commit4fb94c758e3bf2e1c0525e9075c2d5dedc14c666 (patch)
treec08ae8ba9144ece107fac0893ea055a7079edcd1 /app/views/stream_entries/_attachment_list.html.haml
parent9ee9cb549b58a33a81a9da318cbdc26ed2e47788 (diff)
Add attachment list fallback to public pages (#9780)
* Add attachment list fallback to public pages

Fixes #6714

* Refactor attachments lists
Diffstat (limited to 'app/views/stream_entries/_attachment_list.html.haml')
-rw-r--r--app/views/stream_entries/_attachment_list.html.haml8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/views/stream_entries/_attachment_list.html.haml b/app/views/stream_entries/_attachment_list.html.haml
new file mode 100644
index 000000000..d9706f47b
--- /dev/null
+++ b/app/views/stream_entries/_attachment_list.html.haml
@@ -0,0 +1,8 @@
+.attachment-list
+  .attachment-list__icon
+    = fa_icon 'link'
+  %ul.attachment-list__list
+    - attachments.each do |media|
+      %li
+        - url = media.remote_url.presence || media.file.url
+        = link_to File.basename(url), url, title: media.description