From: Anton Khorev Date: Tue, 3 Dec 2024 07:48:59 +0000 (+0300) Subject: Truncate if necessary and set dir=auto for message usernames X-Git-Tag: live~21^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/2d36aa74dbbb29566d2a76c51455b9376bfcc8f2?ds=inline;hp=-c Truncate if necessary and set dir=auto for message usernames --- 2d36aa74dbbb29566d2a76c51455b9376bfcc8f2 diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index b179ec5ad..cf63c8f8c 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -932,8 +932,9 @@ div.secondary-actions { } } -/* Rules for block pages */ +/* Rules for tables with usernames */ +.messages-table .username, #block_list .username { max-width: 20em; } diff --git a/app/views/messages/_message_summary.html.erb b/app/views/messages/_message_summary.html.erb index a181e96e1..7213cf80d 100644 --- a/app/views/messages/_message_summary.html.erb +++ b/app/views/messages/_message_summary.html.erb @@ -1,5 +1,5 @@ <%= tag.tr(:id => "inbox-#{message.id}", :class => { "table-success" => !message.message_read? }) do %> - <%= link_to message.sender.display_name, user_path(message.sender) %> + <%= link_to message.sender.display_name, user_path(message.sender), :class => "username d-inline-block text-truncate text-wrap align-bottom", :dir => "auto" %> <%= link_to message.title, message_path(message) %> <%= l message.sent_on, :format => :friendly %> diff --git a/app/views/messages/_sent_message_summary.html.erb b/app/views/messages/_sent_message_summary.html.erb index cf10cd462..f744d028a 100644 --- a/app/views/messages/_sent_message_summary.html.erb +++ b/app/views/messages/_sent_message_summary.html.erb @@ -1,5 +1,5 @@ <%= tag.tr(:id => "outbox-#{message.id}") do %> - <%= link_to message.recipient.display_name, user_path(message.recipient) %> + <%= link_to message.recipient.display_name, user_path(message.recipient), :class => "username d-inline-block text-truncate text-wrap align-bottom", :dir => "auto" %> <%= link_to message.title, message_path(message) %> <%= l message.sent_on, :format => :friendly %>