% events.each do |event| %> <% if event.profile_comment_id %>
<%== erb :'_news_profile_comment', layout: false, locals: {profile_comment: event.profile_comment} %> <% elsif event.follow_id %>
<%= event.actioning_site.username %>
followed
<%= event.site.username %>'s
website
<%= event.created_at.ago %>
<% elsif event.site_change_id %>
<%= site.username %>.neocities.org
has been updated
<%= event.created_at.ago %>
<% event.site_change.site_change_filenames.each do |f| %>
<% if site_change_file_display_class(f) == 'html' %>
<% elsif site_change_file_display_class(f) == 'image' %>
<% elsif site_change_file_display_class(f) == 'misc' %>
<%= File.extname(f).sub('.', '') %>
<% end %>
<%= f %>
<% end %>
<% end %> <%== erb :'_news_actions', layout: false, locals: {event: event} %> <% if event.comments_dataset.count > 0 %>
<% event.comments.each do |comment| %>
<%= comment.actioning_site.username %>
<%= comment.created_at.ago %>
<%= comment.message %>
<% if current_site %>
<%= comment.site_likes?(current_site) ? 'Unlike' : 'Like' %><%= comment.comment_likes_dataset.count > 0 ? " (#{comment.comment_likes_dataset.count})" : '' %>
<% else %> <% comment_like_count = comment.comment_likes_dataset.count %> <% if comment_like_count > 0 %> <%= comment_like_count %> <%= comment_like_count == 1 ? 'like' : 'likes' %> <% end %> <% end %> <% if current_site %> <% if event.site_id == current_site.id || comment.actioning_site_id == current_site.id %>
Delete
<% end %> <% end %>
<% end %>
<% end %>
<% end %> <%== erb :'_news_templates', layout: false %>
<%= comment.message %>