From 624a2c9c1bce74a8e66379e898cac5366411420c Mon Sep 17 00:00:00 2001 From: Randall Floyd Date: Fri, 1 Nov 2024 11:52:56 -0400 Subject: [PATCH] Suppressing user avatar link when no avatar file specified, and adding an alt text for when one does" (#6936) --- app/views/hyrax/users/_user_row.html.erb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/views/hyrax/users/_user_row.html.erb b/app/views/hyrax/users/_user_row.html.erb index 8fe034db50..26a7672dc7 100644 --- a/app/views/hyrax/users/_user_row.html.erb +++ b/app/views/hyrax/users/_user_row.html.erb @@ -1,8 +1,11 @@ - <%= link_to hyrax.user_path(user) do %> - <%= image_tag(user.avatar.url(:thumb), width: 30) if user.avatar.file %> + + <% if user.avatar.file %> + <%= link_to hyrax.user_path(user) do %> + <%= image_tag(user.avatar.url(:thumb), width: 30, alt: user.name) %> <% end %> - + <% end %> + <%= link_to user.name, hyrax.user_path(user) %> <%= link_to user.user_key, hyrax.user_path(user) %> <%= user.department %>