2024-03-04 16:49:07 +00:00
|
|
|
-#
|
|
|
|
Componente Comentario
|
|
|
|
|
2024-03-08 16:08:24 +00:00
|
|
|
@param form [String]
|
2024-03-04 16:49:07 +00:00
|
|
|
@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-08 16:08:24 +00:00
|
|
|
= render 'components/checkbox', id: activity_pub.id, name: 'activity_pub[]', value: activity_pub.id, data: { target: 'select-all.input' }, form: form
|
2024-02-27 18:05:16 +00:00
|
|
|
.col-11
|
2024-03-14 14:57:06 +00:00
|
|
|
- cache [activity_pub, comment] do
|
|
|
|
.d-flex.flex-row.align-items-center.justify-content-between
|
|
|
|
%h4.mb-0
|
|
|
|
%a{ href: text_plain(comment['attributedTo']) }= text_plain profile['preferredUsername']
|
|
|
|
%small
|
|
|
|
= render 'layouts/time', time: text_plain(comment['published'])
|
|
|
|
- if in_reply_to.present?
|
|
|
|
%dl
|
|
|
|
%dt.d-inline
|
|
|
|
%small= t('.reply_to')
|
|
|
|
%dd.d-inline
|
|
|
|
%small
|
|
|
|
%a{ href: in_reply_to }= in_reply_to
|
|
|
|
.content
|
|
|
|
- if summary.present?
|
|
|
|
= render 'layouts/details', summary: summary, summary_class: 'h5' do
|
|
|
|
= sanitize comment['content']
|
|
|
|
- else
|
2024-03-04 14:59:29 +00:00
|
|
|
= sanitize comment['content']
|
2024-03-04 16:49:07 +00:00
|
|
|
= render 'components/comments_btn_box', activity_pub: activity_pub
|