From d1a39f74460f43b1d0547005125eee65ffe815a8 Mon Sep 17 00:00:00 2001 From: rkuehn-uofl Date: Mon, 4 Nov 2024 11:32:02 -0500 Subject: [PATCH] Updated user activity log table --- app/views/hyrax/users/_activity_log.html.erb | 24 ++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/app/views/hyrax/users/_activity_log.html.erb b/app/views/hyrax/users/_activity_log.html.erb index 183bbf4685..6c3700bb4f 100644 --- a/app/views/hyrax/users/_activity_log.html.erb +++ b/app/views/hyrax/users/_activity_log.html.erb @@ -7,17 +7,23 @@ - <% events.each do |event| %> - <% next if event[:action].blank? or event[:timestamp].blank? %> + <% valid_events = events.reject { |event| event[:action].blank? || event[:timestamp].blank? } %> + <% if valid_events.empty? %> - <%= sanitize event[:action] %> - <% time = Time.zone.at(event[:timestamp].to_i) %> - - - <%= time.to_formatted_s(:long_ordinal) %> - - + No user activity + <% else %> + <% valid_events.each do |event| %> + + <%= sanitize event[:action] %> + <% time = Time.zone.at(event[:timestamp].to_i) %> + + + <%= time.to_formatted_s(:long_ordinal) %> + + + + <% end %> <% end %>