Sha256: 807e8e99e025a59c97cfcaf14759f37fbd552216062b716eedb83fa2af298897

Contents?: true

Size: 1.35 KB

Versions: 56

Compression:

Stored size: 1.35 KB

Contents

<% new_message ||= false %>
<% current_user_message = message.membership.user == current_user %>
<% avatar = capture do %>
  <img src="<%= membership_profile_photo_url(message.membership) %>" title="<%= message.membership.name %>" alt="<%= message.membership.name %>" class="w-10 h-10 rounded-full <%= current_user_message ? 'order-2' : 'order-1' %>">
<% end %>

<div class="flex py-3 px-2  text-gray-700 <%= message.reply? ? 'border w-full bg-gray-50 rounded-md' : 'border-b' %> <%= 'opacity-30' if new_message %>">
  <div class="mr-3 min-w-max"><%= avatar %></div>
  <div class="flex flex-col w-full">
    <div class=""><span class="uppercase font-bold text-gray-500"><%= message.user.name %></span><span class="font-extralight text-xs text-gray-400"> &bull; <%= time_ago_in_words message.created_at %> ago</span></div>
    <div class="py-2"><%= trix_sanitize message.body %></div>
    <% if message.replies.any? %>
      <div class="space-y-2 mt-2 mb-2">
        <% message.replies.oldest.each do |reply| %>
          <%= render 'account/shared/comment', message: reply %>
        <% end %>
      </div>
    <% end %>
    <% unless message.reply? %>
      <%= turbo_frame_tag "reply_#{message.id}" do %>
        <%= link_to "Reply", [:reply, :account, message], class: "font-light text-sm text-gray-400 hover:text-gray-500 pt-2" %>
      <% end %>
    <% end %>
  </div>

</div>

Version data entries

56 entries across 56 versions & 5 rubygems

Version Path
bullet_train-themes-light-1.2.10 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.2.9 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.2.8 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.2.7 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.2.6 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.2.5 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.2.4 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.2.3 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.2.2 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.2.1 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.2.0 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.0.52 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.0.51 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.0.50 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.0.49 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.0.48 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.0.47 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.0.43 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.0.44 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.0.42 app/views/themes/light/conversations/_comment.html.erb