diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0bf1567e2..d268e1007 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1300,6 +1300,14 @@ module ApplicationHelper #added by nie # Display watcher picture + def show_more_watchers?(obj) + if User.watched_by(obj.id).count > 12 + return true + else + return false + end + end + def show_watcher_profile(obj) count = 0 html = '' @@ -1314,6 +1322,14 @@ module ApplicationHelper end #display fans picture + def show_more_fans?(obj) + if obj.watcher_users.count > 12 + return true + else + return false + end + end + def show_fans_picture(obj) html = '' count = 0 diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index f00000a31..635120f85 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -69,7 +69,7 @@ - +
@@ -86,6 +86,9 @@
<%= l(:label_user_watcher) %> + <% if show_more_watchers?(@user) %> +
<%= link_to l(:label_more), :controller => "users", :action => "user_watchlist"%>
+ <% end %>
@@ -101,6 +104,9 @@
<%= l(:label_user_fans) %> + <% if show_more_fans?(@user) %> +
<%= link_to l(:label_more), :controller => "users", :action => "user_fanslist"%>
+ <% end %>
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index bcca40ffd..dc3a7ff4c 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -137,7 +137,7 @@ software development and software crowdsourcing. -
+