9ce8524b49
This commit allows users to use the trix editor to send messages with basic formatting and attachements. * add active storage * add actiontext * add richtext field to messages * add imageprocessing for message attachements * add html email layout and adjust translations to use html urls
14 lines
605 B
Text
14 lines
605 B
Text
<figure class="attachment attachment--<%= blob.representable? ? "preview" : "file" %> attachment--<%= blob.filename.extension %>">
|
|
<% if blob.representable? %>
|
|
<%= image_tag blob.representation(resize_to_limit: local_assigns[:in_gallery] ? [ 800, 600 ] : [ 1024, 768 ]) %>
|
|
<% end %>
|
|
|
|
<figcaption class="attachment__caption">
|
|
<% if caption = blob.try(:caption) %>
|
|
<%= caption %>
|
|
<% else %>
|
|
<span class="attachment__name"><%= blob.filename %></span>
|
|
<span class="attachment__size"><%= number_to_human_size blob.byte_size %></span>
|
|
<% end %>
|
|
</figcaption>
|
|
</figure>
|