about summary refs log tree commit diff
path: root/app/views/stream_entries/_simple_status.html.haml
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-03-04 22:17:10 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-03-04 23:02:24 +0100
commitcaf5b8e9757679b93b9a34b0c55f43cb47910201 (patch)
tree6d1dde88a9e086190dea20a3d8b7935afe8ae71c /app/views/stream_entries/_simple_status.html.haml
parent4cbeb9a7eb4d24cfa1fd2ce6e4a2e731c486925d (diff)
Fix #431 - convert gif to webm during upload. Web UI treats them like it did
before. In the API, attachments now can be either image, video or gifv. Gifv
is to be treated like images in terms of behaviour, but are videos by file
type.
Diffstat (limited to 'app/views/stream_entries/_simple_status.html.haml')
-rw-r--r--app/views/stream_entries/_simple_status.html.haml15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/views/stream_entries/_simple_status.html.haml b/app/views/stream_entries/_simple_status.html.haml
index 52ad39220..cb2c976ce 100644
--- a/app/views/stream_entries/_simple_status.html.haml
+++ b/app/views/stream_entries/_simple_status.html.haml
@@ -22,11 +22,12 @@
       - if status.sensitive?
         = render partial: 'stream_entries/content_spoiler'
       - if status.media_attachments.first.video?
-        .video-item
-          = link_to (status.media_attachments.first.remote_url.blank? ? status.media_attachments.first.file.url(:original) : status.media_attachments.first.remote_url), style: "background-image: url(#{status.media_attachments.first.file.url(:small)})", target: '_blank', rel: 'noopener', class: 'u-video' do
-            .video-item__play
-              = fa_icon('play')
+        .status__attachments__inner
+          .video-item
+            = link_to (status.media_attachments.first.remote_url.blank? ? status.media_attachments.first.file.url(:original) : status.media_attachments.first.remote_url), style: "background-image: url(#{status.media_attachments.first.file.url(:small)})", target: '_blank', rel: 'noopener', class: 'u-video' do
+              .video-item__play
+                = fa_icon('play')
       - else
-        - status.media_attachments.each do |media|
-          .media-item
-            = link_to '', (media.remote_url.blank? ? media.file.url(:original) : media.remote_url), style: "background-image: url(#{media.file.url(:original)})", target: '_blank', rel: 'noopener', class: "u-#{media.video? ? 'video' : 'photo'}"
+        .status__attachments__inner
+          - status.media_attachments.each do |media|
+            = render partial: 'stream_entries/media', locals: { media: media }