From: Anton Khorev Date: Fri, 11 Aug 2023 15:46:51 +0000 (+0300) Subject: Put message read/unread/delete buttons in one column X-Git-Tag: live~1094^2~6 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/e290df896ecfd7c93dedab50adb27f3d146daf9c?ds=sidebyside Put message read/unread/delete buttons in one column --- diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 5a033bd0b..1b200ded7 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1147,21 +1147,15 @@ tr.turn:hover { } .inbox-row .inbox-mark-read { - display: none; + display: none !important; } .inbox-sent { white-space: nowrap; } -.inbox-mark-unread, -.inbox-mark-read, -.inbox-delete { - width: 1%; -} - .inbox-row-unread .inbox-mark-unread { - display: none; + display: none !important; } .search_form { diff --git a/app/views/messages/_message_summary.html.erb b/app/views/messages/_message_summary.html.erb index 1a4445eae..b0f5f931b 100644 --- a/app/views/messages/_message_summary.html.erb +++ b/app/views/messages/_message_summary.html.erb @@ -2,7 +2,9 @@ <%= link_to message_summary.sender.display_name, user_path(message_summary.sender) %> <%= link_to message_summary.title, message_path(message_summary) %> <%= l message_summary.sent_on, :format => :friendly %> - <%= button_to t(".unread_button"), message_mark_path(message_summary, :mark => "unread"), :remote => true, :class => "btn btn-sm btn-primary" %> - <%= button_to t(".read_button"), message_mark_path(message_summary, :mark => "read"), :remote => true, :class => "btn btn-sm btn-primary" %> - <%= button_to t(".destroy_button"), message_path(message_summary, :referer => request.fullpath), :method => :delete, :remote => true, :class => "btn btn-sm btn-danger" %> + + <%= button_to t(".unread_button"), message_mark_path(message_summary, :mark => "unread"), :remote => true, :class => "btn btn-sm btn-primary", :form_class => "d-inline-block inbox-mark-unread" %> + <%= button_to t(".read_button"), message_mark_path(message_summary, :mark => "read"), :remote => true, :class => "btn btn-sm btn-primary", :form_class => "d-inline-block inbox-mark-read" %> + <%= button_to t(".destroy_button"), message_path(message_summary, :referer => request.fullpath), :method => :delete, :remote => true, :class => "btn btn-sm btn-danger", :form_class => "d-inline-block inbox-destroy" %> + diff --git a/app/views/messages/_sent_message_summary.html.erb b/app/views/messages/_sent_message_summary.html.erb index 4d1b361b1..fa690e092 100644 --- a/app/views/messages/_sent_message_summary.html.erb +++ b/app/views/messages/_sent_message_summary.html.erb @@ -2,5 +2,7 @@ <%= link_to sent_message_summary.recipient.display_name, user_path(sent_message_summary.recipient) %> <%= link_to sent_message_summary.title, message_path(sent_message_summary) %> <%= l sent_message_summary.sent_on, :format => :friendly %> - <%= button_to t(".destroy_button"), message_path(sent_message_summary, :referer => request.fullpath), :method => :delete, :remote => true, :class => "btn btn-sm btn-danger" %> + + <%= button_to t(".destroy_button"), message_path(sent_message_summary, :referer => request.fullpath), :method => :delete, :remote => true, :class => "btn btn-sm btn-danger", :form_class => "d-inline-block inbox-destroy" %> + diff --git a/app/views/messages/inbox.html.erb b/app/views/messages/inbox.html.erb index 4f2925b14..7eba93b76 100644 --- a/app/views/messages/inbox.html.erb +++ b/app/views/messages/inbox.html.erb @@ -25,8 +25,6 @@ <%= t ".from" %> <%= t ".subject" %> <%= t ".date" %> - - diff --git a/app/views/messages/outbox.html.erb b/app/views/messages/outbox.html.erb index 0099b573d..ad5b4c28f 100644 --- a/app/views/messages/outbox.html.erb +++ b/app/views/messages/outbox.html.erb @@ -26,7 +26,6 @@ <%= t ".to" %> <%= t ".subject" %> <%= t ".date" %> -