<%= render layout: 'discussions/message_container', locals: {user: user} do %>
<%= user.name %> <% if user.moderator_here? %> <%= t(:moderation) %> <% end %> <%= t(:time_since, time: time_ago_in_words(message.created_at)) %> <% if message.authorized? current_user %> <% if current_user&.moderator_here? %> <%= fa_icon(:check, class: 'fa-lg') %> <% if message.from_initiator? %> <%= fa_icon('question-circle', type: 'regular', class: 'fa-lg') %> <% end %> <% end %> <%= link_to fa_icon('trash-alt', type: :regular, class: 'fa-lg'), discussion_message_path(@discussion, message), method: :delete, data: { confirm: t(:are_you_sure, action: t(:destroy_message)) }, class: 'discussion-delete-message' %> <% end %> <% if should_show_approved_for?(current_user, message) %> <%= fa_icon(:check, class: 'fa-lg', 'data-toggle': 'tooltip', title: (t :approved_message)) %> <% end %>
<%= message.content_html %>
<% end %>