From 5befc0658a8ea301f4fbdf0c348c725e140da5fb Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Mon, 15 Apr 2024 03:14:00 +0300 Subject: [PATCH] Wrap message action buttons in divs Avoid redefining table cell display css property using d-flex. Now d-flex is on wrapper divs. --- app/views/messages/_message_summary.html.erb | 16 +++++++++------- .../messages/_sent_message_summary.html.erb | 6 ++++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/views/messages/_message_summary.html.erb b/app/views/messages/_message_summary.html.erb index 81ef48402..02c60a752 100644 --- a/app/views/messages/_message_summary.html.erb +++ b/app/views/messages/_message_summary.html.erb @@ -2,12 +2,14 @@ <%= link_to message.sender.display_name, user_path(message.sender) %> <%= link_to message.title, message_path(message) %> <%= l message.sent_on, :format => :friendly %> - - <%= button_to t(".unread_button"), message_mark_path(message, :mark => "unread"), :class => "btn btn-sm btn-primary", :form => { :data => { :turbo => true }, :class => "inbox-mark-unread", :hidden => !message.message_read? } %> - <%= button_to t(".read_button"), message_mark_path(message, :mark => "read"), :class => "btn btn-sm btn-primary", :form => { :data => { :turbo => true }, :class => "inbox-mark-read", :hidden => message.message_read? } %> - <%= button_to t(".destroy_button"), message_path(message, :referer => request.fullpath), :method => :delete, :class => "btn btn-sm btn-danger", :form => { :data => { :turbo => true }, :class => "destroy-message" } %> - <% if message.muted? %> - <%= button_to t(".unmute_button"), message_unmute_path(message), :method => :patch, :class => "btn btn-sm btn-secondary", :form => { :data => { :turbo => true } } %> - <% end %> + +
+ <%= button_to t(".unread_button"), message_mark_path(message, :mark => "unread"), :class => "btn btn-sm btn-primary", :form => { :data => { :turbo => true }, :class => "inbox-mark-unread", :hidden => !message.message_read? } %> + <%= button_to t(".read_button"), message_mark_path(message, :mark => "read"), :class => "btn btn-sm btn-primary", :form => { :data => { :turbo => true }, :class => "inbox-mark-read", :hidden => message.message_read? } %> + <%= button_to t(".destroy_button"), message_path(message, :referer => request.fullpath), :method => :delete, :class => "btn btn-sm btn-danger", :form => { :data => { :turbo => true }, :class => "destroy-message" } %> + <% if message.muted? %> + <%= button_to t(".unmute_button"), message_unmute_path(message), :method => :patch, :class => "btn btn-sm btn-secondary", :form => { :data => { :turbo => true } } %> + <% end %> +
diff --git a/app/views/messages/_sent_message_summary.html.erb b/app/views/messages/_sent_message_summary.html.erb index 683d8d6ad..82bbafc16 100644 --- a/app/views/messages/_sent_message_summary.html.erb +++ b/app/views/messages/_sent_message_summary.html.erb @@ -2,7 +2,9 @@ <%= link_to message.recipient.display_name, user_path(message.recipient) %> <%= link_to message.title, message_path(message) %> <%= l message.sent_on, :format => :friendly %> - - <%= button_to t(".destroy_button"), message_path(message, :referer => request.fullpath), :method => :delete, :class => "btn btn-sm btn-danger", :form => { :data => { :turbo => true }, :class => "destroy-message" } %> + +
+ <%= button_to t(".destroy_button"), message_path(message, :referer => request.fullpath), :method => :delete, :class => "btn btn-sm btn-danger", :form => { :data => { :turbo => true }, :class => "destroy-message" } %> +
-- 2.39.5