2024-03-04 16:49:07 +00:00
|
|
|
-#
|
|
|
|
Componente Comentario
|
|
|
|
|
|
|
|
@param profile [Hash]
|
|
|
|
@param comment [Hash]
|
|
|
|
@param activity_pub [ActivityPub]
|
2024-02-27 18:05:16 +00:00
|
|
|
|
2024-03-04 16:11:17 +00:00
|
|
|
- in_reply_to = text_plain comment['inReplyTo']
|
2024-03-04 16:49:07 +00:00
|
|
|
- summary = text_plain comment['summary']
|
2024-03-04 16:11:17 +00:00
|
|
|
|
2024-02-27 18:05:16 +00:00
|
|
|
.row.no-gutters
|
|
|
|
.col-1
|
2024-03-04 17:26:41 +00:00
|
|
|
= render 'components/checkbox', id: activity_pub.id, name: 'activity_pub[]', value: activity_pub.id, data: { target: 'select-all.input' }, form: form_id
|
2024-02-27 18:05:16 +00:00
|
|
|
.col-11
|
2024-03-04 14:59:29 +00:00
|
|
|
.d-flex.flex-row.align-items-center.justify-content-between
|
|
|
|
%h4.mb-0
|
2024-03-04 16:11:17 +00:00
|
|
|
%a{ href: text_plain(comment['attributedTo']) }= text_plain profile['preferredUsername']
|
2024-03-04 14:59:29 +00:00
|
|
|
%small
|
2024-03-04 16:17:21 +00:00
|
|
|
= render 'layouts/time', time: text_plain(comment['published'])
|
2024-03-04 16:11:17 +00:00
|
|
|
- if in_reply_to.present?
|
2024-03-04 14:59:29 +00:00
|
|
|
%dl
|
|
|
|
%dt.d-inline
|
|
|
|
%small= t('.reply_to')
|
|
|
|
%dd.d-inline
|
|
|
|
%small
|
2024-03-04 16:17:21 +00:00
|
|
|
%a{ href: in_reply_to }= in_reply_to
|
|
|
|
.content
|
|
|
|
- if summary.present?
|
|
|
|
= render 'layouts/details', summary: summary, summary_class: 'h5' do
|
2024-03-04 14:59:29 +00:00
|
|
|
= sanitize comment['content']
|
|
|
|
- else
|
|
|
|
= sanitize comment['content']
|
2024-03-04 16:49:07 +00:00
|
|
|
= render 'components/comments_btn_box', activity_pub: activity_pub
|