feat(messages): add html formatting to messages
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
This commit is contained in:
parent
ad62cbd086
commit
9ce8524b49
27 changed files with 148 additions and 7 deletions
|
|
@ -110,7 +110,7 @@
|
|||
= f.input :recipient_tokens, :input_html => { 'data-pre' => User.where(id: @message.recipients_ids).map(&:token_attributes).to_json }
|
||||
= f.input :private, inline_label: t('.hint_private')
|
||||
= f.input :subject, input_html: {class: 'input-xxlarge'}
|
||||
= f.input :body, input_html: {class: 'input-xxlarge', rows: 13}
|
||||
= f.rich_text_area :body, input_html: {class: 'input-xxlarge', rows: 13}
|
||||
.form-actions
|
||||
= f.submit class: 'btn btn-primary'
|
||||
= link_to t('ui.or_cancel'), :back
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
- if @message.can_toggle_private?(current_user)
|
||||
= link_to t('.change_visibility'), toggle_private_message_path(@message), method: :post, class: 'btn btn-mini'
|
||||
%hr/
|
||||
%p= simple_format(h(@message.body))
|
||||
.trix-content= @message.body
|
||||
%hr/
|
||||
%p
|
||||
= link_to t('.reply'), new_message_path(:message => {:reply_to => @message.id}), class: 'btn'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
= raw @message.body
|
||||
%hr
|
||||
%ul
|
||||
- if @message.group
|
||||
%li= t '.footer_group', group: @message.group.name
|
||||
%li
|
||||
%a{href: new_message_url('message[reply_to]' => @message.id)}= t '.reply'
|
||||
%li
|
||||
%a{href: message_url(@message)}= t '.see_message_online'
|
||||
%li
|
||||
%a{href: my_profile_url}= t '.messaging_options'
|
||||
Loading…
Add table
Add a link
Reference in a new issue