diff --git a/views/_follows.erb b/views/_follows.erb index 851257e7..05b1e5dc 100644 --- a/views/_follows.erb +++ b/views/_follows.erb @@ -1,22 +1,26 @@ -<% site_followings = site.followings_dataset.count %> -<% if (!is_current_site && site_followings > 0) || is_current_site %> +<% site_followings_count = site.followings_dataset.count %> +<% if (!is_current_site && site_followings_count > 0) || is_current_site %>

<%= is_current_site ? 'Sites you follow' : 'This site follows' %>

- <% if site_followings == 0 %> + <% if site_followings_count == 0 %>

You are not following any sites yet. Add some by browsing sites or looking at your tags. <% else %> - <% site.followings_dataset.select(:site_id).all.each do |following| %> + <% site.followings_dataset.select(:site_id).limit(Site::MAX_DISPLAY_FOLLOWS).each do |following| %> <% end %> + + <% if Site::MAX_DISPLAY_FOLLOWS < site_followings_count %> + see more + <% end %> <% end %>

<% end %> -<% site_follows = site.follows_dataset.count %> -<% if (!is_current_site && site_follows > 0) || is_current_site %> +<% site_follows_count = site.follows_dataset.count %> +<% if (!is_current_site && site_follows_count > 0) || is_current_site %>

Followers

- <% if site_follows == 0 %> + <% if site_follows_count == 0 %> No followers yet. <% else %> <% site_profile_follows_actioning_ids = site.profile_follows_actioning_ids %>