2017-05-08 01:35:25 +00:00
|
|
|
:ruby
|
2017-08-24 23:41:18 +00:00
|
|
|
pinned ||= false
|
2017-05-08 01:35:25 +00:00
|
|
|
include_threads ||= false
|
|
|
|
is_predecessor ||= false
|
|
|
|
is_successor ||= false
|
|
|
|
direct_reply_id ||= false
|
|
|
|
parent_id ||= false
|
2018-04-29 23:59:42 +00:00
|
|
|
is_direct_parent = direct_reply_id == status.id
|
|
|
|
is_direct_child = parent_id == status.in_reply_to_id
|
|
|
|
centered ||= include_threads && !is_predecessor && !is_successor
|
|
|
|
h_class = microformats_h_class(status, is_predecessor, is_successor, include_threads)
|
|
|
|
style_classes = style_classes(status, is_predecessor, is_successor, include_threads)
|
|
|
|
mf_classes = microformats_classes(status, is_direct_parent, is_direct_child)
|
|
|
|
entry_classes = h_class + ' ' + mf_classes + ' ' + style_classes
|
2022-03-17 14:25:16 +00:00
|
|
|
has_reference = (current_account.nil? || current_account&.user&.setting_enable_status_reference) && status.status_references_count - (status.quote? ? 1 : 0) > 0
|
2016-03-21 11:11:27 +00:00
|
|
|
|
2022-03-17 14:25:16 +00:00
|
|
|
- if include_threads
|
2018-04-11 10:35:09 +00:00
|
|
|
- if @next_ancestor
|
|
|
|
.entry{ class: entry_classes }
|
2020-11-04 20:15:45 +00:00
|
|
|
= link_to_older ActivityPub::TagManager.instance.url_for(@next_ancestor)
|
2018-04-29 23:59:42 +00:00
|
|
|
|
2021-05-05 19:16:55 +00:00
|
|
|
= render partial: 'statuses/status', collection: @ancestors, as: :status, locals: { is_predecessor: true, direct_reply_id: status.in_reply_to_id }
|
2017-04-12 18:04:33 +00:00
|
|
|
|
|
|
|
.entry{ class: entry_classes }
|
2016-02-28 13:02:53 +00:00
|
|
|
|
2017-01-06 19:24:51 +00:00
|
|
|
- if status.reblog?
|
2018-07-28 17:25:33 +00:00
|
|
|
.status__prepend
|
|
|
|
.status__prepend-icon-wrapper
|
|
|
|
%i.status__prepend-icon.fa.fa-fw.fa-retweet
|
2017-01-06 19:24:51 +00:00
|
|
|
%span
|
2019-07-07 14:16:51 +00:00
|
|
|
= link_to ActivityPub::TagManager.instance.url_for(status.account), class: 'status__display-name muted' do
|
2018-07-28 17:25:33 +00:00
|
|
|
%bdi
|
|
|
|
%strong.emojify= display_name(status.account, custom_emojify: true)
|
2017-01-06 19:24:51 +00:00
|
|
|
= t('stream_entries.reblogged')
|
2021-02-14 09:12:05 +00:00
|
|
|
= visibility_icon status
|
2017-08-24 23:41:18 +00:00
|
|
|
- elsif pinned
|
2018-07-28 17:25:33 +00:00
|
|
|
.status__prepend
|
|
|
|
.status__prepend-icon-wrapper
|
2018-09-28 00:11:14 +00:00
|
|
|
%i.status__prepend-icon.fa.fa-fw.fa-thumb-tack
|
2017-08-24 23:41:18 +00:00
|
|
|
%span
|
|
|
|
= t('stream_entries.pinned')
|
2016-02-29 18:42:08 +00:00
|
|
|
|
2021-05-05 19:16:55 +00:00
|
|
|
= render (centered ? 'statuses/detailed_status' : 'statuses/simple_status'), status: status.proper, hide_show_thread: is_predecessor || is_successor
|
2016-09-07 23:24:26 +00:00
|
|
|
|
2017-01-06 19:24:51 +00:00
|
|
|
- if include_threads
|
2018-04-23 17:27:35 +00:00
|
|
|
- if @since_descendant_thread_id
|
|
|
|
.entry{ class: entry_classes }
|
2020-11-04 20:15:45 +00:00
|
|
|
= link_to_newer short_account_status_url(status.account.username, status, max_descendant_thread_id: @since_descendant_thread_id + 1)
|
2018-04-23 17:27:35 +00:00
|
|
|
- @descendant_threads.each do |thread|
|
2021-05-05 19:16:55 +00:00
|
|
|
= render partial: 'statuses/status', collection: thread[:statuses], as: :status, locals: { is_successor: true, parent_id: status.id }
|
2018-04-29 23:59:42 +00:00
|
|
|
|
2018-04-23 17:27:35 +00:00
|
|
|
- if thread[:next_status]
|
|
|
|
.entry{ class: entry_classes }
|
2020-11-04 20:15:45 +00:00
|
|
|
= link_to_newer ActivityPub::TagManager.instance.url_for(thread[:next_status])
|
2018-04-23 17:27:35 +00:00
|
|
|
- if @next_descendant_thread
|
|
|
|
.entry{ class: entry_classes }
|
2020-11-04 20:15:45 +00:00
|
|
|
= link_to_newer short_account_status_url(status.account.username, status, since_descendant_thread_id: @max_descendant_thread_id - 1)
|
2018-08-18 10:48:27 +00:00
|
|
|
|
|
|
|
- if include_threads && !embedded_view? && !user_signed_in?
|
|
|
|
.entry{ class: entry_classes }
|
|
|
|
= link_to new_user_session_path, class: 'load-more load-gap' do
|
|
|
|
= fa_icon 'comments'
|
|
|
|
= t('statuses.sign_in_to_participate')
|