about summary refs log tree commit diff
path: root/app/views/stream_entries
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-09-08 01:24:26 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-09-08 01:24:26 +0200
commit0f4bc567195d368de596cdeeee6bc0b6507ae95e (patch)
treeb6ef5fbeb1103203dae8237d8b26379664a397f3 /app/views/stream_entries
parent87576e1ab1a4c02f8847e8264e6a62abd36df793 (diff)
Improving production logs, removing n+1 on media attachments in atom,
adding attachments display to static views
Diffstat (limited to 'app/views/stream_entries')
-rw-r--r--app/views/stream_entries/_status.html.haml4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/views/stream_entries/_status.html.haml b/app/views/stream_entries/_status.html.haml
index d210805fe..defadffc6 100644
--- a/app/views/stream_entries/_status.html.haml
+++ b/app/views/stream_entries/_status.html.haml
@@ -38,6 +38,10 @@
 
       .content= content_for_status(proper_status(status))
 
+      %ul.media-attachments
+        - status.media_attachments.each do |media|
+          %li.transparent-background= link_to '', media.file.url, style: "background-image: url(#{media.file.url(:small)})", target: '_blank'
+
 - if include_threads
   - status.descendants.with_includes.with_counters.each do |status|
     = render partial: 'status', locals: { status: status, is_successor: true }