From: Anton Khorev Date: Fri, 16 Aug 2024 11:41:02 +0000 (+0300) Subject: Truncate long usernames in blocks tables X-Git-Tag: live~293^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/a9b84ff4c600b394b0b18dc30f3e14958f99abb3?hp=a0013c8f56d6d0b6eaa707741ac744c8fb9f52cc Truncate long usernames in blocks tables --- diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 321b0bcb9..d551462b2 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -904,6 +904,12 @@ div.secondary-actions { } } +/* Rules for block pages */ + +#block_list .username { + max-width: 20em; +} + /* Rules for tabs inside secondary background sections */ .bg-body-secondary .nav-tabs { diff --git a/app/views/user_blocks/_block.html.erb b/app/views/user_blocks/_block.html.erb index a18d1dbdb..5444bdd5b 100644 --- a/app/views/user_blocks/_block.html.erb +++ b/app/views/user_blocks/_block.html.erb @@ -1,9 +1,9 @@ <% if show_user_name %> - <%= link_to block.user.display_name, block.user %> + <%= link_to block.user.display_name, block.user, :class => "username d-inline-block text-truncate text-wrap" %> <% end %> <% if show_creator_name %> - <%= link_to block.creator.display_name, block.creator %> + <%= link_to block.creator.display_name, block.creator, :class => "username d-inline-block text-truncate text-wrap" %> <% end %> <%= h truncate(block.reason) %> <%= h block_status(block) %>