From a4313224d93cd762fd500e687e33247025035af8 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 15 Nov 2016 18:45:54 +0100 Subject: Improve how public status pages look slightly --- app/views/stream_entries/_status.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/stream_entries/_status.html.haml b/app/views/stream_entries/_status.html.haml index fc21e6c45..2edc8bc3f 100644 --- a/app/views/stream_entries/_status.html.haml +++ b/app/views/stream_entries/_status.html.haml @@ -31,9 +31,10 @@ .content= Formatter.instance.format(proper_status(status)) - %ul.media-attachments - - (status.reblog? ? status.reblog : 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 (status.reblog? ? status.reblog : status).media_attachments.size > 0 + %ul.media-attachments + - (status.reblog? ? status.reblog : 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 = render partial: 'status', collection: @descendants, as: :status, locals: { is_successor: true } -- cgit