about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-03-28 15:12:33 +0100
committerGitHub <noreply@github.com>2019-03-28 15:12:33 +0100
commitbb316faffff7a76bc89f7e942233f0e14caf60f5 (patch)
tree260458c7ff43dd82fc02cc7e5ef0920dd8d2a25b /app/views
parent0418bdd71f59b4d7e9f3498f2990c8b044f310e1 (diff)
parent050efbc12650feaac3e833c4dd740bf090e3dae1 (diff)
Merge pull request #970 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/views')
-rw-r--r--app/views/relationships/show.html.haml7
-rw-r--r--app/views/stream_entries/_detailed_status.html.haml6
-rw-r--r--app/views/stream_entries/_simple_status.html.haml6
3 files changed, 13 insertions, 6 deletions
diff --git a/app/views/relationships/show.html.haml b/app/views/relationships/show.html.haml
index fc9613731..1de4e373f 100644
--- a/app/views/relationships/show.html.haml
+++ b/app/views/relationships/show.html.haml
@@ -22,11 +22,18 @@
       %li= filter_link_to t('generic.all'), activity: nil
       %li= filter_link_to t('relationships.dormant'), activity: 'dormant'
 
+  .filter-subset
+    %strong= t 'generic.order_by'
+    %ul
+      %li= filter_link_to t('relationships.most_recent'), order: nil
+      %li= filter_link_to t('relationships.last_active'), order: 'active'
+
 = form_for(@form, url: relationships_path, method: :patch) do |f|
   = hidden_field_tag :page, params[:page] || 1
   = hidden_field_tag :relationship, params[:relationship]
   = hidden_field_tag :status, params[:status]
   = hidden_field_tag :activity, params[:activity]
+  = hidden_field_tag :order, params[:order]
 
   .batch-table
     .batch-table__toolbar
diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml
index d18ecd37a..4459581d9 100644
--- a/app/views/stream_entries/_detailed_status.html.haml
+++ b/app/views/stream_entries/_detailed_status.html.haml
@@ -22,9 +22,9 @@
         %a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
     .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 do
-      = render partial: 'stream_entries/poll', locals: { status: status, poll: status.poll, autoplay: autoplay }
+  - if status.preloadable_poll
+    = react_component :poll, disabled: true, poll: ActiveModelSerializers::SerializableResource.new(status.preloadable_poll, serializer: REST::PollSerializer, scope: current_user, scope_name: :current_user).as_json do
+      = render partial: 'stream_entries/poll', locals: { status: status, poll: status.preloadable_poll, autoplay: autoplay }
   - elsif !status.media_attachments.empty?
     - if status.media_attachments.first.video?
       - video = status.media_attachments.first
diff --git a/app/views/stream_entries/_simple_status.html.haml b/app/views/stream_entries/_simple_status.html.haml
index 1952128a0..6d2a408ea 100644
--- a/app/views/stream_entries/_simple_status.html.haml
+++ b/app/views/stream_entries/_simple_status.html.haml
@@ -27,9 +27,9 @@
     .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 do
-      = render partial: 'stream_entries/poll', locals: { status: status, poll: status.poll, autoplay: autoplay }
+  - if status.preloadable_poll
+    = react_component :poll, disabled: true, poll: ActiveModelSerializers::SerializableResource.new(status.preloadable_poll, serializer: REST::PollSerializer, scope: current_user, scope_name: :current_user).as_json do
+      = render partial: 'stream_entries/poll', locals: { status: status, poll: status.preloadable_poll, autoplay: autoplay }
   - elsif !status.media_attachments.empty?
     - if status.media_attachments.first.video?
       - video = status.media_attachments.first