From a9b84ff4c600b394b0b18dc30f3e14958f99abb3 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Fri, 16 Aug 2024 14:41:02 +0300 Subject: [PATCH] Truncate long usernames in blocks tables --- app/assets/stylesheets/common.scss | 6 ++++++ app/views/user_blocks/_block.html.erb | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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) %> -- 2.39.5