From 0f4bc567195d368de596cdeeee6bc0b6507ae95e Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 8 Sep 2016 01:24:26 +0200 Subject: Improving production logs, removing n+1 on media attachments in atom, adding attachments display to static views --- app/views/stream_entries/_status.html.haml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/views/stream_entries') 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 } -- cgit