From 3de71887d849103ed62e8b04b54c630763881010 Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 4 Mar 2019 18:03:12 +0100 Subject: Add non-JS fallback for polls on public pages (#10155) --- app/views/stream_entries/_simple_status.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views/stream_entries/_simple_status.html.haml') diff --git a/app/views/stream_entries/_simple_status.html.haml b/app/views/stream_entries/_simple_status.html.haml index a000c02f4..68e48edbb 100644 --- a/app/views/stream_entries/_simple_status.html.haml +++ b/app/views/stream_entries/_simple_status.html.haml @@ -27,7 +27,8 @@ .e-content{ lang: status.language, style: "display: #{!current_account&.user&.setting_expand_spoilers && status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status, custom_emojify: true, autoplay: autoplay) - if status.poll - = react_component :poll, disabled: true, poll: ActiveModelSerializers::SerializableResource.new(status.poll, serializer: REST::PollSerializer, scope: current_user, scope_name: :current_user).as_json + = react_component :poll, disabled: true, poll: ActiveModelSerializers::SerializableResource.new(status.poll, serializer: REST::PollSerializer, scope: current_user, scope_name: :current_user).as_json do + = render partial: 'stream_entries/poll', locals: { poll: status.poll } - elsif !status.media_attachments.empty? - if status.media_attachments.first.video? - video = status.media_attachments.first -- cgit