From: Anton Khorev Date: Fri, 11 Aug 2023 15:54:14 +0000 (+0300) Subject: Use Bootstrap nowrap class in messages table X-Git-Tag: live~1094^2~5 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/d0cfde29962d0e3d11daa4f797cbd8419646dd2d Use Bootstrap nowrap class in messages table --- diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 1b200ded7..8e29424c2 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1132,11 +1132,6 @@ tr.turn:hover { /* Rules for messages pages */ .messages { - button[type="submit"] { - margin: auto; - white-space: nowrap; - } - .inbox-row { background: $offwhite; } @@ -1150,10 +1145,6 @@ tr.turn:hover { display: none !important; } -.inbox-sent { - white-space: nowrap; -} - .inbox-row-unread .inbox-mark-unread { display: none !important; } diff --git a/app/views/messages/_message_summary.html.erb b/app/views/messages/_message_summary.html.erb index b0f5f931b..e93b7fa90 100644 --- a/app/views/messages/_message_summary.html.erb +++ b/app/views/messages/_message_summary.html.erb @@ -1,8 +1,8 @@ "> <%= 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 %> - + <%= 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", :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 fa690e092..39ba0cf81 100644 --- a/app/views/messages/_sent_message_summary.html.erb +++ b/app/views/messages/_sent_message_summary.html.erb @@ -1,8 +1,8 @@ <%= 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 %> - + <%= 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", :form_class => "d-inline-block inbox-destroy" %>